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
531 changes: 531 additions & 0 deletions docs/feature_snippets.json

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions docs/sdk.contractplatformfee.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; [ContractPlatformFee](./sdk.contractplatformfee.md) &gt; [featureName](./sdk.contractplatformfee.featurename.md)

## ContractPlatformFee.featureName property

<b>Signature:</b>

```typescript
featureName: "PlatformFee";
```
27 changes: 25 additions & 2 deletions docs/sdk.contractplatformfee.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,29 @@

## ContractPlatformFee class

Handles primary sales recipients for a Contract
Handle platform fees and recipients

<b>Signature:</b>

```typescript
export declare class ContractPlatformFee<TContract extends IPlatformFee>
export declare class ContractPlatformFee<TContract extends IPlatformFee> implements DetectableFeature
```
<b>Implements:</b> DetectableFeature

## Remarks

Configure platform fees for a contract, which can be applied on certain paid transactions

## Example


```javascript
const contract = sdk.getContract("{{contract_address}}");
const feeInfo = await contract.platformFee.get();
await contract.platformFee.set({
platform_fee_basis_points: 100, // 1% fee
platform_fee_recipient: "0x..." // the fee recipient
})
```

## Constructors
Expand All @@ -18,6 +35,12 @@ export declare class ContractPlatformFee<TContract extends IPlatformFee>
| --- | --- | --- |
| [(constructor)(contractWrapper)](./sdk.contractplatformfee._constructor_.md) | | Constructs a new instance of the <code>ContractPlatformFee</code> class |

## Properties

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [featureName](./sdk.contractplatformfee.featurename.md) | | "PlatformFee" | |

## Methods

| Method | Modifiers | Description |
Expand Down
11 changes: 11 additions & 0 deletions docs/sdk.contractprimarysale.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; [ContractPrimarySale](./sdk.contractprimarysale.md) &gt; [featureName](./sdk.contractprimarysale.featurename.md)

## ContractPrimarySale.featureName property

<b>Signature:</b>

```typescript
featureName: "PrimarySale";
```
24 changes: 22 additions & 2 deletions docs/sdk.contractprimarysale.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,26 @@

## ContractPrimarySale class

Handles primary sales recipients for a Contract
Handle primary sales recipients

<b>Signature:</b>

```typescript
export declare class ContractPrimarySale<TContract extends IPrimarySale>
export declare class ContractPrimarySale<TContract extends IPrimarySale> implements DetectableFeature
```
<b>Implements:</b> DetectableFeature

## Remarks

Configure primary sale recipients for an entire contract.

## Example


```javascript
const contract = sdk.getContract("{{contract_address}}");
const salesRecipient = await contract.sales.getRecipient();
await contract.roles.setRecipient(recipientWalletAddress);
```

## Constructors
Expand All @@ -18,6 +32,12 @@ export declare class ContractPrimarySale<TContract extends IPrimarySale>
| --- | --- | --- |
| [(constructor)(contractWrapper)](./sdk.contractprimarysale._constructor_.md) | | Constructs a new instance of the <code>ContractPrimarySale</code> class |

## Properties

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [featureName](./sdk.contractprimarysale.featurename.md) | | "PrimarySale" | |

## Methods

| Method | Modifiers | Description |
Expand Down
11 changes: 11 additions & 0 deletions docs/sdk.contractroles.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; [ContractRoles](./sdk.contractroles.md) &gt; [featureName](./sdk.contractroles.featurename.md)

## ContractRoles.featureName property

<b>Signature:</b>

```typescript
featureName: "Permissions";
```
24 changes: 22 additions & 2 deletions docs/sdk.contractroles.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,26 @@

## ContractRoles class

Handles Contract roles and permissions
Handle contract permissions

<b>Signature:</b>

```typescript
export declare class ContractRoles<TContract extends IPermissionsEnumerable, TRole extends Role>
export declare class ContractRoles<TContract extends IPermissionsEnumerable, TRole extends Role> implements DetectableFeature
```
<b>Implements:</b> DetectableFeature

