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()
}