Skip to content
This repository was archived by the owner on Aug 30, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 136 additions & 0 deletions docs/feature_snippets.json
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,85 @@
"javascript": "https://docs.thirdweb.com/typescript/sdk.Erc1155BatchMintable"
}
},
"ERC1155Burnable": {
"name": "Erc1155Burnable",
"summary": "",
"remarks": null,
"examples": {},
"methods": [
{
"name": "batch",
"summary": "Burn a batch of NFTs\n\n",
"remarks": "\n\nBurn the batch NFTs from the connected wallet\n\n",
"examples": {
"javascript": "// The token IDs to burn NFTs of\nconst tokenIds = [0, 1];\n// The amounts of each NFT you want to burn\nconst amounts = [2, 2];\n\nconst result = await contract.edition.burn.batch(tokenIds, amounts);"
},
"reference": {
"javascript": "https://docs.thirdweb.com/typescript/sdk.Erc1155Burnable.batch"
}
},
{
"name": "batchFrom",
"summary": "Burn a batch of NFTs\n\n",
"remarks": "\n\nBurn the batch NFTs from the specified wallet\n\n",
"examples": {
"javascript": "// The address of the wallet to burn NFTS from\nconst account = \"0x...\";\n// The token IDs to burn NFTs of\nconst tokenIds = [0, 1];\n// The amounts of each NFT you want to burn\nconst amounts = [2, 2];\n\nconst result = await contract.edition.burn.batchFrom(account, tokenIds, amounts);"
},
"reference": {
"javascript": "https://docs.thirdweb.com/typescript/sdk.Erc1155Burnable.batchFrom"
}
},
{
"name": "from",
"summary": "Burn a specified amount of a NFTs\n\n",
"remarks": "\n\nBurn the specified NFTs from a specified wallet\n\n",
"examples": {
"javascript": "// The address of the wallet to burn NFTS from\nconst account = \"0x...\";\n// The token ID to burn NFTs of\nconst tokenId = 0;\n// The amount of this NFT you want to burn\nconst amount = 2;\n\nconst result = await contract.edition.burn.from(account, tokenId, amount);"
},
"reference": {
"javascript": "https://docs.thirdweb.com/typescript/sdk.Erc1155Burnable.from"
}
},
{
"name": "tokens",
"summary": "Burn a specified amount of a NFTs\n\n",
"remarks": "\n\nBurn the specified NFTs from the connected wallet\n\n",
"examples": {
"javascript": "// The token ID to burn NFTs of\nconst tokenId = 0;\n// The amount of the NFT you want to burn\nconst amount = 2;\n\nconst result = await contract.edition.burn.tokens(tokenId, amount);"
},
"reference": {
"javascript": "https://docs.thirdweb.com/typescript/sdk.Erc1155Burnable.tokens"
}
}
],
"properties": [],
"reference": {
"javascript": "https://docs.thirdweb.com/typescript/sdk.Erc1155Burnable"
}
},
"ERC1155Droppable": {
"name": "Erc1155Droppable",
"summary": "",
"remarks": null,
"examples": {},
"methods": [
{
"name": "lazyMint",
"summary": "Create a batch of NFTs to be claimed in the future\n\n",
"remarks": "\n\nCreate batch allows you to create a batch of many NFTs in one transaction.\n\n",
"examples": {
"javascript": "// Custom metadata of the NFTs to create\nconst metadatas = [{\n name: \"Cool NFT\",\n description: \"This is a cool NFT\",\n image: fs.readFileSync(\"path/to/image.png\"), // This can be an image url or file\n}, {\n name: \"Cool NFT\",\n description: \"This is a cool NFT\",\n image: fs.readFileSync(\"path/to/image.png\"),\n}];\n\nconst results = await contract.edition.drop.lazyMint(metadatas); // uploads and creates the NFTs on chain\nconst firstTokenId = results[0].id; // token id of the first created NFT\nconst firstNFT = await results[0].data(); // (optional) fetch details of the first created NFT"
},
"reference": {
"javascript": "https://docs.thirdweb.com/typescript/sdk.Erc1155Droppable.lazyMint"
}
}
],
"properties": [],
"reference": {
"javascript": "https://docs.thirdweb.com/typescript/sdk.Erc1155Droppable"
}
},
"ERC1155Enumerable": {
"name": "Erc1155Enumerable",
"summary": "List ERC1155 NFTs\n\n",
Expand Down Expand Up @@ -492,6 +571,40 @@
"javascript": "https://docs.thirdweb.com/typescript/sdk.Erc20BatchMintable"
}
},
"ERC20Burnable": {
"name": "Erc20Burnable",
"summary": "",
"remarks": null,
"examples": {},
"methods": [
{
"name": "from",
"summary": "Burn Tokens\n\n",
"remarks": "\n\nBurn tokens held by the specified wallet\n\n",
"examples": {
"javascript": "// Address of the wallet sending the tokens\nconst holderAddress = \"{{wallet_address}}\";\n\n// The amount of this token you want to burn\nconst amount = 1.2;\n\nawait contract.token.burn.from(holderAddress, amount);"
},
"reference": {
"javascript": "https://docs.thirdweb.com/typescript/sdk.Erc20Burnable.from"
}
},
{
"name": "tokens",
"summary": "Burn Tokens\n\n",
"remarks": "\n\nBurn tokens held by the connected wallet\n\n",
"examples": {
"javascript": "// The amount of this token you want to burn\nconst amount = 1.2;\n\nawait contract.token.burn.tokens(amount);"
},
"reference": {
"javascript": "https://docs.thirdweb.com/typescript/sdk.Erc20Burnable.tokens"
}
}
],
"properties": [],
"reference": {
"javascript": "https://docs.thirdweb.com/typescript/sdk.Erc20Burnable"
}
},
"ERC20Mintable": {
"name": "Erc20Mintable",
"summary": "Mint ERC20 Tokens\n\n",
Expand Down Expand Up @@ -623,6 +736,29 @@
"javascript": "https://docs.thirdweb.com/typescript/sdk.Erc721BatchMintable"
}
},
"ERC721Burnable": {
"name": "Erc721Burnable",
"summary": "",
"remarks": null,
"examples": {},
"methods": [
{
"name": "token",
"summary": "Burn NFTs\n\n",
"remarks": "\n\nBurn NFTs held by the connected wallet\n\n",
"examples": {
"javascript": "// The token ID of the NFT you want to burn\nconst tokenId = 0;\n\nawait contract.nft.burn.token(tokenId);"
},
"reference": {
"javascript": "https://docs.thirdweb.com/typescript/sdk.Erc721Burnable.token"
}
}
],
"properties": [],
"reference": {
"javascript": "https://docs.thirdweb.com/typescript/sdk.Erc721Burnable"
}
},
"ERC721Claimable": {
"name": "Erc721Claimable",
"summary": "Lazily mint and claim ERC721 NFTs\n\n",
Expand Down
8 changes: 4 additions & 4 deletions docs/sdk.edition.burn.md → docs/sdk.edition.burntokens.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@thirdweb-dev/sdk](./sdk.md) &gt; [Edition](./sdk.edition.md) &gt; [burn](./sdk.edition.burn.md)
[Home](./index.md) &gt; [@thirdweb-dev/sdk](./sdk.md) &gt; [Edition](./sdk.edition.md) &gt; [burnTokens](./sdk.edition.burntokens.md)

