Skip to main content

Multiwrap class

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Multiwrap lets you wrap any number of ERC20, ERC721 and ERC1155 tokens you own into a single wrapped token bundle.

Example

import { ThirdwebSDK } from "@thirdweb-dev/sdk";

const sdk = new ThirdwebSDK("{{chainName}}");
const contract = sdk.getMultiwrap("{{contract_address}}");

Constructors

ConstructorModifiersDescription
(constructor)(network, address, storage, options, contractWrapper)(BETA) Constructs a new instance of the Multiwrap class

Properties

PropertyModifiersTypeDescription
contractAbistaticany(BETA)
contractRolesstaticreadonly ["transfer", "minter", "unwrap", "asset"](BETA)
contractTypestatic"multiwrap"(BETA)
encoderContractEncoder<MultiwrapContract>(BETA)
estimatorGasCostEstimator<MultiwrapContract>(BETA)
eventsContractEvents<MultiwrapContract>(BETA)
metadataContractMetadata<MultiwrapContract, typeof Multiwrap.schema>(BETA)
rolesContractRoles<MultiwrapContract, typeof Multiwrap.contractRoles[number]>(BETA)
royaltiesContractRoyalty<MultiwrapContract, typeof Multiwrap.schema>(BETA) Configure royalties

Methods

MethodModifiersDescription
getAll(queryParams)(BETA) Get All Wrapped Token Bundles
getWrappedContents(wrappedTokenId)(BETA) Get the contents of a wrapped token bundle
unwrap(wrappedTokenId, recipientAddress)(BETA) Unwrap a wrapped token bundle, and retrieve its contents
wrap(contents, wrappedTokenMetadata, recipientAddress)(BETA) Wrap any number of ERC20/ERC721/ERC1155 tokens into a single wrapped token

Signature:

export declare class Multiwrap extends Erc721<MultiwrapContract>

Extends: Erc721<MultiwrapContract