typescript-sdk

Home > @3rdweb/sdk > PackModule > open

PackModule.open() method

Open Pack

Signature:

open(packId: string): Promise<NFTMetadata[]>;

Parameters

Parameter Type Description
packId string  

Returns:

Promise<NFTMetadata[]>

Remarks

Open a pack to burn it and obtain the reward asset inside.

Example

// The pack ID of the asset you want to buy
const packId = "0";
const rewards = await module.open(packId);
console.log(rewards);