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
Constructor | Modifiers | Description |
---|---|---|
(constructor)(network, address, storage, options, contractWrapper) | (BETA) Constructs a new instance of the Multiwrap class |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
contractAbi | static | any | (BETA) |
contractRoles | static | readonly ["transfer", "minter", "unwrap", "asset"] | (BETA) |
contractType | static | "multiwrap" | (BETA) |
encoder | ContractEncoder<MultiwrapContract> | (BETA) | |
estimator | GasCostEstimator<MultiwrapContract> | (BETA) | |
events | ContractEvents<MultiwrapContract> | (BETA) | |
metadata | ContractMetadata<MultiwrapContract, typeof Multiwrap.schema> | (BETA) | |
roles | ContractRoles<MultiwrapContract, typeof Multiwrap.contractRoles[number]> | (BETA) | |
royalties | ContractRoyalty<MultiwrapContract, typeof Multiwrap.schema> | (BETA) Configure royalties |
Methods
Method | Modifiers | Description |
---|---|---|
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