{"_id":"@ashkuc/ssdk","_rev":"5-8485488b64a81dd64ce083c6447d7bfa","name":"@ashkuc/ssdk","dist-tags":{"latest":"2.0.2"},"versions":{"1.0.1":{"name":"@ashkuc/ssdk","version":"1.0.1","_id":"@ashkuc/ssdk@1.0.1","maintainers":[{"name":"ashkuc","email":"ashkucc@gmail.com"}],"dist":{"shasum":"727a510b8bbaa075c8ead22efca5d661e2e8ea72","tarball":"https://registry.npmjs.org/@ashkuc/ssdk/-/ssdk-1.0.1.tgz","fileCount":11,"integrity":"sha512-ne3xtmATAkVlllzVSnmAtQSX8Y0eICSfDeZFs5Qn8FVAgW4kJQuxS1VDIGECPkm2HpoOOyoaeFuio6iz09AQOw==","signatures":[{"sig":"MEUCIGVa8lQoN1vgi5KAfmb66ehBOddBNe0oyc9sCYrLarFnAiEAtZp0OizfhatHDSIkUqMOhINME0eeLUOaaG1XNmIvPfw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11630543},"main":"index.cjs","type":"module","types":"index.d.ts","module":"index.js","exports":{".":{"types":"./index.d.ts","import":"./index.js","require":"./index.cjs"}},"gitHead":"e6bd78eca7ee1474bbc8193ce2e6a9f2b4f85cd2","scripts":{"test":"vitest --typecheck","build":"tsup --clean --config configs/tsup.config.ts && yarn copy_files","release":"release-it --config configs/release-it.config.ts","schemas":"yarn tsx ./tools/copySchemas.ts","testrun":"vitest --typecheck --run","copy_files":"yarn copyfiles ./package.json ./README.md ./dist","build:watch":"yarn copy_files && tsup --watch --config configs/tsup.config.ts"},"_npmUser":{"name":"ashkuc","email":"ashkucc@gmail.com"},"_npmVersion":"10.5.1","description":"This package is a thin client for Unique Network. It is a wrapper around the Substrate RPC API that provides a more convenient API for interacting with Unique Network.","directories":{},"_nodeVersion":"22.0.0","dependencies":{"qs":"^6.13.0","zod":"^3.22.4","axios":"^1.6.8","@unique-nft/utils":"^0.3.20","@unique-nft/schemas":"^2.1.7","@unique-nft/sr25519":"^0.0.2","@unique-nft/solidity-interfaces":"0.70.1"},"_hasShrinkwrap":false,"packageManager":"yarn@4.1.1","devDependencies":{"tsx":"^4.7.2","tsup":"^8.0.2","vitest":"^1.2.2","prettier":"^3.3.3","@types/qs":"^6.9.15","copyfiles":"^2.4.1","release-it":"^17.6.0","typescript":"^5.3.3"},"_npmOperationalInternal":{"tmp":"tmp/ssdk_1.0.1_1727970686020_0.5143912958669066","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@ashkuc/ssdk","version":"1.0.2","_id":"@ashkuc/ssdk@1.0.2","maintainers":[{"name":"ashkuc","email":"ashkucc@gmail.com"}],"dist":{"shasum":"cc66833914c6e21504f205deb74fded6c6c86539","tarball":"https://registry.npmjs.org/@ashkuc/ssdk/-/ssdk-1.0.2.tgz","fileCount":26,"integrity":"sha512-dl0MlEDFpsuOI2aKKHFmpJq2ndv9TzxK82u/eAa7JvLu1QSdvYeBGR98lV44/HIofoOk0J4YpT7YikPdkvmpBg==","signatures":[{"sig":"MEQCIHMp2yD+/G51bY9Mkds3kqWsUEnFcrTqFRPh57aju/fdAiACnqRO+ln6anPZR//y1KlE4AFDVrWDLHU7hLvFi08fug==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155456},"main":"index.cjs","type":"module","types":"index.d.ts","module":"index.js","exports":{".":{"types":"./index.d.ts","import":"./index.js","require":"./index.cjs"}},"gitHead":"e6bd78eca7ee1474bbc8193ce2e6a9f2b4f85cd2","scripts":{"test":"vitest --typecheck","build":"tsup --clean --config configs/tsup.config.ts && yarn copy_files","release":"release-it --config configs/release-it.config.ts","schemas":"yarn tsx ./tools/copySchemas.ts","testrun":"vitest --typecheck --run","copy_files":"yarn copyfiles ./package.json ./README.md ./dist","build:watch":"yarn copy_files && tsup --watch --config configs/tsup.config.ts","release:minor":"npm run release -- -i minor --ci","release:patch":"npm run release -- -i patch --ci"},"_npmUser":{"name":"ashkuc","email":"ashkucc@gmail.com"},"_npmVersion":"10.5.1","description":"This package is a thin client for Unique Network. It is a wrapper around the Substrate RPC API that provides a more convenient API for interacting with Unique Network.","directories":{},"_nodeVersion":"22.0.0","dependencies":{"qs":"^6.13.0","zod":"^3.22.4","axios":"^1.6.8","@unique-nft/utils":"^0.3.20","@unique-nft/schemas":"^2.1.7","@unique-nft/sr25519":"^0.0.2","@unique-nft/solidity-interfaces":"0.70.1"},"_hasShrinkwrap":false,"packageManager":"yarn@4.1.1","devDependencies":{"tsx":"^4.7.2","tsup":"^8.0.2","vitest":"^1.2.2","prettier":"^3.3.3","@types/qs":"^6.9.15","copyfiles":"^2.4.1","release-it":"^17.6.0","typescript":"^5.3.3"},"_npmOperationalInternal":{"tmp":"tmp/ssdk_1.0.2_1727971239652_0.9298198119987524","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@ashkuc/ssdk","version":"1.0.3","_id":"@ashkuc/ssdk@1.0.3","maintainers":[{"name":"ashkuc","email":"ashkucc@gmail.com"}],"dist":{"shasum":"8770a91e69231d43668cefd3ead1df4ede3c5b1b","tarball":"https://registry.npmjs.org/@ashkuc/ssdk/-/ssdk-1.0.3.tgz","fileCount":26,"integrity":"sha512-iCnGKD9jpjU4dqnh7D64zoA3nwmJRQnikAQ5QKOm75aOYqkDoAiRjtdDSrqPghsIKUHMtXs83Abt954+hIxwAg==","signatures":[{"sig":"MEUCIQCnlZIHu67nqsSkmErR9aDV6FrisAmZuY51kevKLLcVEwIga65odaFH8Eoo/TRxr0Q0bd9O7WvhnZZ1s+MmQJLc+p4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":155457},"main":"index.cjs","type":"module","types":"index.d.ts","module":"index.js","exports":{".":{"types":"./index.d.ts","import":"./index.js","require":"./index.cjs"}},"gitHead":"8734134ed555e326caf6052dd631da9c06dc9334","scripts":{"test":"vitest --typecheck","build":"tsup --clean --config configs/tsup.config.ts && yarn copy_files","release":"release-it --config configs/release-it.config.ts","schemas":"yarn tsx ./tools/copySchemas.ts","testrun":"vitest --typecheck --run","copy_files":"yarn copyfiles ./package.json ./README.md ./dist","build:watch":"yarn copy_files && tsup --watch --config configs/tsup.config.ts","release:minor":"npm run release -- -i minor --ci","release:patch":"npm run release -- -i patch --ci"},"_npmUser":{"name":"ashkuc","email":"ashkucc@gmail.com"},"_npmVersion":"10.5.1","description":"This package is a thin client for Unique Network. It is a wrapper around the Substrate RPC API that provides a more convenient API for interacting with Unique Network.","directories":{},"_nodeVersion":"22.0.0","dependencies":{"qs":"^6.13.0","zod":"^3.22.4","axios":"^1.6.8","@unique-nft/utils":"^0.3.20","@unique-nft/schemas":"^2.1.7","@unique-nft/sr25519":"^0.0.2","@unique-nft/solidity-interfaces":"0.70.1"},"_hasShrinkwrap":false,"packageManager":"yarn@4.1.1","devDependencies":{"tsx":"^4.7.2","tsup":"^8.0.2","vitest":"^1.2.2","prettier":"^3.3.3","@types/qs":"^6.9.15","copyfiles":"^2.4.1","release-it":"^17.6.0","typescript":"^5.3.3"},"_npmOperationalInternal":{"tmp":"tmp/ssdk_1.0.3_1727971296001_0.9613925268585917","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"@ashkuc/ssdk","version":"1.0.4","_id":"@ashkuc/ssdk@1.0.4","maintainers":[{"name":"ashkuc","email":"ashkucc@gmail.com"}],"dist":{"shasum":"0f731a4e38656b1bcbe0de2877867d8d741f04de","tarball":"https://registry.npmjs.org/@ashkuc/ssdk/-/ssdk-1.0.4.tgz","fileCount":11,"integrity":"sha512-m+8usLyrAe/R/GdyQg/NMh0UHWu2bHHEs9kJw2kDW5TtSzTMkyhAncSUvz9dCdHybONrAyyVD7mem2mkBiqHQQ==","signatures":[{"sig":"MEUCIDPybNbIWlgT3T4qSQNvXPYCh5MsFgnFGSYqyeCjYxoYAiEAsU5o6Vri0eCfuqA/JjMZX4SG6ccU48vzjfp+coRanpY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11630659},"main":"index.cjs","type":"module","types":"index.d.ts","module":"index.js","exports":{".":{"types":"./index.d.ts","import":"./index.js","require":"./index.cjs"}},"gitHead":"4317466a5e122466ed27d38bcc59287ff7a789ae","scripts":{"test":"vitest --typecheck","build":"tsup --clean --config configs/tsup.config.ts && yarn copy_files","release":"release-it --config configs/release-it.config.ts","schemas":"yarn tsx ./tools/copySchemas.ts","testrun":"vitest --typecheck --run","copy_files":"yarn copyfiles ./package.json ./README.md ./dist","build:watch":"yarn copy_files && tsup --watch --config configs/tsup.config.ts","release:minor":"npm run release -- -i minor --ci","release:patch":"npm run release -- -i patch --ci"},"_npmUser":{"name":"ashkuc","email":"ashkucc@gmail.com"},"_npmVersion":"10.5.1","description":"This package is a thin client for Unique Network. It is a wrapper around the Substrate RPC API that provides a more convenient API for interacting with Unique Network.","directories":{},"_nodeVersion":"22.0.0","dependencies":{"qs":"^6.13.0","zod":"^3.22.4","axios":"^1.6.8","@unique-nft/utils":"^0.3.20","@unique-nft/schemas":"^2.1.7","@unique-nft/sr25519":"^0.0.2","@unique-nft/solidity-interfaces":"0.70.1"},"_hasShrinkwrap":false,"packageManager":"yarn@4.1.1","devDependencies":{"tsx":"^4.7.2","tsup":"^8.0.2","vitest":"^1.2.2","prettier":"^3.3.3","@types/qs":"^6.9.15","copyfiles":"^2.4.1","release-it":"^17.6.0","typescript":"^5.3.3"},"_npmOperationalInternal":{"tmp":"tmp/ssdk_1.0.4_1727971368025_0.9737883703988337","host":"s3://npm-registry-packages"}},"2.0.1":{"name":"@ashkuc/ssdk","version":"2.0.1","keywords":["blockchain","parachain","polkadot","unique network","nft"],"license":"MIT","_id":"@ashkuc/ssdk@2.0.1","maintainers":[{"name":"ashkuc","email":"ashkucc@gmail.com"}],"dist":{"shasum":"5e323f93611314c42ee429328c29519b9e1a5176","tarball":"https://registry.npmjs.org/@ashkuc/ssdk/-/ssdk-2.0.1.tgz","fileCount":54,"integrity":"sha512-BIMdGeUP/+knZEeJNAp98dFo9aBfZVG8Gj9FyzupcCML1gwwi0/b7fVewmFUlhRKP5nPLaekeQiDP2U1MC/gng==","signatures":[{"sig":"MEQCIGrNGwGuQUwCH4sYLJZ3BLr1Ta7ImN0A500km1fJDbNOAiBMaV0Aqu8VRyRsyxqBIg5V5Kqgy12V7k8XmsSlf1N0nw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14145207},"main":"index.cjs","type":"module","types":"index.d.ts","module":"index.js","exports":{".":{"types":"./index.d.ts","import":"./index.js","require":"./index.cjs"},"./nftsPallet":{"types":"./nftsPallet.d.ts","import":"./nftsPallet.js","require":"./nftsPallet.cjs"},"./uniqueChain":{"types":"./uniqueChain.d.ts","import":"./uniqueChain.js","require":"./uniqueChain.cjs"},"./uniqueIndexer":{"types":"./uniqueIndexer.d.ts","import":"./uniqueIndexer.js","require":"./uniqueIndexer.cjs"}},"gitHead":"53db2b521a7f0248be502e3d5d1c56f270e23bd6","scripts":{"test":"vitest --typecheck","build":"tsup --clean --config configs/tsup.config.ts && yarn copy_files","analyze":"tsup --metafile --clean --config configs/tsup.config.ts && esbuild-visualizer --open --metadata ./dist/metafile-esm.json","release":"release-it --config configs/release-it.config.ts","schemas":"yarn tsx ./tools/copySchemas.ts","testrun":"vitest --typecheck --run","copy_files":"yarn copyfiles ./package.json ./README.md ./dist","build:watch":"yarn copy_files && tsup --watch --config configs/tsup.config.ts","release:minor":"npm run release -- -i minor --ci","release:patch":"npm run release -- -i patch --ci"},"_npmUser":{"name":"ashkuc","email":"ashkucc@gmail.com"},"_npmVersion":"10.5.1","description":"This package is a thin client for Unique Network. It is a wrapper around the Substrate RPC API that provides a more convenient API for interacting with Unique Network.","directories":{},"_nodeVersion":"22.0.0","dependencies":{"qs":"^6.13.0","zod":"^3.22.4","axios":"^1.6.8","@unique-nft/utils":"^0.3.20","@unique-nft/schemas":"^2.1.8","@unique-nft/sr25519":"^0.0.2","@unique-nft/solidity-interfaces":"^1.0.1"},"_hasShrinkwrap":false,"packageManager":"yarn@4.1.1","devDependencies":{"tsx":"^4.7.2","tsup":"^8.0.2","vitest":"^1.2.2","prettier":"^3.3.3","@types/qs":"^6.9.15","copyfiles":"^2.4.1","release-it":"^17.6.0","typescript":"^5.3.3","esbuild-visualizer":"^0.6.0"},"_npmOperationalInternal":{"tmp":"tmp/ssdk_2.0.1_1728774427060_0.6659264959105073","host":"s3://npm-registry-packages"}},"2.0.2":{"name":"@ashkuc/ssdk","version":"2.0.2","packageManager":"yarn@4.1.1","type":"module","main":"index.cjs","module":"index.js","types":"index.d.ts","exports":{".":{"import":"./index.js","require":"./index.cjs","types":"./index.d.ts"},"./uniqueChain":{"import":"./uniqueChain.js","require":"./uniqueChain.cjs","types":"./uniqueChain.d.ts"},"./nftsPallet":{"import":"./nftsPallet.js","require":"./nftsPallet.cjs","types":"./nftsPallet.d.ts"},"./uniqueIndexer":{"import":"./uniqueIndexer.js","require":"./uniqueIndexer.cjs","types":"./uniqueIndexer.d.ts"}},"scripts":{"build":"tsup --clean --config configs/tsup.config.ts && yarn copy_files","build:watch":"yarn copy_files && tsup --watch --config configs/tsup.config.ts","copy_files":"yarn copyfiles ./package.json ./README.md ./dist","test":"vitest --typecheck","testrun":"vitest --typecheck --run","release:patch":"npm run release -- -i patch --ci","release:minor":"npm run release -- -i minor --ci","release":"release-it --config configs/release-it.config.ts","analyze":"tsup --metafile --clean --config configs/tsup.config.ts && esbuild-visualizer --open --metadata ./dist/metafile-esm.json","schemas":"yarn tsx ./tools/copySchemas.ts"},"dependencies":{"@unique-nft/schemas":"^2.1.8","@unique-nft/solidity-interfaces":"^1.0.1","@unique-nft/sr25519":"^0.0.2","@unique-nft/utils":"^0.3.20","axios":"^1.6.8","qs":"^6.13.0","zod":"^3.22.4"},"devDependencies":{"@types/qs":"^6.9.15","copyfiles":"^2.4.1","esbuild-visualizer":"^0.6.0","prettier":"^3.3.3","release-it":"^17.6.0","tsup":"^8.0.2","tsx":"^4.7.2","typescript":"^5.3.3","vitest":"^1.2.2"},"keywords":["blockchain","parachain","polkadot","unique network","nft"],"license":"MIT","_id":"@ashkuc/ssdk@2.0.2","gitHead":"53db2b521a7f0248be502e3d5d1c56f270e23bd6","description":"This package is a thin client for Unique Network. It is a wrapper around the Substrate RPC API that provides a more convenient API for interacting with Unique Network.","_nodeVersion":"22.0.0","_npmVersion":"10.5.1","dist":{"integrity":"sha512-3B0enkcrrgI2s63rwLfXYFKHy3bkRqqMjddGmN+M9Qy9sZ3jbKvO4ARv2IHZJcO5ExfcT4hpPX7U9y8cbg558Q==","shasum":"f258901712d2824721dbc060face4b0aab0c7fcc","tarball":"https://registry.npmjs.org/@ashkuc/ssdk/-/ssdk-2.0.2.tgz","fileCount":54,"unpackedSize":14145907,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICb68SLKKQf76muI+eRRaTmsituzweem2G+OWkFyctedAiEA+ji7PcM5SIcP8Wx9eMJ6cAuzzx4VFAV30qwdzufFQhI="}]},"_npmUser":{"name":"ashkuc","email":"ashkucc@gmail.com"},"directories":{},"maintainers":[{"name":"ashkuc","email":"ashkucc@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ssdk_2.0.2_1728774637581_0.6700630410016908"},"_hasShrinkwrap":false}},"time":{"created":"2024-10-03T15:51:25.861Z","modified":"2024-10-12T23:10:38.064Z","1.0.1":"2024-10-03T15:51:26.331Z","1.0.2":"2024-10-03T16:00:39.881Z","1.0.3":"2024-10-03T16:01:36.158Z","1.0.4":"2024-10-03T16:02:48.267Z","2.0.1":"2024-10-12T23:07:07.338Z","2.0.2":"2024-10-12T23:10:37.849Z"},"license":"MIT","keywords":["blockchain","parachain","polkadot","unique network","nft"],"description":"This package is a thin client for Unique Network. It is a wrapper around the Substrate RPC API that provides a more convenient API for interacting with Unique Network.","maintainers":[{"name":"ashkuc","email":"ashkucc@gmail.com"}],"readme":"# Unique Network SDK (thin-client)\n\nThis package is a thin client for Unique Network. It is a wrapper around the Substrate RPC API that provides a more convenient API for interacting with Unique Network.\n\nYou can read more about working with SDK and Unique Network in the [official documentation](https://docs.unique.network/build)\n\n- [Unique Network SDK (thin-client)](#unique-network-sdk-thin-client)\n  - [Install](#install)\n  - [Usage](#usage)\n    - [Create a Unique Chain Instance](#create-a-unique-chain-instance)\n    - [Managing Balances](#managing-balances)\n      - [Get Balance](#get-balance)\n      - [Transfer Balance](#transfer-balance)\n    - [Managing Collections and NFTs](#managing-collections-and-nfts)\n      - [Creating a Collection](#creating-a-collection)\n      - [Minting NFTs](#minting-nfts)\n      - [Transferring NFTs](#transferring-nfts)\n      - [Updating NFT Attributes and Image](#updating-nft-attributes-and-image)\n      - [Burning NFTs](#burning-nfts)\n      - [Nesting and Unnesting NFTs](#nesting-and-unnesting-nfts)\n      - [Approving Spenders for NFTs](#approving-spenders-for-nfts)\n    - [Managing EVM Contracts](#managing-evm-contracts)\n      - [Creating an NFT Collection via EVM](#creating-an-nft-collection-via-evm)\n      - [Deploying and Interacting with Smart Contracts](#deploying-and-interacting-with-smart-contracts)\n  - [Blockchain Indexer](#blockchain-indexer)\n      - [API Endpoints](#api-endpoints)\n    - [SDK Initialization](#sdk-initialization)\n    - [Usage Examples](#usage-examples)\n      - [Fetch the Last 5 Blocks](#fetch-the-last-5-blocks)\n      - [Search Collections](#search-collections)\n      - [Search NFTs](#search-nfts)\n\n\n## Install\n\n```bash\nnpm install @unique-nft/sdk\n```\n\n## Usage\n\n### Create a Unique Chain Instance\n\nTo establish a connection, you may use one of the publicly available endpoints:\n\n| Network | Endpoint                              |\n|---------|---------------------------------------|\n| Unique  | https://rest.unique.network/v2/unique |\n| Quartz  | https://rest.unique.network/v2/quartz |\n| Opal    | https://rest.unique.network/v2/opal   |\n\n```ts\nimport { UniqueChain } from '@unique-nft/sdk'\nimport { Sr25519Account } from '@unique-nft/utils/sr25519'\n\n// Create an account from a mnemonic\nconst account = Sr25519Account.fromUri('your mnemonic phrase here')\n\n// Initialize UniqueChain with the account\nconst uniqueChain = UniqueChain({baseUrl: 'https://rest.unique.network/v2/opal'})\n```\n\n### Managing Balances\n\n#### Get Balance\n\nRetrieve the balance details of a specific account.\n\n```ts\nconst balance = await uniqueChain.balance.get({ address: \"5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY\" })\n```\n\n#### Transfer Balance\n\nTransfer a specified amount from one account to another. The SDK supports transferring amounts in both Wei (smallest unit) and Coin (standard unit).\n\nTransfer balance in wei:\n\n```ts\nconst transferResult = await uniqueChain.balance.transfer(\n  {\n    to: toAddress,\n    amount, // Amount in Wei\n  },\n  { signerAddress: fromAddress },\n  aliceAccount, // Signer account\n)\n```\n\nTransfer Balance in coins:\n\n```ts\nconst transferResult = await uniqueChain.balance.transfer(\n  {\n    to: toAddress,\n    amount, // Amount in Coins\n    isAmountInCoins: true,\n  },\n  { signerAddress: fromAddress },\n  aliceAccount, // Signer account\n)\n```\n\n### Managing Collections and NFTs\n\n#### Creating a Collection\n\nCreate a new collection on the Unique Network. Collections can be used to group related NFTs.\n\n```ts\nconst collectionResult = await uniqueChain.collection.create({\n  mode: 'Nft',\n  name: 'My Collection',\n  description: 'A description for my collection',\n  symbol: 'MC',\n  info: {\n    cover_image: { url: 'https://ipfs.unique.network/ipfs/Qmau5RNqJMf6bR5mcatnAZGaF1hhiCY1UoaFctfw7rMhTU' },\n  },\n})\n```\n\n#### Minting NFTs\n\nMint new NFTs within a specific collection.\n\n```ts\nconst mintResult = await uniqueChain.token.mintNFTs({\n  collectionId,\n  tokens: [\n    {\n      data: {\n        image: 'https://ipfs.unique.network/ipfs/QmRJYgnXfo9WfTckYk8J1h4NTC35VBBGLsjhpkkFDuzQ9L',\n        attributes: [{ trait_type: 'Power', value: '10' }],\n      },\n      owner: '5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY',\n    },\n    {\n      data: {\n        image: 'https://ipfs.unique.network/ipfs/QmduruSNgY9h13p2q6hnsaot9vgVxYVzg9DL7ZWxZ6U5w6',\n        attributes: [{ trait_type: 'Speed', value: '8' }],\n      },\n      owner: '5H5ymQAo198Ap2rVGG7mNfAVkomFG98FdwL4mz8XqAJeGHHt',\n    },\n  ],\n})\n```\n\n#### Transferring NFTs\n\nTransfer ownership of an NFT from one account to another.\n\n```ts\nconst transferResult = await uniqueChain.token.transfer(\n  {\n    to: '5H5ymQAo198Ap2rVGG7mNfAVkomFG98FdwL4mz8XqAJeGHHt',\n    collectionId: 1,\n    tokenId: 1,\n  },\n  { signer: alice },\n)\n```\n\n#### Updating NFT Attributes and Image\n\nModify the attributes or image of an existing NFT.\n\n```ts\nconst updateResult = await uniqueChain.token.updateNft({\n  collectionId: 1,\n  tokenId: 1,\n  data: {\n    attributes: [{ trait_type: 'Power', value: '15' }],\n    image: 'https://ipfs.unique.network/ipfs/QmNewImageURL',\n  },\n})\n```\n\n#### Burning NFTs\n\nRemove an NFT permanently from the collection.\n\n```ts\nconst burnResult = await uniqueChain.token.burn({\n  collectionId: 1,\n  tokenId: 2,\n})\n```\n\n#### Nesting and Unnesting NFTs\n\nNest one NFT within another, allowing for hierarchical ownership structures.\n\n```ts\nconst parent = { collectionId: 1, tokenId: 1 }\nconst nested = { collectionId: 1, tokenId: 2 }\n\nconst nestResult = await uniqueChain.token.nest({\n  parent,\n  nested,\n})\n```\n  \n#### Approving Spenders for NFTs\n\nAuthorize another account to manage or transfer your NFTs.\n\n```ts\nconst approveResult = await uniqueChain.token.approve({\n  spender: '5H5ymQAo198Ap2rVGG7mNfAVkomFG98FdwL4mz8XqAJeGHHt',\n  collectionId: 1,\n  tokenId: 1,\n})\n\nconst isApproved = await uniqueChain.token.getApproved({\n  collectionId: 1,\n  tokenId: 1,\n  spender: '5H5ymQAo198Ap2rVGG7mNfAVkomFG98FdwL4mz8XqAJeGHHt',\n})\n```\n\n### Managing EVM Contracts\n\nThe Unique Network SDK provides robust methods to manage EVM-compatible contracts, including deploying contracts, interacting with them, and handling NFT collections within the EVM environment. Below are the key functionalities and how to use them.\n\nRead more about how Substrate accounts work with EVM in the [documentation](https://docs.unique.network/build/evm/).\n\n#### Creating an NFT Collection via EVM\n\nCreate a new NFT collection using the EVM-compatible methods.\n\n```ts\nconst collectionCreationFee = await uniqueChain.evm.collectionHelpers.call({\n  functionName: 'collectionCreationFee',\n  functionArgs: [],\n})\n\nconsole.log('Collection Creation Fee:', collectionCreationFee)\n\nconst collectionResult = await uniqueChain.evm.collectionHelpers.send({\n  functionName: 'createNFTCollection',\n  functionArgs: ['Test Collection', 'Description of Test Collection', 'TC'],\n  value: collectionCreationFee, // Ensure to send the required fee\n})\n```\n\n#### Deploying and Interacting with Smart Contracts\n\nDeploy EVM-compatible smart contracts and interact with their functions seamlessly using the SDK.\n\n```ts\nconst abi = [\n  {\n    \"inputs\": [\n      {\n        \"internalType\": \"uint256\",\n        \"name\": \"num\",\n        \"type\": \"uint256\"\n      }\n    ],\n    \"name\": \"store\",\n  },\n  //...\n]\n\nconst deployResult = await uniqueChain.evm.deploy({\n  bytecode: storageArtifacts.bytecode,\n})\n\nconst contractAddress = deployResult.result.contractAddress\nconsole.log('Contract Deployed at:', contractAddress)\n\n// Verify the contract exists\nconst { exists } = await uniqueChain.evm.contractExists({ address: contractAddress })\nconsole.log('Contract Exists:', exists)\n\n// Interact with the contract's `store` function\nconst storeTx = await uniqueChain.evm.send({\n  functionName: 'store',\n  functionArgs: [123n],\n  contract: {\n    address: contractAddress,\n    abi,\n  },\n})\n```\n\n## Blockchain Indexer\n\nThe Unique Network SDK includes a typed wrapper around Axios to interact seamlessly with the Unique Network blockchain indexer API. This allows you to fetch and query blockchain data efficiently.\n\nYou can read more about working with Indexer and Unique Network in the [official documentation](https://docs.unique.network/build/sdk/v2/indexer.html)\n\n#### API Endpoints\n\n| Network | Endpoint URL                        |\n|---------|-------------------------------------|\n| Unique  | https://api-unique.uniquescan.io/v2 |\n| Quartz  | https://api-quartz.uniquescan.io/v2 |\n\n### SDK Initialization\n\nInitialize the UniqueIndexer client with the desired base URL to start interacting with the blockchain indexer API.\n\n```ts\nimport { UniqueIndexer } from '@unique-nft/sdk';\n\nconst indexerClient = UniqueIndexer({ baseUrl: 'https://api-unique.uniquescan.io/v2' });\n```\n\n### Usage Examples\n\n#### Fetch the Last 5 Blocks\n\nRetrieve the latest 5 blocks in descending order by block number.\n\n```ts\nconst blocks = await indexerClient.blocks({ limit: 5, orderByNumber: 'desc' });\n```\n\n#### Search Collections\n\nRetrieve collections based on various search criteria like name, description, admin, owner, and sponsor.\n\n```ts\nconst collections = await indexerClient.collections({\n  nameLike: '%substra%',\n  descriptionLike: '%First NFT collection%',\n  adminIn: ['5F6TPxrxZBhhpvRA8Lu1PWjcpoeoEkAQ4TVALpaxgenTU3sM'],\n  ownerIn: ['5H684Wa69GpbgwQ7w9nZyzVpDmEDCTexhRNmZ7mkqM1Rt7dH'],\n  sponsorIn: ['5H684Wa69GpbgwQ7w9nZyzVpDmEDCTexhRNmZ7mkqM1Rt7dH'],\n  isBurned: false,\n  orderByCollectionId: 'asc',\n  orderByName: 'asc',\n});\n```\n\n#### Search NFTs\n\nRetrieve NFTs based on criteria such as collection ID, token ID, ownership, royalty recipients, and attributes.\n\n```ts\nconst nfts = await indexerClient.nfts({\n  collectionIdIn: ['1', '0x17C4e6453cC49AAaaEaCA894E6D9683e00000001'],\n  tokenIdIn: [1],\n  isBurned: false,\n  royaltyRecipientIn: ['5Gus5r7HSZv9ScdaTNVbFMBEsxMtc4cZBPTLfJJbLXQK8m9d'],\n  attributeTraitTypeIn: ['traits'],\n  attributeValueIn: ['Up Hair', 'Teeth Smile'],\n  isBundle: false,\n  ownerIn: ['5FZeTmbZQZsJcyEevjGVK1HHkcKfWBYxWpbgEffQ2M1SqAnP'],\n  orderByTokenId: 'asc',\n});\n```","readmeFilename":"README.md"}