ListBalanceDetails

Lists more details about balances in a wallet such as how much funds are available vs reserved.

rpc ListBalanceDetails

asset_controller_api.v1.ListBalanceDetails

Lists more details about balances in a wallet such as how much funds are available vs reserved.

requests ListBalanceDetailsRequest

asset_controller.ListBalanceDetailsRequest

FieldTypeDescription
verifier optionalstringWallet verifier.
resp, _ := assetcontroller.ListBalanceDetailsRequest(ctx, &v1.ListBalanceDetailsRequest{
  Verifier: "zWalletPublicKey",
})
fmt.Println(resp)
const listbalancedetailsrequest = new ListBalanceDetailsRequest();
listbalancedetailsrequest.setVerifier("zWalletPublicKey");

service.listBalanceDetails(listbalancedetailsrequest, (err, value:ListBalanceDetailsResponse|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 listBalanceDetailsRequest = new listBalanceDetailsRequest{
        Verifier = "zWalletPublicKey",
      };
      var reply = client.ListBalanceDetails(listBalanceDetailsRequest, 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.ListBalanceDetailsRequest;
import asset_controller_api.v1.AssetController.ListBalanceDetailsResponse;
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);
    
    ListBalanceDetailsRequest req_ListBalanceDetailsRequest =
        ListBalanceDetailsRequest.newBuilder()
          .setVerifier("zWalletPublicKey")
          .build();
    ListBalanceDetailsResponse resp = blockStub.listBalanceDetails(req_ListBalanceDetailsRequest);
    System.out.println(resp);
    channel.shutdown();
  }
}
const listbalancedetailsrequest = new ListBalanceDetailsRequest();
listbalancedetailsrequest.setVerifier("zWalletPublicKey");

service.listBalanceDetails(listbalancedetailsrequest, (err, value:ListBalanceDetailsResponse|null) => {
    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::ListBalanceDetailsRequest;

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

import io.grpc.ManagedChannelBuilder
import asset_controller_api.v1.AssetController.ListBalanceDetailsRequest
import asset_controller_api.v1.AssetController.ListBalanceDetailsResponse
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_ListBalanceDetailsRequest = ListBalanceDetailsRequest.newBuilder()
          .setVerifier("zWalletPublicKey")
          .build()
    val resp = blockStub.listBalanceDetails(req_ListBalanceDetailsRequest)
    println(resp)
    channel.shutdown()
}


returns ListBalanceDetailsResponse

asset_controller.ListBalanceDetailsResponse

FieldTypeDescription
balancesBalanceDetail repeatedList of Balance Details
{
  "balances": [
    {
      "balance": {
        "amount": {
          "currency_code": "USD",
          "amount": 5700,
          "decimals": 2
        },
        "file_count": 57
      },
      "kind": 0
    },
    {
      "balance": {
        "amount": {
          "currency_code": "EUR",
          "amount": 5700,
          "decimals": 2
        },
        "file_count": 57
      },
      "kind": 0
    }
  ]
}