pub fn led_base_get_asset(
    contract_id: ContractId,
    asset_id: AssetId
) -> Option<Asset>
Expand description

Retrieve the asset properties.

§Parameters

  • contract_id: Contract id of the ledger.
  • asset_id: Locally unique asset identifier (needs ledger to be globally unique).

§Result

The asset properties, null if not exist.

§Sample request

LEDGER_CONTRACT_ID=1_376_994_832_725_996_537_612_682_825_051_864_610_558_585_037_795
ASSET_ID=0xF94E2AD9DD5CBBC04143

dfx canister call coreledger_backend led_base_get_asset "($LEDGER_CONTRACT_ID, $ASSET_ID)"

§Sample response

( opt record {
  bitwise = false;
  hash = opt blob "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\12\34";
  created_on = opt (1_718_903_226_472_604_500 : nat64);
  issuer = principal "r63pu-qjqo3-yvyrr-xhymp-63lj4-oycfx-7r4yr-mspkh-guhdl-vrjkr-cae";
})