Consume an Item (ERC1155)

Use this method to consume an item directly from its owner wallet.

Only works if the item was created as consumable

Usage in your script

const response = altura.consumeItem(
  COLLECTION_ADDRESS,
  TOKEN_ID,
  AMOUNT,
  FROM_ADDRESS
);

const txHash = response.txHash;

Parameters

Parameter
Type
Required
Description

collection_addr

String

Yes

The item's collection address

token_id

number

Yes

The item's tokenId

amount

number

Yes

The amount of item to consume

from_addr

String

Yes

The address you want to consume an item from

Last updated