RequestPresentation

Returns the JSON Verifiable Presentation containing the PII of the subject.

rpc RequestPresentation

wallet_api.v1.RequestPresentation

Returns the JSON Verifiable Presentation containing the PII of the subject.

requests RequestPresentationRequest

wallet_api.v1.RequestPresentationRequest

FieldTypeDescription
didstringW3C Decentralized Identifier (DID) of the wallet.
credential_typestringType of Verifiable Credential - e.g., “BankAccount“, “PermanentResidentCard“.
api_keystringAPI key given to the wallet owner at the time of owner creation.
resp, _ := custodialWallet.RequestPresentation(ctx, &v1.RequestPresentationRequest{
  ApiKey: "API_KEY",
  CredentialType: "CREDENTIAL_TYPE",
  Did: "did:method-name:zDIDMultibase58Encoded",
})
fmt.Println(resp)
const requestpresentationrequest = new RequestPresentationRequest();
requestpresentationrequest.setApiKey("API_KEY");
requestpresentationrequest.setCredentialType("CREDENTIAL_TYPE");
requestpresentationrequest.setDid("did:method-name:zDIDMultibase58Encoded");

service.requestPresentation(requestpresentationrequest, (err, value:RequestPresentationResponse|null) => {
    const resp = JSON.stringify(err ? err : value);
    console.log("received ", resp);
})
using System;
using Grpc.Core;
using WalletApi.V1;

namespace main
{
  class Program
  {
    static void Main(string[] args)
    {
      Channel channel = new Channel("wallet.YOUR_SANDBOX_ID.knoxnetworks.io:443", ChannelCredentials.Insecure); 
      var client = new CustodialWallet.CustodialWalletClient(channel); 
      var headers = new Metadata();
      var requestPresentationRequest = new RequestPresentationRequest{
        ApiKey = "API_KEY",
        CredentialType = "CREDENTIAL_TYPE",
        Did = "did:method-name:zDIDMultibase58Encoded",
      };
      var reply = client.RequestPresentation(requestPresentationRequest, headers);
      Console.WriteLine("Response: " + reply);
      channel.ShutdownAsync().Wait();
    }
  }
}
package demo;

import io.grpc.Channel;
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
import wallet_api.v1.Wallet.RequestPresentationRequest;
import wallet_api.v1.Wallet.RequestPresentationResponse;
import wallet_api.v1.CustodialWalletGrpc;

public class App {
  public static void main(String[] args) {
    ManagedChannel channel = ManagedChannelBuilder
      .forAddress("wallet.YOUR_SANDBOX_ID.knoxnetworks.io", 443)
      .usePlaintext()
      .build();
    CustodialWalletGrpc.CustodialWalletBlockingStub blockStub =
        CustodialWalletGrpc.newBlockingStub(channel);
    
    RequestPresentationRequest req_RequestPresentationRequest =
        RequestPresentationRequest.newBuilder()
          .setApiKey("API_KEY")
          .setCredentialType("CREDENTIAL_TYPE")
          .setDid("did:method-name:zDIDMultibase58Encoded")
          .build();
    RequestPresentationResponse resp = blockStub.requestPresentation(req_RequestPresentationRequest);
    System.out.println(resp);
    channel.shutdown();
  }
}
const requestpresentationrequest = new RequestPresentationRequest();
requestpresentationrequest.setApiKey("API_KEY");
requestpresentationrequest.setCredentialType("CREDENTIAL_TYPE");
requestpresentationrequest.setDid("did:method-name:zDIDMultibase58Encoded");

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

use grpc-sdks::wallet_api::v1::wallet_service_client::CustodialWalletClient;
use grpc-sdks::wallet_api::v1::RequestPresentationRequest;

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

  let request = tonic::Request::new(
    RequestPresentationRequest{
      api_key: String::from("API_KEY"),
      credential_type: String::from("CREDENTIAL_TYPE"),
      did: String::from("did:method-name:zDIDMultibase58Encoded")
    });
// sending request and waiting for response
  let response = client.request_presentation(request).await?.into_inner();
  println!("RESPONSE={:?}", response);
  Ok(())
}
package app

import io.grpc.ManagedChannelBuilder
import wallet_api.v1.Wallet.RequestPresentationRequest
import wallet_api.v1.Wallet.RequestPresentationResponse
import wallet_api.v1.CustodialWalletGrpc

fun main() {
    val channel = ManagedChannelBuilder
            .forAddress("wallet.YOUR_SANDBOX_ID.knoxnetworks.io", 443)
            .usePlaintext()
            .build()
    var blockStub = CustodialWalletGrpc.newBlockingStub(channel)
    
    val req_RequestPresentationRequest = RequestPresentationRequest.newBuilder()
          .setApiKey("API_KEY")
          .setCredentialType("CREDENTIAL_TYPE")
          .setDid("did:method-name:zDIDMultibase58Encoded")
          .build()
    val resp = blockStub.requestPresentation(req_RequestPresentationRequest)
    println(resp)
    channel.shutdown()
}


returns RequestPresentationResponse

wallet_api.v1.RequestPresentationResponse

FieldTypeDescription
presentationstringThe JSON Verifiable Presentation containing the PII of the subject.
{
  "presentation": "PRESENTATION"
}