CreateIssuanceChallenge

Called by the holder to the VC issuer to initiate the challenge needed for credential issuance.

rpc CreateIssuanceChallenge

vc_api.v1.CreateIssuanceChallenge

Called by the holder to the VC issuer to initiate the challenge needed for credential issuance.

requests CreateIssuanceChallengeRequest

vc_api.v1.CreateIssuanceChallengeRequest

FieldTypeDescription
credential_typeCredentialType enum
FieldNumberDescription
CREDENTIAL_TYPE_UNSPECIFIED0Type of the verifiable credential being requested for issuance.Credential Type Unspecified.
CREDENTIAL_TYPE_PERMANENT_RESIDENT_CARD1Type of the verifiable credential being requested for issuance.Credential Type Permanent Resident Card.
CREDENTIAL_TYPE_BANK_CARD2Type of the verifiable credential being requested for issuance.Credential Type Bank Card.
CREDENTIAL_TYPE_BANK_ACCOUNT3Type of the verifiable credential being requested for issuance.Credential Type Bank Account.
didstringW3C Decentralized Identifier (DID) of the wallet.
resp, _ := credentialAdapterService.CreateIssuanceChallenge(ctx, &v1.CreateIssuanceChallengeRequest{
  CredentialType: v1.CredentialType_CREDENTIAL_TYPE_PERMANENT_RESIDENT_CARD,
  Did: "did:method-name:zDIDMultibase58Encoded",
})
fmt.Println(resp)
const createissuancechallengerequest = new CreateIssuanceChallengeRequest();
createissuancechallengerequest.setCredentialType(CredentialType.CREDENTIAL_TYPE_UNSPECIFIED);
createissuancechallengerequest.setDid("did:method-name:zDIDMultibase58Encoded");

service.createIssuanceChallenge(createissuancechallengerequest, (err, value:CreateIssuanceChallengeResponse|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 createIssuanceChallengeRequest = new CreateIssuanceChallengeRequest{
        CredentialType = CredentialType.Credential_type_permanent_resident_card,
        Did = "did:method-name:zDIDMultibase58Encoded",
      };
      var reply = client.CreateIssuanceChallenge(createIssuanceChallengeRequest, 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.CreateIssuanceChallengeRequest;
import vc_api.v1.Vc.CreateIssuanceChallengeResponse;
import vc_api.v1.Vc.CredentialType;

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);
    
    CreateIssuanceChallengeRequest req_CreateIssuanceChallengeRequest =
        CreateIssuanceChallengeRequest.newBuilder()
          .setCredentialType(CredentialType.CREDENTIAL_TYPE_PERMANENT_RESIDENT_CARD)
          .setDid("did:method-name:zDIDMultibase58Encoded")
          .build();
    CreateIssuanceChallengeResponse resp = blockStub.createIssuanceChallenge(req_CreateIssuanceChallengeRequest);
    System.out.println(resp);
    channel.shutdown();
  }
}
const createissuancechallengerequest = new CreateIssuanceChallengeRequest();
createissuancechallengerequest.setCredentialType(CredentialType.CREDENTIAL_TYPE_UNSPECIFIED);
createissuancechallengerequest.setDid("did:method-name:zDIDMultibase58Encoded");

service.createIssuanceChallenge(createissuancechallengerequest, (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::credential_adapter_service_client::CredentialAdapterServiceClient;
use grpc-sdks::vc_api::v1::CredentialType;
use grpc-sdks::vc_api::v1::CreateIssuanceChallengeRequest;

#[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(
    CreateIssuanceChallengeRequest{
      credential_type: CredentialType::CredentialTypePermanentResidentCard as i32,
      did: String::from("did:method-name:zDIDMultibase58Encoded")
    });
// sending request and waiting for response
  let response = client.create_issuance_challenge(request).await?.into_inner();
  println!("RESPONSE={:?}", response);
  Ok(())
}
package app

import io.grpc.ManagedChannelBuilder
import vc_api.v1.CredentialAdapterServiceGrpc
import vc_api.v1.Vc.CreateIssuanceChallengeRequest
import vc_api.v1.Vc.CreateIssuanceChallengeResponse
import vc_api.v1.Vc.CredentialType

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


returns CreateIssuanceChallengeResponse

vc_api.v1.CreateIssuanceChallengeResponse

FieldTypeDescription
noncestringValue used for the challenge.
endpointstringUsed by browser to construct URL for QR generation.
credential_typeCredentialType enum
FieldNumberDescription
CREDENTIAL_TYPE_UNSPECIFIED0Type of the verifiable credential being requested for issuance.Credential Type Unspecified.
CREDENTIAL_TYPE_PERMANENT_RESIDENT_CARD1Type of the verifiable credential being requested for issuance.Credential Type Permanent Resident Card.
CREDENTIAL_TYPE_BANK_CARD2Type of the verifiable credential being requested for issuance.Credential Type Bank Card.
CREDENTIAL_TYPE_BANK_ACCOUNT3Type of the verifiable credential being requested for issuance.Credential Type Bank Account.
{
  "nonce": "NonceLengthVariesByAlgo",
  "endpoint": "QR_URL_ENDPOINT",
  "credential_type": 1
}