## Edition.burn() method
## Edition.burnTokens() method

Burn a specified amount of a NFT

<b>Signature:</b>

```typescript
burn(tokenId: BigNumberish, amount: BigNumberish): Promise<TransactionResult>;
burnTokens(tokenId: BigNumberish, amount: BigNumberish): Promise<TransactionResult>;
```

## Parameters
Expand All @@ -27,6 +27,6 @@ Promise&lt;[TransactionResult](./sdk.transactionresult.md)<!-- -->&gt;


```javascript
const result = await contract.burn(tokenId, amount);
const result = await contract.burnTokens(tokenId, amount);
```

2 changes: 1 addition & 1 deletion docs/sdk.edition.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const contract = sdk.getEdition("{{contract_address}}");

| Method | Modifiers | Description |
| --- | --- | --- |
| [burn(tokenId, amount)](./sdk.edition.burn.md) | | Burn a specified amount of a NFT |
| [burnTokens(tokenId, amount)](./sdk.edition.burntokens.md) | | Burn a specified amount of a NFT |
| [getAll(queryParams)](./sdk.edition.getall.md) | | Get All Minted NFTs |
| [getOwned(walletAddress)](./sdk.edition.getowned.md) | | Get Owned NFTs |
| [getTotalCount()](./sdk.edition.gettotalcount.md) | | Get the number of NFTs minted |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@thirdweb-dev/sdk](./sdk.md) &gt; [EditionDrop](./sdk.editiondrop.md) &gt; [burn](./sdk.editiondrop.burn.md)
[Home](./index.md) &gt; [@thirdweb-dev/sdk](./sdk.md) &gt; [EditionDrop](./sdk.editiondrop.md) &gt; [burnTokens](./sdk.editiondrop.burntokens.md)

