quartz/wallet/node_modules/@3rdweb/sdk/dist/index.d.ts
2022-03-04 20:05:23 +08:00

73 lines
2.1 KiB
TypeScript

/**
* The {@link https://thirdweb.com | thirdweb} typescript sdk.
*
* @remarks
* Please keep in mind that the thirdweb typescript sdk and {@link https://thirdweb.com/dashboard | Admin Dashboard} are currently in Early Access.
*
* Should you find bugs or in the case you need help please reach out to us in {@link https://discord.gg/thirdweb | Discord}. (We also have 🍪 )
*
*
* @example
* To get you started here's how you would instantiate the SDK and fetch some NFTs
*
* 1. Install the sdk
* ```shell
* npm install @3rdweb/sdk
* ```
*
* 2. Get your NFT contract address from the {@link https://thirdweb.com/dashboard | Admin Dashboard}.
*
* 3. Write the tiniest amount of code!
* ```typescript
* 1 | import { ThirdwebSDK } from "@3rdweb/sdk";
* 2 | import type { NFTModule, NFTMetadataOwner } from "@3rdweb/sdk";
* 3 |
* 5 | const contractAddress = "0x..."; // your contract address from step 2
* 6 |
* 7 | const sdk = new ThirdwebSDK();
* 8 |
* 9 | const nftModule: NFTModule = sdk.getNFTModule(contractAddress);
* 10 |
* 11 | const nftListWithOwnerAddress: NFTMetadataOwner[] = await nftModule.getAllWithOwner();
* 12 |
* 13 | console.log(nftListWithOwnerAddress);
* ```
* ```
* Output
* => [
* {
* owner: "0x...",
* metadata: {
* name: "...",
* description: "...",
* image: "..."
* },
* },
* {
* owner: "0x...",
* metadata: {
* name: "...",
* description: "...",
* image: "..."
* },
* },
* ...
* ]
* ```
*
* @packageDocumentation
*/
export * from "./common";
export type { InvariantError } from "./common/invariant";
export * from "./core";
export type { Module, ModuleWithRoles } from "./core/module";
export type { IAppModule } from "./core/registry";
export * from "./core/types";
export * from "./enums";
export * from "./factories";
export * from "./interfaces";
export * from "./modules";
export * from "./storage";
export * from "./types";
export * from "./utils";