Skip to main content

unlock

Unlocks an asset previously locked.

info

When the asset is locked by a delegate, only the delegate can unlock the asset. Likewise, when the asset is locked by the owner, only the owner can unlocked it.

Accounts

Below is the list of accounts expected by the unlock instruction.

NameWritableSignerOptionalDescription
assetInitialized asset account
authorityDelegate or owner account

Arguments

None.

Examples

import { unlock } from '@nifty-oss/asset';

// Accounts:
// - asset: PublicKey
// - sugner: KeypairSigner (either owner of delegte)
await unlock(umi, {
asset,
signer,
}).sendAndConfirm(umi);