## EditionDrop.burn() method
## EditionDrop.burnTokens() method

Burn a specified amount of a NFT

<b>Signature:</b>

```typescript
burn(tokenId: BigNumberish, amount: BigNumberish): Promise<TransactionResult>;
burnTokens(tokenId: BigNumberish, amount: BigNumberish): Promise<TransactionResult>;
```

## Parameters
Expand All @@ -27,6 +27,6 @@ Promise&lt;[TransactionResult](./sdk.transactionresult.md)<!-- -->&gt;


```javascript
const result = await contract.burn(tokenId, amount);
const result = await contract.burnTokens(tokenId, amount);
```

2 changes: 1 addition & 1 deletion docs/sdk.editiondrop.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const contract = sdk.getEditionDrop("{{contract_address}}");

| Method | Modifiers | Description |
| --- | --- | --- |
| [burn(tokenId, amount)](./sdk.editiondrop.burn.md) | | Burn a specified amount of a NFT |
| [burnTokens(tokenId, amount)](./sdk.editiondrop.burntokens.md) | | Burn a specified amount of a NFT |
| [claim(tokenId, quantity, checkERC20Allowance)](./sdk.editiondrop.claim.md) | | Claim a token to the connected wallet |
| [claimTo(destinationAddress, tokenId, quantity, checkERC20Allowance)](./sdk.editiondrop.claimto.md) | | Claim NFTs to a specific Wallet |
| [createBatch(metadatas, options)](./sdk.editiondrop.createbatch.md) | | Create a batch of NFTs to be claimed in the future |
Expand Down
11 changes: 11 additions & 0 deletions docs/sdk.erc1155.burn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@thirdweb-dev/sdk](./sdk.md) &gt; [Erc1155](./sdk.erc1155.md) &gt; [burn](./sdk.erc1155.burn.md)

## Erc1155.burn property

<b>Signature:</b>

