resp, _ := statusListRegistryService.CreateStatusListEntry(ctx, &v1.CreateStatusListEntryRequest{
CredentialId: "https://issuer.oidp.uscis.gov/credentials/83627465",
CredentialIssuerId: "did:method-name:zDIDCredentialIssuerMultibase58Encoded",
CredentialType: "BankAccount",
Status: true,
StatusPurpose: v1.StatusPurpose_STATUS_PURPOSE_UNSPECIFIED,
})
fmt.Println(resp)
const createstatuslistentryrequest = new CreateStatusListEntryRequest();
createstatuslistentryrequest.setCredentialId("https://issuer.oidp.uscis.gov/credentials/83627465");
createstatuslistentryrequest.setCredentialIssuerId("did:method-name:zDIDCredentialIssuerMultibase58Encoded");
createstatuslistentryrequest.setCredentialType("BankAccount");
createstatuslistentryrequest.setStatus(true);
createstatuslistentryrequest.setStatusPurpose(StatusPurpose.STATUS_PURPOSE_SUSPENSION);
service.createStatusListEntry(createstatuslistentryrequest, (err, value:CreateStatusListEntryResponse|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("stat-list-reg.YOUR_SANDBOX_ID.knoxnetworks.io:443", ChannelCredentials.Insecure);
var client = new StatusListRegistryService.StatusListRegistryServiceClient(channel);
var headers = new Metadata();
var createStatusListEntryRequest = new CreateStatusListEntryRequest{
CredentialId = "https://issuer.oidp.uscis.gov/credentials/83627465",
CredentialIssuerId = "did:method-name:zDIDCredentialIssuerMultibase58Encoded",
CredentialType = "BankAccount",
Status = true,
StatusPurpose = StatusPurpose.Status_purpose_unspecified,
};
var reply = client.CreateStatusListEntry(createStatusListEntryRequest, 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.Registry.CreateStatusListEntryRequest;
import registry_api.v1.Registry.CreateStatusListEntryResponse;
import registry_api.v1.Registry.StatusPurpose;
import registry_api.v1.StatusListRegistryServiceGrpc;
public class App {
public static void main(String[] args) {
ManagedChannel channel = ManagedChannelBuilder
.forAddress("stat-list-reg.YOUR_SANDBOX_ID.knoxnetworks.io", 443)
.usePlaintext()
.build();
StatusListRegistryServiceGrpc.StatusListRegistryServiceBlockingStub blockStub =
StatusListRegistryServiceGrpc.newBlockingStub(channel);
CreateStatusListEntryRequest req_CreateStatusListEntryRequest =
CreateStatusListEntryRequest.newBuilder()
.setCredentialId("https://issuer.oidp.uscis.gov/credentials/83627465")
.setCredentialIssuerId("did:method-name:zDIDCredentialIssuerMultibase58Encoded")
.setCredentialType("BankAccount")
.setStatus(true)
.setStatusPurpose(StatusPurpose.STATUS_PURPOSE_UNSPECIFIED)
.build();
CreateStatusListEntryResponse resp = blockStub.createStatusListEntry(req_CreateStatusListEntryRequest);
System.out.println(resp);
channel.shutdown();
}
}
const createstatuslistentryrequest = new CreateStatusListEntryRequest();
createstatuslistentryrequest.setCredentialId("https://issuer.oidp.uscis.gov/credentials/83627465");
createstatuslistentryrequest.setCredentialIssuerId("did:method-name:zDIDCredentialIssuerMultibase58Encoded");
createstatuslistentryrequest.setCredentialType("BankAccount");
createstatuslistentryrequest.setStatus(true);
createstatuslistentryrequest.setStatusPurpose(StatusPurpose.STATUS_PURPOSE_SUSPENSION);
service.createStatusListEntry(createstatuslistentryrequest, (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::status_list_registry_service_client::StatusListRegistryServiceClient;
use grpc-sdks::registry_api::v1::StatusPurpose;
use grpc-sdks::registry_api::v1::CreateStatusListEntryRequest;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let channel = Channel::from_static("stat-list-reg.YOUR_SANDBOX_ID.knoxnetworks.io")
.connect()
.await?;
let mut client = StatusListRegistryServiceClient::new(channel);
let request = tonic::Request::new(
CreateStatusListEntryRequest{
credential_id: String::from("https://issuer.oidp.uscis.gov/credentials/83627465"),
credential_issuer_id: String::from("did:method-name:zDIDCredentialIssuerMultibase58Encoded"),
credential_type: String::from("BankAccount"),
status: true,
status_purpose: StatusPurpose::StatusPurposeUnspecified as i32
});
// sending request and waiting for response
let response = client.create_status_list_entry(request).await?.into_inner();
println!("RESPONSE={:?}", response);
Ok(())
}
package app
import io.grpc.ManagedChannelBuilder
import registry_api.v1.Registry.CreateStatusListEntryRequest
import registry_api.v1.Registry.CreateStatusListEntryResponse
import registry_api.v1.Registry.StatusPurpose
import registry_api.v1.StatusListRegistryServiceGrpc
fun main() {
val channel = ManagedChannelBuilder
.forAddress("stat-list-reg.YOUR_SANDBOX_ID.knoxnetworks.io", 443)
.usePlaintext()
.build()
var blockStub = StatusListRegistryServiceGrpc.newBlockingStub(channel)
val req_CreateStatusListEntryRequest = CreateStatusListEntryRequest.newBuilder()
.setCredentialId("https://issuer.oidp.uscis.gov/credentials/83627465")
.setCredentialIssuerId("did:method-name:zDIDCredentialIssuerMultibase58Encoded")
.setCredentialType("BankAccount")
.setStatus(true)
.setStatusPurpose(StatusPurpose.STATUS_PURPOSE_UNSPECIFIED)
.build()
val resp = blockStub.createStatusListEntry(req_CreateStatusListEntryRequest)
println(resp)
channel.shutdown()
}