UpdateVerifiableCredentialStatus

Called by the VC issuer to revoke / suspend a credential.

rpc UpdateVerifiableCredentialStatus

vc_api.v1.UpdateVerifiableCredentialStatus

Called by the VC issuer to revoke / suspend a credential.

requests UpdateVerifiableCredentialStatusRequest

vc_api.v1.UpdateVerifiableCredentialStatusRequest

FieldTypeDescription
credential_typeCredentialType enum
FieldNumberDescription
CREDENTIAL_TYPE_UNSPECIFIED0Type of the verifiable credential being revoked.Credential Type Unspecified.
CREDENTIAL_TYPE_PERMANENT_RESIDENT_CARD1Type of the verifiable credential being revoked.Credential Type Permanent Resident Card.
CREDENTIAL_TYPE_BANK_CARD2Type of the verifiable credential being revoked.Credential Type Bank Card.
CREDENTIAL_TYPE_BANK_ACCOUNT3Type of the verifiable credential being revoked.Credential Type Bank Account.
didstringW3C Decentralized Identifier (DID) of the credential.
update_typeUpdateVerifiableCredentialStatusType enum
FieldNumberDescription
UPDATE_VERIFIABLE_CREDENTIAL_STATUS_TYPE_UNSPECIFIED0Type of the revocation.Update Type to VC Status is Unspecified.
UPDATE_VERIFIABLE_CREDENTIAL_STATUS_TYPE_REVOCATION1Type of the revocation.Update Type to VC Status is Revocation.
UPDATE_VERIFIABLE_CREDENTIAL_STATUS_TYPE_SUSPENSION2Type of the revocation.Update Type to VC Status is Suspension.
resp, _ := credentialAdapterService.UpdateVerifiableCredentialStatus(ctx, &v1.UpdateVerifiableCredentialStatusRequest{
  CredentialType: v1.CredentialType_CREDENTIAL_TYPE_PERMANENT_RESIDENT_CARD,
  Did: "did:method-name:zDIDMultibase58Encoded",
  UpdateType: v1.UpdateVerifiableCredentialStatusType_UPDATE_VERIFIABLE_CREDENTIAL_STATUS_TYPE_REVOCATION,
})
fmt.Println(resp)
const updateverifiablecredentialstatusrequest = new UpdateVerifiableCredentialStatusRequest();
updateverifiablecredentialstatusrequest.setCredentialType(CredentialType.CREDENTIAL_TYPE_BANK_ACCOUNT);
updateverifiablecredentialstatusrequest.setDid("did:method-name:zDIDMultibase58Encoded");
updateverifiablecredentialstatusrequest.setUpdateType(UpdateVerifiableCredentialStatusType.UPDATE_VERIFIABLE_CREDENTIAL_STATUS_TYPE_UNSPECIFIED);

service.updateVerifiableCredentialStatus(updateverifiablecredentialstatusrequest, (err, value:UpdateVerifiableCredentialStatusResponse|null) => {
    const resp = JSON.stringify(err ? err : value);
    console.log("received ", resp);
})
using System;
using Grpc.Core;
using VcApi.V1;

namespace main
{
  class Program
  {
    static void Main(string[] args)
    {
      Channel channel = new Channel("vc.YOUR_SANDBOX_ID.knoxnetworks.io:443", ChannelCredentials.Insecure); 
      var client = new CredentialAdapterService.CredentialAdapterServiceClient(channel); 
      var headers = new Metadata();
      var updateVerifiableCredentialStatusRequest = new UpdateVerifiableCredentialStatusRequest{
        CredentialType = CredentialType.Credential_type_permanent_resident_card,
        Did = "did:method-name:zDIDMultibase58Encoded",
        UpdateType = UpdateVerifiableCredentialStatusType.Update_verifiable_credential_status_type_revocation,
      };
      var reply = client.UpdateVerifiableCredentialStatus(updateVerifiableCredentialStatusRequest, headers);
      Console.WriteLine("Response: " + reply);
      channel.ShutdownAsync().Wait();
    }
  }
}
package demo;

import io.grpc.Channel;
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
import vc_api.v1.CredentialAdapterServiceGrpc;
import vc_api.v1.Vc.CredentialType;
import vc_api.v1.Vc.UpdateVerifiableCredentialStatusRequest;
import vc_api.v1.Vc.UpdateVerifiableCredentialStatusResponse;
import vc_api.v1.Vc.UpdateVerifiableCredentialStatusType;

