List all of the assets of the specified asset type in a given wallet.
rpc ListAssetFiles
ListAssetFiles
asset_controller_api.v1.ListAssetFiles
asset_controller_api.v1.ListAssetFiles
List all of the assets of the specified asset type in a given wallet.
requests ListAssetFilesRequest
ListAssetFilesRequest
asset_controller.ListAssetFilesRequest
asset_controller.ListAssetFilesRequest
Field | Type | Description |
---|---|---|
asset_type | string | Type of asset. |
page | uint32 | Page number for pagination. First page is '0'. |
page_size optional | uint32 | Elements per page for pagination. |
verifier optional | string | [MultibaseVerifier] Wallet verifier. |
resp, _ := assetcontroller.ListAssetFiles(ctx, &v1.ListAssetFilesRequest{
AssetType: "BankAssetType",
Page: 0,
PageSize: 10000,
Verifier: "zWalletPublicKey",
})
fmt.Println(resp)
const listassetfilesrequest = new ListAssetFilesRequest();
listassetfilesrequest.setAssetType("BankAssetType");
listassetfilesrequest.setPage(0);
listassetfilesrequest.setPageSize(10000);
listassetfilesrequest.setVerifier("zWalletPublicKey");
service.listAssetFiles(listassetfilesrequest, (err, value:ListAssetFilesResponse|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 listAssetFilesRequest = new ListAssetFilesRequest{
AssetType = "BankAssetType",
Page = 0,
PageSize = 10000,
Verifier = "zWalletPublicKey",
};
var reply = client.ListAssetFiles(listAssetFilesRequest, 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.ListAssetFilesRequest;
import asset_controller_api.v1.AssetController.ListAssetFilesResponse;
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);
ListAssetFilesRequest req_ListAssetFilesRequest =
ListAssetFilesRequest.newBuilder()
.setAssetType("BankAssetType")
.setPage(0)
.setPageSize(10000)
.setVerifier("zWalletPublicKey")
.build();
ListAssetFilesResponse resp = blockStub.listAssetFiles(req_ListAssetFilesRequest);
System.out.println(resp);
channel.shutdown();
}
}
const listassetfilesrequest = new ListAssetFilesRequest();
listassetfilesrequest.setAssetType("BankAssetType");
listassetfilesrequest.setPage(0);
listassetfilesrequest.setPageSize(10000);
listassetfilesrequest.setVerifier("zWalletPublicKey");
service.listAssetFiles(listassetfilesrequest, (err, value:ListAssetFilesResponse|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::ListAssetFilesRequest;
#[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(
ListAssetFilesRequest{
asset_type: String::from("BankAssetType"),
page: 0,
page_size: 10000,
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.ListAssetFilesRequest
import asset_controller_api.v1.AssetController.ListAssetFilesResponse
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_ListAssetFilesRequest = ListAssetFilesRequest.newBuilder()
.setAssetType"BankAssetType")
.setPage(0)
.setPageSize(10000)
.setVerifier("zWalletPublicKey")
.build()
val resp = blockStub.listAssetFiles(req_ListAssetFilesRequest)
println(resp)
channel.shutdown()
}
returns ListAssetFilesResponse
ListAssetFilesResponse
asset_controller.ListAssetFilesResponse
asset_controller.ListAssetFilesResponse
Field | Type | Description |
---|---|---|
promissories | Promissory repeated | List of Promissories. |
totalCount | uint32 | Total number of asset files |
{
"promissories": [
{
"version": "0.1.0",
"id": "PROMISSORY_ID",
"currency": "USD",
"amount": 100,
"decimals": 2,
"authority": "zAuthorityPublicKeyMultibase58Encoded",
"issuer": "zIssuerPublicKeyMultibase58Encoded",
"issuance_date": "2006-01-02T15:04:05Z",
"block_depth": 3,
"authorization_signature": "ByteLengthAuthSignatureVariesByAlgo=",
"transfer_signature": "ByteLengthTransferSignatureVariesByAlgo=",
"notaries": [
{
"did": "did:method-name:zDIDMultibase58Encoded",
"signature": "ByteLengthSignatureVariesByAlgo="
},
{
"did": "did:method-name:zDIDMultibase58Encoded",
"signature": "ByteLengthSignatureVariesByAlgo="
}
]
},
{
"version": "0.1.0",
"id": "PROMISSORY_ID",
"currency": "USD",
"amount": 500,
"decimals": 2,
"authority": "zAuthorityPublicKeyMultibase58Encoded",
"issuer": "zIssuerPublicKeyMultibase58Encoded",
"issuance_date": "2006-01-02T15:04:05Z",
"block_depth": 3,
"authorization_signature": "ByteLengthAuthSignatureVariesByAlgo=",
"transfer_signature": "ByteLengthTransferSignatureVariesByAlgo=",
"notaries": [
{
"did": "did:method-name:zDIDMultibase58Encoded",
"signature": "ByteLengthSignatureVariesByAlgo="
},
{
"did": "did:method-name:zDIDMultibase58Encoded",
"signature": "ByteLengthSignatureVariesByAlgo="
}
]
}
],
"total_count": 2
}