## Remarks

Configure roles and permissions for a contract, to restrict certain actions.

## Example


```javascript
const contract = sdk.getContract("{{contract_address}}");
const rolesAndMembers = await contract.roles.getAll();
await contract.roles.grantRole("admin", "0x...");
```

## Constructors
Expand All @@ -18,6 +32,12 @@ export declare class ContractRoles<TContract extends IPermissionsEnumerable, TRo
| --- | --- | --- |
| [(constructor)(contractWrapper, roles)](./sdk.contractroles._constructor_.md) | | Constructs a new instance of the <code>ContractRoles</code> class |

## Properties

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [featureName](./sdk.contractroles.featurename.md) | | "Permissions" | |

## Methods

| Method | Modifiers | Description |
Expand Down
11 changes: 11 additions & 0 deletions docs/sdk.contractroyalty.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; [ContractRoyalty](./sdk.contractroyalty.md) &gt; [featureName](./sdk.contractroyalty.featurename.md)

## ContractRoyalty.featureName property

<b>Signature:</b>

```typescript
featureName: "Royalty";
```
27 changes: 25 additions & 2 deletions docs/sdk.contractroyalty.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,29 @@

## ContractRoyalty class

Handles Contract royalties
Handle contract royalties

<b>Signature:</b>

```typescript
export declare class ContractRoyalty<TContract extends IRoyalty & (IThirdwebContract | ThirdwebContract), TSchema extends IGenericSchemaType>
export declare class ContractRoyalty<TContract extends IRoyalty & (IThirdwebContract | ThirdwebContract), TSchema extends IGenericSchemaType> implements DetectableFeature
```
<b>Implements:</b> DetectableFeature

## Remarks

Configure royalties for an entire contract or a particular token.

## Example


```javascript
const contract = sdk.getContract("{{contract_address}}");
const royaltyInfo = await contract.royalties.getDefaultRoyaltyInfo();
await contract.roles.setTokenRoyaltyInfo(tokenId, {
seller_fee_basis_points: 100, // 1% royalty fee
fee_recipient: "0x...", // the fee recipient
});
```

