Skip to content
LogoLogo

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
ValueNameMeaning
0ACTIVENormal.
1END_OF_LIFERetired; no longer maintained.
2DEPRECATEDSuperseded by another asset.
3REVOKED_BY_PUBLISHERWithdrawn.
4ORDERING_DISABLED_TEMPORARILYVisible, but cannot be ordered.
5ASSET_UNLISTEDAccessible 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