Home > @3rdweb/sdk > PackModule > open
Open Pack
Signature:
open(packId: string): Promise<NFTMetadata[]>;
Parameter | Type | Description |
---|---|---|
packId | string |
Returns:
Promise<NFTMetadata[]>
Open a pack to burn it and obtain the reward asset inside.
// The pack ID of the asset you want to buy
const packId = "0";
const rewards = await module.open(packId);
console.log(rewards);