Destroy Alias Output
You can destroy an alias output by ID.
Example Code
- Rust
- Typescript (Node.js)
- Python
The following example will:
- Instantiate a
Wallet
, get Alice'sAccount
which was created in the first guide. - Destroy an Alias Output transaction by calling the
Account.burn()
function.
- Retry the
Transaction
until included.
The following example will:
- Instantiate a
Wallet
, get Alice'sAccount
which was created in the first guide and sync it. - Prepare the transaction to destroy an Alias Output by calling the
Account.preparedestroyalias()
function, and then send it.
- Await for the
Transaction
to get confirmed by calling theAccount.retryTransactionUntilIncluded
function.
- Instantiate a
Wallet
, get Alice'sAccount
which was created in the first guide and sync it. - Destroy the transaction that will destroy the alias output by calling the
Account.prepare_destroy_alias()
function, and then send it.
Full Example Code
- Rust
- Typescript (Node.js)
- Python
sdk/examples/how_tos/alias/destroy.rs
loading...
bindings/nodejs/examples/how_tos/alias/destroy.ts
loading...
bindings/python/examples/how_tos/alias/destroy.py
loading...
Expected Output
Aliases BEFORE destroying (142):
[
...
]
Sending the destroy-alias transaction...
Transaction sent: 0x829a635a7edc28bee4d4a1019b7b1f1bedec11d83c118b6f2a7904590f4bb458
Block included: https://explorer.shimmer.network/testnet/block/0xd455b8132c0b109dd0b2d1d157c6b1d7275318f69dcf56f536a7b14d9fa17bb3
Destroyed alias 0xf708a29e9619e847916de76c2e167e87a704c235dcbd7cda018865be7f561b5a
Aliases AFTER destroying (141):
[
...
]