pub async fn led_amen_change_issuer(
    contract_id: ContractId,
    asset_id: AssetId,
    hash: Nat,
    new_issuer: Principal
) -> Response<AmendmentId>
Expand description

Change Issuer of an asset.

§Parameters

  • contract_id: Contract id of the ledger.
  • asset_id: Locally unique asset identifier (needs ledger to be globally unique).
  • new_issuer: New designated Issuer.
  • hash: New hash of the amendment with changed issuer.

§Result

  • tx_id: Id of the transaction.
  • data: Id of the created amendment.

§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
AMENDMENT_HASH=0x54321
NEW_ISSUER='principal "dimdt-vwpm3-tkwgu-c2nkv-txykr-atn2x-xras5-6xidt-wtti3-i4xr6-vqe"'

dfx canister call coreledger_backend led_amen_change_issuer "($LEDGER_CONTRACT_ID, $ASSET_ID, $AMENDMENT_HASH, $NEW_ISSUER)"

§Sample response

( record {
  tx_id = 64_902_045_878_680_215_161_103_406_576_570_366_475_824_533_393_005_533_149_888_825_789_042_550_227_580 : nat;
  data = 156_384_428_531_995_775_716_355_670_017 : nat;
})