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
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,17 @@ const sdk = new ThirdwebSDK(
)
);

// deploy contracts
const deployedAddress = sdk.deployer.deployNFTCollection({
name: "My NFT Collection",
})

// access your deployed contracts
const nftCollection = sdk.getNFTCollection("0x...");
const nftCollection = sdk.getNFTCollection(deployedAddress);

// Execute transactions on your contracts from the connected wallet
const walletAddress = "0x...";
await nftCollection.mint.to(walletAddress, {
await nftCollection.mintTo(walletAddress, {
name: "Cool NFT",
description: "Minted NFT from code!",
image: fs.readFileSync("path/to/image.png"), // This can be an image url or file
Expand Down
10 changes: 5 additions & 5 deletions docs/sdk.smartcontract.md

Large diffs are not rendered by default.

111 changes: 1 addition & 110 deletions docs/sdk.smartcontract.metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,114 +10,5 @@
<b>Signature:</b>

```typescript
metadata: ContractMetadata<TContract, {
deploy: import("zod").ZodObject<import("zod").extendShape<import("zod").extendShape<{
name: import("zod").ZodString;
description: import("zod").ZodOptional<import("zod").ZodString>;
image: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodTypeAny, import("zod").ZodString]>>;
external_link: import("zod").ZodOptional<import("zod").ZodString>;
}, {
merkle: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>>;
seller_fee_basis_points: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodNumber>>;
fee_recipient: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodEffects<import("zod").ZodString, string, string>>>;
symbol: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>>;
}>, {
primary_sale_recipient: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string, string>>;
platform_fee_basis_points: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodNumber>>;
platform_fee_recipient: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodEffects<import("zod").ZodString, string, string>>>;
trusted_forwarders: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodEffects<import("zod").ZodString, string, string>, "many">>>;
}>, "strip", import("zod").ZodLazy<import("zod").ZodType<import("../core").Json, import("zod").ZodTypeDef, import("../core").Json>>, {
[x: string]: import("../core").Json;
symbol?: string | undefined;
merkle?: Record<string, string> | undefined;
description?: string | undefined;
image?: any;
external_link?: string | undefined;
seller_fee_basis_points?: number | undefined;
fee_recipient?: string | undefined;
primary_sale_recipient?: string | undefined;
platform_fee_basis_points?: number | undefined;
platform_fee_recipient?: string | undefined;
trusted_forwarders?: string[] | undefined;
name: string;
}, {
[x: string]: import("../core").Json;
symbol?: string | undefined;
merkle?: Record<string, string> | undefined;
description?: string | undefined;
image?: any;
external_link?: string | undefined;
seller_fee_basis_points?: number | undefined;
fee_recipient?: string | undefined;
primary_sale_recipient?: string | undefined;
platform_fee_basis_points?: number | undefined;
platform_fee_recipient?: string | undefined;
trusted_forwarders?: string[] | undefined;
name: string;
}>;
output: import("zod").ZodObject<import("zod").extendShape<import("zod").extendShape<{
name: import("zod").ZodString;
description: import("zod").ZodOptional<import("zod").ZodString>;
image: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodTypeAny, import("zod").ZodString]>>;
external_link: import("zod").ZodOptional<import("zod").ZodString>;
}, {
image: import("zod").ZodOptional<import("zod").ZodString>;
}>, {
merkle: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>>;
seller_fee_basis_points: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodNumber>>;
fee_recipient: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodEffects<import("zod").ZodString, string, string>>>;
symbol: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>>;
}>, "strip", import("zod").ZodLazy<import("zod").ZodType<import("../core").Json, import("zod").ZodTypeDef, import("../core").Json>>, {
[x: string]: import("../core").Json;
symbol?: string | undefined;
merkle?: Record<string, string> | undefined;
description?: string | undefined;
image?: string | undefined;
external_link?: string | undefined;
seller_fee_basis_points?: number | undefined;
fee_recipient?: string | undefined;
name: string;
}, {
[x: string]: import("../core").Json;
symbol?: string | undefined;
merkle?: Record<string, string> | undefined;
description?: string | undefined;
image?: string | undefined;
external_link?: string | undefined;
seller_fee_basis_points?: number | undefined;
fee_recipient?: string | undefined;
name: string;
}>;
input: import("zod").ZodObject<import("zod").extendShape<{
name: import("zod").ZodString;
description: import("zod").ZodOptional<import("zod").ZodString>;
image: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodTypeAny, import("zod").ZodString]>>;
external_link: import("zod").ZodOptional<import("zod").ZodString>;
}, {
merkle: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>>;
seller_fee_basis_points: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodNumber>>;
fee_recipient: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodEffects<import("zod").ZodString, string, string>>>;
symbol: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>>;
}>, "strip", import("zod").ZodLazy<import("zod").ZodType<import("../core").Json, import("zod").ZodTypeDef, import("../core").Json>>, {
[x: string]: import("../core").Json;
symbol?: string | undefined;
merkle?: Record<string, string> | undefined;
description?: string | undefined;
image?: any;
external_link?: string | undefined;
seller_fee_basis_points?: number | undefined;
fee_recipient?: string | undefined;
name: string;
}, {
[x: string]: import("../core").Json;
symbol?: string | undefined;
merkle?: Record<string, string> | undefined;
description?: string | undefined;
image?: any;
external_link?: string | undefined;
seller_fee_basis_points?: number | undefined;
fee_recipient?: string | undefined;
name: string;
}>;
}>;
metadata: ContractMetadata<ThirdwebContract, any> | undefined;
```
2 changes: 1 addition & 1 deletion docs/sdk.smartcontract.platformfees.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
<b>Signature:</b>

```typescript
platformFees: ContractPlatformFee<TContract & IThirdwebPlatformFee> | undefined;
platformFees: ContractPlatformFee<IThirdwebPlatformFee> | undefined;
```
2 changes: 1 addition & 1 deletion docs/sdk.smartcontract.roles.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
<b>Signature:</b>

```typescript
roles: ContractRoles<TContract & AccessControlEnumerable, "transfer" | "lister" | "minter" | "admin" | "pauser" | "editor" | "asset"> | undefined;
roles: ContractRoles<AccessControlEnumerable, any> | undefined;
```
111 changes: 1 addition & 110 deletions docs/sdk.smartcontract.royalties.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,114 +10,5 @@
<b>Signature:</b>

```typescript
royalties: ContractRoyalty<TContract & IThirdwebContract & IThirdwebRoyalty, {
deploy: import("zod").ZodObject<import("zod").extendShape<import("zod").extendShape<{
name: import("zod").ZodString;
description: import("zod").ZodOptional<import("zod").ZodString>;
image: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodTypeAny, import("zod").ZodString]>>;
external_link: import("zod").ZodOptional<import("zod").ZodString>;
}, {
merkle: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>>;
seller_fee_basis_points: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodNumber>>;
fee_recipient: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodEffects<import("zod").ZodString, string, string>>>;
symbol: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>>;
}>, {
primary_sale_recipient: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodString, string, string>>;
platform_fee_basis_points: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodNumber>>;
platform_fee_recipient: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodEffects<import("zod").ZodString, string, string>>>;
trusted_forwarders: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodEffects<import("zod").ZodString, string, string>, "many">>>;
}>, "strip", import("zod").ZodLazy<import("zod").ZodType<import("../core").Json, import("zod").ZodTypeDef, import("../core").Json>>, {
[x: string]: import("../core").Json;
symbol?: string | undefined;
merkle?: Record<string, string> | undefined;
description?: string | undefined;
image?: any;
external_link?: string | undefined;
seller_fee_basis_points?: number | undefined;
fee_recipient?: string | undefined;
primary_sale_recipient?: string | undefined;
platform_fee_basis_points?: number | undefined;
platform_fee_recipient?: string | undefined;
trusted_forwarders?: string[] | undefined;
name: string;
}, {
[x: string]: import("../core").Json;
symbol?: string | undefined;
merkle?: Record<string, string> | undefined;
description?: string | undefined;
image?: any;
external_link?: string | undefined;
seller_fee_basis_points?: number | undefined;
fee_recipient?: string | undefined;
primary_sale_recipient?: string | undefined;
platform_fee_basis_points?: number | undefined;
platform_fee_recipient?: string | undefined;
trusted_forwarders?: string[] | undefined;
name: string;
}>;
output: import("zod").ZodObject<import("zod").extendShape<import("zod").extendShape<{
name: import("zod").ZodString;
description: import("zod").ZodOptional<import("zod").ZodString>;
image: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodTypeAny, import("zod").ZodString]>>;
external_link: import("zod").ZodOptional<import("zod").ZodString>;
}, {
image: import("zod").ZodOptional<import("zod").ZodString>;
}>, {
merkle: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>>;
seller_fee_basis_points: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodNumber>>;
fee_recipient: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodEffects<import("zod").ZodString, string, string>>>;
symbol: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>>;
}>, "strip", import("zod").ZodLazy<import("zod").ZodType<import("../core").Json, import("zod").ZodTypeDef, import("../core").Json>>, {
[x: string]: import("../core").Json;
symbol?: string | undefined;
merkle?: Record<string, string> | undefined;
description?: string | undefined;
image?: string | undefined;
external_link?: string | undefined;
seller_fee_basis_points?: number | undefined;
fee_recipient?: string | undefined;
name: string;
}, {
[x: string]: import("../core").Json;
symbol?: string | undefined;
merkle?: Record<string, string> | undefined;
description?: string | undefined;
image?: string | undefined;
external_link?: string | undefined;
seller_fee_basis_points?: number | undefined;
fee_recipient?: string | undefined;
name: string;
}>;
input: import("zod").ZodObject<import("zod").extendShape<{
name: import("zod").ZodString;
description: import("zod").ZodOptional<import("zod").ZodString>;
image: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodTypeAny, import("zod").ZodString]>>;
external_link: import("zod").ZodOptional<import("zod").ZodString>;
}, {
merkle: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>>;
seller_fee_basis_points: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodNumber>>;
fee_recipient: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodEffects<import("zod").ZodString, string, string>>>;
symbol: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodOptional<import("zod").ZodString>>>;
}>, "strip", import("zod").ZodLazy<import("zod").ZodType<import("../core").Json, import("zod").ZodTypeDef, import("../core").Json>>, {
[x: string]: import("../core").Json;
symbol?: string | undefined;
merkle?: Record<string, string> | undefined;
description?: string | undefined;
image?: any;
external_link?: string | undefined;
seller_fee_basis_points?: number | undefined;
fee_recipient?: string | undefined;
name: string;
}, {
[x: string]: import("../core").Json;
symbol?: string | undefined;
merkle?: Record<string, string> | undefined;
description?: string | undefined;
image?: any;
external_link?: string | undefined;
seller_fee_basis_points?: number | undefined;
fee_recipient?: string | undefined;
name: string;
}>;
}> | undefined;
royalties: ContractRoyalty<IThirdwebRoyalty & IThirdwebContract, any> | undefined;
```
2 changes: 1 addition & 1 deletion docs/sdk.smartcontract.sales.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
<b>Signature:</b>

```typescript
sales: ContractPrimarySale<TContract & IThirdwebPrimarySale> | undefined;
sales: ContractPrimarySale<IThirdwebPrimarySale> | undefined;
```
Loading