```typescript
burn: Erc1155Burnable | undefined;
```
3 changes: 2 additions & 1 deletion docs/sdk.erc1155.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ await contract.edition.transfer(walletAddress, tokenId, quantity);

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [burn](./sdk.erc1155.burn.md) | | [Erc1155Burnable](./sdk.erc1155burnable.md) \| undefined | |
| [contractWrapper](./sdk.erc1155.contractwrapper.md) | | ContractWrapper&lt;T&gt; | |
| [drop](./sdk.erc1155.drop.md) | | Erc1155Droppable \| undefined | |
| [drop](./sdk.erc1155.drop.md) | | [Erc1155Droppable](./sdk.erc1155droppable.md) \| undefined | |
| [featureName](./sdk.erc1155.featurename.md) | | "ERC1155" | |
| [mint](./sdk.erc1155.mint.md) | | [Erc1155Mintable](./sdk.erc1155mintable.md) \| undefined | |
| [options](./sdk.erc1155.options.md) | | [SDKOptions](./sdk.sdkoptions.md) | |
Expand Down
20 changes: 20 additions & 0 deletions docs/sdk.erc1155burnable._constructor_.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@thirdweb-dev/sdk](./sdk.md) &gt; [Erc1155Burnable](./sdk.erc1155burnable.md) &gt; [(constructor)](./sdk.erc1155burnable._constructor_.md)

## Erc1155Burnable.(constructor)

Constructs a new instance of the `Erc1155Burnable` class

<b>Signature:</b>

```typescript
constructor(contractWrapper: ContractWrapper<IBurnableERC1155>);
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| contractWrapper | ContractWrapper&lt;IBurnableERC1155&gt; | |

41 changes: 41 additions & 0 deletions docs/sdk.erc1155burnable.batch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@thirdweb-dev/sdk](./sdk.md) &gt; [Erc1155Burnable](./sdk.erc1155burnable.md) &gt; [batch](./sdk.erc1155burnable.batch.md)

## Erc1155Burnable.batch() method

Burn a batch of NFTs

<b>Signature:</b>

```typescript
batch(tokenIds: BigNumberish[], amounts: BigNumberish[]): Promise<TransactionResult>;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| tokenIds | BigNumberish\[\] | the tokenIds to burn |
| amounts | BigNumberish\[\] | amount of each token to burn |

<b>Returns:</b>

Promise&lt;[TransactionResult](./sdk.transactionresult.md)<!-- -->&gt;

## Remarks

Burn the batch NFTs from the connected wallet

## Example


```javascript
// The token IDs to burn NFTs of
const tokenIds = [0, 1];
// The amounts of each NFT you want to burn
const amounts = [2, 2];

const result = await contract.edition.burn.batch(tokenIds, amounts);
```

44 changes: 44 additions & 0 deletions docs/sdk.erc1155burnable.batchfrom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@thirdweb-dev/sdk](./sdk.md) &gt; [Erc1155Burnable](./sdk.erc1155burnable.md) &gt; [batchFrom](./sdk.erc1155burnable.batchfrom.md)

## Erc1155Burnable.batchFrom() method

Burn a batch of NFTs

<b>Signature:</b>

```typescript
batchFrom(account: string, tokenIds: BigNumberish[], amounts: BigNumberish[]): Promise<TransactionResult>;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| account | string | the address to burn NFTs from |
| tokenIds | BigNumberish\[\] | the tokenIds to burn |
| amounts | BigNumberish\[\] | amount of each token to burn |

<b>Returns:</b>

Promise&lt;[TransactionResult](./sdk.transactionresult.md)<!-- -->&gt;

## Remarks

Burn the batch NFTs from the specified wallet

## Example


```javascript
// The address of the wallet to burn NFTS from
const account = "0x...";
// The token IDs to burn NFTs of
const tokenIds = [0, 1];
// The amounts of each NFT you want to burn
const amounts = [2, 2];

const result = await contract.edition.burn.batchFrom(account, tokenIds, amounts);
```

11 changes: 11 additions & 0 deletions docs/sdk.erc1155burnable.featurename.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@thirdweb-dev/sdk](./sdk.md) &gt; [Erc1155Burnable](./sdk.erc1155burnable.md) &gt; [featureName](./sdk.erc1155burnable.featurename.md)

## Erc1155Burnable.featureName property

<b>Signature:</b>

```typescript
featureName: "ERC1155Burnable";
```
Loading