ListGovernedAssets

List the Governed Assets for this Authority.

rpc ListGovernedAssets

authority_api.v1.ListGovernedAssets

List the Governed Assets for this Authority.

requests ListGovernedAssetsRequest

authority_api.v1.ListGovernedAssetsRequest

resp, _ := authority.ListGovernedAssets(ctx, &v1.ListGovernedAssetsRequest{})
fmt.Println(resp)
const listgovernedassetsrequest = new ListGovernedAssetsRequest();

service.listGovernedAssets(listgovernedassetsrequest, (err, value:ListGovernedAssetsResponse|null) => {
    const resp = JSON.stringify(err ? err : value);
    console.log("received ", resp);
})
using System;
using Grpc.Core;
using AuthorityApi.V1;

namespace main
{
  class Program
  {
    static void Main(string[] args)
    {
      Channel channel = new Channel("authority.YOUR_SANDBOX_ID.knoxnetworks.io:443", ChannelCredentials.Insecure); 
      var client = new Authority.AuthorityClient(channel); 
      var headers = new Metadata();
      var listGovernedAssetsRequest = new ListGovernedAssetsRequest{};
      var reply = client.ListGovernedAssets(listGovernedAssetsRequest, headers);
      Console.WriteLine("Response: " + reply);
      channel.ShutdownAsync().Wait();
    }
  }
}
package demo;

import io.grpc.Channel;
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
import authority_api.v1.Authority.ListGovernedAssetsRequest;
import authority_api.v1.Authority.ListGovernedAssetsResponse;
import authority_api.v1.AuthorityGrpc;

public class App {
  public static void main(String[] args) {
    ManagedChannel channel = ManagedChannelBuilder
      .forAddress("authority.YOUR_SANDBOX_ID.knoxnetworks.io", 443)
      .usePlaintext()
      .build();
    AuthorityGrpc.AuthorityBlockingStub blockStub =
        AuthorityGrpc.newBlockingStub(channel);
    
    ListGovernedAssetsRequest req_ListGovernedAssetsRequest =
        ListGovernedAssetsRequest.newBuilder()
          .build();
    ListGovernedAssetsResponse resp = blockStub.listGovernedAssets(req_ListGovernedAssetsRequest);
    System.out.println(resp);
    channel.shutdown();
  }
}
const listgovernedassetsrequest = new ListGovernedAssetsRequest();

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

use grpc-sdks::authority_api::v1::authority_service_client::AuthorityClient;

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

  let request = tonic::Request::new(
    ());
// sending request and waiting for response
  let response = client.list_governed_assets(request).await?.into_inner();
  println!("RESPONSE={:?}", response);
  Ok(())
}
package app

import io.grpc.ManagedChannelBuilder
import authority_api.v1.Authority.ListGovernedAssetsRequest
import authority_api.v1.Authority.ListGovernedAssetsResponse
import authority_api.v1.AuthorityGrpc

fun main() {
    val channel = ManagedChannelBuilder
            .forAddress("authority.YOUR_SANDBOX_ID.knoxnetworks.io", 443)
            .usePlaintext()
            .build()
    var blockStub = AuthorityGrpc.newBlockingStub(channel)
    
    val req_ListGovernedAssetsRequest = ListGovernedAssetsRequest.newBuilder()
          .build()
    val resp = blockStub.listGovernedAssets(req_ListGovernedAssetsRequest)
    println(resp)
    channel.shutdown()
}


returns ListGovernedAssetsResponse

authority_api.v1.ListGovernedAssetsResponse

FieldTypeDescription
asset_dataAssetDataEntry repeatedList of currently Governed Assets.
{
  "asset_data": [
    {
      "key": "USD",
      "value": {
        "denominations": [
          1,
          5,
          10,
          25,
          100,
          200,
          500,
          1000,
          2000,
          5000,
          10000,
          50000
        ],
        "precision": 2
      }
    },
    {
      "key": "JPY",
      "value": {
        "denominations": [
          1,
          5,
          10,
          50,
          100,
          500,
          1000,
          2000,
          5000,
          10000,
          50000,
          100000
        ],
        "precision": 0
      }
    }
  ]
}