{"_id":"@carlomigueldy/forked-thirdweb-sdk","name":"@carlomigueldy/forked-thirdweb-sdk","dist-tags":{"latest":"2.2.3"},"versions":{"2.2.3":{"name":"@carlomigueldy/forked-thirdweb-sdk","version":"2.2.3","description":"The main thirdweb SDK.","repository":{"type":"git","url":"git+https://github.com/thirdweb-dev/typescript-sdk.git"},"license":"Apache-2.0","source":"src/index.ts","main":"dist/index.js","types":"dist/src/index.d.ts","module":"dist/index.mjs","browser":"dist/index.js","sideEffects":false,"scripts":{"clean":"rm -rf dist/","dev":"tsdx watch","build:lib":"tsup --env.NODE_ENV production --minify --format esm,cjs","format":"prettier src/ --write","prepublishOnly":"yarn lint && yarn build","lint":"eslint src/","fix":"eslint src/ --fix","generate-types":"tsc","typechain":"rm -rf ./lib && typechain --target ethers-v5 --out-dir lib './node_modules/@thirdweb-dev/contracts/abi/*.json'","extract-abi":"node ./scripts/extract-abis.mjs","extract-api":"api-extractor run --local","full-build":"yarn typechain && yarn extract-abi && yarn build:lib && yarn generate-types && yarn extract-api","generate-md-docs":"yarn api-documenter markdown -i ./temp -o ./docs","generate-docs":"yarn full-build && yarn generate-md-docs","generate-snippets":"node ./scripts/generate-snippets.mjs && node ./scripts/generate-feature-snippets.mjs","build":"yarn clean && yarn generate-docs && yarn generate-snippets","test":"echo \"\nUse 'yarn run test:all' to run all tests\nPass a test file pattern from ./test to run\n\n\t$ yarn run test test/pack.test.ts\" && ts-mocha -t 120000 -r esm -p tsconfig.testing.json","test:all":"ts-mocha --parallel --paths -t 120000 -r esm -p tsconfig.testing.json './test/**/*.test.ts'"},"devDependencies":{"@ethersproject/abi":"^5.4.1","@microsoft/api-documenter":"^7.13.53","@microsoft/api-extractor":"^7.18.10","@microsoft/tsdoc":"^0.14.1","@nomiclabs/hardhat-ethers":"^2.0.3","@swc/core":"^1.2.133","@typechain/ethers-v5":"^10.0.0","@types/chai":"^4.3.1","@types/deep-equal":"^1.0.1","@types/deep-equal-in-any-order":"^1.0.1","@types/expect":"^24.3.0","@types/form-data":"^2.5.0","@types/fs-extra":"^9.0.13","@types/lodash.isequal":"^4.5.5","@types/mocha":"^9.1.1","@types/node":"^16.11.7","@types/node-fetch":"^3","@types/uuid":"^8.3.3","@typescript-eslint/eslint-plugin":"^5.2.0","@typescript-eslint/parser":"^5.2.0","chai":"^4.3.6","deep-equal-in-any-order":"^1.1.15","eslint":"^8","eslint-config-prettier":"^8.3.0","eslint-plugin-import":"^2.24.2","eslint-plugin-inclusive-language":"^2.1.1","eslint-plugin-prettier":"^4.0.0","eslint-plugin-tsdoc":"^0.2.14","esm":"^3.2.25","ethers":"^5.6.2","hardhat":"^2.7.1","mocha":"^10.0.0","node-fetch":"^2.6.5","prettier":"^2.4.1","ts-enum-util":"^4.0.2","ts-mocha":"^9.0.0","tsup":"^5.11.11","typechain":"^8.0.0","typescript":"^4.6.2"},"peerDependencies":{"ethers":"^5"},"dependencies":{"@ethersproject/bignumber":"^5.6.0","@ethersproject/bytes":"^5.6.1","@ethersproject/constants":"^5.6.0","@ethersproject/contracts":"^5.6.0","@ethersproject/providers":"^5.6.1","@ethersproject/units":"^5.6.0","@thirdweb-dev/contracts":"2.3.5","@web-std/file":"^3.0.0","cross-fetch":"^3.1.5","deep-equal":"^2.0.5","eventemitter2":"^6.4.5","form-data":"^4.0.0","fs-extra":"^10.0.0","keccak256":"^1.0.6","merkletreejs":"^0.2.24","nanoid":"^3.1.31","tiny-invariant":"^1.2.0","ts-node":"^10.7.0","uuid":"^8.3.2","zod":"^3.11.6"},"resolutions":{"nanoid":"^3.1.31","typescript":"^4.6.2","@microsoft/tsdoc":"^0.14.1"},"bugs":{"url":"https://github.com/thirdweb-dev/typescript-sdk/issues"},"homepage":"https://github.com/thirdweb-dev/typescript-sdk#readme","author":{"name":"thirdweb"},"tsup":{"entry":["src/index.ts"],"sourcemap":true,"clean":true},"gitHead":"e38d8ee5da8fc1eabb96091f65def1c30f6b8878","_id":"@carlomigueldy/forked-thirdweb-sdk@2.2.3","_nodeVersion":"16.13.1","_npmVersion":"8.5.5","dist":{"integrity":"sha512-lw9GLPbLSn4NNyrCPjEEifq3LwNDtkGIbKTMOGQqpsOScWSy3RODwUReW7rK4L9HfkXncVYAMpbkkv1uM6lSvQ==","shasum":"aeb73e30f89b80bf23459175ae1b47ce6063f2e5","tarball":"https://registry.npmjs.org/@carlomigueldy/forked-thirdweb-sdk/-/forked-thirdweb-sdk-2.2.3.tgz","fileCount":341,"unpackedSize":5287971,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCY79ekK5m6fHxKWEzmWYjqy1nVr+iK7q8hBmeKs3HR+QIhAPmmz55Rk7e3R5uTI8at6/JfGETSWNH0WuDDcneeEMl5"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJidJ5UACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmptnxAApRCu8cpByo4K8vnH06BPK1PZob7EWGo1H/TdaUcSMGOguB3n\r\nh7E3wgzvT65tdd+eoNwwGJYvhO2iSSYw4JeUwiWnkmYCBkCMdRXk4ucPrsHC\r\nlP1hWZ/xIn6W8x4CFSyiBgnMEc8WRcsHZDsUeDzPICA/rhW0D9RMICPREDtq\r\n9mfoX/rS+UbZI1xgQERqSqzSnSAyIonJdowuQzl8tGsWVxm37E4lkPnSs8FR\r\nz7UWgvslKoFXN4Ja9w4mnCEGpzEXTyD8tBdwDNvqMMiiytalTiIM3rWtHv/X\r\n2lekuhBsqOBb/+K6e7tYTcAa6exi+W5anJNIWD4oozn5T+F885A4xxXF6lW1\r\nHGKUxq09kzKApAGRqYbWQEoTcfJGvdvVWueMs1YDU6wbrSw0PCXRf9Bhjotb\r\nLN726l5PB2qogc+Ajd0GjZBe+Uqr2YAQoECfCaDkfSQgAIOTahZO/OoDJGuy\r\nLivfIfrKNHZRQ2CWVzTWJ34SCxgZNNOTb6FeIC3564eP/V6ADSrUMtbHcBlb\r\ncVs2suMieEqgCBaIC8hFBaavvjFO2yYwuvhEtmzxeJI0Wo0ngA4lLpG6Y5AO\r\nPAWrDjtdB/Z9/Dk0CZ6wk6s8MRGQS1XaLA7RWyR5WX3yLwnEFHPLVvpfq+tP\r\n7558wvUISHOm5ihZbJLj5Zr3CTBGwzxdGyI=\r\n=2ZoB\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"carlomigueldy","email":"carlomigueldy@gmail.com"},"directories":{},"maintainers":[{"name":"carlomigueldy","email":"carlomigueldy@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/forked-thirdweb-sdk_2.2.3_1651809876519_0.619294678116886"},"_hasShrinkwrap":false}},"time":{"created":"2022-05-06T04:04:36.457Z","2.2.3":"2022-05-06T04:04:36.768Z","modified":"2022-05-06T04:04:36.887Z"},"maintainers":[{"name":"carlomigueldy","email":"carlomigueldy@gmail.com"}],"description":"The main thirdweb SDK.","homepage":"https://github.com/thirdweb-dev/typescript-sdk#readme","repository":{"type":"git","url":"git+https://github.com/thirdweb-dev/typescript-sdk.git"},"author":{"name":"thirdweb"},"bugs":{"url":"https://github.com/thirdweb-dev/typescript-sdk/issues"},"license":"Apache-2.0","readme":"<p align=\"center\">\n<br />\n<a href=\"https://thirdweb.com\"><img src=\"https://github.com/thirdweb-dev/typescript-sdk/blob/main/logo.svg?raw=true\" width=\"200\" alt=\"\"/></a>\n<br />\n</p>\n<h1 align=\"center\">Thirdweb Typescript SDK</h1>\n<p align=\"center\">\n<a href=\"https://www.npmjs.com/package/@thirdweb-dev/sdk\"><img src=\"https://img.shields.io/github/package-json/v/thirdweb-dev/typescript-sdk?color=red&label=npm&logo=npm\" alt=\"npm version\"/></a>\n<a href=\"https://github.com/thirdweb-dev/typescript-sdk/actions\"><img alt=\"Build Status\" src=\"https://github.com/thirdweb-dev/typescript-sdk/actions/workflows/tests.yml/badge.svg\"/></a>\n<a href=\"https://discord.gg/thirdweb\"><img alt=\"Join our Discord!\" src=\"https://img.shields.io/discord/834227967404146718.svg?color=7289da&label=discord&logo=discord&style=flat\"/></a>\n\n</p>\n<p align=\"center\"><strong>Best in class Web3 SDK for Browser, Node and Mobile apps</strong></p>\n<br />\n\n## Installation\n\nInstall the latest version of the SDK with `npm`:\n\n```shell\nnpm install @thirdweb-dev/sdk ethers\n```\nor with `yarn`:\n```shell\nyarn add @thirdweb-dev/sdk ethers\n```\n\n## Quick start\n\n### 1. Deploy & customize your contracts\n\n- Using your [thirdweb dashboard](https://thirdweb.com/dashboard) (recommended)\n- Using the SDK directly (for advanced use cases)\n\n### 2. Reading data from your contracts\n\nQuickest way to get started is to use the SDK as read only (no transactions).\nThis will allow you to query data from any contract with no additional setup.\n\n```typescript\n// my_script.ts\nimport { ThirdwebSDK } from \"@thirdweb-dev/sdk\";\n\n// The RPC url determines which blockchain you want to connect to\nconst rpcUrl = \"https://polygon-rpc.com/\";\n// instantiate the SDK as read only on a given blockchain\nconst sdk = new ThirdwebSDK(rpcUrl);\n\n// access your deployed contracts\nconst nftDrop = sdk.getNFTDrop(\"0x...\");\nconst marketplace = sdk.getMarketplace(\"0x...\");\n\n// Read from your contracts\nconst claimedNFTs = await nftDrop.getAllClaimed();\nconst listings = await marketplace.getActiveListings();\n```\n\nYou can execute this code as a node script by executing:\n```shell\nnpx ts-node my_script.ts\n```\n\n### 3. Executing transactions on your contracts\n\nIn order to execute transactions on your contract, the SDK needs to know which wallet is executing those transactions.\nThis can be done two ways:\n\n- Using your own private key (typically used in the backend or scripts)\n- By connecting to a user wallet (typically used in the frontend)\n\n### Backend / Scripting usage\n\nHere's how to provide your own private key to the SDK to perform transactions with your account from scripts or from a node.js backend:\n\n```typescript\n// my_script.ts\nimport { ThirdwebSDK } from \"@thirdweb-dev/sdk\";\n\n// still need an RPC url to determine which blochain to connect to\nconst rpcUrl = \"https://polygon-rpc.com/\";\n// load your private key in a secure way (env variable, never commited to git)\nconst privateKey = process.env.PRIVATE_KEY as string;\n// instantiate the SDK with your own wallet (or any valid Signer)\nconst sdk = new ThirdwebSDK(\n    new Wallet(\n        privateKey,\n        ethers.getDefaultProvider(rpcUrl)\n    )\n);\n\n// deploy contracts\nconst deployedAddress = sdk.deployer.deployNFTCollection({\n    name: \"My NFT Collection\",\n})\n\n// access your deployed contracts\nconst nftCollection = sdk.getNFTCollection(deployedAddress);\n\n// Execute transactions on your contracts from the connected wallet\nconst walletAddress = \"0x...\";\nawait nftCollection.mintTo(walletAddress, {\n    name: \"Cool NFT\",\n    description: \"Minted NFT from code!\",\n    image: fs.readFileSync(\"path/to/image.png\"), // This can be an image url or file\n});\n```\n\n### Frontend usage\n\nFor frontend applications, head over to our [React Github repo](https://github.com/thirdweb-dev/react) which shows you how to connect to a user's wallet like Metamask, and automatically instantiate the thirdweb SDK for you.\n\nEasiest way to get started on the frontend is using one of our templates in the [thirdweb examples repo](https://github.com/thirdweb-example).\n\n### API Reference & code examples\n\n- [Step by step guides and recipes](https://portal.thirdweb.com)\n- [Full Api Reference and code examples](https://docs.thirdweb.com/typescript)\n\n### Get in touch\n\n- [Discord](https://discord.gg/thirdweb)\n- [Twitter](https://twitter.com/thirdweb_/)\n","readmeFilename":"README.md"}