RemoveAsset

Remove a Governed Asset Type from the Authority.

rpc RemoveAsset

authority_api.v1.RemoveAsset

Remove a governed asset type from the Authority.

requests RemoveAssetRequest

authority_api.v1.RemoveAssetRequest

FieldTypeDescription
currency_codestringCurrency code to be removed.
resp, _ := authority.RemoveAsset(ctx, &v1.RemoveAssetRequest{
  CurrencyCode: "USD",
})
fmt.Println(resp)
const removeassetrequest = new RemoveAssetRequest();
removeassetrequest.setCurrencyCode("USD");

service.removeAsset(removeassetrequest, (err, value:RemoveAssetResponse|null) => {
    const resp = JSON.stringify(err ? err : value);
    console.log("received ", resp);
})
using System;
using Grpc.Core;
using AuthorityApi.V1;
using Google.Protobuf;
using System.Text;

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 removeAssetRequest = new RemoveAssetRequest{
        CurrencyCode = "USD",
      };
      var reply = client.RemoveAsset(removeAssetRequest, 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.RemoveAssetRequest;
import authority_api.v1.Authority.RemoveAssetResponse;
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);
    
    RemoveAssetRequest req_RemoveAssetRequest =
        RemoveAssetRequest.newBuilder()
          .setCurrencyCode("USD")
          .build();
    RemoveAssetResponse resp = blockStub.removeAsset(req_RemoveAssetRequest);
    System.out.println(resp);
    channel.shutdown();
  }
}
const removeassetrequest = new RemoveAssetRequest();
removeassetrequest.setCurrencyCode("USD");

service.removeAsset(removeassetrequest, (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;
use grpc-sdks::authority_api::v1::RemoveAssetRequest;

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

import io.grpc.ManagedChannelBuilder
import authority_api.v1.Authority.RemoveAssetRequest
import authority_api.v1.Authority.RemoveAssetResponse
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_RemoveAssetRequest = RemoveAssetRequest.newBuilder()
          .setCurrencyCode("USD")
          .build()
    val resp = blockStub.removeAsset(req_RemoveAssetRequest)
    println(resp)
    channel.shutdown()
}


returns RemoveAssetResponse

authority_api.v1.RemoveAssetResponse

{}