public class App {
  public static void main(String[] args) {
    ManagedChannel channel = ManagedChannelBuilder
      .forAddress("vc.YOUR_SANDBOX_ID.knoxnetworks.io", 443)
      .usePlaintext()
      .build();
    CredentialAdapterServiceGrpc.CredentialAdapterServiceBlockingStub blockStub =
        CredentialAdapterServiceGrpc.newBlockingStub(channel);
    
    UpdateVerifiableCredentialStatusRequest req_UpdateVerifiableCredentialStatusRequest =
        UpdateVerifiableCredentialStatusRequest.newBuilder()
          .setCredentialType(CredentialType.CREDENTIAL_TYPE_PERMANENT_RESIDENT_CARD)
          .setDid("did:method-name:zDIDMultibase58Encoded")
          .setUpdateType(UpdateVerifiableCredentialStatusType.UPDATE_VERIFIABLE_CREDENTIAL_STATUS_TYPE_REVOCATION)
          .build();
    UpdateVerifiableCredentialStatusResponse resp = blockStub.updateVerifiableCredentialStatus(req_UpdateVerifiableCredentialStatusRequest);
    System.out.println(resp);
    channel.shutdown();
  }
}
const updateverifiablecredentialstatusrequest = new UpdateVerifiableCredentialStatusRequest();
updateverifiablecredentialstatusrequest.setCredentialType(CredentialType.CREDENTIAL_TYPE_BANK_CARD);
updateverifiablecredentialstatusrequest.setDid("did:method-name:zDIDMultibase58Encoded");
updateverifiablecredentialstatusrequest.setUpdateType(UpdateVerifiableCredentialStatusType.UPDATE_VERIFIABLE_CREDENTIAL_STATUS_TYPE_REVOCATION);

service.updateVerifiableCredentialStatus(updateverifiablecredentialstatusrequest, (err, value) => {
    const resp = JSON.stringify(err ? err : value);
    console.log("received ", resp);
})
extern crate grpc-sdks;
use tonic::transport::Channel;

use grpc-sdks::vc_api::v1::UpdateVerifiableCredentialStatusType;
use grpc-sdks::vc_api::v1::UpdateVerifiableCredentialStatusRequest;
use grpc-sdks::vc_api::v1::credential_adapter_service_client::CredentialAdapterServiceClient;
use grpc-sdks::vc_api::v1::CredentialType;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
  let channel = Channel::from_static("vc.YOUR_SANDBOX_ID.knoxnetworks.io")
    .connect()
    .await?;
  let mut client = CredentialAdapterServiceClient::new(channel); 

  let request = tonic::Request::new(
    UpdateVerifiableCredentialStatusRequest{
      credential_type: CredentialType::CredentialTypePermanentResidentCard as i32,
      did: String::from("did:method-name:zDIDMultibase58Encoded"),
      update_type: UpdateVerifiableCredentialStatusType::UpdateVerifiableCredentialStatusTypeRevocation as i32
    });
// sending request and waiting for response
  let response = client.update_verifiable_credential_status(request).await?.into_inner();
  println!("RESPONSE={:?}", response);
  Ok(())
}
package app

import io.grpc.ManagedChannelBuilder
import vc_api.v1.CredentialAdapterServiceGrpc
import vc_api.v1.Vc.CredentialType
import vc_api.v1.Vc.UpdateVerifiableCredentialStatusRequest
import vc_api.v1.Vc.UpdateVerifiableCredentialStatusResponse
import vc_api.v1.Vc.UpdateVerifiableCredentialStatusType

fun main() {
    val channel = ManagedChannelBuilder
            .forAddress("vc.YOUR_SANDBOX_ID.knoxnetworks.io", 443)
            .usePlaintext()
            .build()
    var blockStub = CredentialAdapterServiceGrpc.newBlockingStub(channel)
    
    val req_UpdateVerifiableCredentialStatusRequest = UpdateVerifiableCredentialStatusRequest.newBuilder()
          .setCredentialType(CredentialType.CREDENTIAL_TYPE_PERMANENT_RESIDENT_CARD)
          .setDid("did:method-name:zDIDMultibase58Encoded")
          .setUpdateType(UpdateVerifiableCredentialStatusType.UPDATE_VERIFIABLE_CREDENTIAL_STATUS_TYPE_REVOCATION)
          .build()
    val resp = blockStub.updateVerifiableCredentialStatus(req_UpdateVerifiableCredentialStatusRequest)
    println(resp)
    channel.shutdown()
}


returns UpdateVerifiableCredentialStatusResponse

vc_api.v1.UpdateVerifiableCredentialStatusResponse

{}