## Constructors
Expand All @@ -18,6 +35,12 @@ export declare class ContractRoyalty<TContract extends IRoyalty & (IThirdwebCont
| --- | --- | --- |
| [(constructor)(contractWrapper, metadata)](./sdk.contractroyalty._constructor_.md) | | Constructs a new instance of the <code>ContractRoyalty</code> class |

## Properties

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [featureName](./sdk.contractroyalty.featurename.md) | | "Royalty" | |

## Methods

| Method | Modifiers | Description |
Expand Down
9 changes: 8 additions & 1 deletion docs/sdk.edition.getall.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

## Edition.getAll() method

Get All NFTs
Get All Minted NFTs

<b>Signature:</b>

Expand All @@ -30,3 +30,10 @@ Get all the data associated with every NFT in this contract.

By default, returns the first 100 NFTs, use queryParams to fetch more.

## Example


```javascript
const nfts = await contract.getAll();
```

9 changes: 9 additions & 0 deletions docs/sdk.edition.getowned.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,12 @@ The NFT metadata for all NFTs in the contract.

Get all the data associated with the NFTs owned by a specific wallet.

## Example


```javascript
// Address of the wallet to get the NFTs of
const address = "{{wallet_address}}";
const nfts = await contract.getOwned(address);
```

2 changes: 1 addition & 1 deletion docs/sdk.edition.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const contract = sdk.getEdition("{{contract_address}}");
| Method | Modifiers | Description |
| --- | --- | --- |
| [burn(tokenId, amount)](./sdk.edition.burn.md) | | Burn a single NFT |
| [getAll(queryParams)](./sdk.edition.getall.md) | | Get All NFTs |
| [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 |
| [isTransferRestricted()](./sdk.edition.istransferrestricted.md) | | Get whether users can transfer NFTs from this contract |
Expand Down
9 changes: 3 additions & 6 deletions docs/sdk.erc1155.balanceof.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,8 @@ Get a wallets NFT balance (number of NFTs in this contract owned by the wallet).

```javascript
// Address of the wallet to check NFT balance
const address = "{{wallet_address}}";
// Id of the NFT to check
const tokenId = 0;

const balance = await contract.balanceOf(address, tokenId);
console.log(balance);
const walletAddress = "{{wallet_address}}";
const tokenId = 0; // Id of the NFT to check
const balance = await contract.balanceOf(walletAddress, tokenId);
```

11 changes: 11 additions & 0 deletions docs/sdk.erc1155.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; [Erc1155](./sdk.erc1155.md) &gt; [featureName](./sdk.erc1155.featurename.md)

## Erc1155.featureName property

<b>Signature:</b>

```typescript
featureName: "ERC1155";
```
1 change: 0 additions & 1 deletion docs/sdk.erc1155.get.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,5 @@ The NFT metadata

```javascript
const nft = await contract.get("0");
console.log(nft);
```

21 changes: 17 additions & 4 deletions docs/sdk.erc1155.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,26 @@

## Erc1155 class

Standard ERC1155 functions
Standard ERC1155 NFT functions

<b>Signature:</b>

```typescript
export declare class Erc1155<T extends DropERC1155 | TokenERC1155 | BaseERC1155> implements UpdateableNetwork
export declare class Erc1155<T extends DropERC1155 | TokenERC1155 | BaseERC1155> implements UpdateableNetwork, DetectableFeature
```
<b>Implements:</b> UpdateableNetwork, DetectableFeature

## Remarks

Basic functionality for a ERC1155 contract that handles IPFS storage for you.

## Example


```javascript
const contract = sdk.getContract("{{contract_address}}");
await contract.edition.transfer(walletAddress, tokenId, quantity);
```
<b>Implements:</b> UpdateableNetwork

## Constructors

Expand All @@ -24,7 +36,8 @@ export declare class Erc1155<T extends DropERC1155 | TokenERC1155 | BaseERC1155>
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [contractWrapper](./sdk.erc1155.contractwrapper.md) | | ContractWrapper&lt;T&gt; | |
| [mint](./sdk.erc1155.mint.md) | | Erc1155Mintable \| 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) | |
| [query](./sdk.erc1155.query.md) | | [Erc1155Enumerable](./sdk.erc1155enumerable.md) \| undefined | |
| [storage](./sdk.erc1155.storage.md) | | [IStorage](./sdk.istorage.md) | |
Expand Down
8 changes: 2 additions & 6 deletions docs/sdk.erc1155.transfer.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,8 @@ Transfer an NFT from the connected wallet to another wallet.
```javascript
// Address of the wallet you want to send the NFT to
const toAddress = "{{wallet_address}}";

// The token ID of the NFT you want to send
const tokenId = "0";
// How many copies of the NFTs to transfer
const amount = 3;

const tokenId = "0"; // The token ID of the NFT you want to send
const amount = 3; // How many copies of the NFTs to transfer
await contract.transfer(toAddress, tokenId, amount);
```

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

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

## Erc1155BatchMintable.(constructor)

Constructs a new instance of the `Erc1155BatchMintable` class

<b>Signature:</b>

```typescript
constructor(erc1155: Erc1155<BaseERC1155>, contractWrapper: ContractWrapper<IMintableERC1155 & IMulticall>, storage: IStorage);
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| erc1155 | [Erc1155](./sdk.erc1155.md)<!-- -->&lt;BaseERC1155&gt; | |
| contractWrapper | ContractWrapper&lt;IMintableERC1155 &amp; IMulticall&gt; | |
| storage | [IStorage](./sdk.istorage.md) | |

11 changes: 11 additions & 0 deletions docs/sdk.erc1155batchmintable.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; [Erc1155BatchMintable](./sdk.erc1155batchmintable.md) &gt; [featureName](./sdk.erc1155batchmintable.featurename.md)

## Erc1155BatchMintable.featureName property

<b>Signature:</b>

```typescript
featureName: "ERC1155BatchMintable";
```
Loading