Skip to main content
⚠️ Legacy SDK DocumentationThis documentation uses our older SDK (@handcash/handcash-connect), but the v3 SDK does not support this feature yet.

Lock and Unlock Items

Prevent items from being transferred by locking them, or unlock them to allow transfers again.

Prerequisites

  • User must be connected with the ITEMS_WRITE permission
  • Your application must be the creator of the item

Setup

Lock Items

You can prevent an item from being transferred by locking it:

Lock Multiple Items

Unlock Items

Later on, you can unlock items to allow transfers again:

Unlock Multiple Items

Get Locked Items

Retrieve a list of locked items:

Parameters

  • from: Starting index (default: 0)
  • to: Ending index (default: 10)
  • fetchAttributes: Whether to include item attributes (default: false)

Use Cases

Lock Valuable Items

Unlock Before Transfer

Important Notes

  • Locked items cannot be transferred until they are unlocked
  • Only the app that created the item can lock/unlock it
  • Locking is useful for preventing accidental transfers of valuable items
  • Use getLockedItems() to check which items are currently locked