Updates a verifiable credential Issuer
rpc UpdateCredentialIssuer
UpdateCredentialIssuer
registry_api.v1.UpdateCredentialIssuer
registry_api.v1.UpdateCredentialIssuer
Updates a verifiable credential Issuer
requests UpdateCredentialIssuerRequest
UpdateCredentialIssuerRequest
registry_api.v1.UpdateCredentialIssuerRequest
registry_api.v1.UpdateCredentialIssuerRequest
Field | Type | Description |
---|---|---|
credential_issuer | CredentialIssuer | Updated Credential Issuer. |
resp, _ := credentialIssuerRegistryService.UpdateCredentialIssuer(ctx, &v1.UpdateCredentialIssuerRequest{
CredentialIssuer: &v1.CredentialIssuer{
Email: "[email protected]",
IssuerDid: "did:method-name:zDIDIssuerMultibase58Encoded",
IssuerName: "ISSUER_NAME",
PostalAddress: &v1.PostalAddress{
City: "Anytown",
Country: "United States",
PostalCode: "10101",
State: "AL",
Street: "123 Sesame Street",
},
Status: v1.IssuerStatus_ISSUER_STATUS_UNSPECIFIED,
Website: "google.com",
},
})
fmt.Println(resp)
const postaladdress = new PostalAddress();
postaladdress.setCity("Anytown");
postaladdress.setCountry("United States");
postaladdress.setPostalCode("10101");
postaladdress.setState("AL");
postaladdress.setStreet("123 Sesame Street");
const credentialissuer = new CredentialIssuer();
credentialissuer.setEmail("[email protected]");
credentialissuer.setIssuerDid("did:method-name:zDIDIssuerMultibase58Encoded");
credentialissuer.setIssuerName("ISSUER_NAME");
credentialissuer.setPostalAddress(postaladdress);
credentialissuer.setStatus(IssuerStatus.ISSUER_STATUS_SUSPENDED);
credentialissuer.setWebsite("google.com");
const updatecredentialissuerrequest = new UpdateCredentialIssuerRequest();
updatecredentialissuerrequest.setCredentialIssuer(credentialissuer);
service.updateCredentialIssuer(updatecredentialissuerrequest, (err, value:UpdateCredentialIssuerResponse|null) => {
const resp = JSON.stringify(err ? err : value);
console.log("received ", resp);
})
using System;
using Grpc.Core;
using RegistryApi.V1;
namespace main
{
class Program
{
static void Main(string[] args)
{
Channel channel = new Channel("cred-reg-service.YOUR_SANDBOX_ID.knoxnetworks.io:443", ChannelCredentials.Insecure);
var client = new CredentialIssuerRegistryService.CredentialIssuerRegistryServiceClient(channel);
var headers = new Metadata();
var postalAddress = new PostalAddress{
City = "Anytown",
Country = "United States",
PostalCode = "10101",
State = "AL",
Street = "123 Sesame Street",
};
var credentialIssuer = new CredentialIssuer{
Email = "[email protected]",
IssuerDid = "did:method-name:zDIDIssuerMultibase58Encoded",
IssuerName = "ISSUER_NAME",
PostalAddress = postalAddress,
Status = IssuerStatus.Issuer_status_unspecified,
Website = "google.com",
};
var updateCredentialIssuerRequest = new UpdateCredentialIssuerRequest{
CredentialIssuer = credentialIssuer,
};
var reply = client.UpdateCredentialIssuer(updateCredentialIssuerRequest, headers);
Console.WriteLine("Response: " + reply);
channel.ShutdownAsync().Wait();
}
}
}
package demo;
import io.grpc.Channel;
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
import registry_api.v1.CredentialIssuerRegistryServiceGrpc;
import registry_api.v1.Registry.CredentialIssuer;
import registry_api.v1.Registry.IssuerStatus;
import registry_api.v1.Registry.PostalAddress;
import registry_api.v1.Registry.UpdateCredentialIssuerRequest;
import registry_api.v1.Registry.UpdateCredentialIssuerResponse;
public class App {
public static void main(String[] args) {
ManagedChannel channel = ManagedChannelBuilder
.forAddress("cred-reg-service.YOUR_SANDBOX_ID.knoxnetworks.io", 443)
.usePlaintext()
.build();
CredentialIssuerRegistryServiceGrpc.CredentialIssuerRegistryServiceBlockingStub blockStub =
CredentialIssuerRegistryServiceGrpc.newBlockingStub(channel);
PostalAddress req_PostalAddress =
PostalAddress.newBuilder()
.setCity("Anytown")
.setCountry("United States")
.setPostalCode("10101")
.setState("AL")
.setStreet("123 Sesame Street")
.build();
CredentialIssuer req_CredentialIssuer =
CredentialIssuer.newBuilder()
.setEmail("[email protected]")
.setIssuerDid("did:method-name:zDIDIssuerMultibase58Encoded")
.setIssuerName("ISSUER_NAME")
.setPostalAddress(req_PostalAddress)
.setStatus(IssuerStatus.ISSUER_STATUS_UNSPECIFIED)
.setWebsite("google.com")
.build();
UpdateCredentialIssuerRequest req_UpdateCredentialIssuerRequest =
UpdateCredentialIssuerRequest.newBuilder()
.setCredentialIssuer(req_CredentialIssuer)
.build();
UpdateCredentialIssuerResponse resp = blockStub.updateCredentialIssuer(req_UpdateCredentialIssuerRequest);
System.out.println(resp);
channel.shutdown();
}
}
const postaladdress = new PostalAddress();
postaladdress.setCity("Anytown");
postaladdress.setCountry("United States");
postaladdress.setPostalCode("10101");
postaladdress.setState("AL");
postaladdress.setStreet("123 Sesame Street");
const credentialissuer = new CredentialIssuer();
credentialissuer.setEmail("[email protected]");
credentialissuer.setIssuerDid("did:method-name:zDIDIssuerMultibase58Encoded");
credentialissuer.setIssuerName("ISSUER_NAME");
credentialissuer.setPostalAddress(postaladdress);
credentialissuer.setStatus(IssuerStatus.ISSUER_STATUS_SUSPENDED);
credentialissuer.setWebsite("google.com");
const updatecredentialissuerrequest = new UpdateCredentialIssuerRequest();
updatecredentialissuerrequest.setCredentialIssuer(credentialissuer);
service.updateCredentialIssuer(updatecredentialissuerrequest, (err, value) => {
const resp = JSON.stringify(err ? err : value);
console.log("received ", resp);
})
extern crate grpc-sdks;
use tonic::transport::Channel;
use grpc-sdks::registry_api::v1::CredentialIssuer;
use grpc-sdks::registry_api::v1::PostalAddress;
use grpc-sdks::registry_api::v1::IssuerStatus;
use grpc-sdks::registry_api::v1::UpdateCredentialIssuerRequest;
use grpc-sdks::registry_api::v1::credential_issuer_registry_service_client::CredentialIssuerRegistryServiceClient;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let channel = Channel::from_static("cred-reg-service.YOUR_SANDBOX_ID.knoxnetworks.io")
.connect()
.await?;
let mut client = CredentialIssuerRegistryServiceClient::new(channel);
let request = tonic::Request::new(
UpdateCredentialIssuerRequest{
credential_issuer: Some(CredentialIssuer{
email: String::from("[email protected]"),
issuer_did: String::from("did:method-name:zDIDIssuerMultibase58Encoded"),
issuer_name: String::from("ISSUER_NAME"),
postal_address: Some(PostalAddress{
city: String::from("Anytown"),
country: String::from("United States"),
postal_code: String::from("10101"),
state: String::from("AL"),
street: String::from("123 Sesame Street")
}),
status: IssuerStatus::IssuerStatusUnspecified as i32,
website: String::from("google.com")
})
});
// sending request and waiting for response
let response = client.update_credential_issuer(request).await?.into_inner();
println!("RESPONSE={:?}", response);
Ok(())
}
package app
import io.grpc.ManagedChannelBuilder
import registry_api.v1.CredentialIssuerRegistryServiceGrpc
import registry_api.v1.Registry.CredentialIssuer
import registry_api.v1.Registry.IssuerStatus
import registry_api.v1.Registry.PostalAddress
import registry_api.v1.Registry.UpdateCredentialIssuerRequest
import registry_api.v1.Registry.UpdateCredentialIssuerResponse
fun main() {
val channel = ManagedChannelBuilder
.forAddress("cred-reg-service.YOUR_SANDBOX_ID.knoxnetworks.io", 443)
.usePlaintext()
.build()
var blockStub = CredentialIssuerRegistryServiceGrpc.newBlockingStub(channel)
val req_PostalAddress = PostalAddress.newBuilder()
.setCity("Anytown")
.setCountry("United States")
.setPostalCode("10101")
.setState("AL")
.setStreet("123 Sesame Street")
.build()
val req_CredentialIssuer = CredentialIssuer.newBuilder()
.setEmail("[email protected]")
.setIssuerDid("did:method-name:zDIDIssuerMultibase58Encoded")
.setIssuerName("ISSUER_NAME")
.setPostalAddress(req_PostalAddress)
.setStatus(IssuerStatus.ISSUER_STATUS_UNSPECIFIED)
.setWebsite("google.com")
.build()
val req_UpdateCredentialIssuerRequest = UpdateCredentialIssuerRequest.newBuilder()
.setCredentialIssuer(req_CredentialIssuer)
.build()
val resp = blockStub.updateCredentialIssuer(req_UpdateCredentialIssuerRequest)
println(resp)
channel.shutdown()
}
returns UpdateCredentialIssuerResponse
UpdateCredentialIssuerResponse
registry_api.v1.UpdateCredentialIssuerResponse
registry_api.v1.UpdateCredentialIssuerResponse
Field | Type | Description |
---|---|---|
ok | bool |
{
"ok": true
}