GetContractTtl

Get details of a specific Contract by UETR in RDF 1.1 Turtle format.

rpc GetContractTtl

asset_controller_api.v1.GetContractTtl

Get details of a specific Contract by UETR in RDF 1.1 Turtle format.

requests GetContractTtlRequest

asset_controller.GetContractTtlRequest

FieldTypeDescription
uetrstringA Unique End-to-end Transaction Reference, string of 36 unique characters.
verifier optionalstringWallet verifier.
resp, _ := assetcontroller.GetContractTtl(ctx, &v1.GetContractTtlRequest{
  Uetr: "UETR",
  Verifier: "zWalletPublicKey",
})
fmt.Println(resp)
const getcontractttlrequest = new GetContractTtlRequest();
getcontractttlrequest.setUetr("UETR");
getcontractttlrequest.setVerifier("zWalletPublicKey");

service.getContractTtl(getcontractttlrequest, (err, value:GetContractTtlResponse|null) => {
    const resp = JSON.stringify(err ? err : value);
    console.log("received ", resp);
})
using System;
using Grpc.Core;
using AssetControllerApi.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 AssetController.AssetControllerClient(channel); 
      var headers = new Metadata();
      var getContractTtlRequest = new GetContractTtlRequest{
        Uetr = "UETR",
        Verifier = "zWalletPublicKey",
      };
      var reply = client.GetContractTtl(getContractTtlRequest, headers);
      Console.WriteLine("Response: " + reply);
      channel.ShutdownAsync().Wait();
    }
  }
}
package demo;

import io.grpc.Channel;
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
import asset_controller_api.v1.AssetController.GetContractTtlRequest;
import asset_controller_api.v1.AssetController.GetContractTtlResponse;
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);
    
    GetContractTtlRequest req_GetContractTtlRequest =
        GetContractTtlRequest.newBuilder()
          .setUetr("Uetr")
          .setVerifier("zWalletPublicKey")
          .build();
    GetContractTtlResponse resp = blockStub.getContractTtl(req_GetContractTtlRequest);
    System.out.println(resp);
    channel.shutdown();
  }
}
const getcontractttlrequest = new GetContractTtlRequest();
getcontractttlrequest.setUetr("UETR");
getcontractttlrequest.setVerifier("zWalletPublicKey");

service.getContractDetail(getcontractttlrequest, (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::asset_controller_api::v1::GetContractTtlRequest;

#[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(
    GetContractTtlRequest{
      uetr: String::from("UETR"),
      verifier: String::from("zWalletPublicKey")
    });
// sending request and waiting for response
  let response = client.get_contract_ttl(request).await?.into_inner();
  println!("RESPONSE={:?}", response);
  Ok(())
}
package app

import io.grpc.ManagedChannelBuilder
import asset_controller_api.v1.AssetController.GetContractTtlRequest
import asset_controller_api.v1.AssetController.GetContractTtlResponse
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_GetContractTtlRequest = GetContractTtlRequest.newBuilder()
          .setUetr("Uetr")
          .setVerifier("zPublicKey")
          .build()
    val resp = blockStub.getContractTtl(req_GetContractTtlRequest)
    println(resp)
    channel.shutdown()
}


returns GetContractTtlResponse

asset_controller.GetContractTtlResponse

FieldTypeDescription
ttlstringcontract in TTL format
{
  "contract": "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema# ...>"
}