setAssetLifecycleState
Change an asset's lifecycle state on its NFT.
Usage
const = await .('did:ope:2a6ebce0af...')
const = await .(
,
.
) Returns undefined without sending a transaction when the asset is already in the
requested state.
The states can also be set while editing, via
AssetBuilder.setLifecycleState — use that when
you are changing metadata anyway, and this when the state is all you want to change.
States
- Type:
LifecycleStates
| Value | Name | Meaning |
|---|---|---|
0 | ACTIVE | Normal. |
1 | END_OF_LIFE | Retired; no longer maintained. |
2 | DEPRECATED | Superseded by another asset. |
3 | REVOKED_BY_PUBLISHER | Withdrawn. |
4 | ORDERING_DISABLED_TEMPORARILY | Visible, but cannot be ordered. |
5 | ASSET_UNLISTED | Accessible by DID, hidden from markets. |
DDO v5's State enum carries the same values and is accepted too. nautilus re-exports it as a
type only, so pass LifecycleStates members when you need a value.
Returns
- Type:
TransactionReceipt | undefined
Parameters
asset
- Type:
AssetV5
state
- Type:
LifecycleStates | State