Skip to content

Instantly share code, notes, and snippets.

@gregfromstl
Last active March 13, 2025 22:58
Show Gist options
  • Save gregfromstl/678fe1f331a01270bb002fee660f285d to your computer and use it in GitHub Desktop.
Save gregfromstl/678fe1f331a01270bb002fee660f285d to your computer and use it in GitHub Desktop.
thirdweb sdk typedoc
This file has been truncated, but you can view the full file.
{
"meta": {
"typedocBetterJsonVersion": "0.9.4"
},
"functions": [
{
"kind": "function",
"name": "fromProvider",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Creates a Thirdweb wallet from an EIP-1193 compatible provider."
}
]
},
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "This adapter allows you to use any EIP-1193 provider (like MetaMask, WalletConnect, etc.) as a Thirdweb wallet.\nIt handles all the necessary conversions between the EIP-1193 interface and Thirdweb's wallet interface."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "FromEip1193AdapterOptions",
"tokens": [
{
"name": "FromEip1193AdapterOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Configuration options for creating the wallet adapter"
}
]
}
]
}
],
"returns": {
"type": {
"code": "Wallet",
"tokens": [
{
"name": "Wallet",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A Thirdweb wallet instance that wraps the EIP-1193 provider"
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { EIP1193 } from \"thirdweb/wallets\";\n\n// Create a Thirdweb wallet from MetaMask's provider\nconst wallet = EIP1193.fromProvider({\n provider: window.ethereum,\n walletId: \"io.metamask\"\n});\n\n// Use like any other Thirdweb wallet\nconst account = await wallet.connect({\n client: createThirdwebClient({ clientId: \"...\" })\n});\n\n// Sign messages\nawait account.signMessage({ message: \"Hello World\" });\n\n// Send transactions\nawait account.sendTransaction({\n to: \"0x...\",\n value: 1000000000000000000n\n});"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "EIP1193"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/adapters/eip1193/from-eip1193.ts#L60"
},
{
"kind": "function",
"name": "toProvider",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Converts a Thirdweb wallet into an EIP-1193 compatible provider."
}
]
},
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "This adapter allows you to use a Thirdweb wallet with any library or dApp that expects an EIP-1193 provider.\nThe provider implements the standard EIP-1193 interface including request handling and event subscription."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "ToEip1193ProviderOptions",
"tokens": [
{
"name": "ToEip1193ProviderOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Configuration options for creating the provider"
}
]
}
]
}
],
"returns": {
"type": {
"code": "EIP1193Provider",
"tokens": [
{
"name": "EIP1193Provider",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An EIP-1193 compatible provider that wraps the Thirdweb wallet"
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { EIP1193 } from \"thirdweb/wallets\";\n\n// Create an EIP-1193 provider from a Thirdweb wallet\nconst provider = EIP1193.toProvider({\n wallet,\n chain: ethereum,\n client: createThirdwebClient({ clientId: \"...\" })\n});\n\n// Use with any EIP-1193 compatible library\nconst accounts = await provider.request({\n method: \"eth_requestAccounts\"\n});\n\n// Listen for events\nprovider.on(\"accountsChanged\", (accounts) => {\n console.log(\"Active accounts:\", accounts);\n});"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "EIP1193"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/adapters/eip1193/to-eip1193.ts#L58"
},
{
"kind": "function",
"name": "chat",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Chat with Nebula."
}
]
}
],
"parameters": [
{
"name": "input",
"type": {
"code": "Input",
"tokens": [
{
"name": "Input",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The input for the chat."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<Output>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
},
{
"name": "Output",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The chat response.\nThis API is in early access and might change in the future."
}
]
}
]
},
"blockTags": [
{
"tag": "@nebula",
"summary": []
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { Nebula } from \"thirdweb/ai\";\n\nconst response = await Nebula.chat({\n client: TEST_CLIENT,\n message: \"What's the symbol of this contract: 0xe2cb0eb5147b42095c2FfA6F7ec953bb0bE347D8\",\n contextFilter: {\n chains: [sepolia],\n },\n});"
},
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Multi message prompt:"
}
]
},
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "const response = await Nebula.chat({\n client,\n messages: [\n { role: \"user\", content: \"What's my balance?\" },\n { role: \"assistant\", content: \"Your balance is 0.023 ETH\" },\n { role: \"user\", content: \"What about my NFTs?\" },\n ],\n contextFilter: {\n chains: [sepolia],\n },\n});"
},
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Extracting and sending transactions from a chat response:"
}
]
},
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "const response = await Nebula.chat({ ... });\nconst transactions = response.transactions;\nfor (const transaction of transactions) {\n await sendTransaction({ transaction, account });\n}"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/ai/chat.ts#L50"
},
{
"kind": "function",
"name": "execute",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Execute a transaction based on a prompt."
}
]
}
],
"parameters": [
{
"name": "input",
"type": {
"code": "(Input) & ({ account: Account })",
"tokens": [
{
"name": "Input",
"package": "thirdweb"
},
{
"name": "Account",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The input for the transaction."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<SendTransactionResult>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
},
{
"name": "SendTransactionResult",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The transaction hash.\nThis API is in early access and might change in the future."
}
]
}
]
},
"blockTags": [
{
"tag": "@nebula",
"summary": []
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { Nebula } from \"thirdweb/ai\";\n\nconst wallet = createWallet(\"io.metamask\");\nconst account = wallet.connect({ client });\n\nconst result = await Nebula.execute({\n client,\n account, // transactions will be sent from this account\n message: \"send 0.0001 ETH to vitalik.eth\",\n contextFilter: {\n chains: [sepolia],\n },\n});"
},
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Multi message prompt:"
}
]
},
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "Nebula.execute({\n client,\n account,\n messages: [\n { role: \"user\", content: \"What's the address of vitalik.eth\" },\n {\n role: \"assistant\",\n content:\n \"The address of vitalik.eth is 0xd8dA6BF26964aF8E437eEa5e3616511D7G3a3298\",\n },\n { role: \"user\", content: \"Send them 0.0001 ETH\" },\n ],\n contextFilter: {\n chains: [sepolia],\n },\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/ai/execute.ts#L52"
},
{
"kind": "function",
"name": "createAuth",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Creates an authentication object with the given options."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "AuthOptions",
"tokens": [
{
"name": "AuthOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for creating the authentication object."
}
]
}
]
}
],
"returns": {
"type": {
"code": "{ generateJWT: (params: GenerateJWTParams) => Promise<string>; generatePayload: (__namedParameters: GenerateLoginPayloadParams) => Promise<LoginPayload>; verifyJWT: (params: VerifyJWTParams) => Promise<VerifyJWTResult>; verifyPayload: (__namedParameters: VerifyLoginPayloadParams) => Promise<VerifyLoginPayloadResult> }",
"tokens": [
{
"name": "GenerateJWTParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "GenerateLoginPayloadParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "LoginPayload",
"package": "thirdweb"
},
{
"name": "VerifyJWTParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "VerifyJWTResult",
"package": "thirdweb"
},
{
"name": "VerifyLoginPayloadParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "VerifyLoginPayloadResult",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The created authentication object."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { createAuth } from 'thirdweb/auth';\n\nconst auth = createAuth({...});\n\n// 1. generate a login payload for a client on the server side\nconst loginPayload = await auth.generatePayload({ address: '0x123...' });\n\n// 2. send the login payload to the client\n\n// 3. verify the login payload that the client sends back later\nconst verifiedPayload = await auth.verifyPayload({ payload: loginPayload, signature: '0x123...' });\n\n// 4. generate a JWT for the client\nconst jwt = await auth.generateJWT({ payload: verifiedPayload });\n\n// 5. set the JWT as a cookie or otherwise provide it to the client\n\n// 6. authenticate the client based on the JWT on subsequent calls\n const { valid, parsedJWT } = await auth.verifyJWT({ jwt });\n"
}
]
},
{
"tag": "@auth",
"summary": []
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/auth/auth.ts#L36"
},
{
"kind": "function",
"name": "isErc6492Signature",
"signatures": [
{
"summary": [],
"parameters": [
{
"name": "signature",
"type": {
"code": "`0x${string}`",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The signature to check for ERC6492 compatibility"
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "True if the signature is compatible with ERC6492, false otherwise"
}
]
}
]
},
"blockTags": [
{
"tag": "@description",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Determines if a signature is compatible with "
},
{
"type": "link",
"title": null,
"url": "https://eips.ethereum.org/EIPS/eip-6492",
"children": [
{
"type": "text",
"value": "ERC6492"
}
]
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isErc6492Signature } from 'thirdweb/auth';\n\nconst isErc6492 = isErc6492Signature('0x1234567890123456789012345678901234567890');"
}
]
},
{
"tag": "@auth",
"summary": []
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/auth/is-erc6492-signature.ts#L21"
},
{
"kind": "function",
"name": "parseErc6492Signature",
"signatures": [
{
"summary": [],
"parameters": [
{
"name": "signature",
"type": {
"code": "`0x${string}`",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The signature to parse"
}
]
}
]
}
],
"returns": {
"type": {
"code": "ParseErc6492SignatureReturnType",
"tokens": [
{
"name": "ParseErc6492SignatureReturnType",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ParseErc6492SignatureReturnType The parsed (or original) signature"
}
]
}
]
},
"blockTags": [
{
"tag": "@description",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Parses a serialized (Hex) "
},
{
"type": "link",
"title": null,
"url": "https://eips.ethereum.org/EIPS/eip-6492",
"children": [
{
"type": "text",
"value": "ERC-6492"
}
]
},
{
"type": "text",
"value": " signature.\nIf the signature is not in ERC-6492 format, the original signature is returned."
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { parseErc6492Signature } from 'thirdweb/auth';\n\nconst parsedSignature = parseErc6492Signature('0x1234567890123456789012345678901234567890');"
}
]
},
{
"tag": "@auth",
"summary": []
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/auth/parse-erc6492-signature.ts#L31"
},
{
"kind": "function",
"name": "serializeErc6492Signature",
"signatures": [
{
"summary": [],
"parameters": [
{
"name": "__namedParameters",
"type": {
"code": "Erc6492Signature",
"tokens": [
{
"name": "Erc6492Signature",
"package": "thirdweb"
}
]
}
}
],
"returns": {
"type": {
"code": "`0x${string}`",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The serialized signature"
}
]
}
]
},
"blockTags": [
{
"tag": "@description",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Serializes a signature for use with "
},
{
"type": "link",
"title": null,
"url": "https://eips.ethereum.org/EIPS/eip-6492",
"children": [
{
"type": "text",
"value": "ERC-6492"
}
]
},
{
"type": "text",
"value": ". The signature must be generated by a signer for an "
},
{
"type": "link",
"title": null,
"url": "https://eips.ethereum.org/EIPS/eip-4337",
"children": [
{
"type": "text",
"value": "ERC-4337"
}
]
},
{
"type": "text",
"value": " Account Factory account with counterfactual deployment addresses."
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { serializeErc6492Signature } from 'thirdweb/auth';\n\nconst serializedSignature = serializeErc6492Signature({\n address: '0x...',\n data: '0x...',\n signature: '0x...',\n});\n// 0x000000000000000000000000cafebabecafebabecafebabecafebabecafebabe000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000004deadbeef000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000041a461f509887bd19e312c0c58467ce8ff8e300d3c1a90b608a760c5b80318eaf15fe57c96f9175d6cd4daad4663763baa7e78836e067d0163e9a2ccf2ff753f5b1b000000000000000000000000000000000000000000000000000000000000006492649264926492649264926492649264926492649264926492649264926492"
}
]
},
{
"tag": "@auth",
"summary": []
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/auth/serialize-erc6492-signature.ts#L30"
},
{
"kind": "function",
"name": "signLoginPayload",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Signs the login payload using the provided account."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "SignLoginPayloadParams",
"tokens": [
{
"name": "SignLoginPayloadParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for signing the login payload."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<{ payload: LoginPayload; signature: `0x${string}` }>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
},
{
"name": "LoginPayload",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An object containing the signature and the payload."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { signLoginPayload } from 'thirdweb/auth';\n\nconst { signature, payload } = await signLoginPayload({\n payload: loginPayload,\n account: account,\n});"
}
]
},
{
"tag": "@auth",
"summary": []
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/auth/core/sign-login-payload.ts#L28"
},
{
"kind": "function",
"name": "verifyContractWalletSignature",
"signatures": [
{
"summary": [],
"parameters": [
{
"name": "__namedParameters",
"type": {
"code": "{ accountFactory?: { address: string; verificationCalldata: `0x${string}` }; address: string; chain: Readonly; client: ThirdwebClient; message: Message; signature: string | (Uint8Array<ArrayBufferLike>) }",
"tokens": [
{
"name": "Readonly",
"package": "typescript"
},
{
"name": "ThirdwebClient",
"package": "thirdweb"
},
{
"name": "Message",
"package": "thirdweb"
},
{
"name": "Uint8Array",
"package": "typescript"
},
{
"name": "ArrayBufferLike",
"package": "typescript"
}
]
}
}
],
"returns": {
"type": {
"code": "Promise<boolean>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating whether the signature is valid."
}
]
}
]
},
"blockTags": [
{
"tag": "@description",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Verifies a contract wallet signature using "
},
{
"type": "link",
"title": null,
"url": "https://eips.ethereum.org/EIPS/eip-6942",
"children": [
{
"type": "text",
"value": "ERC-6942"
}
]
},
{
"type": "text",
"value": " Signature Validation for Predeploy Contracts.\nThis function will validate signatures for both deployed and undeployed smart accounts of all signature types."
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { verifyContractWalletSignature } from 'thirdweb/auth';\n\nconst isValid = await verifyContractWalletSignature({\n message: '0x..',\n signature: '0x..',\n address: '0x...',\n chain: ...,\n client: ...,\n});"
}
]
},
{
"tag": "@auth",
"summary": []
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/auth/verify-signature.ts#L106"
},
{
"kind": "function",
"name": "verifyEOASignature",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Verifies the signature of a message using an Ethereum account's EOA (Externally Owned Account)."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "VerifyEOASignatureParams",
"tokens": [
{
"name": "VerifyEOASignatureParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for verifying the signature."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<boolean>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating whether the signature is valid."
}
]
}
]
},
"blockTags": [
{
"tag": "@throws",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An error if the signature is invalid."
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { verifyEOASignature } from 'thirdweb/auth';\n\nconst isValid = await verifyEOASignature({\n message: '0x1234567890123456789012345678901234567890',\n signature: '0x1234567890123456789012345678901234567890',\n address: '0x1234567890123456789012345678901234567890',\n});"
}
]
},
{
"tag": "@auth",
"summary": []
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/auth/verify-signature.ts#L44"
},
{
"kind": "function",
"name": "verifySignature",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Verifies the signature based on the provided options.\nHandles smart contract wallet signatures and EOA signatures.\n"
},
{
"type": "strong",
"children": [
{
"type": "text",
"value": "IMPORTANT: in order to check smart contract signatures, a chain and client must be provided. Or, you can use the "
},
{
"type": "inlineCode",
"value": "verifyContractWalletSignature"
},
{
"type": "text",
"value": " function directly if all signatures will be from smart accounts."
}
]
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "{ accountFactory?: { address: string; verificationCalldata: `0x${string}` }; address: string; chain?: Readonly<(ChainOptions) & ({ rpc: string })>; client?: ThirdwebClient; message: (Message) & (Message | undefined); signature: (string | (Uint8Array<ArrayBufferLike>)) & (undefined | string | (Uint8Array<ArrayBufferLike>)) }",
"tokens": [
{
"name": "Readonly",
"package": "typescript"
},
{
"name": "ChainOptions",
"package": "thirdweb"
},
{
"name": "ThirdwebClient",
"package": "thirdweb"
},
{
"name": "Message",
"package": "thirdweb"
},
{
"name": "Uint8Array",
"package": "typescript"
},
{
"name": "ArrayBufferLike",
"package": "typescript"
},
{
"name": "Uint8Array",
"package": "typescript"
},
{
"name": "ArrayBufferLike",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for signature verification."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<boolean>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating whether the signature is valid or not."
}
]
}
]
},
"blockTags": [
{
"tag": "@see",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "verifyContractWalletSignature"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { verifySignature } from 'thirdweb/auth';\n\nconst isValid = await verifySignature({\n message: 'Your message to sign',\n signature: '0x91db0222ec371a8c18d3b187a6d2e77789bffca1b96826ef6b8708e0d4a66c80312fc3ae95b8fbc147265abf539bb6f360152be61a0e1411d7f5771a599e769a1c',\n address: '0xda9C7A86AeE76701FC1c23ae548e8E93Ba3e42A5',\n client: thirdwebClient,\n chain: chain\n});"
}
]
},
{
"tag": "@auth",
"summary": []
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/auth/verify-signature.ts#L160"
},
{
"kind": "function",
"name": "defineChain",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Defines a chain with the given options."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "number | (Chain) | (ChainOptions) | (LegacyChain)",
"tokens": [
{
"name": "Chain",
"package": "viem"
},
{
"name": "ChainOptions",
"package": "thirdweb"
},
{
"name": "LegacyChain",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the chain."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Readonly",
"tokens": [
{
"name": "Readonly",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The defined chain."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Just pass the chain ID to connect to:"
}
]
},
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "const chain = defineChain(1);"
},
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Or pass your own RPC or custom values:"
}
]
},
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "const chain = defineChain({\n id: 1,\n rpc: \"https://my-rpc.com\",\n nativeCurrency: {\n name: \"Ether\",\n symbol: \"ETH\",\n decimals: 18,\n },\n});"
}
]
},
{
"tag": "@chain",
"summary": []
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/chains/utils.ts#L41"
},
{
"kind": "function",
"name": "getChainMetadata",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Retrieves chain data for a given chain."
}
]
}
],
"parameters": [
{
"name": "chain",
"type": {
"code": "Readonly",
"tokens": [
{
"name": "Readonly",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The chain object containing the chain ID."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<ChainMetadata>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
},
{
"name": "ChainMetadata",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A Promise that resolves to the chain data."
}
]
}
]
},
"blockTags": [
{
"tag": "@throws",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "If there is an error fetching the chain data."
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "const chain = defineChain({ id: 1 });\nconst chainData = await getChainMetadata(chain);\nconsole.log(chainData);"
}
]
},
{
"tag": "@chain",
"summary": []
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/chains/utils.ts#L289"
},
{
"kind": "function",
"name": "getRpcUrlForChain",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Retrieves the RPC URL for the specified chain.\nIf a custom RPC URL is defined in the options, it will be used.\nOtherwise, a thirdweb RPC URL will be constructed using the chain ID and client ID."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "GetRpcUrlForChainOptions",
"tokens": [
{
"name": "GetRpcUrlForChainOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options object containing the chain and client information."
}
]
}
]
}
],
"returns": {
"type": {
"code": "string",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The RPC URL for the specified chain."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getRpcUrlForChain } from \"thirdweb/chains\";\nconst rpcUrl = getRpcUrlForChain({ chain: 1, client });\nconsole.log(rpcUrl); // \"https://1.rpc.thirdweb.com/..."
}
]
},
{
"tag": "@chain",
"summary": []
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/chains/utils.ts#L182"
},
{
"kind": "function",
"name": "checkVerificationStatus",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks the verification status of a contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "CheckVerificationStatusOptions",
"tokens": [
{
"name": "CheckVerificationStatusOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for checking the verification status."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<unknown>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves with the verification status data."
}
]
}
]
},
"blockTags": [
{
"tag": "@throws",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An error if the verification status check fails."
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { checkVerificationStatus } from \"thirdweb/contract\";\nconst verificationStatus = await checkVerificationStatus({\n explorerApiUrl: \"https://api.polygonscan.com/api\",\n explorerApiKey: \"YOUR_API_KEY\",\n guid: \"YOUR_GUID\",\n});\nconsole.log(verificationStatus);"
}
]
},
{
"tag": "@contract",
"summary": []
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/contract/verification/index.ts#L209"
},
{
"kind": "function",
"name": "fetchPublishedContract",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Fetches the published contract based on the provided options."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "FetchPublishedContractOptions",
"tokens": [
{
"name": "FetchPublishedContractOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for fetching the published contract."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<{ bytecodeHash: `0x${string}`; contractId: string; implementation: string; publishMetadataUri: string; publishTimestamp: bigint }>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The published contract."
}
]
}
]
},
"blockTags": [
{
"tag": "@throws",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Error if the contract version or published contract is not found."
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "const publishedContract = await fetchPublishedContract({\n publisherAddress: \"0x1234\",\n contractName: \"MyContract\",\n version: \"1.0.0\",\n client: client,\n});"
}
]
},
{
"tag": "@contract",
"summary": []
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/contract/deployment/publisher.ts#L232"
},
{
"kind": "function",
"name": "getBytecode",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Retrieves the bytecode of a contract."
}
]
}
],
"parameters": [
{
"name": "contract",
"type": {
"code": "Readonly",
"tokens": [
{
"name": "Readonly",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The ThirdwebContract instance."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<`0x${string}`>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A Promise that resolves to the bytecode of the contract."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getBytecode } from \"thirdweb/contract\";\nconst bytecode = await getBytecode(contract);"
}
]
},
{
"tag": "@contract",
"summary": []
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/contract/actions/get-bytecode.ts#L19"
},
{
"kind": "function",
"name": "getCompilerMetadata",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Down the compiled metadata from thirdweb contract api and format it"
}
]
}
],
"parameters": [
{
"name": "contract",
"type": {
"code": "Readonly",
"tokens": [
{
"name": "Readonly",
"package": "typescript"
}
]
}
}
],
"returns": {
"type": {
"code": "Promise<CompilerMetadata>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
},
{
"name": "CompilerMetadata",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The compiler metadata for the contract"
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getCompilerMetadata, getContract } from \"thirdweb/contracts\";\n\nconst contract = getContract({\n address: \"0x...\",\n chain: ethereum,\n client: \"\",\n});\nconst metadata = await getCompilerMetadata(contract);"
}
]
},
{
"tag": "@contract",
"summary": []
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/contract/actions/get-compiler-metadata.ts#L22"
},
{
"kind": "function",
"name": "getContract",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Creates a Thirdweb contract by combining the Thirdweb client and contract options."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "ContractOptions<abi>",
"tokens": [
{
"name": "ContractOptions",
"package": "thirdweb"
},
{
"name": "abi",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for creating the contract."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Readonly<ContractOptions<abi, `0x${string}`>>",
"tokens": [
{
"name": "Readonly",
"package": "typescript"
},
{
"name": "ContractOptions",
"package": "thirdweb"
},
{
"name": "abi",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The Thirdweb contract."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { createThirdwebClient, getContract } from \"thirdweb\";\nimport { sepolia } from \"thirdweb/chains\";\n\nconst client = createThirdwebClient({ clientId: \"...\" });\nconst contract = getContract({\n client,\n chain: sepolia,\n address: \"0x123...\",\n // optional ABI\n abi: [...],\n});"
}
]
},
{
"tag": "@contract",
"summary": []
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/contract/contract.ts#L47"
},
{
"kind": "function",
"name": "prepareDirectDeployTransaction",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a direct deploy transaction with ABI."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "{ abi: Abi; bytecode: `0x${string}`; chain: Readonly; client: ThirdwebClient; constructorParams?: Record<string, unknown> }",
"tokens": [
{
"name": "Abi",
"package": "abitype"
},
{
"name": "Readonly",
"package": "typescript"
},
{
"name": "ThirdwebClient",
"package": "thirdweb"
},
{
"name": "Record",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for preparing the transaction."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<[], AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "list",
"ordered": false,
"start": null,
"spread": false,
"children": [
{
"type": "listItem",
"spread": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared transaction."
}
]
}
]
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { prepareDirectDeployTransaction } from \"thirdweb/deploys\";\nimport { ethereum } from \"thirdweb/chains\";\nconst tx = prepareDirectDeployTransaction({\n client,\n chain: ethereum,\n bytecode: \"0x...\",\n constructorAbi: {\n inputs: [{ type: \"uint256\", name: \"value\" }],\n type: \"constructor\",\n },\n constructorParams: [123],\n});"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "DEPLOY"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/contract/deployment/deploy-with-abi.ts#L52"
},
{
"kind": "function",
"name": "prepareMethod",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a method for usage by converting it into a prepared method object."
}
]
}
],
"parameters": [
{
"name": "method",
"type": {
"code": "TMethod",
"tokens": [
{
"name": "TMethod",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The method to prepare."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedMethod<TMethod>",
"tokens": [
{
"name": "PreparedMethod",
"package": "thirdweb"
},
{
"name": "TMethod",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared method object."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { prepareMethod } from \"thirdweb/utils\";\nconst method = \"function transfer(address to, uint256 value)\";\nconst preparedMethod = prepareMethod(method);"
}
]
},
{
"tag": "@contract",
"summary": []
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/utils/abi/prepare-method.ts#L35"
},
{
"kind": "function",
"name": "resolveAbiFromBytecode",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Resolves the ABI (Application Binary Interface) from the bytecode of a contract."
}
]
}
],
"parameters": [
{
"name": "contract",
"type": {
"code": "Readonly<ContractOptions<any, `0x${string}`>>",
"tokens": [
{
"name": "Readonly",
"package": "typescript"
},
{
"name": "ContractOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The ThirdwebContract instance."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<Abi>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
},
{
"name": "Abi",
"package": "abitype"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The resolved ABI as a generic type."
}
]
}
]
},
"blockTags": [
{
"tag": "@throws",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Error if no IPFS URI is found in the bytecode."
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { createThirdwebClient, getContract } from \"thirdweb\";\nimport { resolveAbiFromBytecode } from \"thirdweb/contract\";\nimport { ethereum } from \"thirdweb/chains\";\nconst client = createThirdwebClient({ clientId: \"...\" });\nconst myContract = getContract({\n client,\n address: \"...\",\n chain: ethereum,\n});\nconst abi = await resolveAbiFromBytecode(myContract);"
}
]
},
{
"tag": "@contract",
"summary": []
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/contract/actions/resolve-abi.ts#L121"
},
{
"kind": "function",
"name": "resolveAbiFromContractApi",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Resolves the ABI (Application Binary Interface) for a contract from the contract API."
}
]
}
],
"parameters": [
{
"name": "contract",
"type": {
"code": "Readonly<ContractOptions<any, `0x${string}`>>",
"tokens": [
{
"name": "Readonly",
"package": "typescript"
},
{
"name": "ContractOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The ThirdwebContract instance representing the contract."
}
]
}
]
},
{
"name": "contractApiBaseUrl",
"type": {
"code": "string",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The base URL of the contract API. Defaults to \"https://contract.thirdweb.com/abi\"."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<Abi>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
},
{
"name": "Abi",
"package": "abitype"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the ABI of the contract."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { createThirdwebClient, getContract } from \"thirdweb\";\nimport { resolveAbiFromContractApi } from \"thirdweb/contract\"\nimport { ethereum } from \"thirdweb/chains\";\nconst client = createThirdwebClient({ clientId: \"...\" });\nconst myContract = getContract({\n client,\n address: \"...\",\n chain: ethereum,\n});\nconst abi = await resolveAbiFromContractApi(myContract);"
}
]
},
{
"tag": "@contract",
"summary": []
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/contract/actions/resolve-abi.ts#L84"
},
{
"kind": "function",
"name": "resolveCompositeAbi",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Resolves the ABI for a contract based on its bytecode.\nIf the contract follows the plugin-pattern or dynamic pattern, it resolves the ABIs for the plugins and merges them with the root ABI.\nIf the contract follows the base router pattern, it resolves the ABIs for the plugins and merges them with the root ABI.\nIf the contract follows the diamond pattern, it resolves the ABIs for the facets and merges them with the root ABI."
}
]
}
],
"parameters": [
{
"name": "contract",
"type": {
"code": "Readonly",
"tokens": [
{
"name": "Readonly",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The contract for which to resolve the ABI."
}
]
}
]
},
{
"name": "rootAbi",
"type": {
"code": "Abi",
"tokens": [
{
"name": "Abi",
"package": "abitype"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The root ABI to use for the contract. If not provided, it resolves the ABI from the contract's bytecode."
}
]
}
],
"flags": {
"isOptional": true
}
},
{
"name": "resolveSubAbi",
"type": {
"code": "(contract: Readonly) => Promise<Abi>",
"tokens": [
{
"name": "Readonly",
"package": "typescript"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "Abi",
"package": "abitype"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A function to resolve the ABI for a sub-contract. If not provided, it uses the default ABI resolution logic."
}
]
}
],
"flags": {
"isOptional": true
}
}
],
"returns": {
"type": {
"code": "Promise<Abi>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
},
{
"name": "Abi",
"package": "abitype"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The resolved ABI for the contract."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { createThirdwebClient, getContract } from \"thirdweb\";\nimport { resolveCompositeAbiFromBytecode } from \"thirdweb/contract\";\nimport { ethereum } from \"thirdweb/chains\";\nconst client = createThirdwebClient({ clientId: \"...\" });\nconst myContract = getContract({\n client,\n address: \"...\",\n chain: ethereum,\n});\nconst abi = await resolveCompositeAbiFromBytecode(myContract);"
}
]
},
{
"tag": "@contract",
"summary": []
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/contract/actions/resolve-abi.ts#L288"
},
{
"kind": "function",
"name": "resolveContractAbi",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Resolves the ABI (Application Binary Interface) for a given contract.\nIf the ABI is already cached, it returns the cached value.\nOtherwise, it tries to resolve the ABI from the contract's API.\nIf that fails, it resolves the ABI from the contract's bytecode."
}
]
}
],
"parameters": [
{
"name": "contract",
"type": {
"code": "Readonly<ContractOptions<abi, `0x${string}`>>",
"tokens": [
{
"name": "Readonly",
"package": "typescript"
},
{
"name": "ContractOptions",
"package": "thirdweb"
},
{
"name": "abi",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The contract for which to resolve the ABI."
}
]
}
]
},
{
"name": "contractApiBaseUrl",
"type": {
"code": "string",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The base URL of the contract API. Defaults to \"https://contract.thirdweb.com/abi\"."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<abi>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
},
{
"name": "abi",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the ABI of the contract."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { createThirdwebClient, getContract } from \"thirdweb\";\nimport { resolveContractAbi } from \"thirdweb/contract\";\nimport { ethereum } from \"thirdweb/chains\";\nconst client = createThirdwebClient({ clientId: \"...\" });\nconst myContract = getContract({\n client,\n address: \"...\",\n chain: ethereum,\n});\nconst abi = await resolveContractAbi(myContract);"
}
]
},
{
"tag": "@contract",
"summary": []
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/contract/actions/resolve-abi.ts#L30"
},
{
"kind": "function",
"name": "verifyContract",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Verifies a contract by performing the following steps:"
}
]
},
{
"type": "list",
"ordered": true,
"start": 1,
"spread": false,
"children": [
{
"type": "listItem",
"spread": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Resolves the implementation of the contract."
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Extracts the IPFS URI from the contract bytecode."
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Downloads the contract source code from the IPFS URI."
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Fetches the source files from the compiler metadata."
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Compiles the contract source code using the Solidity compiler."
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Fetches the constructor parameters if not provided."
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Sends a request to the contract verification API to verify the contract source code."
}
]
}
]
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "VerifyContractOptions",
"tokens": [
{
"name": "VerifyContractOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for contract verification."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<string | (Array<string>)>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the verification result."
}
]
}
]
},
"blockTags": [
{
"tag": "@throws",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An error if any of the verification steps fail."
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContract } from \"thirdweb/contract\";\nimport { verifyContract } from \"thirdweb/contract\";\n\nconst contract = getContract({ ... });\nconst verificationResult = await verifyContract({\n contract,\n explorerApiUrl: \"https://api.polygonscan.com/api\",\n explorerApiKey: \"YOUR_API_KEY\",\n});\nconsole.log(verificationResult);"
}
]
},
{
"tag": "@contract",
"summary": []
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/contract/verification/index.ts#L52"
},
{
"kind": "function",
"name": "computePublishedContractAddress",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Predicts the implementation address of any published contract"
}
]
}
],
"parameters": [
{
"name": "args",
"type": {
"code": "{ chain: Readonly; client: ThirdwebClient; constructorParams?: Record<string, unknown>; contractId: string; publisher?: string; salt?: string; version?: string }",
"tokens": [
{
"name": "Readonly",
"package": "typescript"
},
{
"name": "ThirdwebClient",
"package": "thirdweb"
},
{
"name": "Record",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The arguments for predicting the address of a published contract."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<string>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the predicted address of the contract."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { computePublishedContractAddress } from \"thirdweb/deploys\";\n\nconst address = await computePublishedContractAddress({\n client,\n chain,\n contractId: \"AccountFactory\",\n constructorParams,\n});"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "DEPLOY"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/utils/any-evm/compute-published-contract-address.ts#L31"
},
{
"kind": "function",
"name": "deployContract",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Deploy a contract on a given chain"
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "({ abi: Abi; bytecode: `0x${string}`; chain: Readonly; client: ThirdwebClient; constructorParams?: Record<string, unknown> }) & ({ account: Account; salt?: string })",
"tokens": [
{
"name": "Abi",
"package": "abitype"
},
{
"name": "Readonly",
"package": "typescript"
},
{
"name": "ThirdwebClient",
"package": "thirdweb"
},
{
"name": "Record",
"package": "typescript"
},
{
"name": "Account",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "the deploy options"
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<string>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "list",
"ordered": false,
"start": null,
"spread": false,
"children": [
{
"type": "listItem",
"spread": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "a promise that resolves to the deployed contract address"
}
]
}
]
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "heading",
"depth": 2,
"children": [
{
"type": "text",
"value": "Deploying a regular contract from ABI and bytecode"
}
]
},
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { deployContract } from \"thirdweb/deploys\";\n\nconst address = await deployContract({\n client,\n chain,\n bytecode: \"0x...\",\n abi: contractAbi,\n constructorParams: {\n param1: \"value1\",\n param2: 123,\n },\n salt, // optional: salt enables deterministic deploys\n});"
},
{
"type": "heading",
"depth": 2,
"children": [
{
"type": "text",
"value": "Deploying a contract deterministically"
}
]
},
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { deployContract } from \"thirdweb/deploys\";\n\nconst address = await deployContract({\n client,\n chain,\n bytecode: \"0x...\",\n abi: contractAbi,\n constructorParams: {\n param1: \"value1\",\n param2: 123,\n },\n salt, // passing a salt will enable deterministic deploys\n});"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "DEPLOY"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/contract/deployment/deploy-with-abi.ts#L120"
},
{
"kind": "function",
"name": "deployERC1155Contract",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Deploys an thirdweb ERC1155 contract of the given type.\nOn chains where the thirdweb infrastructure contracts are not deployed, this function will deploy them as well."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "{ account: Account; chain: Readonly; client: ThirdwebClient; params: ERC1155ContractParams; type: ERC1155ContractType }",
"tokens": [
{
"name": "Account",
"package": "thirdweb"
},
{
"name": "Readonly",
"package": "typescript"
},
{
"name": "ThirdwebClient",
"package": "thirdweb"
},
{
"name": "ERC1155ContractParams",
"package": "thirdweb"
},
{
"name": "ERC1155ContractType",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The deployment options."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<string>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The deployed contract address."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "DEPLOY"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { deployERC1155Contract } from \"thirdweb/deploys\";\nconst contractAddress = await deployERC1155Contract({\n chain,\n client,\n account,\n type: \"DropERC1155\",\n params: {\n name: \"MyEdition\",\n description: \"My edition contract\",\n symbol: \"ME\",\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/prebuilts/deploy-erc1155.ts#L68"
},
{
"kind": "function",
"name": "deployERC20Contract",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Deploys an thirdweb ERC20 contract of the given type.\nOn chains where the thirdweb infrastructure contracts are not deployed, this function will deploy them as well."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "{ account: Account; chain: Readonly; client: ThirdwebClient; params: ERC20ContractParams; publisher?: string; type: ERC20ContractType }",
"tokens": [
{
"name": "Account",
"package": "thirdweb"
},
{
"name": "Readonly",
"package": "typescript"
},
{
"name": "ThirdwebClient",
"package": "thirdweb"
},
{
"name": "ERC20ContractParams",
"package": "thirdweb"
},
{
"name": "ERC20ContractType",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The deployment options."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<string>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The deployed contract address."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "DEPLOY"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { deployERC20Contract } from \"thirdweb/deploys\";\nconst contractAddress = await deployERC20Contract({\n chain,\n client,\n account,\n type: \"TokenERC20\",\n params: {\n name: \"MyToken\",\n description: \"My Token contract\",\n symbol: \"MT\",\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/prebuilts/deploy-erc20.ts#L64"
},
{
"kind": "function",
"name": "deployERC721Contract",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Deploys an thirdweb ERC721 contract of the given type.\nOn chains where the thirdweb infrastructure contracts are not deployed, this function will deploy them as well."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "{ account: Account; chain: Readonly; client: ThirdwebClient; params: ERC721ContractParams; type: ERC721ContractType }",
"tokens": [
{
"name": "Account",
"package": "thirdweb"
},
{
"name": "Readonly",
"package": "typescript"
},
{
"name": "ThirdwebClient",
"package": "thirdweb"
},
{
"name": "ERC721ContractParams",
"package": "thirdweb"
},
{
"name": "ERC721ContractType",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The deployment options."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<string>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The deployed contract address."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "DEPLOY"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { deployERC721Contract } from \"thirdweb/deploys\";\nconst contractAddress = await deployERC721Contract({\n chain,\n client,\n account,\n type: \"DropERC721\",\n params: {\n name: \"MyNFT\",\n description: \"My NFT contract\",\n symbol: \"NFT\",\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/prebuilts/deploy-erc721.ts#L74"
},
{
"kind": "function",
"name": "deployMarketplaceContract",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Deploys a marketplace contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "{ account: Account; chain: Readonly; client: ThirdwebClient; params: MarketplaceContractParams; version?: string }",
"tokens": [
{
"name": "Account",
"package": "thirdweb"
},
{
"name": "Readonly",
"package": "typescript"
},
{
"name": "ThirdwebClient",
"package": "thirdweb"
},
{
"name": "MarketplaceContractParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for deploying the marketplace contract."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<string>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
}
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "MARKETPLACE"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { deployMarketplaceContract } from \"thirdweb/deploys\";\n\nconst address = await deployMarketplaceContract({\n client,\n chain,\n account,\n params: {\n name: \"MarketplaceV3\",\n description: \"MarketplaceV3 deployed using thirdweb SDK\",\n platformFeeRecipient: \"0x21d514c90ee4E4e4Cd16Ce9185BF01F0F1eE4A04\",\n platformFeeBps: 1000, \n },\n });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/prebuilts/deploy-marketplace.ts#L67"
},
{
"kind": "function",
"name": "deployPackContract",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Deploy a thirdweb Pack contract"
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "{ account: Account; chain: Readonly; client: ThirdwebClient; params: PackContractParams }",
"tokens": [
{
"name": "Account",
"package": "thirdweb"
},
{
"name": "Readonly",
"package": "typescript"
},
{
"name": "ThirdwebClient",
"package": "thirdweb"
},
{
"name": "PackContractParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "params for deploying "
},
{
"type": "link",
"title": null,
"url": "https://thirdweb.com/thirdweb.eth/Pack",
"children": [
{
"type": "inlineCode",
"value": "Pack contract"
}
]
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<string>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": []
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { deployPackContract } from \"thirdweb/extensions/deploy\";\n\nconst packAddress = await deployPackContract({\n account,\n client,\n chain,\n params: {\n name: \"Pack contract name\",\n symbol: \"PACK1155\",\n },\n});"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "DEPLOY"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/prebuilts/deploy-pack.ts#L78"
},
{
"kind": "function",
"name": "deployPublishedContract",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Deploy an instance of a published contract on a given chain"
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "DeployPublishedContractOptions",
"tokens": [
{
"name": "DeployPublishedContractOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "the deploy options"
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<string>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "a promise that resolves to the deployed contract address"
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "heading",
"depth": 2,
"children": [
{
"type": "text",
"value": "Deploying a published contract"
}
]
},
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { deployPublishedContract } from \"thirdweb/deploys\";\n\nconst address = await deployPublishedContract({\n client,\n chain,\n account,\n contractId: \"MyPublishedContract\",\n contractParams: {\n param1: \"value1\",\n param2: 123,\n },\n publisher: \"0x...\", // optional, defaults to the thirdweb deployer\n});"
},
{
"type": "heading",
"depth": 2,
"children": [
{
"type": "text",
"value": "Deploying a published contract deterministically"
}
]
},
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { deployPublishedContract } from \"thirdweb/deploys\";\n\nconst address = await deployPublishedContract({\n client,\n chain,\n account,\n contractId: \"MyPublishedContract\",\n contractParams: {\n param1: \"value1\",\n param2: 123,\n },\n publisher: \"0x...\",\n salt: \"your-salt\", // this will deterministically deploy the contract at the same address on all chains\n});"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "DEPLOY"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/prebuilts/deploy-published.ts#L86"
},
{
"kind": "function",
"name": "deploySplitContract",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Deploys a thirdweb "
},
{
"type": "link",
"title": null,
"url": "https://thirdweb.com/thirdweb.eth/Split",
"children": [
{
"type": "inlineCode",
"value": "Split contract"
}
]
},
{
"type": "text",
"value": "\nOn chains where the thirdweb infrastructure contracts are not deployed, this function will deploy them as well."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "{ account: Account; chain: Readonly; client: ThirdwebClient; params: SplitContractParams }",
"tokens": [
{
"name": "Account",
"package": "thirdweb"
},
{
"name": "Readonly",
"package": "typescript"
},
{
"name": "ThirdwebClient",
"package": "thirdweb"
},
{
"name": "SplitContractParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The deployment options."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<string>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The deployed contract address."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "DEPLOY"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { deploySplitContract } from \"thirdweb/deploys\";\nconst contractAddress = await deploySplitContract({\n chain,\n client,\n account,\n params: {\n name: \"Split contract\",\n payees: [\"0x...123\", \"0x...456\"],\n shares: [5100, 4900], // See type `SplitContractParams` for more context\n },\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/prebuilts/deploy-split.ts#L78"
},
{
"kind": "function",
"name": "getInitializeTransaction",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares the initialization transaction for a contract deployment"
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "{ account: Account; chain: Readonly; client: ThirdwebClient; deployMetadata: FetchDeployMetadataResult; implementationContract: Readonly; initializeParams?: Record<string, unknown>; modules?: Array<{ deployMetadata: FetchDeployMetadataResult; initializeParams?: Record<string, unknown> }> }",
"tokens": [
{
"name": "Account",
"package": "thirdweb"
},
{
"name": "Readonly",
"package": "typescript"
},
{
"name": "ThirdwebClient",
"package": "thirdweb"
},
{
"name": "FetchDeployMetadataResult",
"package": "thirdweb"
},
{
"name": "Readonly",
"package": "typescript"
},
{
"name": "Record",
"package": "typescript"
},
{
"name": "FetchDeployMetadataResult",
"package": "thirdweb"
},
{
"name": "Record",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for generating the initialize transaction"
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<PreparedTransaction<[], AbiFunction, PrepareTransactionOptions>>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
},
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared transaction for contract initialization"
}
]
}
]
},
"blockTags": [
{
"tag": "@contract",
"summary": []
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/prebuilts/deploy-published.ts#L351"
},
{
"kind": "function",
"name": "getOrDeployInfraForPublishedContract",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Gets or deploys the infrastructure contracts needed for a published contract deployment"
}
]
}
],
"parameters": [
{
"name": "args",
"type": {
"code": "({ account: Account; chain: Readonly; client: ThirdwebClient }) & ({ constructorParams?: Record<string, unknown>; contractId: string; publisher?: string; version?: string })",
"tokens": [
{
"name": "Account",
"package": "thirdweb"
},
{
"name": "Readonly",
"package": "typescript"
},
{
"name": "ThirdwebClient",
"package": "thirdweb"
},
{
"name": "Record",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The arguments object"
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<{ cloneFactoryContract: Readonly; implementationContract: Readonly }>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
},
{
"name": "Readonly",
"package": "typescript"
},
{
"name": "Readonly",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An object containing:"
}
]
},
{
"type": "list",
"ordered": false,
"start": null,
"spread": false,
"children": [
{
"type": "listItem",
"spread": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "cloneFactoryContract: The factory contract used for creating clones"
}
]
}
]
},
{
"type": "listItem",
"spread": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "implementationContract: The deployed implementation contract"
}
]
}
]
}
]
}
]
},
"blockTags": [
{
"tag": "@contract",
"summary": []
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/contract/deployment/utils/bootstrap.ts#L43"
},
{
"kind": "function",
"name": "prepareDeterministicDeployTransaction",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Deploy a contract deterministically - will maintain the same address across chains.\nThis is meant to be used with published contracts configured with the 'direct deploy' method.\nUnder the hood, this uses a keyless transaction with a common create2 factory."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "{ chain: Readonly; client: ThirdwebClient; constructorParams?: Record<string, unknown>; contractId: string; publisher?: string; salt?: string; version?: string }",
"tokens": [
{
"name": "Readonly",
"package": "typescript"
},
{
"name": "ThirdwebClient",
"package": "thirdweb"
},
{
"name": "Record",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "the options to deploy the contract"
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<[], AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "list",
"ordered": false,
"start": null,
"spread": false,
"children": [
{
"type": "listItem",
"spread": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "the transaction to deploy the contract"
}
]
}
]
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "DEPLOY"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { prepareDeterministicDeployTransaction } from \"thirdweb/deploys\";\nimport { sepolia } from \"thirdweb/chains\";\n\nconst tx = prepareDeterministicDeployTransaction({\n client,\n chain: sepolia,\n contractId: \"AccountFactory\",\n constructorParams: [123],\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/contract/deployment/deploy-deterministic.ts#L40"
},
{
"kind": "function",
"name": "getContractEvents",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Retrieves events from a contract based on the provided options."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "GetContractEventsOptions<abi, abiEvents, TStrict>",
"tokens": [
{
"name": "GetContractEventsOptions",
"package": "thirdweb"
},
{
"name": "abi",
"package": "thirdweb"
},
{
"name": "abiEvents",
"package": "thirdweb"
},
{
"name": "TStrict",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for retrieving events."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<GetContractEventsResult<abiEvents, TStrict>>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
},
{
"name": "GetContractEventsResult",
"package": "thirdweb"
},
{
"name": "abiEvents",
"package": "thirdweb"
},
{
"name": "TStrict",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to an array of parsed event logs.\nNote: toBlock and fromBlock are both inclusive."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractEvents } from \"thirdweb\";\nconst events = await getContractEvents({\n contract: myContract,\n fromBlock: 123456n,\n toBlock: 123456n,\n events: [preparedEvent, preparedEvent2],\n});"
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Optionally specify a blockRange as the number of blocks to retrieve. toBlock will default to the current block number."
}
]
},
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractEvents } from \"thirdweb\";\nconst events = await getContractEvents({\n contract: myContract,\n blockRange: 123456n,\n events: [preparedEvent, preparedEvent2],\n});"
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Use fromBlock with blockRange for pagination."
}
]
},
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractEvents } from \"thirdweb\";\nconst events = await getContractEvents({\n contract: myContract,\n fromBlock: lastBlockFetched,\n blockRange: 123456n,\n events: [preparedEvent, preparedEvent2],\n});"
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Retrieve events for a specific block hash."
}
]
},
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractEvents } from \"thirdweb\";\nconst events = await getContractEvents({\n contract: myContract,\n blockHash: \"0x...\",\n events: [preparedEvent, preparedEvent2],\n});"
}
]
},
{
"tag": "@contract",
"summary": []
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/event/actions/get-events.ts#L100"
},
{
"kind": "function",
"name": "parseEventLogs",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Parses logs and returns the corresponding events."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "ParseEventLogsOptions<abiEvents, TStrict>",
"tokens": [
{
"name": "ParseEventLogsOptions",
"package": "thirdweb"
},
{
"name": "abiEvents",
"package": "thirdweb"
},
{
"name": "TStrict",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for parsing logs."
}
]
}
]
}
],
"returns": {
"type": {
"code": "ParseEventLogsResult<abiEvents, TStrict>",
"tokens": [
{
"name": "ParseEventLogsResult",
"package": "thirdweb"
},
{
"name": "abiEvents",
"package": "thirdweb"
},
{
"name": "TStrict",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed events."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { parseEventLogs } from \"thirdweb\";\nconst events = parseEventLogs({\n logs,\n events: [preparedEvent, preparedEvent2],\n});"
}
]
},
{
"tag": "@contract",
"summary": []
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/event/actions/parse-logs.ts#L38"
},
{
"kind": "function",
"name": "prepareEvent",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares an event by parsing the signature, generating the event hash, and encoding the event topics."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "PrepareEventOptions<TSignature>",
"tokens": [
{
"name": "PrepareEventOptions",
"package": "thirdweb"
},
{
"name": "TSignature",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for preparing the event."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedEvent<ParseEvent<TSignature>>",
"tokens": [
{
"name": "PreparedEvent",
"package": "thirdweb"
},
{
"name": "ParseEvent",
"package": "thirdweb"
},
{
"name": "TSignature",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared event object."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { prepareEvent } from \"thirdweb\";\nconst myEvent = prepareEvent({\n signature: \"event MyEvent(uint256 myArg)\",\n});"
}
]
},
{
"tag": "@contract",
"summary": []
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/event/prepare-event.ts#L48"
},
{
"kind": "function",
"name": "watchContractEvents",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Listens for contract events from the blockchain."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "{ contract: Readonly<ContractOptions<abi, `0x${string}`>>; events?: abiEvents; latestBlockNumber?: bigint; onEvents: (events: ParseEventLogsResult<abiEvents, TStrict>) => void; strict?: TStrict }",
"tokens": [
{
"name": "Readonly",
"package": "typescript"
},
{
"name": "ContractOptions",
"package": "thirdweb"
},
{
"name": "abi",
"package": "thirdweb"
},
{
"name": "abiEvents",
"package": "thirdweb"
},
{
"name": "ParseEventLogsResult",
"package": "thirdweb"
},
{
"name": "abiEvents",
"package": "thirdweb"
},
{
"name": "TStrict",
"package": "thirdweb"
},
{
"name": "TStrict",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for retrieving contract events."
}
]
}
]
}
],
"returns": {
"type": {
"code": "() => void",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The unwatch function."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "heading",
"depth": 3,
"children": [
{
"type": "text",
"value": "Listen to all events for a contract"
}
]
},
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { watchContractEvents } from \"thirdweb\";\nconst unwatch = watchContractEvents({\n contract: myContract,\n onEvents: (events) => {\n // do something with the events\n },\n});"
},
{
"type": "heading",
"depth": 3,
"children": [
{
"type": "text",
"value": "Listen to specific events for a contract"
}
]
},
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { prepareEvent, watchContractEvents } from \"thirdweb\";\nconst myEvent = prepareEvent({\n event: \"event MyEvent(uint256 myArg)\",\n});\nconst events = await watchContractEvents({\n contract: myContract,\n events: [myEvent],\n onEvents: (events) => {\n // do something with the events\n },\n});"
}
]
},
{
"tag": "@contract",
"summary": []
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/event/actions/watch-events.ts#L56"
},
{
"kind": "function",
"name": "airdropERC1155",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"airdropERC1155\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(AirdropERC1155Params) | ({ asyncParams: () => Promise<AirdropERC1155Params> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "AirdropERC1155Params",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "AirdropERC1155Params",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"airdropERC1155\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "AIRDROP"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { airdropERC1155 } from \"thirdweb/extensions/airdrop\";\n\nconst transaction = airdropERC1155({\n contract,\n tokenAddress: ...,\n contents: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC1155.ts#L143"
},
{
"kind": "function",
"name": "airdropERC1155WithSignature",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"airdropERC1155WithSignature\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(AirdropERC1155WithSignatureParams) | ({ asyncParams: () => Promise<AirdropERC1155WithSignatureParams> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "AirdropERC1155WithSignatureParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "AirdropERC1155WithSignatureParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"airdropERC1155WithSignature\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "AIRDROP"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { airdropERC1155WithSignature } from \"thirdweb/extensions/airdrop\";\n\nconst transaction = airdropERC1155WithSignature({\n contract,\n req: ...,\n signature: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/airdrop/write/airdropERC1155WithSignature.ts#L29"
},
{
"kind": "function",
"name": "airdropERC20",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"airdropERC20\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(AirdropERC20Params) | ({ asyncParams: () => Promise<AirdropERC20Params> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "AirdropERC20Params",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "AirdropERC20Params",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"airdropERC20\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "AIRDROP"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { airdropERC20 } from \"thirdweb/extensions/airdrop\";\n\nconst transaction = airdropERC20({\n contract,\n tokenAddress: ...,\n contents: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC20.ts#L138"
},
{
"kind": "function",
"name": "airdropERC20WithSignature",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"airdropERC20WithSignature\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(AirdropERC20WithSignatureParams) | ({ asyncParams: () => Promise<AirdropERC20WithSignatureParams> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "AirdropERC20WithSignatureParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "AirdropERC20WithSignatureParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"airdropERC20WithSignature\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "AIRDROP"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { airdropERC20WithSignature } from \"thirdweb/extensions/airdrop\";\n\nconst transaction = airdropERC20WithSignature({\n contract,\n req: ...,\n signature: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/airdrop/write/airdropERC20WithSignature.ts#L29"
},
{
"kind": "function",
"name": "airdropERC721",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"airdropERC721\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(AirdropERC721Params) | ({ asyncParams: () => Promise<AirdropERC721Params> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "AirdropERC721Params",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "AirdropERC721Params",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"airdropERC721\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "AIRDROP"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { airdropERC721 } from \"thirdweb/extensions/airdrop\";\n\nconst transaction = airdropERC721({\n contract,\n tokenAddress: ...,\n contents: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropERC721.ts#L138"
},
{
"kind": "function",
"name": "airdropERC721WithSignature",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"airdropERC721WithSignature\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(AirdropERC721WithSignatureParams) | ({ asyncParams: () => Promise<AirdropERC721WithSignatureParams> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "AirdropERC721WithSignatureParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "AirdropERC721WithSignatureParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"airdropERC721WithSignature\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "AIRDROP"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { airdropERC721WithSignature } from \"thirdweb/extensions/airdrop\";\n\nconst transaction = airdropERC721WithSignature({\n contract,\n req: ...,\n signature: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/airdrop/write/airdropERC721WithSignature.ts#L29"
},
{
"kind": "function",
"name": "airdropNativeToken",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"airdropNativeToken\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(AirdropNativeTokenParams) | ({ asyncParams: () => Promise<AirdropNativeTokenParams> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "AirdropNativeTokenParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "AirdropNativeTokenParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"airdropNativeToken\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "AIRDROP"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { airdropNativeToken } from \"thirdweb/extensions/airdrop\";\n\nconst transaction = airdropNativeToken({\n contract,\n contents: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/airdropNativeToken.ts#L126"
},
{
"kind": "function",
"name": "claimERC1155",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Claim airdrop of ERC1155 tokens for allowlisted addresses. (Pull based airdrop)"
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<ClaimERC1155Params>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "ClaimERC1155Params",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The transaction options."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the transaction result."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { claimERC1155 } from \"thirdweb/extensions/airdrop\";\nimport { sendTransaction } from \"thirdweb\";\n\nconst tokenAddress = \"0x...\" // Address of airdropped tokens to claim\nconst recipient = \"0x...\" // Address of the allowlisted recipient\n\nconst claimTransaction = claimERC1155({\n contract,\n tokenAddress,\n recipient\n});\n\nawait sendTransaction({ claimTransaction, account });\n"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "AIRDROP"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/airdrop/write/claimERC1155.ts#L38"
},
{
"kind": "function",
"name": "claimERC20",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Claim airdrop of ERC20 tokens for allowlisted addresses. (Pull based airdrop)"
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<ClaimERC20Params>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "ClaimERC20Params",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The transaction options."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the transaction result."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { claimERC20 } from \"thirdweb/extensions/airdrop\";\nimport { sendTransaction } from \"thirdweb\";\n\nconst tokenAddress = \"0x...\" // Address of airdropped tokens to claim\nconst recipient = \"0x...\" // Address of the allowlisted recipient\n\nconst claimTransaction = claimERC20({\n contract,\n tokenAddress,\n recipient\n});\n\nawait sendTransaction({ claimTransaction, account });\n"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "AIRDROP"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/airdrop/write/claimERC20.ts#L42"
},
{
"kind": "function",
"name": "claimERC721",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Claim airdrop of ERC721 tokens for allowlisted addresses. (Pull based airdrop)"
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<ClaimERC721Params>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "ClaimERC721Params",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The transaction options."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the transaction result."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { claimERC721 } from \"thirdweb/extensions/airdrop\";\nimport { sendTransaction } from \"thirdweb\";\n\nconst tokenAddress = \"0x...\" // Address of airdropped tokens to claim\nconst recipient = \"0x...\" // Address of the allowlisted recipient\n\nconst claimTransaction = claimERC721({\n contract,\n tokenAddress,\n recipient\n});\n\nawait sendTransaction({ claimTransaction, account });\n"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "AIRDROP"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/airdrop/write/claimERC721.ts#L38"
},
{
"kind": "function",
"name": "fetchProofsERC1155",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Retrieves the claim merkle proof for the provided address."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "{ contract: Readonly; merkleRoot: string; recipient: string }",
"tokens": [
{
"name": "Readonly",
"package": "typescript"
}
]
}
}
],
"returns": {
"type": {
"code": "Promise<null | (ClaimProofERC1155)>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
},
{
"name": "ClaimProofERC1155",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the proof or null if the recipient is not in the allowlist"
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { fetchProofsERCC1155 } from \"thirdweb/extensions/airdrop\";\nimport { getContract, defineChain } from \"thirdweb\";\n\nconst TOKEN = getContracct({\n client,\n chain: defineChain(1),\n address: \"0x...\"\n});\n\nconst merkleRoot = await tokenMerkleRoot({\n contract: TOKEN,\n tokenAddress: TOKEN.address\n});\n\nconst proof = await fetchProofsERC1155({\n contract: TOKEN,\n recipient: \"0x...\",\n merkleRoot\n});"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "AIRDROP"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/utils/extensions/airdrop/fetch-proofs-erc1155.ts#L47"
},
{
"kind": "function",
"name": "fetchProofsERC20",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Retrieves the claim merkle proof for the provided address."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "{ contract: Readonly; merkleRoot: string; recipient: string; tokenDecimals: number }",
"tokens": [
{
"name": "Readonly",
"package": "typescript"
}
]
}
}
],
"returns": {
"type": {
"code": "Promise<null | (ClaimProofERC20)>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
},
{
"name": "ClaimProofERC20",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the proof or null if the recipient is not in the allowlist"
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { fetchProofsERCC20 } from \"thirdweb/extensions/airdrop\";\nimport { getContract, defineChain } from \"thirdweb\";\n\nconst TOKEN = getContracct({\n client,\n chain: defineChain(1),\n address: \"0x...\"\n});\n\nconst merkleRoot = await tokenMerkleRoot({\n contract: TOKEN,\n tokenAddress: TOKEN.address\n});\n\nconst proof = await fetchProofsERC20({\n contract: TOKEN,\n recipient: \"0x...\",\n merkleRoot\n});"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "AIRDROP"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/utils/extensions/airdrop/fetch-proofs-erc20.ts#L48"
},
{
"kind": "function",
"name": "fetchProofsERC721",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Retrieves the claim merkle proof for the provided address."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "{ contract: Readonly; merkleRoot: string; recipient: string }",
"tokens": [
{
"name": "Readonly",
"package": "typescript"
}
]
}
}
],
"returns": {
"type": {
"code": "Promise<null | (ClaimProofERC721)>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
},
{
"name": "ClaimProofERC721",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the proof or null if the recipient is not in the allowlist"
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { fetchProofsERC721 } from \"thirdweb/extensions/airdrop\";\nimport { getContract, defineChain } from \"thirdweb\";\n\nconst NFT = getContracct({\n client,\n chain: defineChain(1),\n address: \"0x...\"\n});\n\nconst merkleRoot = await tokenMerkleRoot({\n contract: NFT,\n tokenAddress: NFT.address\n});\n\nconst proof = await fetchProofsERC721({\n contract: NFT,\n recipient: \"0x...\",\n merkleRoot\n});"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "AIRDROP"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/utils/extensions/airdrop/fetch-proofs-erc721.ts#L47"
},
{
"kind": "function",
"name": "generateAirdropSignatureERC1155",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Generates the req and signature for sending ERC1155 airdrop."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "GenerateAirdropERC1155SignatureOptions",
"tokens": [
{
"name": "GenerateAirdropERC1155SignatureOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the airdrop."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<{ req: { contents: readonly Array<{ amount: bigint; recipient: string; tokenId: bigint }>; expirationTimestamp: bigint; tokenAddress: string; uid: `0x${string}` }; signature: `0x${string}` }>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the req and signature."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { airdropERC1155WithSignature, generateAirdropSignatureERC1155 } from \"thirdweb/extensions/airdrop\";\n\n// list of recipients, tokenIds and amounts to airdrop for each recipient\nconst contents = [\n { recipient: \"0x...\", tokenId: 0, amount: 10n },\n { recipient: \"0x...\", tokenId: 0, amount: 15n },\n { recipient: \"0x...\", tokenId: 0, amount: 20n },\n ];\n\nconst { req, signature } = await generateAirdropSignatureERC1155({\n account,\n contract,\n airdropRequest: {\n tokenAddress: \"0x...\", // address of the ERC1155 token to airdrop\n contents\n },\n});\n\nconst transaction = airdropERC1155WithSignature({\n contract,\n req,\n signature,\n});\nawait sendTransaction({ transaction, account });"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "AIRDROP"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/airdrop/write/airdropERC1155WithSignature.ts#L73"
},
{
"kind": "function",
"name": "generateAirdropSignatureERC20",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Generates the req and signature for sending ERC20 airdrop."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "GenerateAirdropERC20SignatureOptions",
"tokens": [
{
"name": "GenerateAirdropERC20SignatureOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the airdrop."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<{ req: { contents: readonly Array<{ amount: bigint; recipient: string }>; expirationTimestamp: bigint; tokenAddress: string; uid: `0x${string}` }; signature: `0x${string}` }>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the req and signature."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { airdropERC20WithSignature, generateAirdropSignatureERC20 } from \"thirdweb/extensions/airdrop\";\n\n// list of recipients and amounts to airdrop for each recipient\nconst contents = [\n { recipient: \"0x...\", amount: 10n }, // amount in wei\n { recipient: \"0x...\", amount: 15n }, // amount in wei\n { recipient: \"0x...\", amount: 20n }, // amount in wei\n ];\n\nconst { req, signature } = await generateAirdropSignatureERC20({\n account,\n contract,\n airdropRequest: {\n tokenAddress: \"0x...\", // address of the ERC20 token to airdrop\n contents\n },\n});\n\nconst transaction = airdropERC20WithSignature({\n contract,\n req,\n signature,\n});\nawait sendTransaction({ transaction, account });"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "AIRDROP"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/airdrop/write/airdropERC20WithSignature.ts#L73"
},
{
"kind": "function",
"name": "generateAirdropSignatureERC721",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Generates the req and signature for sending ERC721 airdrop."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "GenerateAirdropERC721SignatureOptions",
"tokens": [
{
"name": "GenerateAirdropERC721SignatureOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the airdrop."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<{ req: { contents: readonly Array<{ recipient: string; tokenId: bigint }>; expirationTimestamp: bigint; tokenAddress: string; uid: `0x${string}` }; signature: `0x${string}` }>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the req and signature."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { airdropERC721WithSignature, generateAirdropSignatureERC721 } from \"thirdweb/extensions/airdrop\";\n\n// list of recipients and tokenIds to airdrop for each recipient\nconst contents = [\n { recipient: \"0x...\", tokenId: 0 },\n { recipient: \"0x...\", tokenId: 1 },\n { recipient: \"0x...\", tokenId: 2 },\n ];\n\nconst { req, signature } = await generateAirdropSignatureERC721({\n account,\n contract,\n airdropRequest: {\n tokenAddress: \"0x...\", // address of the ERC721 token to airdrop\n contents\n },\n});\n\nconst transaction = airdropERC721WithSignature({\n contract,\n req,\n signature,\n});\nawait sendTransaction({ transaction, account });"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "AIRDROP"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/airdrop/write/airdropERC721WithSignature.ts#L73"
},
{
"kind": "function",
"name": "generateMerkleTreeInfoERC1155",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Generate merkle tree for a given snapshot."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<GenerateMerkleTreeInfoERC1155Params>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "GenerateMerkleTreeInfoERC1155Params",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The transaction options."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<{ merkleRoot: string; snapshotUri: string }>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the merkle-root and snapshot-uri."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { generateMerkleTreeInfoERC1155 } from \"thirdweb/extensions/airdrop\";\n\n// snapshot / allowlist of airdrop recipients and amounts\nconst snapshot = [\n { recipient: \"0x...\", tokenId: 0, amount: 10 },\n { recipient: \"0x...\", tokenId: 1, amount: 12 },\n { recipient: \"0x...\", tokenId: 2, amount: 15 },\n];\n\nconst tokenAddress = \"0x...\" // Address of ERC1155 airdrop token\n\nconst { merkleRoot, snapshotUri } = await generateMerkleTreeInfoERC1155({\n contract,\n tokenAddress,\n snapshot\n});\n\n// Optional next steps {See: saveSnapshot and setMerkleRoot functions}\n// - Save snapshot on-chain (on the airdrop contract uri)\n// - Set merkle root on the contract to enable claiming\n"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "AIRDROP"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/airdrop/write/merkleInfoERC1155.ts#L43"
},
{
"kind": "function",
"name": "generateMerkleTreeInfoERC20",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Generate merkle tree for a given snapshot."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<GenerateMerkleTreeInfoERC20Params>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "GenerateMerkleTreeInfoERC20Params",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The transaction options."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<{ merkleRoot: string; snapshotUri: string }>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the merkle-root and snapshot-uri."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { generateMerkleTreeInfoERC20 } from \"thirdweb/extensions/airdrop\";\n\n// snapshot / allowlist of airdrop recipients and amounts\nconst snapshot = [\n { recipient: \"0x...\", amount: 10 },\n { recipient: \"0x...\", amount: 15 },\n { recipient: \"0x...\", amount: 20 },\n];\n\nconst tokenAddress = \"0x...\" // Address of ERC20 airdrop token\n\nconst { merkleRoot, snapshotUri } = await generateMerkleTreeInfoERC20({\n contract,\n tokenAddress,\n snapshot\n});\n\n// Optional next steps {See: saveSnapshot and setMerkleRoot functions}\n// - Save snapshot on-chain (on the airdrop contract uri)\n// - Set merkle root on the contract to enable claiming\n"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "AIRDROP"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/airdrop/write/merkleInfoERC20.ts#L47"
},
{
"kind": "function",
"name": "generateMerkleTreeInfoERC721",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Generate merkle tree for a given snapshot."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<GenerateMerkleTreeInfoERC721Params>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "GenerateMerkleTreeInfoERC721Params",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The transaction options."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<{ merkleRoot: string; snapshotUri: string }>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the merkle-root and snapshot-uri."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { generateMerkleTreeInfoERC721 } from \"thirdweb/extensions/airdrop\";\n\n// snapshot / allowlist of airdrop recipients and amounts\nconst snapshot = [\n { recipient: \"0x...\", tokenId: 0 },\n { recipient: \"0x...\", tokenId: 1 },\n { recipient: \"0x...\", tokenId: 2 },\n];\n\nconst tokenAddress = \"0x...\" // Address of ERC721 airdrop token\n\nconst { merkleRoot, snapshotUri } = await generateMerkleTreeInfoERC721({\n contract,\n tokenAddress,\n snapshot\n});\n\n// Optional next steps {See: saveSnapshot and setMerkleRoot functions}\n// - Save snapshot on-chain (on the airdrop contract uri)\n// - Set merkle root on the contract to enable claiming\n"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "AIRDROP"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/airdrop/write/merkleInfoERC721.ts#L43"
},
{
"kind": "function",
"name": "isClaimed",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"isClaimed\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<IsClaimedParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "IsClaimedParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the isClaimed function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<boolean>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "AIRDROP"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isClaimed } from \"thirdweb/extensions/airdrop\";\n\nconst result = await isClaimed({\n contract,\n receiver: ...,\n token: ...,\n tokenId: ...,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/read/isClaimed.ts#L137"
},
{
"kind": "function",
"name": "saveSnapshot",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Generate merkle tree for a given snapshot and save the info on-chain."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<SaveSnapshotParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "SaveSnapshotParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The transaction options."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the transaction result."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "\n// This is ERC20 example. Should import and use other ERC variants as needed\n\nimport { generateMerkleTreeInfoERC20, saveSnapshot, setMerkleRoot } from \"thirdweb/extensions/airdrop\";\n\n// snapshot / allowlist of airdrop recipients and amounts\nconst snapshot = [\n { recipient: \"0x...\", amount: 10 },\n { recipient: \"0x...\", amount: 15 },\n { recipient: \"0x...\", amount: 20 },\n];\n\nconst tokenAddress = \"0x...\" // Address of airdrop token\n\nconst { merkleRoot, snapshotUri } = await generateMerkleTreeInfoERC20({\n contract,\n tokenAddress,\n snapshot\n});\n\nconst saveSnapshotTransaction = saveSnapshot({\n contract,\n merkleRoot,\n snapshotUri,\n});\nawait sendTransaction({ saveSnapshotTransaction, account });\n\nconst setMerkleRootTransaction = setMerkleRoot({\n contract,\n token,\n tokenMerkleRoot: merkleRoot as `0x${string}`,\n resetClaimStatus: false // toggle as needed\n signature,\n});\nawait sendTransaction({ setMerkleRootTransaction, account });\n"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "AIRDROP"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/airdrop/write/saveSnapshot.ts#L58"
},
{
"kind": "function",
"name": "setMerkleRoot",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"setMerkleRoot\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(SetMerkleRootParams) | ({ asyncParams: () => Promise<SetMerkleRootParams> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "SetMerkleRootParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "SetMerkleRootParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"setMerkleRoot\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "AIRDROP"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { setMerkleRoot } from \"thirdweb/extensions/airdrop\";\n\nconst transaction = setMerkleRoot({\n contract,\n token: ...,\n tokenMerkleRoot: ...,\n resetClaimStatus: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/write/setMerkleRoot.ts#L133"
},
{
"kind": "function",
"name": "tokenConditionId",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"tokenConditionId\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<TokenConditionIdParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "TokenConditionIdParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the tokenConditionId function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<bigint>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "AIRDROP"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { tokenConditionId } from \"thirdweb/extensions/airdrop\";\n\nconst result = await tokenConditionId({\n contract,\n tokenAddress: ...,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/read/tokenConditionId.ts#L120"
},
{
"kind": "function",
"name": "tokenMerkleRoot",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"tokenMerkleRoot\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<TokenMerkleRootParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "TokenMerkleRootParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the tokenMerkleRoot function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<`0x${string}`>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "AIRDROP"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { tokenMerkleRoot } from \"thirdweb/extensions/airdrop\";\n\nconst result = await tokenMerkleRoot({\n contract,\n tokenAddress: ...,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/airdrop/__generated__/Airdrop/read/tokenMerkleRoot.ts#L120"
},
{
"kind": "function",
"name": "contractURI",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"contractURI\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the contractURI function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<string>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "COMMON"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { contractURI } from \"thirdweb/extensions/common\";\n\nconst result = await contractURI({\n contract,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/common/__generated__/IContractMetadata/read/contractURI.ts#L64"
},
{
"kind": "function",
"name": "getContractMetadata",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Retrieves the contract metadata including name and symbol."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The transaction options."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<{ name: string; symbol: string }>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to an object containing the resolved metadata, name, and symbol."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "COMMON"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractMetadata } from \"thirdweb/extensions/common\";\nconst metadata = await getContractMetadata({ contract });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/common/read/getContractMetadata.ts#L20"
},
{
"kind": "function",
"name": "getDefaultRoyaltyInfo",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"getDefaultRoyaltyInfo\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the getDefaultRoyaltyInfo function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<readonly [string, number]>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "COMMON"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getDefaultRoyaltyInfo } from \"thirdweb/extensions/common\";\n\nconst result = await getDefaultRoyaltyInfo({\n contract,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/read/getDefaultRoyaltyInfo.ts#L67"
},
{
"kind": "function",
"name": "getPlatformFeeInfo",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"getPlatformFeeInfo\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the getPlatformFeeInfo function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<readonly [string, number]>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "COMMON"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getPlatformFeeInfo } from \"thirdweb/extensions/common\";\n\nconst result = await getPlatformFeeInfo({\n contract,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/common/__generated__/IPlatformFee/read/getPlatformFeeInfo.ts#L67"
},
{
"kind": "function",
"name": "getRoyaltyInfoForToken",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"getRoyaltyInfoForToken\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<GetRoyaltyInfoForTokenParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "GetRoyaltyInfoForTokenParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the getRoyaltyInfoForToken function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<readonly [string, number]>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "COMMON"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getRoyaltyInfoForToken } from \"thirdweb/extensions/common\";\n\nconst result = await getRoyaltyInfoForToken({\n contract,\n tokenId: ...,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/read/getRoyaltyInfoForToken.ts#L126"
},
{
"kind": "function",
"name": "isGetContractMetadataSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "contractURI"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "contractURI"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "COMMON"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isContractURISupported } from \"thirdweb/extensions/common\";\nconst supported = isContractURISupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/common/__generated__/IContractMetadata/read/contractURI.ts#L27"
},
{
"kind": "function",
"name": "isGetDefaultRoyaltyInfoSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "getDefaultRoyaltyInfo"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "getDefaultRoyaltyInfo"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "COMMON"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isGetDefaultRoyaltyInfoSupported } from \"thirdweb/extensions/common\";\nconst supported = isGetDefaultRoyaltyInfoSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/read/getDefaultRoyaltyInfo.ts#L30"
},
{
"kind": "function",
"name": "isGetPlatformFeeInfoSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "getPlatformFeeInfo"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "getPlatformFeeInfo"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "COMMON"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isGetPlatformFeeInfoSupported } from \"thirdweb/extensions/common\";\nconst supported = isGetPlatformFeeInfoSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/common/__generated__/IPlatformFee/read/getPlatformFeeInfo.ts#L30"
},
{
"kind": "function",
"name": "isGetRoyaltyInfoForTokenSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "getRoyaltyInfoForToken"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "getRoyaltyInfoForToken"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "COMMON"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isGetRoyaltyInfoForTokenSupported } from \"thirdweb/extensions/common\";\nconst supported = isGetRoyaltyInfoForTokenSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/read/getRoyaltyInfoForToken.ts#L43"
},
{
"kind": "function",
"name": "isMulticallSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "multicall"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "multicall"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "COMMON"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isMulticallSupported } from \"thirdweb/extensions/common\";\n\nconst supported = isMulticallSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/common/__generated__/IMulticall/write/multicall.ts#L44"
},
{
"kind": "function",
"name": "isNameSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "name"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "name"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "COMMON"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isNameSupported } from \"thirdweb/extensions/common\";\nconst supported = isNameSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/common/__generated__/IContractMetadata/read/name.ts#L27"
},
{
"kind": "function",
"name": "isOwnerSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "owner"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "owner"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "COMMON"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isOwnerSupported } from \"thirdweb/extensions/common\";\nconst supported = isOwnerSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/common/__generated__/IOwnable/read/owner.ts#L27"
},
{
"kind": "function",
"name": "isPrimarySaleRecipientSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "primarySaleRecipient"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "primarySaleRecipient"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "COMMON"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isPrimarySaleRecipientSupported } from \"thirdweb/extensions/common\";\nconst supported = isPrimarySaleRecipientSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/common/__generated__/IPrimarySale/read/primarySaleRecipient.ts#L27"
},
{
"kind": "function",
"name": "isSetContractURISupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "setContractURI"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "setContractURI"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "COMMON"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isSetContractURISupported } from \"thirdweb/extensions/common\";\n\nconst supported = isSetContractURISupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/common/__generated__/IContractMetadata/write/setContractURI.ts#L39"
},
{
"kind": "function",
"name": "isSetDefaultRoyaltyInfoSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "setDefaultRoyaltyInfo"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "setDefaultRoyaltyInfo"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "COMMON"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isSetDefaultRoyaltyInfoSupported } from \"thirdweb/extensions/common\";\n\nconst supported = isSetDefaultRoyaltyInfoSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/write/setDefaultRoyaltyInfo.ts#L50"
},
{
"kind": "function",
"name": "isSetPlatformFeeInfoSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "setPlatformFeeInfo"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "setPlatformFeeInfo"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "COMMON"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isSetPlatformFeeInfoSupported } from \"thirdweb/extensions/common\";\n\nconst supported = isSetPlatformFeeInfoSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/common/__generated__/IPlatformFee/write/setPlatformFeeInfo.ts#L50"
},
{
"kind": "function",
"name": "isSetPrimarySaleRecipientSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "setPrimarySaleRecipient"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "setPrimarySaleRecipient"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "COMMON"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isSetPrimarySaleRecipientSupported } from \"thirdweb/extensions/common\";\n\nconst supported = isSetPrimarySaleRecipientSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/common/__generated__/IPrimarySale/write/setPrimarySaleRecipient.ts#L42"
},
{
"kind": "function",
"name": "isSetRoyaltyInfoForTokenSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "setRoyaltyInfoForToken"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "setRoyaltyInfoForToken"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "COMMON"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isSetRoyaltyInfoForTokenSupported } from \"thirdweb/extensions/common\";\n\nconst supported = isSetRoyaltyInfoForTokenSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/write/setRoyaltyInfoForToken.ts#L52"
},
{
"kind": "function",
"name": "isSymbolSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "symbol"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "symbol"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "COMMON"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isSymbolSupported } from \"thirdweb/extensions/common\";\nconst supported = isSymbolSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/common/__generated__/IContractMetadata/read/symbol.ts#L27"
},
{
"kind": "function",
"name": "multicall",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"multicall\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(MulticallParams) | ({ asyncParams: () => Promise<MulticallParams> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "MulticallParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "MulticallParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"multicall\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "COMMON"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { multicall } from \"thirdweb/extensions/common\";\n\nconst transaction = multicall({\n contract,\n data: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/common/__generated__/IMulticall/write/multicall.ts#L112"
},
{
"kind": "function",
"name": "name",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Retrieves the name associated with the given contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the transaction."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<string>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the name associated with the contract."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "COMMON"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { name } from \"thirdweb/extensions/common\";\n\nconst contractName = await name({ contract });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/common/read/name.ts#L19"
},
{
"kind": "function",
"name": "owner",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"owner\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the owner function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<string>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "COMMON"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { owner } from \"thirdweb/extensions/common\";\n\nconst result = await owner({\n contract,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/common/__generated__/IOwnable/read/owner.ts#L64"
},
{
"kind": "function",
"name": "ownerUpdatedEvent",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Creates an event object for the OwnerUpdated event."
}
]
}
],
"parameters": [
{
"name": "filters",
"type": {
"code": "Partial",
"tokens": [
{
"name": "Partial",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Optional filters to apply to the event."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedEvent<{ readonly inputs: readonly [{ readonly indexed: true; readonly name: \"prevOwner\"; readonly type: \"address\" }, { readonly indexed: true; readonly name: \"newOwner\"; readonly type: \"address\" }]; readonly name: \"OwnerUpdated\"; readonly type: \"event\" }>",
"tokens": [
{
"name": "PreparedEvent",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared event object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "COMMON"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractEvents } from \"thirdweb\";\nimport { ownerUpdatedEvent } from \"thirdweb/extensions/common\";\n\nconst events = await getContractEvents({\ncontract,\nevents: [\n ownerUpdatedEvent({\n prevOwner: ...,\n newOwner: ...,\n})\n],\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/common/__generated__/IOwnable/events/OwnerUpdated.ts#L41"
},
{
"kind": "function",
"name": "parseNftUri",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Parses an NFT URI."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "{ client: ThirdwebClient; uri: string }",
"tokens": [
{
"name": "ThirdwebClient",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for parsing an NFT URI."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<null | string>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the NFT URI, or null if the URI could not be parsed."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { parseNftUri } from \"thirdweb/utils/ens\";\nconst nftUri = await parseNftUri({\n client,\n uri: \"eip155:1/erc1155:0xb32979486938aa9694bfc898f35dbed459f44424/10063\",\n});\n\nconsole.log(nftUri); // ipfs://bafybeiemxf5abjwjbikoz4mc3a3dla6ual3jsgpdr4cjr3oz3evfyavhwq/"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ENS"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/utils/nft/parseNft.ts#L124"
},
{
"kind": "function",
"name": "primarySaleRecipient",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"primarySaleRecipient\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the primarySaleRecipient function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<string>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "COMMON"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { primarySaleRecipient } from \"thirdweb/extensions/common\";\n\nconst result = await primarySaleRecipient({\n contract,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/common/__generated__/IPrimarySale/read/primarySaleRecipient.ts#L64"
},
{
"kind": "function",
"name": "setContractMetadata",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Sets the metadata for a contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<SetContractMetadataParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "SetContractMetadataParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for setting the contract metadata."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "list",
"ordered": false,
"start": null,
"spread": false,
"children": [
{
"type": "listItem",
"spread": false,
"checked": null,
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared transaction to set the contract metadata."
}
]
}
]
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "COMMON"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { setContractMetadata } from '@thirdweb/extensions/common';\nimport { sendTransaction } from 'thirdweb';\n\nconst transaction = setContractMetadata({\n contract,\n name: 'My NFT',\n symbol: 'NFT',\n});\n\n// Send the transaction\nawait sendTransaction({\n transaction,\n account,\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/common/write/setContractMetadata.ts#L36"
},
{
"kind": "function",
"name": "setContractURI",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"setContractURI\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(SetContractURIParams) | ({ asyncParams: () => Promise<SetContractURIParams> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "SetContractURIParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "SetContractURIParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"setContractURI\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "COMMON"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { setContractURI } from \"thirdweb/extensions/common\";\n\nconst transaction = setContractURI({\n contract,\n uri: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/common/__generated__/IContractMetadata/write/setContractURI.ts#L107"
},
{
"kind": "function",
"name": "setDefaultRoyaltyInfo",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"setDefaultRoyaltyInfo\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(SetDefaultRoyaltyInfoParams) | ({ asyncParams: () => Promise<SetDefaultRoyaltyInfoParams> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "SetDefaultRoyaltyInfoParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "SetDefaultRoyaltyInfoParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"setDefaultRoyaltyInfo\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "COMMON"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { setDefaultRoyaltyInfo } from \"thirdweb/extensions/common\";\n\nconst transaction = setDefaultRoyaltyInfo({\n contract,\n royaltyRecipient: ...,\n royaltyBps: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/write/setDefaultRoyaltyInfo.ts#L128"
},
{
"kind": "function",
"name": "setOwner",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"setOwner\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(SetOwnerParams) | ({ asyncParams: () => Promise<SetOwnerParams> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "SetOwnerParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "SetOwnerParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"setOwner\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "COMMON"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { setOwner } from \"thirdweb/extensions/common\";\n\nconst transaction = setOwner({\n contract,\n newOwner: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/common/__generated__/IOwnable/write/setOwner.ts#L105"
},
{
"kind": "function",
"name": "setPlatformFeeInfo",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"setPlatformFeeInfo\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(SetPlatformFeeInfoParams) | ({ asyncParams: () => Promise<SetPlatformFeeInfoParams> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "SetPlatformFeeInfoParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "SetPlatformFeeInfoParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"setPlatformFeeInfo\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "COMMON"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { setPlatformFeeInfo } from \"thirdweb/extensions/common\";\n\nconst transaction = setPlatformFeeInfo({\n contract,\n platformFeeRecipient: ...,\n platformFeeBps: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/common/__generated__/IPlatformFee/write/setPlatformFeeInfo.ts#L126"
},
{
"kind": "function",
"name": "setPrimarySaleRecipient",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"setPrimarySaleRecipient\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(SetPrimarySaleRecipientParams) | ({ asyncParams: () => Promise<SetPrimarySaleRecipientParams> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "SetPrimarySaleRecipientParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "SetPrimarySaleRecipientParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"setPrimarySaleRecipient\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "COMMON"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { setPrimarySaleRecipient } from \"thirdweb/extensions/common\";\n\nconst transaction = setPrimarySaleRecipient({\n contract,\n saleRecipient: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/common/__generated__/IPrimarySale/write/setPrimarySaleRecipient.ts#L116"
},
{
"kind": "function",
"name": "setRoyaltyInfoForToken",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"setRoyaltyInfoForToken\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(SetRoyaltyInfoForTokenParams) | ({ asyncParams: () => Promise<SetRoyaltyInfoForTokenParams> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "SetRoyaltyInfoForTokenParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "SetRoyaltyInfoForTokenParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"setRoyaltyInfoForToken\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "COMMON"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { setRoyaltyInfoForToken } from \"thirdweb/extensions/common\";\n\nconst transaction = setRoyaltyInfoForToken({\n contract,\n tokenId: ...,\n recipient: ...,\n bps: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/common/__generated__/IRoyalty/write/setRoyaltyInfoForToken.ts#L136"
},
{
"kind": "function",
"name": "symbol",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Retrieves the name associated with the given contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the transaction."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<string>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the name associated with the contract."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "COMMON"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { symbol } from \"thirdweb/extensions/common\";\n\nconst contractSymbol = await symbol({ contract });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/common/read/symbol.ts#L19"
},
{
"kind": "function",
"name": "parseAvatarRecord",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Parses an ENS or similar avatar record. Supports NFT URIs, IPFS scheme, and HTTPS URIs."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "ParseAvatarOptions",
"tokens": [
{
"name": "ParseAvatarOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for parsing an ENS avatar record."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<null | string>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the avatar URL, or null if the URI could not be parsed."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { parseAvatarRecord } from \"thirdweb/utils/ens\";\nconst avatarUrl = await parseAvatarRecord({\n client,\n uri: \"ipfs://bafybeiemxf5abjwjbikoz4mc3a3dla6ual3jsgpdr4cjr3oz3evfyavhwq/\",\n});\n\nconsole.log(avatarUrl); // \"https://ipfs.io/ipfs/bafybeiemxf5abjwjbikoz4mc3a3dla6ual3jsgpdr4cjr3oz3evfyavhwq/\"\n\nconst avatarUrl2 = await parseAvatarRecord({\n client,\n uri: \"eip155:1/erc1155:0xb32979486938aa9694bfc898f35dbed459f44424/10063\",\n});\n\nconsole.log(avatarUrl2); // \"https://opensea.io/assets/0xb32979486938aa9694bfc898f35dbed459f44424/10063\""
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ENS"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/utils/ens/avatar.ts#L36"
},
{
"kind": "function",
"name": "resolveAddress",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Resolves an ENS name to an Ethereum address."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "ResolveAddressOptions",
"tokens": [
{
"name": "ResolveAddressOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for resolving an ENS address."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<`0x${string}`>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the Ethereum address."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { resolveAddress } from \"thirdweb/extensions/ens\";\nconst address = await resolveAddress({\n client,\n name: \"vitalik.eth\",\n});"
},
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Resolve an address to a Basename."
}
]
},
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { resolveAddress, BASENAME_RESOLVER_ADDRESS } from \"thirdweb/extensions/ens\";\nimport { base } from \"thirdweb/chains\";\nconst address = await resolveAddress({\n client,\n name: \"myk.base.eth\",\n resolverAddress: BASENAME_RESOLVER_ADDRESS,\n resolverChain: base,\n});"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ENS"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/ens/resolve-address.ts#L50"
},
{
"kind": "function",
"name": "resolveAvatar",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Resolves an ENS name to the avatar URL."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "ResolveAvatarOptions",
"tokens": [
{
"name": "ResolveAvatarOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for resolving an ENS address."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<null | string>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the avatar url, or null if not set."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { resolveAvatar } from \"thirdweb/extensions/ens\";\nconst address = await resolveAvatar({\n client,\n name: \"vitalik.eth\",\n});"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ENS"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/ens/resolve-avatar.ts#L31"
},
{
"kind": "function",
"name": "resolveL2Name",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Resolves the L2 name for a specified address."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "ResolveL2NameOptions",
"tokens": [
{
"name": "ResolveL2NameOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for resolving an L2 ENS address."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<null | string>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the Ethereum address."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { resolveL2Name } from \"thirdweb/extensions/ens\";\nconst name = await resolveL2Name({\n client,\n address: \"0x1234...\",\n resolverAddress: \"0x...\",\n resolverChain: base,\n});"
},
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Resolve a Basename."
}
]
},
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { resolveL2Name, BASENAME_RESOLVER_ADDRESS } from \"thirdweb/extensions/ens\";\nimport { base } from \"thirdweb/chains\";\nconst name = await resolveL2Name({\n client,\n address: \"0x1234...\",\n resolverAddress: BASENAME_RESOLVER_ADDRESS,\n resolverChain: base,\n});"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ENS"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/ens/resolve-l2-name.ts#L82"
},
{
"kind": "function",
"name": "resolveName",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Resolves the primary name for a specified address."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "ResolveNameOptions",
"tokens": [
{
"name": "ResolveNameOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for resolving an ENS address."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<null | string>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the Ethereum address."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { resolveName } from \"thirdweb/extensions/ens\";\nconst name = await resolveName({\n client,\n address: \"0x1234...\",\n});"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ENS"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/ens/resolve-name.ts#L36"
},
{
"kind": "function",
"name": "resolveText",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Resolves an ENS name and key to the specified record."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "ResolveTextOptions",
"tokens": [
{
"name": "ResolveTextOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for resolving an ENS address."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<null | string>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the text record."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { resolveText } from \"thirdweb/extensions/ens\";\nconst twitterUsername = await resolveText({\n client,\n name: \"vitalik.eth\",\n key: \"com.twitter\"\n});"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ENS"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/ens/resolve-text.ts#L42"
},
{
"kind": "function",
"name": "approvalForAllEvent",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Creates an event object for the ApprovalForAll event."
}
]
}
],
"parameters": [
{
"name": "filters",
"type": {
"code": "Partial",
"tokens": [
{
"name": "Partial",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Optional filters to apply to the event."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedEvent<{ readonly inputs: readonly [{ readonly indexed: true; readonly name: \"_owner\"; readonly type: \"address\" }, { readonly indexed: true; readonly name: \"_operator\"; readonly type: \"address\" }, { readonly name: \"_approved\"; readonly type: \"bool\" }]; readonly name: \"ApprovalForAll\"; readonly type: \"event\" }>",
"tokens": [
{
"name": "PreparedEvent",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared event object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractEvents } from \"thirdweb\";\nimport { approvalForAllEvent } from \"thirdweb/extensions/erc1155\";\n\nconst events = await getContractEvents({\ncontract,\nevents: [\n approvalForAllEvent({\n _owner: ...,\n _operator: ...,\n})\n],\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/events/ApprovalForAll.ts#L41"
},
{
"kind": "function",
"name": "balanceOf",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"balanceOf\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<BalanceOfParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "BalanceOfParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the balanceOf function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<bigint>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { balanceOf } from \"thirdweb/extensions/erc1155\";\n\nconst result = await balanceOf({\n contract,\n owner: ...,\n tokenId: ...,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/read/balanceOf.ts#L125"
},
{
"kind": "function",
"name": "balanceOfBatch",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"balanceOfBatch\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<BalanceOfBatchParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "BalanceOfBatchParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the balanceOfBatch function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<readonly Array<bigint>>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { balanceOfBatch } from \"thirdweb/extensions/erc1155\";\n\nconst result = await balanceOfBatch({\n contract,\n owners: ...,\n tokenIds: ...,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/read/balanceOfBatch.ts#L128"
},
{
"kind": "function",
"name": "batchMetadataUpdateEvent",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Creates an event object for the BatchMetadataUpdate event."
}
]
}
],
"returns": {
"type": {
"code": "PreparedEvent<{ readonly inputs: readonly [{ readonly name: \"_fromTokenId\"; readonly type: \"uint256\" }, { readonly name: \"_toTokenId\"; readonly type: \"uint256\" }]; readonly name: \"BatchMetadataUpdate\"; readonly type: \"event\" }>",
"tokens": [
{
"name": "PreparedEvent",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared event object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractEvents } from \"thirdweb\";\nimport { batchMetadataUpdateEvent } from \"thirdweb/extensions/erc1155\";\n\nconst events = await getContractEvents({\ncontract,\nevents: [\n batchMetadataUpdateEvent()\n],\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/INFTMetadata/events/BatchMetadataUpdate.ts#L20"
},
{
"kind": "function",
"name": "burn",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"burn\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(BurnParams) | ({ asyncParams: () => Promise<BurnParams> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "BurnParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "BurnParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"burn\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { burn } from \"thirdweb/extensions/erc1155\";\n\nconst transaction = burn({\n contract,\n account: ...,\n id: ...,\n value: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/IBurnableERC1155/write/burn.ts#L125"
},
{
"kind": "function",
"name": "burnBatch",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"burnBatch\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(BurnBatchParams) | ({ asyncParams: () => Promise<BurnBatchParams> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "BurnBatchParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "BurnBatchParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"burnBatch\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { burnBatch } from \"thirdweb/extensions/erc1155\";\n\nconst transaction = burnBatch({\n contract,\n account: ...,\n ids: ...,\n values: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/IBurnableERC1155/write/burnBatch.ts#L127"
},
{
"kind": "function",
"name": "canClaim",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Check if a user can claim a drop."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<CanClaimParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "CanClaimParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the transaction."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<CanClaimResult>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
},
{
"name": "CanClaimResult",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Whether the user can claim the drop."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "const claimResult = await canClaim({\n contract: contract,\n claimer: \"0x1234567890123456789012345678901234567890\",\n quantity: \"1\",\n tokenId: 0n,\n});"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/drops/read/canClaim.ts#L37"
},
{
"kind": "function",
"name": "claimTo",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Claim ERC1155 NFTs to a specified address"
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<ClaimToParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "ClaimToParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the transaction"
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared transaction"
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "heading",
"depth": 3,
"children": [
{
"type": "text",
"value": "Basic usage"
}
]
},
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { claimTo } from \"thirdweb/extensions/erc1155\";\nimport { sendTransaction } from \"thirdweb\";\n\nconst transaction = claimTo({\n contract,\n to: \"0x...\",\n tokenId: 0n,\n quantity: 1n,\n});\n\nawait sendTransaction({ transaction, account });"
},
{
"type": "heading",
"depth": 3,
"children": [
{
"type": "text",
"value": "For Drops with allowlists"
}
]
},
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "You need to specify the claimer address as the "
},
{
"type": "inlineCode",
"value": "from"
},
{
"type": "text",
"value": " param to avoid any issue with the allowlist"
}
]
},
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "const transaction = claimTo({\n contract,\n to: \"0x...\",\n tokenId: 0n,\n quantity: 1n,\n from: \"0x...\", // address of the one claiming\n});"
}
]
},
{
"tag": "@throws",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "If no claim condition is set"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/drops/write/claimTo.ts#L53"
},
{
"kind": "function",
"name": "createPack",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"createPack\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(CreatePackParams) | ({ asyncParams: () => Promise<CreatePackParams> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "CreatePackParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "CreatePackParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"createPack\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { createPack } from \"thirdweb/extensions/erc1155\";\n\nconst transaction = createPack({\n contract,\n contents: ...,\n numOfRewardUnits: ...,\n packUri: ...,\n openStartTimestamp: ...,\n amountDistributedPerOpen: ...,\n recipient: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/IPack/write/createPack.ts#L202"
},
{
"kind": "function",
"name": "encodeSafeTransferFrom",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Encodes the \"safeTransferFrom\" function into a Hex string with its parameters."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "SafeTransferFromParams",
"tokens": [
{
"name": "SafeTransferFromParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the safeTransferFrom function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "`0xf242432a${string}`",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The encoded hexadecimal string."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { encodeSafeTransferFrom } from \"thirdweb/extensions/erc1155\";\nconst result = encodeSafeTransferFrom({\n from: ...,\n to: ...,\n tokenId: ...,\n value: ...,\n data: ...,\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/write/safeTransferFrom.ts#L110"
},
{
"kind": "function",
"name": "freezeMetadata",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"freezeMetadata\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"freezeMetadata\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { freezeMetadata } from \"thirdweb/extensions/erc1155\";\n\nconst transaction = freezeMetadata();\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/INFTMetadata/write/freezeMetadata.ts#L45"
},
{
"kind": "function",
"name": "generateMintSignature",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Generates the payload and signature for minting an ERC1155 token."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "GenerateMintSignatureOptions",
"tokens": [
{
"name": "GenerateMintSignatureOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the minting process."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<{ payload: { currency: string; pricePerToken: bigint; primarySaleRecipient: string; quantity: bigint; royaltyBps: bigint; royaltyRecipient: string; to: string; tokenId: bigint; uid: `0x${string}`; uri: string; validityEndTimestamp: bigint; validityStartTimestamp: bigint }; signature: `0x${string}` }>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the payload and signature."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { mintWithSignature, generateMintSignature } from \"thirdweb/extensions/erc1155\";\n\nconst { payload, signature } = await generateMintSignature({\n account,\n contract,\n mintRequest: {\n to: \"0x...\",\n quantity: 10n,\n metadata: {\n name: \"My NFT\",\n description: \"This is my NFT\",\n image: \"https://example.com/image.png\",\n },\n },\n});\n\nconst transaction = mintWithSignature({\n contract,\n payload,\n signature,\n});\nawait sendTransaction({ transaction, account });"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/write/sigMint.ts#L95"
},
{
"kind": "function",
"name": "getActiveClaimCondition",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Retrieves the active claim condition."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<GetActiveClaimConditionIdParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "GetActiveClaimConditionIdParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The transaction options."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<ClaimCondition>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
},
{
"name": "ClaimCondition",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the active claim condition."
}
]
}
]
},
"blockTags": [
{
"tag": "@throws",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An error if the claim condition is unsupported."
}
]
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getActiveClaimCondition } from \"thirdweb/extensions/erc1155\";\nconst activeClaimCondition = await getActiveClaimCondition({ contract, tokenId });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/drops/read/getActiveClaimCondition.ts#L26"
},
{
"kind": "function",
"name": "getClaimConditionById",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"getClaimConditionById\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<GetClaimConditionByIdParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "GetClaimConditionByIdParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the getClaimConditionById function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<{ currency: string; maxClaimableSupply: bigint; merkleRoot: `0x${string}`; metadata: string; pricePerToken: bigint; quantityLimitPerWallet: bigint; startTimestamp: bigint; supplyClaimed: bigint }>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getClaimConditionById } from \"thirdweb/extensions/erc1155\";\n\nconst result = await getClaimConditionById({\n contract,\n tokenId: ...,\n conditionId: ...,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/read/getClaimConditionById.ts#L167"
},
{
"kind": "function",
"name": "getClaimConditions",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Retrieves all claim conditions."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<GetClaimConditionsParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "GetClaimConditionsParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The transaction options."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<Array<ClaimCondition>>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
},
{
"name": "ClaimCondition",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to all claim conditions."
}
]
}
]
},
"blockTags": [
{
"tag": "@throws",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An error if the claim conditions are unsupported by the contract."
}
]
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getClaimConditions } from \"thirdweb/extensions/erc1155\";\nconst conditions = await getClaimConditions({ contract, tokenId: 1n });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/drops/read/getClaimConditions.ts#L21"
},
{
"kind": "function",
"name": "getNFT",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Retrieves information about a specific ERC1155 non-fungible token (NFT)."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<GetNFTParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "GetNFTParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for retrieving the NFT."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<NFT>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
},
{
"name": "NFT",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the NFT object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getNFT } from \"thirdweb/extensions/erc1155\";\nconst nft = await getNFT({\n contract,\n tokenId: 1n,\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/read/getNFT.ts#L31"
},
{
"kind": "function",
"name": "getNFTs",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Retrieves an array of NFTs (\"ERC1155\") based on the provided options."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<GetNFTsParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "GetNFTsParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for retrieving the NFTs."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<Array<NFT>>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
},
{
"name": "NFT",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to an array of NFTs."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getNFTs } from \"thirdweb/extensions/erc1155\";\nconst nfts = await getNFTs({\n contract,\n start: 0,\n count: 10,\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/read/getNFTs.ts#L43"
},
{
"kind": "function",
"name": "getOwnedNFTs",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Retrieves the owned ERC1155 NFTs for a given wallet address."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<GetOwnedTokenIdsParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "GetOwnedTokenIdsParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The transaction options and parameters."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<Array<(NFT) & ({ quantityOwned: bigint })>>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
},
{
"name": "NFT",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to an array of ERC1155 NFTs owned by the wallet address, along with the quantity owned."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getOwnedNFTs } from \"thirdweb/extensions/erc1155\";\nconst nfts = await getOwnedNFTs({\n contract,\n start: 0,\n count: 10,\n address: \"0x123...\",\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/read/getOwnedNFTs.ts#L31"
},
{
"kind": "function",
"name": "getOwnedTokenIds",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Retrieves the owned ERC1155 tokenIds & the owned balance of each tokenId for a given wallet address."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<GetOwnedTokenIdsParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "GetOwnedTokenIdsParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The transaction options and parameters."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<Array<{ balance: bigint; tokenId: bigint }>>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to an array of ERC1155 NFTs owned by the wallet address, along with the quantity owned."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getOwnedNFTs } from \"thirdweb/extensions/erc1155\";\nconst ownedTokenIds = await getOwnedTokenIds({\n contract,\n start: 0,\n count: 10,\n address: \"0x123...\",\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/read/getOwnedTokenIds.ts#L44"
},
{
"kind": "function",
"name": "isApprovedForAll",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"isApprovedForAll\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<IsApprovedForAllParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "IsApprovedForAllParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the isApprovedForAll function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<boolean>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isApprovedForAll } from \"thirdweb/extensions/erc1155\";\n\nconst result = await isApprovedForAll({\n contract,\n owner: ...,\n operator: ...,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/read/isApprovedForAll.ts#L125"
},
{
"kind": "function",
"name": "isBurnSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "burn"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "burn"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isBurnSupported } from \"thirdweb/extensions/erc1155\";\n\nconst supported = isBurnSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/IBurnableERC1155/write/burn.ts#L49"
},
{
"kind": "function",
"name": "isClaimToSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "claimTo"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "claimTo"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isClaimToSupported } from \"thirdweb/extensions/erc1155\";\n\nconst supported = isClaimToSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/drops/write/claimTo.ts#L87"
},
{
"kind": "function",
"name": "isERC1155",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Check if a contract supports the ERC1155 interface."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The transaction options."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<boolean>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating whether the contract supports the ERC1155 interface."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isERC1155 } from \"thirdweb/extensions/erc1155\";\nconst result = await isERC1155({ contract });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/read/isERC1155.ts#L15"
},
{
"kind": "function",
"name": "isGetActiveClaimConditionSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "getActiveClaimCondition"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "getActiveClaimCondition"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isGetActiveClaimConditionSupported } from \"thirdweb/extensions/erc1155\";\n\nconst supported = isGetActiveClaimConditionSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/drops/read/getActiveClaimCondition.ts#L49"
},
{
"kind": "function",
"name": "isGetClaimConditionByIdSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "getClaimConditionById"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "getClaimConditionById"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isGetClaimConditionByIdSupported } from \"thirdweb/extensions/erc1155\";\nconst supported = isGetClaimConditionByIdSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/read/getClaimConditionById.ts#L83"
},
{
"kind": "function",
"name": "isGetClaimConditionsSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "getClaimConditions"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "getClaimConditions"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isGetClaimConditionsSupported } from \"thirdweb/extensions/erc1155\";\n\nconst supported = isGetClaimConditionsSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/drops/read/getClaimConditions.ts#L56"
},
{
"kind": "function",
"name": "isGetNFTsSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "getNFTs"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "getNFTs"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isGetNFTsSupported } from \"thirdweb/extensions/erc721\";\n\nconst supported = isGetNFTsSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/read/getNFTs.ts#L79"
},
{
"kind": "function",
"name": "isGetNFTSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "uri"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "uri"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isUriSupported } from \"thirdweb/extensions/erc1155\";\nconst supported = isUriSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/read/uri.ts#L40"
},
{
"kind": "function",
"name": "isLazyMintSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "lazyMint"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "lazyMint"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isLazyMintSupported } from \"thirdweb/extensions/erc1155\";\n\nconst supported = isLazyMintSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/write/lazyMint.ts#L100"
},
{
"kind": "function",
"name": "isMintAdditionalSupplyToSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "mintAdditionalSupplyTo"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "mintAdditionalSupplyTo"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isMintAdditionalSupplyToSupported } from \"thirdweb/extensions/erc1155\";\n\nconst supported = isMintAdditionalSupplyToSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/write/mintAdditionalSupplyTo.ts#L63"
},
{
"kind": "function",
"name": "isMintToSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "mintTo"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "mintTo"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isMintToSupported } from \"thirdweb/extensions/erc1155\";\n\nconst supported = isMintToSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/IMintableERC1155/write/mintTo.ts#L54"
},
{
"kind": "function",
"name": "isNextTokenIdToMintSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "nextTokenIdToMint"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "nextTokenIdToMint"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isNextTokenIdToMintSupported } from \"thirdweb/extensions/erc1155\";\nconst supported = isNextTokenIdToMintSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155Enumerable/read/nextTokenIdToMint.ts#L27"
},
{
"kind": "function",
"name": "isResetClaimEligibilitySupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "resetClaimEligibility"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "resetClaimEligibility"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isResetClaimEligibilitySupported } from \"thirdweb/extensions/erc1155\";\n\nconst supported = isResetClaimEligibilitySupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/drops/write/resetClaimEligibility.ts#L71"
},
{
"kind": "function",
"name": "isSetClaimConditionsSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "setClaimConditions"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "setClaimConditions"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isSetClaimConditionsSupported } from \"thirdweb/extensions/erc1155\";\n\nconst supported = isSetClaimConditionsSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/drops/write/setClaimConditions.ts#L82"
},
{
"kind": "function",
"name": "isTotalSupplySupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "totalSupply"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "totalSupply"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isTotalSupplySupported } from \"thirdweb/extensions/erc1155\";\nconst supported = isTotalSupplySupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/read/totalSupply.ts#L40"
},
{
"kind": "function",
"name": "isUpdateMetadataSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "updateMetadata"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "updateMetadata"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC721"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isUpdateMetadataSupported } from \"thirdweb/extensions/erc721\";\n\nconst supported = isUpdateMetadataSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/drops/write/updateMetadata.ts#L140"
},
{
"kind": "function",
"name": "isUpdateTokenURISupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "setTokenURI"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "setTokenURI"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isSetTokenURISupported } from \"thirdweb/extensions/erc1155\";\n\nconst supported = isSetTokenURISupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/INFTMetadata/write/setTokenURI.ts#L44"
},
{
"kind": "function",
"name": "lazyMint",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Lazily mints ERC1155 tokens."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<LazyMintParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "LazyMintParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the lazy minting process."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the prepared contract call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { lazyMint } from \"thirdweb/extensions/erc1155\";\nimport { sendTransaction } from \"thirdweb\";\n\nconst transaction = lazyMint({\ncontract,\nnfts: [\n {\n name: \"My NFT\",\n description: \"This is my NFT\",\n image: \"https://example.com/image.png\",\n },\n ],\n});\n\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/write/lazyMint.ts#L62"
},
{
"kind": "function",
"name": "metadataFrozenEvent",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Creates an event object for the MetadataFrozen event."
}
]
}
],
"returns": {
"type": {
"code": "PreparedEvent<{ readonly inputs: readonly []; readonly name: \"MetadataFrozen\"; readonly type: \"event\" }>",
"tokens": [
{
"name": "PreparedEvent",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared event object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractEvents } from \"thirdweb\";\nimport { metadataFrozenEvent } from \"thirdweb/extensions/erc1155\";\n\nconst events = await getContractEvents({\ncontract,\nevents: [\n metadataFrozenEvent()\n],\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/INFTMetadata/events/MetadataFrozen.ts#L20"
},
{
"kind": "function",
"name": "metadataUpdateEvent",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Creates an event object for the MetadataUpdate event."
}
]
}
],
"returns": {
"type": {
"code": "PreparedEvent<{ readonly inputs: readonly [{ readonly name: \"_tokenId\"; readonly type: \"uint256\" }]; readonly name: \"MetadataUpdate\"; readonly type: \"event\" }>",
"tokens": [
{
"name": "PreparedEvent",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared event object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractEvents } from \"thirdweb\";\nimport { metadataUpdateEvent } from \"thirdweb/extensions/erc1155\";\n\nconst events = await getContractEvents({\ncontract,\nevents: [\n metadataUpdateEvent()\n],\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/INFTMetadata/events/MetadataUpdate.ts#L20"
},
{
"kind": "function",
"name": "mintAdditionalSupplyTo",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Mints a \"supply\" number of additional ERC1155 tokens to the specified \"to\" address."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<MintAdditionalSupplyToParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "MintAdditionalSupplyToParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The transaction options."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the transaction result."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { mintAdditionalSupplyTo } from \"thirdweb/extensions/erc1155\";\nimport { sendTransaction } from \"thirdweb\";\n\nconst transaction = mintAdditionalSupplyTo({\n contract,\n to: \"0x...\",\n tokenId: 1n,\n supply: 10n,\n});\n\nawait sendTransaction({ transaction, account });\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/write/mintAdditionalSupplyTo.ts#L35"
},
{
"kind": "function",
"name": "mintAdditionalSupplyToBatch",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "This extension batches multiple "
},
{
"type": "inlineCode",
"value": "mintAdditionalSupplyToBatch"
},
{
"type": "text",
"value": " extensions into one single multicall.\nKeep in mind that there is a limit of how many NFTs you can mint per transaction.\nThis limit varies depends on the network that you are transacting on."
}
]
},
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "You are recommended to experiment with the number to figure out the best number for your chain of choice."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<MintAdditionalSupplyToBatchParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "MintAdditionalSupplyToBatchParams",
"package": "thirdweb"
}
]
}
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
}
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { mintAdditionalSupplyToBatch } from \"thirdweb/extensions/erc1155\";\n\nconst transaction = mintAdditionalSupplyToBatch({\n contract,\n nfts: [\n { tokenId: 0n, supply: 99n, to: account.address },\n { tokenId: 1n, supply: 98n, to: account.address },\n { tokenId: 2n, supply: 97n, to: account.address },\n ],\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/write/mintAdditionalSupplyToBatch.ts#L38"
},
{
"kind": "function",
"name": "mintTo",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Mints a \"supply\" number of new ERC1155 tokens to the specified \"to\" address.\nIf the "
},
{
"type": "inlineCode",
"value": "nft"
},
{
"type": "text",
"value": " parameter is a string, it will be used as the token URI.\nIf the "
},
{
"type": "inlineCode",
"value": "nft"
},
{
"type": "text",
"value": " parameter is a file, it will be uploaded to the storage server and the resulting URI will be used as the token URI."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<MintToParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "MintToParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The transaction options."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the transaction result."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { mintTo } from \"thirdweb/extensions/erc1155\";\nimport { sendTransaction } from \"thirdweb\";\n\nconst transaction = mintTo({\n contract,\n to: \"0x...\",\n supply: 10n,\n nft: {\n name: \"My NFT\",\n description: \"This is my NFT\",\n image: \"https://example.com/image.png\",\n },\n});\n\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/write/mintTo.ts#L46"
},
{
"kind": "function",
"name": "mintToBatch",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "This extension batches multiple "
},
{
"type": "inlineCode",
"value": "mintTo"
},
{
"type": "text",
"value": " extensions into one single multicall.\nKeep in mind that there is a limit of how many NFTs you can mint per transaction.\nThis limit varies depends on the network that you are transacting on."
}
]
},
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "You are recommended to experiment with the number to figure out the best number for your chain of choice."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<MintToBatchParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "MintToBatchParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "the transaction options"
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the transaction result."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { mintBatchTo } from \"thirdweb/extension/erc1155\";\n\nconst transaction = mintToBatch({\n contract: editionContract,\n to: \"0x...\",\n nfts: [\n {\n metadata: {\n name: \"Token #0\",\n image: \"...\",\n attributes: [],\n },\n supply: 100n,\n },\n {\n metadata: {\n name: \"Token #1\",\n image: \"...\",\n attributes: [],\n },\n supply: 111n,\n },\n ],\n});\n\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/write/mintToBatch.ts#L80"
},
{
"kind": "function",
"name": "mintWithSignature",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Mints a new ERC1155 token with the given minter signature"
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<MintWithSignatureParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "MintWithSignatureParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The transaction options."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the transaction result."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { mintWithSignature, generateMintSignature } from \"thirdweb/extensions/erc1155\";\nimport { sendTransaction } from \"thirdweb\";\n\nconst { payload, signature } = await generateMintSignature(...)\n\nconst transaction = mintWithSignature({\n contract,\n payload,\n signature,\n});\nawait sendTransaction({ transaction, account });"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/write/sigMint.ts#L40"
},
{
"kind": "function",
"name": "nextTokenId",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"nextTokenId\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the nextTokenId function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<bigint>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { nextTokenId } from \"thirdweb/extensions/erc1155\";\n\nconst result = await nextTokenId({\n contract,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/Zora1155/read/nextTokenId.ts#L64"
},
{
"kind": "function",
"name": "nextTokenIdToMint",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"nextTokenIdToMint\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the nextTokenIdToMint function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<bigint>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { nextTokenIdToMint } from \"thirdweb/extensions/erc1155\";\n\nconst result = await nextTokenIdToMint({\n contract,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155Enumerable/read/nextTokenIdToMint.ts#L64"
},
{
"kind": "function",
"name": "openPack",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"openPack\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(OpenPackParams) | ({ asyncParams: () => Promise<OpenPackParams> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "OpenPackParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "OpenPackParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"openPack\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { openPack } from \"thirdweb/extensions/erc1155\";\n\nconst transaction = openPack({\n contract,\n packId: ...,\n amountToOpen: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/IPack/write/openPack.ts#L138"
},
{
"kind": "function",
"name": "packCreatedEvent",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Creates an event object for the PackCreated event."
}
]
}
],
"parameters": [
{
"name": "filters",
"type": {
"code": "Partial",
"tokens": [
{
"name": "Partial",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Optional filters to apply to the event."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedEvent<{ readonly inputs: readonly [{ readonly indexed: true; readonly name: \"packId\"; readonly type: \"uint256\" }, { readonly name: \"recipient\"; readonly type: \"address\" }, { readonly name: \"totalPacksCreated\"; readonly type: \"uint256\" }]; readonly name: \"PackCreated\"; readonly type: \"event\" }>",
"tokens": [
{
"name": "PreparedEvent",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared event object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractEvents } from \"thirdweb\";\nimport { packCreatedEvent } from \"thirdweb/extensions/erc1155\";\n\nconst events = await getContractEvents({\ncontract,\nevents: [\n packCreatedEvent({\n packId: ...,\n})\n],\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/IPack/events/PackCreated.ts#L35"
},
{
"kind": "function",
"name": "packOpenedEvent",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Creates an event object for the PackOpened event."
}
]
}
],
"parameters": [
{
"name": "filters",
"type": {
"code": "Partial",
"tokens": [
{
"name": "Partial",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Optional filters to apply to the event."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedEvent<{ readonly inputs: readonly [{ readonly indexed: true; readonly name: \"packId\"; readonly type: \"uint256\" }, { readonly indexed: true; readonly name: \"opener\"; readonly type: \"address\" }, { readonly name: \"numOfPacksOpened\"; readonly type: \"uint256\" }, { readonly components: readonly [{ readonly name: \"assetContract\"; readonly type: \"address\" }, { readonly name: \"tokenType\"; readonly type: \"uint8\" }, { readonly name: \"tokenId\"; readonly type: \"uint256\" }, { readonly name: \"totalAmount\"; readonly type: \"uint256\" }]; readonly name: \"rewardUnitsDistributed\"; readonly type: \"tuple[]\" }]; readonly name: \"PackOpened\"; readonly type: \"event\" }>",
"tokens": [
{
"name": "PreparedEvent",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared event object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractEvents } from \"thirdweb\";\nimport { packOpenedEvent } from \"thirdweb/extensions/erc1155\";\n\nconst events = await getContractEvents({\ncontract,\nevents: [\n packOpenedEvent({\n packId: ...,\n opener: ...,\n})\n],\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/IPack/events/PackOpened.ts#L41"
},
{
"kind": "function",
"name": "packUpdatedEvent",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Creates an event object for the PackUpdated event."
}
]
}
],
"parameters": [
{
"name": "filters",
"type": {
"code": "Partial",
"tokens": [
{
"name": "Partial",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Optional filters to apply to the event."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedEvent<{ readonly inputs: readonly [{ readonly indexed: true; readonly name: \"packId\"; readonly type: \"uint256\" }, { readonly name: \"recipient\"; readonly type: \"address\" }, { readonly name: \"totalPacksCreated\"; readonly type: \"uint256\" }]; readonly name: \"PackUpdated\"; readonly type: \"event\" }>",
"tokens": [
{
"name": "PreparedEvent",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared event object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractEvents } from \"thirdweb\";\nimport { packUpdatedEvent } from \"thirdweb/extensions/erc1155\";\n\nconst events = await getContractEvents({\ncontract,\nevents: [\n packUpdatedEvent({\n packId: ...,\n})\n],\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/IPack/events/PackUpdated.ts#L35"
},
{
"kind": "function",
"name": "resetClaimEligibility",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Reset the claim eligibility for all users."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<GetClaimConditionsParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "GetClaimConditionsParams",
"package": "thirdweb"
}
]
}
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "the prepared transaction"
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { resetClaimEligibility } from \"thirdweb/extensions/erc1155\";\nimport { sendTransaction } from \"thirdweb\";\n\nconst transaction = resetClaimEligibility({\n contract,\n});\n\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/drops/write/resetClaimEligibility.ts#L33"
},
{
"kind": "function",
"name": "safeBatchTransferFrom",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"safeBatchTransferFrom\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(SafeBatchTransferFromParams) | ({ asyncParams: () => Promise<SafeBatchTransferFromParams> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "SafeBatchTransferFromParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "SafeBatchTransferFromParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"safeBatchTransferFrom\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { safeBatchTransferFrom } from \"thirdweb/extensions/erc1155\";\n\nconst transaction = safeBatchTransferFrom({\n contract,\n from: ...,\n to: ...,\n tokenIds: ...,\n values: ...,\n data: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/write/safeBatchTransferFrom.ts#L152"
},
{
"kind": "function",
"name": "safeTransferFrom",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"safeTransferFrom\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(SafeTransferFromParams) | ({ asyncParams: () => Promise<SafeTransferFromParams> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "SafeTransferFromParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "SafeTransferFromParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"safeTransferFrom\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { safeTransferFrom } from \"thirdweb/extensions/erc1155\";\n\nconst transaction = safeTransferFrom({\n contract,\n from: ...,\n to: ...,\n tokenId: ...,\n value: ...,\n data: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/write/safeTransferFrom.ts#L145"
},
{
"kind": "function",
"name": "setApprovalForAll",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"setApprovalForAll\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(SetApprovalForAllParams) | ({ asyncParams: () => Promise<SetApprovalForAllParams> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "SetApprovalForAllParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "SetApprovalForAllParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"setApprovalForAll\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { setApprovalForAll } from \"thirdweb/extensions/erc1155\";\n\nconst transaction = setApprovalForAll({\n contract,\n operator: ...,\n approved: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/write/setApprovalForAll.ts#L117"
},
{
"kind": "function",
"name": "setClaimConditions",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Set the claim conditions for a ERC1155 drop"
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<SetClaimConditionsParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "SetClaimConditionsParams",
"package": "thirdweb"
}
]
}
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "the prepared transaction"
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { setClaimConditions } from \"thirdweb/extensions/erc1155\";\nimport { sendTransaction } from \"thirdweb\";\n\nconst transaction = setClaimConditions({\n contract,\n tokenId: 0n,\n phases: [\n {\n maxClaimableSupply: 100n,\n maxClaimablePerWallet: 1n,\n currencyAddress: \"0x...\",\n price: 0.1,\n startTime: new Date(),\n },\n ],\n});\n\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/drops/write/setClaimConditions.ts#L50"
},
{
"kind": "function",
"name": "setTokenURI",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"setTokenURI\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(SetTokenURIParams) | ({ asyncParams: () => Promise<SetTokenURIParams> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "SetTokenURIParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "SetTokenURIParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"setTokenURI\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { setTokenURI } from \"thirdweb/extensions/erc1155\";\n\nconst transaction = setTokenURI({\n contract,\n tokenId: ...,\n uri: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/INFTMetadata/write/setTokenURI.ts#L115"
},
{
"kind": "function",
"name": "tokensClaimedEvent",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Creates an event object for the TokensClaimed event."
}
]
}
],
"parameters": [
{
"name": "filters",
"type": {
"code": "Partial",
"tokens": [
{
"name": "Partial",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Optional filters to apply to the event."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedEvent<{ readonly inputs: readonly [{ readonly indexed: true; readonly name: \"claimConditionIndex\"; readonly type: \"uint256\" }, { readonly indexed: true; readonly name: \"claimer\"; readonly type: \"address\" }, { readonly indexed: true; readonly name: \"receiver\"; readonly type: \"address\" }, { readonly name: \"tokenId\"; readonly type: \"uint256\" }, { readonly name: \"quantityClaimed\"; readonly type: \"uint256\" }]; readonly name: \"TokensClaimed\"; readonly type: \"event\" }>",
"tokens": [
{
"name": "PreparedEvent",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared event object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractEvents } from \"thirdweb\";\nimport { tokensClaimedEvent } from \"thirdweb/extensions/erc1155\";\n\nconst events = await getContractEvents({\ncontract,\nevents: [\n tokensClaimedEvent({\n claimConditionIndex: ...,\n claimer: ...,\n receiver: ...,\n})\n],\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/IDrop1155/events/TokensClaimed.ts#L47"
},
{
"kind": "function",
"name": "tokensLazyMintedEvent",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Creates an event object for the TokensLazyMinted event."
}
]
}
],
"parameters": [
{
"name": "filters",
"type": {
"code": "Partial",
"tokens": [
{
"name": "Partial",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Optional filters to apply to the event."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedEvent<{ readonly inputs: readonly [{ readonly indexed: true; readonly name: \"startTokenId\"; readonly type: \"uint256\" }, { readonly name: \"endTokenId\"; readonly type: \"uint256\" }, { readonly name: \"baseURI\"; readonly type: \"string\" }, { readonly name: \"encryptedBaseURI\"; readonly type: \"bytes\" }]; readonly name: \"TokensLazyMinted\"; readonly type: \"event\" }>",
"tokens": [
{
"name": "PreparedEvent",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared event object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractEvents } from \"thirdweb\";\nimport { tokensLazyMintedEvent } from \"thirdweb/extensions/erc1155\";\n\nconst events = await getContractEvents({\ncontract,\nevents: [\n tokensLazyMintedEvent({\n startTokenId: ...,\n})\n],\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/ILazyMint/events/TokensLazyMinted.ts#L35"
},
{
"kind": "function",
"name": "tokensMintedWithSignatureEvent",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Creates an event object for the TokensMintedWithSignature event."
}
]
}
],
"parameters": [
{
"name": "filters",
"type": {
"code": "Partial",
"tokens": [
{
"name": "Partial",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Optional filters to apply to the event."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedEvent<{ readonly inputs: readonly [{ readonly indexed: true; readonly name: \"signer\"; readonly type: \"address\" }, { readonly indexed: true; readonly name: \"mintedTo\"; readonly type: \"address\" }, { readonly indexed: true; readonly name: \"tokenIdMinted\"; readonly type: \"uint256\" }, { readonly components: readonly [{ readonly name: \"to\"; readonly type: \"address\" }, { readonly name: \"royaltyRecipient\"; readonly type: \"address\" }, { readonly name: \"royaltyBps\"; readonly type: \"uint256\" }, { readonly name: \"primarySaleRecipient\"; readonly type: \"address\" }, { readonly name: \"tokenId\"; readonly type: \"uint256\" }, { readonly name: \"uri\"; readonly type: \"string\" }, { readonly name: \"quantity\"; readonly type: \"uint256\" }, { readonly name: \"pricePerToken\"; readonly type: \"uint256\" }, { readonly name: \"currency\"; readonly type: \"address\" }, { readonly name: \"validityStartTimestamp\"; readonly type: \"uint128\" }, { readonly name: \"validityEndTimestamp\"; readonly type: \"uint128\" }, { readonly name: \"uid\"; readonly type: \"bytes32\" }]; readonly name: \"mintRequest\"; readonly type: \"tuple\" }]; readonly name: \"TokensMintedWithSignature\"; readonly type: \"event\" }>",
"tokens": [
{
"name": "PreparedEvent",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared event object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractEvents } from \"thirdweb\";\nimport { tokensMintedWithSignatureEvent } from \"thirdweb/extensions/erc1155\";\n\nconst events = await getContractEvents({\ncontract,\nevents: [\n tokensMintedWithSignatureEvent({\n signer: ...,\n mintedTo: ...,\n tokenIdMinted: ...,\n})\n],\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/ISignatureMintERC1155/events/TokensMintedWithSignature.ts#L47"
},
{
"kind": "function",
"name": "totalSupply",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"totalSupply\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<TotalSupplyParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "TotalSupplyParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the totalSupply function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<bigint>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { totalSupply } from \"thirdweb/extensions/erc1155\";\n\nconst result = await totalSupply({\n contract,\n id: ...,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/read/totalSupply.ts#L117"
},
{
"kind": "function",
"name": "transferBatchEvent",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Creates an event object for the TransferBatch event."
}
]
}
],
"parameters": [
{
"name": "filters",
"type": {
"code": "Partial",
"tokens": [
{
"name": "Partial",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Optional filters to apply to the event."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedEvent<{ readonly inputs: readonly [{ readonly indexed: true; readonly name: \"_operator\"; readonly type: \"address\" }, { readonly indexed: true; readonly name: \"_from\"; readonly type: \"address\" }, { readonly indexed: true; readonly name: \"_to\"; readonly type: \"address\" }, { readonly name: \"tokenIds\"; readonly type: \"uint256[]\" }, { readonly name: \"_values\"; readonly type: \"uint256[]\" }]; readonly name: \"TransferBatch\"; readonly type: \"event\" }>",
"tokens": [
{
"name": "PreparedEvent",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared event object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractEvents } from \"thirdweb\";\nimport { transferBatchEvent } from \"thirdweb/extensions/erc1155\";\n\nconst events = await getContractEvents({\ncontract,\nevents: [\n transferBatchEvent({\n _operator: ...,\n _from: ...,\n _to: ...,\n})\n],\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/events/TransferBatch.ts#L47"
},
{
"kind": "function",
"name": "transferSingleEvent",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Creates an event object for the TransferSingle event."
}
]
}
],
"parameters": [
{
"name": "filters",
"type": {
"code": "Partial",
"tokens": [
{
"name": "Partial",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Optional filters to apply to the event."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedEvent<{ readonly inputs: readonly [{ readonly indexed: true; readonly name: \"_operator\"; readonly type: \"address\" }, { readonly indexed: true; readonly name: \"_from\"; readonly type: \"address\" }, { readonly indexed: true; readonly name: \"_to\"; readonly type: \"address\" }, { readonly name: \"tokenId\"; readonly type: \"uint256\" }, { readonly name: \"_value\"; readonly type: \"uint256\" }]; readonly name: \"TransferSingle\"; readonly type: \"event\" }>",
"tokens": [
{
"name": "PreparedEvent",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared event object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractEvents } from \"thirdweb\";\nimport { transferSingleEvent } from \"thirdweb/extensions/erc1155\";\n\nconst events = await getContractEvents({\ncontract,\nevents: [\n transferSingleEvent({\n _operator: ...,\n _from: ...,\n _to: ...,\n})\n],\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/events/TransferSingle.ts#L47"
},
{
"kind": "function",
"name": "updateMetadata",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Update the metadata of the single token in an Edition Drop (DropERC1155) collection\nFor Edition contracts, use "
},
{
"type": "inlineCode",
"value": "setTokenURI"
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<UpdateMetadataParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "UpdateMetadataParams",
"package": "thirdweb"
}
]
}
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "the prepared transaction"
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { updateMetadata } from \"thirdweb/extensions/erc1155\";\nimport { sendTransaction } from \"thirdweb\";\n\nconst transaction = updateMetadata({\n contract,\n targetTokenId: 0n,\n client: thirdwebClient,\n newMetadata: {\n name: \"this is the new nft name\",\n description: \"...\",\n image: \"new image uri\"\n // ...\n },\n});\n\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/drops/write/updateMetadata.ts#L118"
},
{
"kind": "function",
"name": "updateTokenURI",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "This function is an abstracted layer of the "
},
{
"type": "link",
"title": null,
"url": "https://portal.thirdweb.com/references/typescript/v5/erc1155/setTokenURI",
"children": [
{
"type": "inlineCode",
"value": "setTokenURI"
},
{
"type": "text",
"value": " extension"
}
]
},
{
"type": "text",
"value": ",\nwhich means it uses "
},
{
"type": "inlineCode",
"value": "setTokenURI"
},
{
"type": "text",
"value": " under the hood.\nWhile the "
},
{
"type": "inlineCode",
"value": "setTokenURI"
},
{
"type": "text",
"value": " method only takes in a uri string, this extension takes in a user-friendly "
},
{
"type": "link",
"title": null,
"url": "https://portal.thirdweb.com/references/typescript/v5/NFTInput",
"children": [
{
"type": "inlineCode",
"value": "NFTInput"
}
]
},
{
"type": "text",
"value": ",\nupload that content to IPFS and pass the IPFS URI (of said "
},
{
"type": "inlineCode",
"value": "NFTInput"
},
{
"type": "text",
"value": ") to the underlying "
},
{
"type": "inlineCode",
"value": "setTokenURI"
},
{
"type": "text",
"value": " method."
}
]
},
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "This extension does not validate the NFTInput so make sure you are passing the proper content that you want to update."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<UpdateTokenURIParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "UpdateTokenURIParams",
"package": "thirdweb"
}
]
}
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "the prepared transaction from "
},
{
"type": "inlineCode",
"value": "setTokenURI"
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { updateTokenURI } from \"thirdweb/extensions/erc1155\";\n\nconst transaction = updateTokenURI({\n tokenId: 0n,\n nft: {\n name: \"new name\",\n description: \"new description\",\n image: \"https://image-host.com/new-image.png\",\n },\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/write/updateTokenURI.ts#L42"
},
{
"kind": "function",
"name": "uri",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"uri\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<UriParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "UriParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the uri function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<string>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1155"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { uri } from \"thirdweb/extensions/erc1155\";\n\nconst result = await uri({\n contract,\n tokenId: ...,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1155/__generated__/IERC1155/read/uri.ts#L115"
},
{
"kind": "function",
"name": "checkContractWalletSignature",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if a contract wallet signature is valid."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "CheckContractWalletSignatureOptions",
"tokens": [
{
"name": "CheckContractWalletSignatureOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the checkContractWalletSignature function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<boolean>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves with a boolean indicating if the signature is valid."
}
]
}
]
},
"blockTags": [
{
"tag": "@deprecated",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Use "
},
{
"type": "inlineCode",
"value": "verifySignature"
},
{
"type": "text",
"value": " instead"
}
]
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1271"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { checkContractWalletSignature } from \"thirdweb/extensions/erc1271\";\nconst isValid = await checkContractWalletSignature({\n contract: myContract,\n message: \"hello world\",\n signature: \"0x...\",\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1271/checkContractWalletSignature.ts#L35"
},
{
"kind": "function",
"name": "checkContractWalletSignedTypedData",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if a contract wallet signature is valid."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "CheckContractWalletSignTypedDataOptions<typedData, primaryType>",
"tokens": [
{
"name": "CheckContractWalletSignTypedDataOptions",
"package": "thirdweb"
},
{
"name": "typedData",
"package": "thirdweb"
},
{
"name": "primaryType",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the checkContractWalletSignature function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<boolean>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves with a boolean indicating if the signature is valid."
}
]
}
]
},
"blockTags": [
{
"tag": "@deprecated",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Use "
},
{
"type": "inlineCode",
"value": "verifyTypedData"
},
{
"type": "text",
"value": " instead"
}
]
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC1271"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { checkContractWalletSignedTypedData } from \"thirdweb/extensions/erc1271\";\nconst isValid = await checkContractWalletSignedTypedData({\n contract: myContract,\n data: {\n primaryType: \"EIP712Domain\",\n domain: {\n name: \"Example\",\n version: \"1\",\n chainId: 1,\n verifyingContract: myContract.address,\n },\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc1271/checkContractWalletSignedTypedData.ts#L44"
},
{
"kind": "function",
"name": "allowance",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"allowance\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<AllowanceParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "AllowanceParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the allowance function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<bigint>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { allowance } from \"thirdweb/extensions/erc20\";\n\nconst result = await allowance({\n contract,\n owner: ...,\n spender: ...,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/__generated__/IERC20/read/allowance.ts#L125"
},
{
"kind": "function",
"name": "approvalEvent",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Creates an event object for the Approval event."
}
]
}
],
"parameters": [
{
"name": "filters",
"type": {
"code": "Partial",
"tokens": [
{
"name": "Partial",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Optional filters to apply to the event."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedEvent<{ readonly inputs: readonly [{ readonly indexed: true; readonly name: \"owner\"; readonly type: \"address\" }, { readonly indexed: true; readonly name: \"spender\"; readonly type: \"address\" }, { readonly name: \"value\"; readonly type: \"uint256\" }]; readonly name: \"Approval\"; readonly type: \"event\" }>",
"tokens": [
{
"name": "PreparedEvent",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared event object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractEvents } from \"thirdweb\";\nimport { approvalEvent } from \"thirdweb/extensions/erc20\";\n\nconst events = await getContractEvents({\ncontract,\nevents: [\n approvalEvent({\n owner: ...,\n spender: ...,\n})\n],\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/__generated__/IERC20/events/Approval.ts#L41"
},
{
"kind": "function",
"name": "approve",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Approves the spending of tokens by a specific address."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<ApproveParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "ApproveParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The transaction options."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { approve } from \"thirdweb/extensions/erc20\";\nimport { sendTransaction } from \"thirdweb\";\n\nconst transaction = await approve({\n contract,\n spender: \"0x...\",\n amount: 100,\n});\n\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/write/approve.ts#L41"
},
{
"kind": "function",
"name": "balanceOf",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"balanceOf\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<BalanceOfParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "BalanceOfParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the balanceOf function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<bigint>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { balanceOf } from \"thirdweb/extensions/erc20\";\n\nconst result = await balanceOf({\n contract,\n address: ...,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/__generated__/IERC20/read/balanceOf.ts#L117"
},
{
"kind": "function",
"name": "burn",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"burn\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(BurnParams) | ({ asyncParams: () => Promise<BurnParams> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "BurnParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "BurnParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"burn\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { burn } from \"thirdweb/extensions/erc20\";\n\nconst transaction = burn({\n contract,\n amount: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/__generated__/IBurnableERC20/write/burn.ts#L105"
},
{
"kind": "function",
"name": "burnFrom",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"burnFrom\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(BurnFromParams) | ({ asyncParams: () => Promise<BurnFromParams> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "BurnFromParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "BurnFromParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"burnFrom\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { burnFrom } from \"thirdweb/extensions/erc20\";\n\nconst transaction = burnFrom({\n contract,\n account: ...,\n amount: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/__generated__/IBurnableERC20/write/burnFrom.ts#L113"
},
{
"kind": "function",
"name": "canClaim",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Check if a user can claim a drop."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<CanClaimParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "CanClaimParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the transaction."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<CanClaimResult>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
},
{
"name": "CanClaimResult",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Whether the user can claim the drop."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "const claimResult = await canClaim({\n contract: contract,\n claimer: \"0x1234567890123456789012345678901234567890\",\n quantity: \"1\",\n});"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/drops/read/canClaim.ts#L35"
},
{
"kind": "function",
"name": "claimConditionsUpdatedEvent",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Creates an event object for the ClaimConditionsUpdated event."
}
]
}
],
"returns": {
"type": {
"code": "PreparedEvent<{ readonly inputs: readonly [{ readonly components: readonly [{ readonly name: \"startTimestamp\"; readonly type: \"uint256\" }, { readonly name: \"maxClaimableSupply\"; readonly type: \"uint256\" }, { readonly name: \"supplyClaimed\"; readonly type: \"uint256\" }, { readonly name: \"quantityLimitPerWallet\"; readonly type: \"uint256\" }, { readonly name: \"merkleRoot\"; readonly type: \"bytes32\" }, { readonly name: \"pricePerToken\"; readonly type: \"uint256\" }, { readonly name: \"currency\"; readonly type: \"address\" }, { readonly name: \"metadata\"; readonly type: \"string\" }]; readonly name: \"claimConditions\"; readonly type: \"tuple[]\" }, { readonly name: \"resetEligibility\"; readonly type: \"bool\" }]; readonly name: \"ClaimConditionsUpdated\"; readonly type: \"event\" }>",
"tokens": [
{
"name": "PreparedEvent",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared event object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractEvents } from \"thirdweb\";\nimport { claimConditionsUpdatedEvent } from \"thirdweb/extensions/erc20\";\n\nconst events = await getContractEvents({\ncontract,\nevents: [\n claimConditionsUpdatedEvent()\n],\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/__generated__/IDropERC20/events/ClaimConditionsUpdated.ts#L20"
},
{
"kind": "function",
"name": "claimTo",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Claim ERC20 NFTs to a specified address"
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<ClaimToParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "ClaimToParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the transaction"
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves with the submitted transaction hash."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "heading",
"depth": 3,
"children": [
{
"type": "text",
"value": "Basic usage"
}
]
},
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { claimTo } from \"thirdweb/extensions/erc20\";\nimport { sendTransaction } from \"thirdweb\";\n\nconst transaction = claimTo({\n contract,\n to: \"0x...\",\n quantity: 100n,\n});\n\nawait sendTransaction({ transaction, account });"
},
{
"type": "heading",
"depth": 3,
"children": [
{
"type": "text",
"value": "For Drops with allowlists"
}
]
},
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "You need to specify the claimer address as the "
},
{
"type": "inlineCode",
"value": "from"
},
{
"type": "text",
"value": " param to avoid any issue with the allowlist"
}
]
},
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "const transaction = claimTo({\n contract,\n to: \"0x...\",\n quantity: 100n,\n from: \"0x...\", // address of the one claiming\n});"
}
]
},
{
"tag": "@throws",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "If no claim condition is set"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/drops/write/claimTo.ts#L52"
},
{
"kind": "function",
"name": "decimals",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Retrieves the number of decimal places for a given ERC20 contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the transaction."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<number>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the number of decimal places."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { decimals } from \"thirdweb/extensions/erc20\";\n\nconst tokenDecimals = await decimals({ contract });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/read/decimals.ts#L19"
},
{
"kind": "function",
"name": "delegate",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"delegate\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(DelegateParams) | ({ asyncParams: () => Promise<DelegateParams> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "DelegateParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "DelegateParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"delegate\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { delegate } from \"thirdweb/extensions/erc20\";\n\nconst transaction = delegate({\n contract,\n delegatee: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/write/delegate.ts#L108"
},
{
"kind": "function",
"name": "delegates",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"delegates\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<DelegatesParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "DelegatesParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the delegates function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<string>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { delegates } from \"thirdweb/extensions/erc20\";\n\nconst result = await delegates({\n contract,\n account: ...,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/__generated__/IVotes/read/delegates.ts#L117"
},
{
"kind": "function",
"name": "deposit",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"deposit\" function on the contract (useful to wrap ETH)."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<DepositParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "DepositParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"deposit\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { deposit } from \"thirdweb/extensions/erc20\";\nimport { sendTransaction } from \"thirdweb\";\n\nconst transaction = deposit({ contract, amount: \"0.1\" });\n\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/write/deposit.ts#L30"
},
{
"kind": "function",
"name": "generateMintSignature",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Generates the payload and signature for minting an ERC20 token."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "GenerateMintSignatureOptions",
"tokens": [
{
"name": "GenerateMintSignatureOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the minting process."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<{ payload: { currency: string; price: bigint; primarySaleRecipient: string; quantity: bigint; to: string; uid: `0x${string}`; validityEndTimestamp: bigint; validityStartTimestamp: bigint }; signature: `0x${string}` }>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the payload and signature."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { mintWithSignature, generateMintSignature } from \"thirdweb/extensions/erc20\";\n\nconst { payload, signature } = await generateMintSignature({\n account,\n contract,\n mintRequest: {\n to: \"0x...\",\n quantity: \"10\",\n },\n});\n\nconst transaction = mintWithSignature({\n contract,\n payload,\n signature,\n});\nawait sendTransaction({ transaction, account });"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/write/sigMint.ts#L98"
},
{
"kind": "function",
"name": "getActiveClaimCondition",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Retrieves the active claim condition."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The transaction options."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<ClaimCondition>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
},
{
"name": "ClaimCondition",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the active claim condition."
}
]
}
]
},
"blockTags": [
{
"tag": "@throws",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An error if the claim condition is unsupported."
}
]
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getActiveClaimCondition } from \"thirdweb/extensions/erc20\";\nconst activeClaimCondition = await getActiveClaimCondition({ contract });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/drops/read/getActiveClaimCondition.ts#L18"
},
{
"kind": "function",
"name": "getActiveClaimConditionId",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"getActiveClaimConditionId\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the getActiveClaimConditionId function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<bigint>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getActiveClaimConditionId } from \"thirdweb/extensions/erc20\";\n\nconst result = await getActiveClaimConditionId({\n contract,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/__generated__/IDropERC20/read/getActiveClaimConditionId.ts#L66"
},
{
"kind": "function",
"name": "getApprovalForTransaction",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "When dealing with transactions that involve ERC20 tokens (Airdropping ERC20, buy NFTs with ERC20, etc.)\nyou often have to do a pre-check to see if the targeted contract has the sufficient allowance to \"take\" the ERC20 tokens from the caller's wallet."
}
]
},
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "This extension is a handy method that checks for the allowance and requests to approve for more if current allowance is insufficient"
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "GetApprovalForTransactionParams",
"tokens": [
{
"name": "GetApprovalForTransactionParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "GetApprovalForTransactionParams"
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<null | (PreparedTransaction)>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
},
{
"name": "PreparedTransaction",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "a PreparedTransaction"
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getApprovalForTransaction } from \"thirdweb/extensions/erc20\";\nimport { sendAndConfirmTransaction } from \"thirdweb\";\n\nasync function buyNFT() {\n const buyTransaction = ... // could be a marketplacev3's buyFromListing\n\n // Check if you need to approve spending for the involved ERC20 contract\n const approveTx = await getApprovalForTransaction({\n transaction: buyTransaction,\n account, // the connected account\n });\n if (approveTx) {\n await sendAndConfirmTransaction({\n transaction: approveTx,\n account,\n })\n }\n // Once approved, you can finally perform the buy transaction\n await sendAndConfirmTransaction({\n transaction: buyTransaction,\n account,\n });\n}"
}
]
},
{
"tag": "@transaction",
"summary": []
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/write/getApprovalForTransaction.ts#L58"
},
{
"kind": "function",
"name": "getBalance",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Retrieves the balance of an ERC20 token for a specific address."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<GetBalanceParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "GetBalanceParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The transaction options including the address."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<GetBalanceResult>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
},
{
"name": "GetBalanceResult",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An object containing the balance value, display value, and symbol."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getBalance } from \"thirdweb/extensions/erc20\";\n\nconst balance = await getBalance({ contract, address: \"0x...\" });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/read/getBalance.ts#L40"
},
{
"kind": "function",
"name": "getClaimConditionById",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"getClaimConditionById\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<GetClaimConditionByIdParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "GetClaimConditionByIdParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the getClaimConditionById function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<{ currency: string; maxClaimableSupply: bigint; merkleRoot: `0x${string}`; metadata: string; pricePerToken: bigint; quantityLimitPerWallet: bigint; startTimestamp: bigint; supplyClaimed: bigint }>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getClaimConditionById } from \"thirdweb/extensions/erc20\";\n\nconst result = await getClaimConditionById({\n contract,\n conditionId: ...,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/__generated__/IDropERC20/read/getClaimConditionById.ts#L159"
},
{
"kind": "function",
"name": "getClaimConditions",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Retrieves all claim conditions."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The transaction options."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<Array<ClaimCondition>>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
},
{
"name": "ClaimCondition",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to all claim conditions."
}
]
}
]
},
"blockTags": [
{
"tag": "@throws",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An error if the claim conditions are unsupported by the contract."
}
]
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getClaimConditions } from \"thirdweb/extensions/erc20\";\nconst conditions = await getClaimConditions({ contract });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/drops/read/getClaimConditions.ts#L18"
},
{
"kind": "function",
"name": "getCurrencyMetadata",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Retrieves the metadata of a currency."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the transaction."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<GetCurrencyMetadataResult>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
},
{
"name": "GetCurrencyMetadataResult",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to an object containing the currency metadata."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getCurrencyMetadata } from \"thirdweb/extensions/erc20\";\n\nconst currencyMetadata = await getCurrencyMetadata({ contract });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/read/getCurrencyMetadata.ts#L28"
},
{
"kind": "function",
"name": "isClaimToSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "claimTo"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "claimTo"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isClaimToSupported } from \"thirdweb/extensions/erc20\";\n\nconst supported = isClaimToSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/drops/write/claimTo.ts#L93"
},
{
"kind": "function",
"name": "isERC20",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Check if a contract is an ERC20 token."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
}
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating whether the contract is an ERC20 token."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isERC20 } from \"thirdweb/extensions/erc20\";\nimport { resolveContractAbi } from \"thirdweb/contract\";\n\nconst abi = await resolveContractAbi(contract);\nconst selectors = abi\n .filter((f) => f.type === \"function\")\n .map((f) => toFunctionSelector(f));\n\nconst result = await isERC20(selectors);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/read/isERC20.ts#L29"
},
{
"kind": "function",
"name": "isGetActiveClaimConditionIdSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "getActiveClaimConditionId"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "getActiveClaimConditionId"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isGetActiveClaimConditionIdSupported } from \"thirdweb/extensions/erc20\";\nconst supported = isGetActiveClaimConditionIdSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/__generated__/IDropERC20/read/getActiveClaimConditionId.ts#L27"
},
{
"kind": "function",
"name": "isGetActiveClaimConditionSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "getActiveClaimCondition"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "getActiveClaimCondition"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isGetActiveClaimConditionSupported } from \"thirdweb/extensions/erc20\";\n\nconst supported = isGetActiveClaimConditionSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/drops/read/getActiveClaimCondition.ts#L41"
},
{
"kind": "function",
"name": "isGetClaimConditionByIdSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "getClaimConditionById"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "getClaimConditionById"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isGetClaimConditionByIdSupported } from \"thirdweb/extensions/erc20\";\nconst supported = isGetClaimConditionByIdSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/__generated__/IDropERC20/read/getClaimConditionById.ts#L78"
},
{
"kind": "function",
"name": "isGetClaimConditionsSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "getClaimConditions"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "getClaimConditions"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC721"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isGetClaimConditionsSupported } from \"thirdweb/extensions/erc721\";\n\nconst supported = isGetClaimConditionsSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/drops/read/getClaimConditions.ts#L53"
},
{
"kind": "function",
"name": "isMintToSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "mintTo"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "mintTo"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isMintToSupported } from \"thirdweb/extensions/erc20\";\n\nconst supported = isMintToSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/__generated__/IMintableERC20/write/mintTo.ts#L44"
},
{
"kind": "function",
"name": "isResetClaimEligibilitySupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "resetClaimEligibility"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "resetClaimEligibility"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isResetClaimEligibilitySupported } from \"thirdweb/extensions/erc20\";\n\nconst supported = isResetClaimEligibilitySupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/drops/write/resetClaimEligibility.ts#L65"
},
{
"kind": "function",
"name": "isSetClaimConditionsSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "setClaimConditions"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "setClaimConditions"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isSetClaimConditionsSupported } from \"thirdweb/extensions/erc20\";\n\nconst supported = isSetClaimConditionsSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/drops/write/setClaimConditions.ts#L79"
},
{
"kind": "function",
"name": "mintTo",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Mints a specified amount of tokens to a given address."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<MintToParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "MintToParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for minting tokens."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { mintTo } from \"thirdweb/extensions/erc20\";\nimport { sendTransaction } from \"thirdweb\";\n\nconst transaction = mintTo({\n contract,\n to: \"0x...\",\n amount: 100,\n});\n\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/write/mintTo.ts#L47"
},
{
"kind": "function",
"name": "mintWithSignature",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Mints a new ERC20 token with the given minter signature"
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<MintWithSignatureParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "MintWithSignatureParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The transaction options."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the transaction result."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { mintWithSignature, generateMintSignature } from \"thirdweb/extensions/erc20\";\nimport { sendTransaction } from \"thirdweb\";\n\nconst { payload, signature } = await generateMintSignature(...)\n\nconst transaction = mintWithSignature({\n contract,\n payload,\n signature,\n});\n\nawait sendTransaction({ transaction, account });"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/write/sigMint.ts#L40"
},
{
"kind": "function",
"name": "resetClaimEligibility",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Reset the claim eligibility for all users."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
}
]
}
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "the prepared transaction"
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { resetClaimEligibility } from \"thirdweb/extensions/erc20\";\nimport { sendTransaction } from \"thirdweb\";\n\nconst transaction = resetClaimEligibility({\n contract,\n});\n\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/drops/write/resetClaimEligibility.ts#L30"
},
{
"kind": "function",
"name": "setClaimConditions",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Set the claim conditions for a ERC20 drop"
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<SetClaimConditionsParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "SetClaimConditionsParams",
"package": "thirdweb"
}
]
}
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "the prepared transaction"
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { setClaimConditions } from \"thirdweb/extensions/erc20\";\nimport { sendTransaction } from \"thirdweb\";\n\nconst transaction = setClaimConditions({\n contract,\n phases: [\n {\n maxClaimableSupply: 100n,\n maxClaimablePerWallet: 1n,\n currencyAddress: \"0x...\",\n price: 0.1,\n startTime: new Date(),\n },\n ],\n});\n\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/drops/write/setClaimConditions.ts#L48"
},
{
"kind": "function",
"name": "tokensClaimedEvent",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Creates an event object for the TokensClaimed event."
}
]
}
],
"parameters": [
{
"name": "filters",
"type": {
"code": "Partial",
"tokens": [
{
"name": "Partial",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Optional filters to apply to the event."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedEvent<{ readonly inputs: readonly [{ readonly indexed: true; readonly name: \"claimConditionIndex\"; readonly type: \"uint256\" }, { readonly indexed: true; readonly name: \"claimer\"; readonly type: \"address\" }, { readonly indexed: true; readonly name: \"receiver\"; readonly type: \"address\" }, { readonly name: \"quantityClaimed\"; readonly type: \"uint256\" }]; readonly name: \"TokensClaimed\"; readonly type: \"event\" }>",
"tokens": [
{
"name": "PreparedEvent",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared event object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractEvents } from \"thirdweb\";\nimport { tokensClaimedEvent } from \"thirdweb/extensions/erc20\";\n\nconst events = await getContractEvents({\ncontract,\nevents: [\n tokensClaimedEvent({\n claimConditionIndex: ...,\n claimer: ...,\n receiver: ...,\n})\n],\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/__generated__/IDropERC20/events/TokensClaimed.ts#L47"
},
{
"kind": "function",
"name": "tokensMintedEvent",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Creates an event object for the TokensMinted event."
}
]
}
],
"parameters": [
{
"name": "filters",
"type": {
"code": "Partial",
"tokens": [
{
"name": "Partial",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Optional filters to apply to the event."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedEvent<{ readonly inputs: readonly [{ readonly indexed: true; readonly name: \"mintedTo\"; readonly type: \"address\" }, { readonly name: \"quantityMinted\"; readonly type: \"uint256\" }]; readonly name: \"TokensMinted\"; readonly type: \"event\" }>",
"tokens": [
{
"name": "PreparedEvent",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared event object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractEvents } from \"thirdweb\";\nimport { tokensMintedEvent } from \"thirdweb/extensions/erc20\";\n\nconst events = await getContractEvents({\ncontract,\nevents: [\n tokensMintedEvent({\n mintedTo: ...,\n})\n],\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/__generated__/IMintableERC20/events/TokensMinted.ts#L35"
},
{
"kind": "function",
"name": "tokensMintedWithSignatureEvent",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Creates an event object for the TokensMintedWithSignature event."
}
]
}
],
"parameters": [
{
"name": "filters",
"type": {
"code": "Partial",
"tokens": [
{
"name": "Partial",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Optional filters to apply to the event."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedEvent<{ readonly inputs: readonly [{ readonly indexed: true; readonly name: \"signer\"; readonly type: \"address\" }, { readonly indexed: true; readonly name: \"mintedTo\"; readonly type: \"address\" }, { readonly components: readonly [{ readonly name: \"to\"; readonly type: \"address\" }, { readonly name: \"primarySaleRecipient\"; readonly type: \"address\" }, { readonly name: \"quantity\"; readonly type: \"uint256\" }, { readonly name: \"price\"; readonly type: \"uint256\" }, { readonly name: \"currency\"; readonly type: \"address\" }, { readonly name: \"validityStartTimestamp\"; readonly type: \"uint128\" }, { readonly name: \"validityEndTimestamp\"; readonly type: \"uint128\" }, { readonly name: \"uid\"; readonly type: \"bytes32\" }]; readonly name: \"mintRequest\"; readonly type: \"tuple\" }]; readonly name: \"TokensMintedWithSignature\"; readonly type: \"event\" }>",
"tokens": [
{
"name": "PreparedEvent",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared event object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractEvents } from \"thirdweb\";\nimport { tokensMintedWithSignatureEvent } from \"thirdweb/extensions/erc20\";\n\nconst events = await getContractEvents({\ncontract,\nevents: [\n tokensMintedWithSignatureEvent({\n signer: ...,\n mintedTo: ...,\n})\n],\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/__generated__/ISignatureMintERC20/events/TokensMintedWithSignature.ts#L41"
},
{
"kind": "function",
"name": "totalSupply",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"totalSupply\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the totalSupply function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<bigint>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { totalSupply } from \"thirdweb/extensions/erc20\";\n\nconst result = await totalSupply({\n contract,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/__generated__/IERC20/read/totalSupply.ts#L64"
},
{
"kind": "function",
"name": "transfer",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Transfers ERC20 tokens from the sender's address to the specified recipient address."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<TransferParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "TransferParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the transfer transaction."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the prepared transaction."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { transfer } from \"thirdweb/extensions/erc20\";\nimport { sendTransaction } from \"thirdweb\";\n\nconst transaction = transfer({\n contract,\n to: \"0x...\",\n amount: 100,\n});\n\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/write/transfer.ts#L45"
},
{
"kind": "function",
"name": "transferBatch",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Transfers a batch of ERC20 tokens from the sender's address to the specified recipient address."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<{ batch: Array<({ to: string }) & (({ amount: string | number }) | ({ amountWei: bigint }))> }>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the batch transfer transaction."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the prepared transaction."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { transferBatch } from \"thirdweb/extensions/erc20\";\nimport { sendTransaction } from \"thirdweb\";\n\nconst transaction = transferBatch({\n contract,\n batch: [\n {\n to: \"0x...\",\n amount: 100,\n },\n {\n to: \"0x...\",\n amount: \"0.1\",\n },\n]);\n\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/write/transferBatch.ts#L50"
},
{
"kind": "function",
"name": "transferEvent",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Creates an event object for the Transfer event."
}
]
}
],
"parameters": [
{
"name": "filters",
"type": {
"code": "Partial",
"tokens": [
{
"name": "Partial",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Optional filters to apply to the event."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedEvent<{ readonly inputs: readonly [{ readonly indexed: true; readonly name: \"from\"; readonly type: \"address\" }, { readonly indexed: true; readonly name: \"to\"; readonly type: \"address\" }, { readonly name: \"value\"; readonly type: \"uint256\" }]; readonly name: \"Transfer\"; readonly type: \"event\" }>",
"tokens": [
{
"name": "PreparedEvent",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared event object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractEvents } from \"thirdweb\";\nimport { transferEvent } from \"thirdweb/extensions/erc20\";\n\nconst events = await getContractEvents({\ncontract,\nevents: [\n transferEvent({\n from: ...,\n to: ...,\n})\n],\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/__generated__/IERC20/events/Transfer.ts#L41"
},
{
"kind": "function",
"name": "transferFrom",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Transfers a specified amount of tokens from one address to another address on the ERC20 contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<TransferFromParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "TransferFromParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The transaction options including from, to, amount, and gas price."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { transferFrom } from \"thirdweb/extensions/erc20\";\nimport { sendTransaction } from \"thirdweb\";\n\nconst transaction = transferFrom({\n contract: USDC_CONTRACT,\n from: \"0x1234...\",\n to: \"0x5678...\",\n amount: 100,\n});\n\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/write/transferFrom.ts#L48"
},
{
"kind": "function",
"name": "withdraw",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"withdraw\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(WithdrawParams) | ({ asyncParams: () => Promise<WithdrawParams> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "WithdrawParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "WithdrawParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"withdraw\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC20"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { withdraw } from \"thirdweb/extensions/erc20\";\n\nconst transaction = withdraw({\n contract,\n amount: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc20/__generated__/IWETH/write/withdraw.ts#L105"
},
{
"kind": "function",
"name": "accountDeployedEvent",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Creates an event object for the AccountDeployed event."
}
]
}
],
"parameters": [
{
"name": "filters",
"type": {
"code": "Partial",
"tokens": [
{
"name": "Partial",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Optional filters to apply to the event."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedEvent<{ readonly inputs: readonly [{ readonly indexed: true; readonly name: \"userOpHash\"; readonly type: \"bytes32\" }, { readonly indexed: true; readonly name: \"sender\"; readonly type: \"address\" }, { readonly name: \"factory\"; readonly type: \"address\" }, { readonly name: \"paymaster\"; readonly type: \"address\" }]; readonly name: \"AccountDeployed\"; readonly type: \"event\" }>",
"tokens": [
{
"name": "PreparedEvent",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared event object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractEvents } from \"thirdweb\";\nimport { accountDeployedEvent } from \"thirdweb/extensions/erc4337\";\n\nconst events = await getContractEvents({\ncontract,\nevents: [\n accountDeployedEvent({\n userOpHash: ...,\n sender: ...,\n})\n],\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/AccountDeployed.ts#L41"
},
{
"kind": "function",
"name": "addAdmin",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Adds admin permissions for a specified address."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<AddAdminOptions>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "AddAdminOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the addAdmin function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The transaction object to be sent."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { addAdmin } from 'thirdweb/extensions/erc4337';\nimport { sendTransaction } from 'thirdweb';\n\nconst transaction = addAdmin({\ncontract,\naccount,\nadminAddress: '0x...'\n});\n\nawait sendTransaction({ transaction, account });"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/account/addAdmin.ts#L42"
},
{
"kind": "function",
"name": "addSessionKey",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Adds session key permissions for a specified address."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<AddSessionKeyOptions>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "AddSessionKeyOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the removeSessionKey function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The transaction object to be sent."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { addSessionKey } from 'thirdweb/extensions/erc4337';\nimport { sendTransaction } from 'thirdweb';\n\nconst transaction = addSessionKey({\ncontract,\naccount,\nsessionKeyAddress,\npermissions: {\n approvedTargets: ['0x...'],\n nativeTokenLimitPerTransaction: 0.1, // in ETH\n permissionStartTimestamp: new Date(),\n permissionEndTimestamp: new Date(Date.now() + 1000 * 60 * 60 * 24 * 365), // 1 year from now\n}\n});\n\nawait sendTransaction({ transaction, account });"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/account/addSessionKey.ts#L59"
},
{
"kind": "function",
"name": "adminUpdatedEvent",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Creates an event object for the AdminUpdated event."
}
]
}
],
"parameters": [
{
"name": "filters",
"type": {
"code": "Partial",
"tokens": [
{
"name": "Partial",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Optional filters to apply to the event."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedEvent<{ readonly inputs: readonly [{ readonly indexed: true; readonly name: \"signer\"; readonly type: \"address\" }, { readonly name: \"isAdmin\"; readonly type: \"bool\" }]; readonly name: \"AdminUpdated\"; readonly type: \"event\" }>",
"tokens": [
{
"name": "PreparedEvent",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared event object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractEvents } from \"thirdweb\";\nimport { adminUpdatedEvent } from \"thirdweb/extensions/erc4337\";\n\nconst events = await getContractEvents({\ncontract,\nevents: [\n adminUpdatedEvent({\n signer: ...,\n})\n],\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/events/AdminUpdated.ts#L35"
},
{
"kind": "function",
"name": "createAccount",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"createAccount\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(CreateAccountParams) | ({ asyncParams: () => Promise<CreateAccountParams> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "CreateAccountParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "CreateAccountParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"createAccount\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { createAccount } from \"thirdweb/extensions/erc4337\";\n\nconst transaction = createAccount({\n contract,\n admin: ...,\n data: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/write/createAccount.ts#L120"
},
{
"kind": "function",
"name": "getAccounts",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"getAccounts\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<GetAccountsParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "GetAccountsParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the getAccounts function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<readonly Array<string>>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getAccounts } from \"thirdweb/extensions/erc4337\";\n\nconst result = await getAccounts({\n contract,\n start: ...,\n end: ...,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/read/getAccounts.ts#L125"
},
{
"kind": "function",
"name": "getAccountsOfSigner",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"getAccountsOfSigner\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<GetAccountsOfSignerParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "GetAccountsOfSignerParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the getAccountsOfSigner function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<readonly Array<string>>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getAccountsOfSigner } from \"thirdweb/extensions/erc4337\";\n\nconst result = await getAccountsOfSigner({\n contract,\n signer: ...,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/read/getAccountsOfSigner.ts#L120"
},
{
"kind": "function",
"name": "getAllAccounts",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"getAllAccounts\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the getAllAccounts function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<readonly Array<string>>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getAllAccounts } from \"thirdweb/extensions/erc4337\";\n\nconst result = await getAllAccounts({\n contract,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/read/getAllAccounts.ts#L64"
},
{
"kind": "function",
"name": "getAllActiveSigners",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"getAllActiveSigners\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the getAllActiveSigners function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<readonly Array<{ approvedTargets: readonly Array<string>; endTimestamp: bigint; nativeTokenLimitPerTransaction: bigint; signer: string; startTimestamp: bigint }>>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getAllActiveSigners } from \"thirdweb/extensions/erc4337\";\n\nconst result = await getAllActiveSigners({\n contract,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/getAllActiveSigners.ts#L87"
},
{
"kind": "function",
"name": "getAllAdmins",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"getAllAdmins\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the getAllAdmins function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<readonly Array<string>>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getAllAdmins } from \"thirdweb/extensions/erc4337\";\n\nconst result = await getAllAdmins({\n contract,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/getAllAdmins.ts#L65"
},
{
"kind": "function",
"name": "getAllSigners",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"getAllSigners\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the getAllSigners function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<readonly Array<{ approvedTargets: readonly Array<string>; endTimestamp: bigint; nativeTokenLimitPerTransaction: bigint; signer: string; startTimestamp: bigint }>>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getAllSigners } from \"thirdweb/extensions/erc4337\";\n\nconst result = await getAllSigners({\n contract,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/getAllSigners.ts#L87"
},
{
"kind": "function",
"name": "getPermissionsForSigner",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"getPermissionsForSigner\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<GetPermissionsForSignerParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "GetPermissionsForSignerParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the getPermissionsForSigner function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<{ approvedTargets: readonly Array<string>; endTimestamp: bigint; nativeTokenLimitPerTransaction: bigint; signer: string; startTimestamp: bigint }>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getPermissionsForSigner } from \"thirdweb/extensions/erc4337\";\n\nconst result = await getPermissionsForSigner({\n contract,\n signer: ...,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/getPermissionsForSigner.ts#L146"
},
{
"kind": "function",
"name": "getUserOpHash",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"getUserOpHash\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<GetUserOpHashParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "GetUserOpHashParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the getUserOpHash function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<`0x${string}`>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getUserOpHash } from \"thirdweb/extensions/erc4337\";\n\nconst result = await getUserOpHash({\n contract,\n userOp: ...,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/read/getUserOpHash.ts#L179"
},
{
"kind": "function",
"name": "isAccountDeployed",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Adds admin permissions for a specified address."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<GetAddressParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "GetAddressParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the addAdmin function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<boolean>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The transaction object to be sent."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isAccountDeployed } from 'thirdweb/extensions/erc4337';\n\nconst isDeployed = await isAccountDeployed({\ncontract,\naccount,\nadminSigner: '0x...'\n});\n\nawait isAccountDeployed({ contract, adminSigner });"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/account/isAccountDeployed.ts#L29"
},
{
"kind": "function",
"name": "isActiveSigner",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"isActiveSigner\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<IsActiveSignerParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "IsActiveSignerParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the isActiveSigner function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<boolean>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isActiveSigner } from \"thirdweb/extensions/erc4337\";\n\nconst result = await isActiveSigner({\n contract,\n signer: ...,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/isActiveSigner.ts#L117"
},
{
"kind": "function",
"name": "isAddAdminSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "isAddAdminSupported"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "isAddAdminSupported"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isAddAdminSupported } from \"thirdweb/extensions/erc4337\";\n\nconst supported = isAddAdminSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/account/addAdmin.ts#L72"
},
{
"kind": "function",
"name": "isAddSessionKeySupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "isAddSessionKeySupported"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "isAddSessionKeySupported"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isAddSessionKeySupported } from \"thirdweb/extensions/erc4337\";\n\nconst supported = isAddSessionKeySupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/account/addSessionKey.ts#L91"
},
{
"kind": "function",
"name": "isAdmin",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"isAdmin\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<IsAdminParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "IsAdminParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the isAdmin function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<boolean>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isAdmin } from \"thirdweb/extensions/erc4337\";\n\nconst result = await isAdmin({\n contract,\n signer: ...,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/isAdmin.ts#L115"
},
{
"kind": "function",
"name": "isCreateAccountSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "createAccount"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "createAccount"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isCreateAccountSupported } from \"thirdweb/extensions/erc4337\";\n\nconst supported = isCreateAccountSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/write/createAccount.ts#L49"
},
{
"kind": "function",
"name": "isGetAccountsOfSignerSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "getAccountsOfSigner"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "getAccountsOfSigner"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isGetAccountsOfSignerSupported } from \"thirdweb/extensions/erc4337\";\nconst supported = isGetAccountsOfSignerSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/read/getAccountsOfSigner.ts#L41"
},
{
"kind": "function",
"name": "isGetAccountsSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "getAccounts"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "getAccounts"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isGetAccountsSupported } from \"thirdweb/extensions/erc4337\";\nconst supported = isGetAccountsSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/read/getAccounts.ts#L45"
},
{
"kind": "function",
"name": "isGetAllAccountsSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "getAllAccounts"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "getAllAccounts"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isGetAllAccountsSupported } from \"thirdweb/extensions/erc4337\";\nconst supported = isGetAllAccountsSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/read/getAllAccounts.ts#L27"
},
{
"kind": "function",
"name": "isGetAllActiveSignersSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "getAllActiveSigners"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "getAllActiveSigners"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isGetAllActiveSignersSupported } from \"thirdweb/extensions/erc4337\";\nconst supported = isGetAllActiveSignersSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/getAllActiveSigners.ts#L50"
},
{
"kind": "function",
"name": "isGetAllAdminsSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "getAllAdmins"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "getAllAdmins"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isGetAllAdminsSupported } from \"thirdweb/extensions/erc4337\";\nconst supported = isGetAllAdminsSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/getAllAdmins.ts#L28"
},
{
"kind": "function",
"name": "isGetAllSignersSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "getAllSigners"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "getAllSigners"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isGetAllSignersSupported } from \"thirdweb/extensions/erc4337\";\nconst supported = isGetAllSignersSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/getAllSigners.ts#L50"
},
{
"kind": "function",
"name": "isIsAccountDeployedSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "getAddress"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "getAddress"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isGetAddressSupported } from \"thirdweb/extensions/erc4337\";\nconst supported = isGetAddressSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/read/getAddress.ts#L48"
},
{
"kind": "function",
"name": "isIsActiveSignerSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "isActiveSigner"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "isActiveSigner"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isIsActiveSignerSupported } from \"thirdweb/extensions/erc4337\";\nconst supported = isIsActiveSignerSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/isActiveSigner.ts#L40"
},
{
"kind": "function",
"name": "isIsAdminSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "isAdmin"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "isAdmin"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isIsAdminSupported } from \"thirdweb/extensions/erc4337\";\nconst supported = isIsAdminSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/read/isAdmin.ts#L40"
},
{
"kind": "function",
"name": "isRegistered",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"isRegistered\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<IsRegisteredParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "IsRegisteredParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the isRegistered function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<boolean>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isRegistered } from \"thirdweb/extensions/erc4337\";\n\nconst result = await isRegistered({\n contract,\n account: ...,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/read/isRegistered.ts#L117"
},
{
"kind": "function",
"name": "isRemoveAdminSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "isRemoveAdminSupported"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "isRemoveAdminSupported"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isRemoveAdminSupported } from \"thirdweb/extensions/erc4337\";\n\nconst supported = isRemoveAdminSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/account/removeAdmin.ts#L77"
},
{
"kind": "function",
"name": "isRemoveSessionKeySupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "isRemoveSessionKeySupported"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "isRemoveSessionKeySupported"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isRemoveSessionKeySupported } from \"thirdweb/extensions/erc4337\";\n\nconst supported = isRemoveSessionKeySupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/account/removeSessionKey.ts#L79"
},
{
"kind": "function",
"name": "isTotalAccountsSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "totalAccounts"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "totalAccounts"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isTotalAccountsSupported } from \"thirdweb/extensions/erc4337\";\nconst supported = isTotalAccountsSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/read/totalAccounts.ts#L27"
},
{
"kind": "function",
"name": "isValidateUserOpSupported",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the "
},
{
"type": "inlineCode",
"value": "validateUserOp"
},
{
"type": "text",
"value": " method is supported by the given contract."
}
]
}
],
"parameters": [
{
"name": "availableSelectors",
"type": {
"code": "Array<string>",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "An array of 4byte function selectors of the contract. You can get this in various ways, such as using \"whatsabi\" or if you have the ABI of the contract available you can use it to generate the selectors."
}
]
}
]
}
],
"returns": {
"type": {
"code": "boolean",
"tokens": []
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the "
},
{
"type": "inlineCode",
"value": "validateUserOp"
},
{
"type": "text",
"value": " method is supported."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { isValidateUserOpSupported } from \"thirdweb/extensions/erc4337\";\n\nconst supported = isValidateUserOpSupported([\"0x...\"]);"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/__generated__/IAccount/write/validateUserOp.ts#L122"
},
{
"kind": "function",
"name": "predictAccountAddress",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"getAddress\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<GetAddressParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "GetAddressParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the getAddress function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<string>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getAddress } from \"thirdweb/extensions/erc4337\";\n\nconst result = await getAddress({\n contract,\n adminSigner: ...,\n data: ...,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/read/getAddress.ts#L128"
},
{
"kind": "function",
"name": "removeAdmin",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Removes admin permissions for a specified address."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<RemoveAdminOptions>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "RemoveAdminOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the removeAdmin function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The transaction object to be sent."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { removeAdmin } from 'thirdweb/extensions/erc4337';\nimport { sendTransaction } from 'thirdweb';\n\nconst transaction = removeAdmin({\n contract,\n account,\n adminAddress: '0x...'\n});\n\nawait sendTransaction({ transaction, account });"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/account/removeAdmin.ts#L42"
},
{
"kind": "function",
"name": "removeSessionKey",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Removes session key permissions for a specified address."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<RemoveSessionKeyOptions>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "RemoveSessionKeyOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the removeSessionKey function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The transaction object to be sent."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { removeSessionKey } from 'thirdweb/extensions/erc4337';\nimport { sendTransaction } from 'thirdweb';\n\nconst transaction = removeSessionKey({\ncontract,\naccount,\nsessionKeyAddress\n});\n\nawait sendTransaction({ transaction, account });"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/account/removeSessionKey.ts#L42"
},
{
"kind": "function",
"name": "shouldUpdateSessionKey",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Checks if the session key should be updated."
}
]
}
],
"parameters": [
{
"name": "args",
"type": {
"code": "{ accountContract: Readonly; newPermissions: AccountPermissions; sessionKeyAddress: string }",
"tokens": [
{
"name": "Readonly",
"package": "typescript"
},
{
"name": "AccountPermissions",
"package": "thirdweb"
}
]
}
}
],
"returns": {
"type": {
"code": "Promise<boolean>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A boolean indicating if the session key should be updated."
}
]
}
]
},
"blockTags": []
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/account/addSessionKey.ts#L101"
},
{
"kind": "function",
"name": "signerPermissionsUpdatedEvent",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Creates an event object for the SignerPermissionsUpdated event."
}
]
}
],
"parameters": [
{
"name": "filters",
"type": {
"code": "Partial",
"tokens": [
{
"name": "Partial",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Optional filters to apply to the event."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedEvent<{ readonly inputs: readonly [{ readonly indexed: true; readonly name: \"authorizingSigner\"; readonly type: \"address\" }, { readonly indexed: true; readonly name: \"targetSigner\"; readonly type: \"address\" }, { readonly components: readonly [{ readonly name: \"signer\"; readonly type: \"address\" }, { readonly name: \"isAdmin\"; readonly type: \"uint8\" }, { readonly name: \"approvedTargets\"; readonly type: \"address[]\" }, { readonly name: \"nativeTokenLimitPerTransaction\"; readonly type: \"uint256\" }, { readonly name: \"permissionStartTimestamp\"; readonly type: \"uint128\" }, { readonly name: \"permissionEndTimestamp\"; readonly type: \"uint128\" }, { readonly name: \"reqValidityStartTimestamp\"; readonly type: \"uint128\" }, { readonly name: \"reqValidityEndTimestamp\"; readonly type: \"uint128\" }, { readonly name: \"uid\"; readonly type: \"bytes32\" }]; readonly name: \"permissions\"; readonly type: \"tuple\" }]; readonly name: \"SignerPermissionsUpdated\"; readonly type: \"event\" }>",
"tokens": [
{
"name": "PreparedEvent",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared event object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractEvents } from \"thirdweb\";\nimport { signerPermissionsUpdatedEvent } from \"thirdweb/extensions/erc4337\";\n\nconst events = await getContractEvents({\ncontract,\nevents: [\n signerPermissionsUpdatedEvent({\n authorizingSigner: ...,\n targetSigner: ...,\n})\n],\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountPermissions/events/SignerPermissionsUpdated.ts#L41"
},
{
"kind": "function",
"name": "simulateHandleOp",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"simulateHandleOp\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(SimulateHandleOpParams) | ({ asyncParams: () => Promise<SimulateHandleOpParams> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "SimulateHandleOpParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "SimulateHandleOpParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"simulateHandleOp\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { simulateHandleOp } from \"thirdweb/extensions/erc4337\";\n\nconst transaction = simulateHandleOp({\n contract,\n op: ...,\n target: ...,\n targetCallData: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/write/simulateHandleOp.ts#L192"
},
{
"kind": "function",
"name": "totalAccounts",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"totalAccounts\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the totalAccounts function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<bigint>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { totalAccounts } from \"thirdweb/extensions/erc4337\";\n\nconst result = await totalAccounts({\n contract,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/__generated__/IAccountFactory/read/totalAccounts.ts#L64"
},
{
"kind": "function",
"name": "userOperationEventEvent",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Creates an event object for the UserOperationEvent event."
}
]
}
],
"parameters": [
{
"name": "filters",
"type": {
"code": "Partial",
"tokens": [
{
"name": "Partial",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Optional filters to apply to the event."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedEvent<{ readonly inputs: readonly [{ readonly indexed: true; readonly name: \"userOpHash\"; readonly type: \"bytes32\" }, { readonly indexed: true; readonly name: \"sender\"; readonly type: \"address\" }, { readonly indexed: true; readonly name: \"paymaster\"; readonly type: \"address\" }, { readonly name: \"nonce\"; readonly type: \"uint256\" }, { readonly name: \"success\"; readonly type: \"bool\" }, { readonly name: \"actualGasCost\"; readonly type: \"uint256\" }, { readonly name: \"actualGasUsed\"; readonly type: \"uint256\" }]; readonly name: \"UserOperationEvent\"; readonly type: \"event\" }>",
"tokens": [
{
"name": "PreparedEvent",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared event object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractEvents } from \"thirdweb\";\nimport { userOperationEventEvent } from \"thirdweb/extensions/erc4337\";\n\nconst events = await getContractEvents({\ncontract,\nevents: [\n userOperationEventEvent({\n userOpHash: ...,\n sender: ...,\n paymaster: ...,\n})\n],\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/UserOperationEvent.ts#L47"
},
{
"kind": "function",
"name": "userOperationRevertReasonEvent",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Creates an event object for the UserOperationRevertReason event."
}
]
}
],
"parameters": [
{
"name": "filters",
"type": {
"code": "Partial",
"tokens": [
{
"name": "Partial",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Optional filters to apply to the event."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedEvent<{ readonly inputs: readonly [{ readonly indexed: true; readonly name: \"userOpHash\"; readonly type: \"bytes32\" }, { readonly indexed: true; readonly name: \"sender\"; readonly type: \"address\" }, { readonly name: \"nonce\"; readonly type: \"uint256\" }, { readonly name: \"revertReason\"; readonly type: \"bytes\" }]; readonly name: \"UserOperationRevertReason\"; readonly type: \"event\" }>",
"tokens": [
{
"name": "PreparedEvent",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared event object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4337"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractEvents } from \"thirdweb\";\nimport { userOperationRevertReasonEvent } from \"thirdweb/extensions/erc4337\";\n\nconst events = await getContractEvents({\ncontract,\nevents: [\n userOperationRevertReasonEvent({\n userOpHash: ...,\n sender: ...,\n})\n],\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4337/__generated__/IEntryPoint/events/UserOperationRevertReason.ts#L41"
},
{
"kind": "function",
"name": "asset",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"asset\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the asset function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<string>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4626"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { asset } from \"thirdweb/extensions/erc4626\";\n\nconst result = await asset({\n contract,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/asset.ts#L65"
},
{
"kind": "function",
"name": "convertToAssets",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"convertToAssets\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<ConvertToAssetsParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "ConvertToAssetsParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the convertToAssets function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<bigint>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4626"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { convertToAssets } from \"thirdweb/extensions/erc4626\";\n\nconst result = await convertToAssets({\n contract,\n shares: ...,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/convertToAssets.ts#L118"
},
{
"kind": "function",
"name": "convertToShares",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"convertToShares\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<ConvertToSharesParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "ConvertToSharesParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the convertToShares function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<bigint>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4626"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { convertToShares } from \"thirdweb/extensions/erc4626\";\n\nconst result = await convertToShares({\n contract,\n assets: ...,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/convertToShares.ts#L118"
},
{
"kind": "function",
"name": "deposit",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"deposit\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(DepositParams) | ({ asyncParams: () => Promise<DepositParams> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "DepositParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "DepositParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"deposit\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4626"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { deposit } from \"thirdweb/extensions/erc4626\";\n\nconst transaction = deposit({\n contract,\n assets: ...,\n receiver: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/write/deposit.ts#L118"
},
{
"kind": "function",
"name": "depositEvent",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Creates an event object for the Deposit event."
}
]
}
],
"parameters": [
{
"name": "filters",
"type": {
"code": "Partial",
"tokens": [
{
"name": "Partial",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Optional filters to apply to the event."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedEvent<{ readonly inputs: readonly [{ readonly indexed: true; readonly name: \"caller\"; readonly type: \"address\" }, { readonly indexed: true; readonly name: \"owner\"; readonly type: \"address\" }, { readonly name: \"assets\"; readonly type: \"uint256\" }, { readonly name: \"shares\"; readonly type: \"uint256\" }]; readonly name: \"Deposit\"; readonly type: \"event\" }>",
"tokens": [
{
"name": "PreparedEvent",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared event object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4626"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractEvents } from \"thirdweb\";\nimport { depositEvent } from \"thirdweb/extensions/erc4626\";\n\nconst events = await getContractEvents({\ncontract,\nevents: [\n depositEvent({\n caller: ...,\n owner: ...,\n})\n],\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/events/Deposit.ts#L41"
},
{
"kind": "function",
"name": "maxDeposit",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"maxDeposit\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<MaxDepositParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "MaxDepositParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the maxDeposit function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<bigint>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4626"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { maxDeposit } from \"thirdweb/extensions/erc4626\";\n\nconst result = await maxDeposit({\n contract,\n receiver: ...,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/maxDeposit.ts#L118"
},
{
"kind": "function",
"name": "maxMint",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"maxMint\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<MaxMintParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "MaxMintParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the maxMint function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<bigint>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4626"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { maxMint } from \"thirdweb/extensions/erc4626\";\n\nconst result = await maxMint({\n contract,\n receiver: ...,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/maxMint.ts#L116"
},
{
"kind": "function",
"name": "maxRedeem",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"maxRedeem\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<MaxRedeemParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "MaxRedeemParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the maxRedeem function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<bigint>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4626"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { maxRedeem } from \"thirdweb/extensions/erc4626\";\n\nconst result = await maxRedeem({\n contract,\n owner: ...,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/maxRedeem.ts#L118"
},
{
"kind": "function",
"name": "maxWithdraw",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"maxWithdraw\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<MaxWithdrawParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "MaxWithdrawParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the maxWithdraw function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<bigint>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4626"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { maxWithdraw } from \"thirdweb/extensions/erc4626\";\n\nconst result = await maxWithdraw({\n contract,\n owner: ...,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/maxWithdraw.ts#L118"
},
{
"kind": "function",
"name": "mint",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"mint\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(MintParams) | ({ asyncParams: () => Promise<MintParams> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "MintParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "MintParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"mint\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4626"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { mint } from \"thirdweb/extensions/erc4626\";\n\nconst transaction = mint({\n contract,\n shares: ...,\n receiver: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/write/mint.ts#L118"
},
{
"kind": "function",
"name": "previewDeposit",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"previewDeposit\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<PreviewDepositParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "PreviewDepositParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the previewDeposit function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<bigint>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4626"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { previewDeposit } from \"thirdweb/extensions/erc4626\";\n\nconst result = await previewDeposit({\n contract,\n assets: ...,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/previewDeposit.ts#L118"
},
{
"kind": "function",
"name": "previewMint",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"previewMint\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<PreviewMintParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "PreviewMintParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the previewMint function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<bigint>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4626"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { previewMint } from \"thirdweb/extensions/erc4626\";\n\nconst result = await previewMint({\n contract,\n shares: ...,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/previewMint.ts#L117"
},
{
"kind": "function",
"name": "previewRedeem",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"previewRedeem\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<PreviewRedeemParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "PreviewRedeemParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the previewRedeem function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<bigint>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4626"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { previewRedeem } from \"thirdweb/extensions/erc4626\";\n\nconst result = await previewRedeem({\n contract,\n shares: ...,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/previewRedeem.ts#L118"
},
{
"kind": "function",
"name": "previewWithdraw",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"previewWithdraw\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<PreviewWithdrawParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "PreviewWithdrawParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the previewWithdraw function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<bigint>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4626"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { previewWithdraw } from \"thirdweb/extensions/erc4626\";\n\nconst result = await previewWithdraw({\n contract,\n assets: ...,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/previewWithdraw.ts#L118"
},
{
"kind": "function",
"name": "redeem",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"redeem\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(RedeemParams) | ({ asyncParams: () => Promise<RedeemParams> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "RedeemParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "RedeemParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"redeem\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4626"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { redeem } from \"thirdweb/extensions/erc4626\";\n\nconst transaction = redeem({\n contract,\n shares: ...,\n receiver: ...,\n owner: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/write/redeem.ts#L130"
},
{
"kind": "function",
"name": "totalAssets",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"totalAssets\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the totalAssets function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<bigint>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4626"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { totalAssets } from \"thirdweb/extensions/erc4626\";\n\nconst result = await totalAssets({\n contract,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/read/totalAssets.ts#L65"
},
{
"kind": "function",
"name": "withdraw",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"withdraw\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(WithdrawParams) | ({ asyncParams: () => Promise<WithdrawParams> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "WithdrawParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "WithdrawParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"withdraw\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4626"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { withdraw } from \"thirdweb/extensions/erc4626\";\n\nconst transaction = withdraw({\n contract,\n assets: ...,\n receiver: ...,\n owner: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/write/withdraw.ts#L130"
},
{
"kind": "function",
"name": "withdrawEvent",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Creates an event object for the Withdraw event."
}
]
}
],
"parameters": [
{
"name": "filters",
"type": {
"code": "Partial",
"tokens": [
{
"name": "Partial",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Optional filters to apply to the event."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedEvent<{ readonly inputs: readonly [{ readonly indexed: true; readonly name: \"caller\"; readonly type: \"address\" }, { readonly indexed: true; readonly name: \"receiver\"; readonly type: \"address\" }, { readonly indexed: true; readonly name: \"owner\"; readonly type: \"address\" }, { readonly name: \"assets\"; readonly type: \"uint256\" }, { readonly name: \"shares\"; readonly type: \"uint256\" }]; readonly name: \"Withdraw\"; readonly type: \"event\" }>",
"tokens": [
{
"name": "PreparedEvent",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared event object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC4626"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractEvents } from \"thirdweb\";\nimport { withdrawEvent } from \"thirdweb/extensions/erc4626\";\n\nconst events = await getContractEvents({\ncontract,\nevents: [\n withdrawEvent({\n caller: ...,\n receiver: ...,\n owner: ...,\n})\n],\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc4626/__generated__/IERC4626/events/Withdraw.ts#L47"
},
{
"kind": "function",
"name": "approvalEvent",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Creates an event object for the Approval event."
}
]
}
],
"parameters": [
{
"name": "filters",
"type": {
"code": "Partial",
"tokens": [
{
"name": "Partial",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Optional filters to apply to the event."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedEvent<{ readonly inputs: readonly [{ readonly indexed: true; readonly name: \"owner\"; readonly type: \"address\" }, { readonly indexed: true; readonly name: \"approved\"; readonly type: \"address\" }, { readonly indexed: true; readonly name: \"tokenId\"; readonly type: \"uint256\" }]; readonly name: \"Approval\"; readonly type: \"event\" }>",
"tokens": [
{
"name": "PreparedEvent",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared event object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC721"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractEvents } from \"thirdweb\";\nimport { approvalEvent } from \"thirdweb/extensions/erc721\";\n\nconst events = await getContractEvents({\ncontract,\nevents: [\n approvalEvent({\n owner: ...,\n approved: ...,\n tokenId: ...,\n})\n],\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/events/Approval.ts#L47"
},
{
"kind": "function",
"name": "approvalForAllEvent",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Creates an event object for the ApprovalForAll event."
}
]
}
],
"parameters": [
{
"name": "filters",
"type": {
"code": "Partial",
"tokens": [
{
"name": "Partial",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Optional filters to apply to the event."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedEvent<{ readonly inputs: readonly [{ readonly indexed: true; readonly name: \"owner\"; readonly type: \"address\" }, { readonly indexed: true; readonly name: \"operator\"; readonly type: \"address\" }, { readonly name: \"approved\"; readonly type: \"bool\" }]; readonly name: \"ApprovalForAll\"; readonly type: \"event\" }>",
"tokens": [
{
"name": "PreparedEvent",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared event object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC721"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractEvents } from \"thirdweb\";\nimport { approvalForAllEvent } from \"thirdweb/extensions/erc721\";\n\nconst events = await getContractEvents({\ncontract,\nevents: [\n approvalForAllEvent({\n owner: ...,\n operator: ...,\n})\n],\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/events/ApprovalForAll.ts#L41"
},
{
"kind": "function",
"name": "approve",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"approve\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(ApproveParams) | ({ asyncParams: () => Promise<ApproveParams> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "ApproveParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "ApproveParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"approve\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC721"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { approve } from \"thirdweb/extensions/erc721\";\n\nconst transaction = approve({\n contract,\n to: ...,\n tokenId: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/write/approve.ts#L113"
},
{
"kind": "function",
"name": "balanceOf",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Calls the \"balanceOf\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<BalanceOfParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "BalanceOfParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the balanceOf function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<bigint>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The parsed result of the function call."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC721"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { balanceOf } from \"thirdweb/extensions/erc721\";\n\nconst result = await balanceOf({\n contract,\n owner: ...,\n});\n"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc721/__generated__/IERC721A/read/balanceOf.ts#L117"
},
{
"kind": "function",
"name": "burn",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Prepares a transaction to call the \"burn\" function on the contract."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<(BurnParams) | ({ asyncParams: () => Promise<BurnParams> })>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "BurnParams",
"package": "thirdweb"
},
{
"name": "Promise",
"package": "typescript"
},
{
"name": "BurnParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the \"burn\" function."
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A prepared transaction object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC721"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { sendTransaction } from \"thirdweb\";\nimport { burn } from \"thirdweb/extensions/erc721\";\n\nconst transaction = burn({\n contract,\n tokenId: ...,\n overrides: {\n ...\n }\n});\n\n// Send the transaction\nawait sendTransaction({ transaction, account });"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc721/__generated__/IBurnableERC721/write/burn.ts#L105"
},
{
"kind": "function",
"name": "canClaim",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Check if a user can claim a drop."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<CanClaimParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "CanClaimParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the transaction."
}
]
}
]
}
],
"returns": {
"type": {
"code": "Promise<CanClaimResult>",
"tokens": [
{
"name": "Promise",
"package": "typescript"
},
{
"name": "CanClaimResult",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Whether the user can claim the drop."
}
]
}
]
},
"blockTags": [
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "const claimResult = await canClaim({\n contract: contract,\n claimer: \"0x1234567890123456789012345678901234567890\",\n quantity: \"1\",\n});"
}
]
},
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC721"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc721/drops/read/canClaim.ts#L35"
},
{
"kind": "function",
"name": "claimConditionsUpdatedEvent",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Creates an event object for the ClaimConditionsUpdated event."
}
]
}
],
"returns": {
"type": {
"code": "PreparedEvent<{ readonly inputs: readonly [{ readonly components: readonly [{ readonly name: \"startTimestamp\"; readonly type: \"uint256\" }, { readonly name: \"maxClaimableSupply\"; readonly type: \"uint256\" }, { readonly name: \"supplyClaimed\"; readonly type: \"uint256\" }, { readonly name: \"quantityLimitPerWallet\"; readonly type: \"uint256\" }, { readonly name: \"merkleRoot\"; readonly type: \"bytes32\" }, { readonly name: \"pricePerToken\"; readonly type: \"uint256\" }, { readonly name: \"currency\"; readonly type: \"address\" }, { readonly name: \"metadata\"; readonly type: \"string\" }]; readonly name: \"claimConditions\"; readonly type: \"tuple[]\" }, { readonly name: \"resetEligibility\"; readonly type: \"bool\" }]; readonly name: \"ClaimConditionsUpdated\"; readonly type: \"event\" }>",
"tokens": [
{
"name": "PreparedEvent",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The prepared event object."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC721"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { getContractEvents } from \"thirdweb\";\nimport { claimConditionsUpdatedEvent } from \"thirdweb/extensions/erc721\";\n\nconst events = await getContractEvents({\ncontract,\nevents: [\n claimConditionsUpdatedEvent()\n],\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc721/__generated__/IDrop/events/ClaimConditionsUpdated.ts#L20"
},
{
"kind": "function",
"name": "claimTo",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Claim ERC721 NFTs to a specified address"
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<ClaimToParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "ClaimToParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "The options for the transaction"
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves with the submitted transaction hash."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC721"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "heading",
"depth": 3,
"children": [
{
"type": "text",
"value": "Basic usage"
}
]
},
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { claimTo } from \"thirdweb/extensions/erc721\";\nimport { sendTransaction } from \"thirdweb\";\n\nconst transaction = claimTo({\n contract,\n to: \"0x...\",\n quantity: 1n,\n});\n\nawait sendTransaction({ transaction, account });"
},
{
"type": "heading",
"depth": 3,
"children": [
{
"type": "text",
"value": "For Drops with allowlists"
}
]
},
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "You need to specify the claimer address as the "
},
{
"type": "inlineCode",
"value": "from"
},
{
"type": "text",
"value": " param to avoid any issue with the allowlist"
}
]
},
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "const transaction = claimTo({\n contract,\n to: \"0x...\",\n quantity: 1n,\n from: \"0x...\", // address of the one claiming\n});"
}
]
},
{
"tag": "@throws",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "If no claim condition is set"
}
]
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc721/drops/write/claimTo.ts#L56"
},
{
"kind": "function",
"name": "claimToBatch",
"signatures": [
{
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "This extension batches multiple "
},
{
"type": "inlineCode",
"value": "claimTo"
},
{
"type": "text",
"value": " extensions into one single multicall.\nKeep in mind that there is a limit of how many NFTs you can claim per transaction.\nThis limit varies depends on the network that you are transacting on."
}
]
},
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "You are recommended to experiment with the number to figure out the best number for your chain of choice."
}
]
}
],
"parameters": [
{
"name": "options",
"type": {
"code": "BaseTransactionOptions<ClaimToBatchParams>",
"tokens": [
{
"name": "BaseTransactionOptions",
"package": "thirdweb"
},
{
"name": "ClaimToBatchParams",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "the transaction options"
}
]
}
]
}
],
"returns": {
"type": {
"code": "PreparedTransaction<any, AbiFunction, PrepareTransactionOptions>",
"tokens": [
{
"name": "PreparedTransaction",
"package": "thirdweb"
},
{
"name": "AbiFunction",
"package": "abitype"
},
{
"name": "PrepareTransactionOptions",
"package": "thirdweb"
}
]
},
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "A promise that resolves to the transaction result."
}
]
}
]
},
"blockTags": [
{
"tag": "@extension",
"summary": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "ERC721"
}
]
}
]
},
{
"tag": "@example",
"summary": [
{
"type": "code",
"lang": "ts",
"meta": null,
"value": "import { claimToBatch } from \"thirdweb/extensions/erc721\";\n\nconst transaction = claimToBatch({\n contract: nftDropContract,\n from: claimer.address, // address of the one calling this transaction\n content: [\n { to: \"0x...1\", quantity: 1n },\n { to: \"0x...2\", quantity: 12n },\n { to: \"0x...3\", quantity: 2n },\n ],\n});"
}
]
}
]
}
],
"source": "https://github.com/thirdweb-dev/js/blob/269fbe5ecf161289a4759e0c5f7b7fb7f99660e2/packages/thirdweb/src/extensions/erc721/drops/write/claimToBatch.ts#L46"
},
{
"kind": "function",
View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment