resp, _ := credentialAdapterService.IssueVerifiableCredential(ctx, &v1.IssueVerifiableCredentialRequest{
CredentialType: v1.CredentialType_CREDENTIAL_TYPE_PERMANENT_RESIDENT_CARD,
Did: "did:method-name:zDIDMultibase58Encoded",
Nonce: "NonceLengthVariesByAlgo",
Signature: []byte{72,129,141,1,53,17,19,16,88,76,68},
})
fmt.Println(resp)
const issueverifiablecredentialrequest = new IssueVerifiableCredentialRequest();
issueverifiablecredentialrequest.setCredentialType(CredentialType.CREDENTIAL_TYPE_PERMANENT_RESIDENT_CARD);
issueverifiablecredentialrequest.setDid("did:method-name:zDIDMultibase58Encoded");
issueverifiablecredentialrequest.setNonce("NonceLengthVariesByAlgo");
issueverifiablecredentialrequest.setSignature(Uint8Array.from([72, 129, 141, 1, 53, 17, 19, 16, 88, 76, 68]));
service.issueVerifiableCredential(issueverifiablecredentialrequest, (err, value:IssueVerifiableCredentialResponse|null) => {
const resp = JSON.stringify(err ? err : value);
console.log("received ", resp);
})
using System;
using Grpc.Core;
using Google.Protobuf;
using System.Text;
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 issueVerifiableCredentialRequest = new IssueVerifiableCredentialRequest{
CredentialType = CredentialType.Credential_type_permanent_resident_card,
Did = "did:method-name:zDIDMultibase58Encoded",
Nonce = "NonceLengthVariesByAlgo",
Signature = ByteString.CopyFrom(new byte[]{72, 129, 141, 1, 53, 17, 19, 16, 88, 76, 68}),
};
var reply = client.IssueVerifiableCredential(issueVerifiableCredentialRequest, 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.IssueVerifiableCredentialRequest;
import vc_api.v1.Vc.IssueVerifiableCredentialResponse;
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);
IssueVerifiableCredentialRequest req_IssueVerifiableCredentialRequest =
IssueVerifiableCredentialRequest.newBuilder()
.setCredentialType(CredentialType.CREDENTIAL_TYPE_PERMANENT_RESIDENT_CARD)
.setDid("did:method-name:zDIDMultibase58Encoded")
.setNonce("NonceLengthVariesByAlgo")
.setSignature(com.google.protobuf.ByteString.copyFrom(new byte[]{72, 129, 141, 1, 53, 17, 19, 16, 88, 76, 68}))
.build();
IssueVerifiableCredentialResponse resp = blockStub.issueVerifiableCredential(req_IssueVerifiableCredentialRequest);
System.out.println(resp);
channel.shutdown();
}
}
const issueverifiablecredentialrequest = new IssueVerifiableCredentialRequest();
issueverifiablecredentialrequest.setCredentialType(CredentialType.CREDENTIAL_TYPE_UNSPECIFIED);
issueverifiablecredentialrequest.setDid("did:method-name:zDIDMultibase58Encoded");
issueverifiablecredentialrequest.setNonce("NonceLengthVariesByAlgo");
issueverifiablecredentialrequest.setSignature(Uint8Array.from([72, 129, 141, 1, 53, 17, 19, 16, 88, 76, 68]));
service.issueVerifiableCredential(issueverifiablecredentialrequest, (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::IssueVerifiableCredentialRequest;
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(
IssueVerifiableCredentialRequest{
credential_type: CredentialType::CredentialTypePermanentResidentCard as i32,
did: String::from("did:method-name:zDIDMultibase58Encoded"),
nonce: String::from("NonceLengthVariesByAlgo"),
signature: Vec::from([72, 129, 141, 1, 53, 17, 19, 16, 88, 76, 68])
});
// sending request and waiting for response
let response = client.issue_verifiable_credential(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.IssueVerifiableCredentialRequest
import vc_api.v1.Vc.IssueVerifiableCredentialResponse
fun main() {
val channel = ManagedChannelBuilder
.forAddress("vc.YOUR_SANDBOX_ID.knoxnetworks.io", 443)
.usePlaintext()
.build()
var blockStub = CredentialAdapterServiceGrpc.newBlockingStub(channel)
val req_IssueVerifiableCredentialRequest = IssueVerifiableCredentialRequest.newBuilder()
.setCredentialType(CredentialType.CREDENTIAL_TYPE_PERMANENT_RESIDENT_CARD)
.setDid("did:method-name:zDIDMultibase58Encoded")
.setNonce("NonceLengthVariesByAlgo")
.setSignature(com.google.protobuf.ByteString.copyFrom(byteArrayOf(72, 129, 141, 1, 53, 17, 19, 16, 88, 76, 68)))
.build()
val resp = blockStub.issueVerifiableCredential(req_IssueVerifiableCredentialRequest)
println(resp)
channel.shutdown()
}