{"_id":"@alphabatem/liquifynft-sdk","_rev":"4-56e9de44a93bd55632042fde3b129475","name":"@alphabatem/liquifynft-sdk","dist-tags":{"latest":"1.1.15"},"versions":{"1.1.11":{"name":"@alphabatem/liquifynft-sdk","version":"1.1.11","author":{"name":"AlphaBatem Labs"},"license":"MIT","exports":{".":{"import":{"types":"./lib/esm/types/index.d.ts","default":"./lib/esm/index.mjs"},"require":{"types":"./lib/cjs/types/index.d.ts","default":"./lib/cjs/index.js"}}},"types":"./lib/cjs/types/index.d.ts","main":"./lib/cjs/index.js","scripts":{"clean":"rm -rf ./lib","build":"yarn clean && yarn build:esm && yarn build:cjs","build:esm":"tsc -p ./configs/tsconfig.esm.json && mv lib/esm/index.js lib/esm/index.mjs","build:cjs":"tsc -p ./configs/tsconfig.cjs.json","test":"mocha","semantic-release":"semantic-release","prepack":"npm run build"},"release":{"branches":["master"]},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/alphabatem/nft-amm-sdk.git"},"keywords":["npm","javascript","typescript","esm","cjs","nodejs","commonjs","ecmascript","sdk","aggregator","nft"],"devDependencies":{"ts-node":"^10.9.1","typescript":"^4.7.4"},"description":"This SDK Allows you to interface with the LiquifyNFT Aggregator to provide your users the best price to instantly sell any NFT in any token.","bugs":{"url":"https://alphabatem.com"},"homepage":"https://liquifynft.com/","dependencies":{"@solana/web3.js":"^1.73.0","acorn":"^8.8.1","acorn-walk":"^8.2.0","arg":"^4.1.3","create-require":"^1.1.1","diff":"^4.0.2","make-error":"^1.3.6","v8-compile-cache-lib":"^3.0.1","yn":"^3.1.1"},"_id":"@alphabatem/liquifynft-sdk@1.1.11","dist":{"shasum":"da1f24001794a48c04d504d0c653dfad294d8570","integrity":"sha512-NuB3xVMSqqgylzMlX3yp9ZK9isXRYSzmu1qJ505cS71su5yX1Tyrk+DHvxWmbSH7XtuS9UiYx+/cpnlP2enqJw==","tarball":"https://registry.npmjs.org/@alphabatem/liquifynft-sdk/-/liquifynft-sdk-1.1.11.tgz","fileCount":118,"unpackedSize":51412,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEyVzFSwoh6GWdxV9+guESx6VGeHh14fl5F9NKYfMqURAiEA+jUwMINwXrWZXRYwOH7YIRHwPGapyX+NW8Y3Agi7XrM="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj7e8xACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoNwA//YYtn7RYpeEwOdSp++ewXnTxrbroihJBa/6IudCKs0/Bopx0u\r\nMHNgdQZyMyW5IYlyzQ/WtFslDo61G4iKDWUYLpuJMGDakekdcEFp85j6Y4Jd\r\nteFBlU2zV2/R8heF1iBx1y/aAqkckNwL/WXFdkYbFx1ejm4deKe+ArSxCUKH\r\n2MwPjyNGAglfg3PX2RqelW1pkP8txF7CIgGcoCdvSC85y00IRQx/Ucbo7OZV\r\ndRt6cWI7q0bUaz/tnpBHs0aI/YrsJ01BxYG0TDycIt17hpzJp9VFaAnf2wKP\r\neBTrZrYinsWUb4fiPTGEHS56ZqS25Ofx48Sr6yCyn9wxH2aRlNa4L1u6Tr1+\r\nd+34Ym+tvhge/dolcYf1Qcylu1rY+KRBuNBCLVTqlA21QatSHFSXIXV43YTY\r\nBNwKMEXBgzpNhgKd5hRpAg38ILTU1bd1XHQU3WZ0A6uQ3iUUwRUQjTUS8UkH\r\nKL7bt8EMRvByIhfN+hx+zdhWcckJVf5Ftt+cVk8tJhNEeuHvdEd9qyGbSWGO\r\naZiBxoZvU8ftqWsoDQVypuZZTYE0OvFc1wf9s/NqWeam5ad1Swvc0ewdU+/Z\r\nsYsqNn+6sRxfM+/WChY5knfMY1sc1VEeLbDvQnYs+5G2QE8vZkX7LCIqlQZb\r\nyacKFly2oueLCfmPFG3LWoIZO0nBnJfmj+0=\r\n=P3gp\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"cloakd","email":"scotthague10@hotmail.com"},"directories":{},"maintainers":[{"name":"cloakd","email":"scotthague10@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/liquifynft-sdk_1.1.11_1676537649543_0.9833191284112466"},"_hasShrinkwrap":false},"1.1.12":{"name":"@alphabatem/liquifynft-sdk","version":"1.1.12","author":{"name":"AlphaBatem Labs"},"license":"MIT","exports":{".":{"import":{"types":"./lib/esm/types/index.d.ts","default":"./lib/esm/index.mjs"},"require":{"types":"./lib/cjs/types/index.d.ts","default":"./lib/cjs/index.js"}}},"types":"./lib/cjs/types/index.d.ts","main":"./lib/cjs/index.js","scripts":{"clean":"rm -rf ./lib","build":"yarn clean && yarn build:esm && yarn build:cjs","build:esm":"tsc -p ./configs/tsconfig.esm.json && mv lib/esm/index.js lib/esm/index.mjs","build:cjs":"tsc -p ./configs/tsconfig.cjs.json","test":"mocha","semantic-release":"semantic-release","prepack":"npm run build"},"release":{"branches":["master"]},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/alphabatem/nft-amm-sdk.git"},"keywords":["npm","javascript","typescript","esm","cjs","nodejs","commonjs","ecmascript","sdk","aggregator","nft"],"devDependencies":{"ts-node":"^10.9.1","typescript":"^4.7.4"},"description":"This SDK Allows you to interface with the LiquifyNFT Aggregator to provide your users the best price to instantly sell any NFT in any token.","bugs":{"url":"https://alphabatem.com"},"homepage":"https://liquifynft.com","directories":{"lib":"lib"},"dependencies":{"@solana/web3.js":"^1.73.0","acorn":"^8.8.1","acorn-walk":"^8.2.0","arg":"^4.1.3","create-require":"^1.1.1","diff":"^4.0.2","make-error":"^1.3.6","v8-compile-cache-lib":"^3.0.1","yn":"^3.1.1"},"gitHead":"5150d9be19e2703c1b81bd58934ddedfc406f637","_id":"@alphabatem/liquifynft-sdk@1.1.12","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-OERUW/iZdEBeFZWas1OhksWs5ZvMZFErKhrkvW923YYTS9oPK6Az94IwWAVsW5AfkQzgE2H1JHpVZFEn+Jx1vw==","shasum":"d0716c3476b3bbb556e285afc61a140792c09dd9","tarball":"https://registry.npmjs.org/@alphabatem/liquifynft-sdk/-/liquifynft-sdk-1.1.12.tgz","fileCount":104,"unpackedSize":51628,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDsIpuExnprxuz+Z6kMRUSQpY7UpIR3Cdj7zbtV2vk6ZAIhAKpZ3Zf+KUDHDa7VV/+lNyO3YofFWMSyHRK3mUm1mEkx"}]},"_npmUser":{"name":"cloakd","email":"scotthague10@hotmail.com"},"maintainers":[{"name":"cloakd","email":"scotthague10@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/liquifynft-sdk_1.1.12_1687947380881_0.33995068357200675"},"_hasShrinkwrap":false},"1.1.13":{"name":"@alphabatem/liquifynft-sdk","version":"1.1.13","author":{"name":"AlphaBatem Labs"},"license":"MIT","exports":{".":{"import":{"types":"./lib/esm/types/index.d.ts","default":"./lib/esm/index.mjs"},"require":{"types":"./lib/cjs/types/index.d.ts","default":"./lib/cjs/index.js"}}},"types":"./lib/cjs/types/index.d.ts","main":"./lib/cjs/index.js","scripts":{"clean":"rm -rf ./lib","build":"yarn clean && yarn build:esm && yarn build:cjs","build:esm":"tsc -p ./configs/tsconfig.esm.json && mv lib/esm/index.js lib/esm/index.mjs","build:cjs":"tsc -p ./configs/tsconfig.cjs.json","test":"mocha","semantic-release":"semantic-release","prepack":"npm run build"},"release":{"branches":["master"]},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/alphabatem/nft-amm-sdk.git"},"keywords":["npm","javascript","typescript","esm","cjs","nodejs","commonjs","ecmascript","sdk","aggregator","nft"],"devDependencies":{"ts-node":"^10.9.1","typescript":"^4.7.4"},"description":"This SDK Allows you to interface with the LiquifyNFT Aggregator to provide your users the best price to instantly sell any NFT in any token.","bugs":{"url":"https://alphabatem.com"},"homepage":"https://liquifynft.com/","dependencies":{"@solana/web3.js":"^1.73.0","acorn":"^8.8.1","acorn-walk":"^8.2.0","arg":"^4.1.3","create-require":"^1.1.1","diff":"^4.0.2","make-error":"^1.3.6","v8-compile-cache-lib":"^3.0.1","yn":"^3.1.1"},"_id":"@alphabatem/liquifynft-sdk@1.1.13","dist":{"shasum":"9f92c67578c97cbe22dda7ca14391c7db411f215","integrity":"sha512-XWawG/uH3amRJKH301aHT3QGgGMx56tt0LzJDydCDxrc+GxOVwAyLd2CCMpBcrGKbv8YLP5zjgCyk5JVsy3Zqw==","tarball":"https://registry.npmjs.org/@alphabatem/liquifynft-sdk/-/liquifynft-sdk-1.1.13.tgz","fileCount":118,"unpackedSize":51628,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBOIfHN/ywdtwufmRHFghQdcekAtTlfk8BbbQpSnDakcAiAEfxPwXTzfX14FNGhUzTttnBebxgRqEwGTAA58evtrJQ=="}]},"_npmUser":{"name":"cloakd","email":"scotthague10@hotmail.com"},"directories":{},"maintainers":[{"name":"cloakd","email":"scotthague10@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/liquifynft-sdk_1.1.13_1687947518842_0.9299693153296604"},"_hasShrinkwrap":false},"1.1.14":{"name":"@alphabatem/liquifynft-sdk","version":"1.1.14","author":{"name":"AlphaBatem Labs"},"license":"MIT","exports":{".":{"import":{"types":"./lib/esm/types/index.d.ts","default":"./lib/esm/index.mjs"},"require":{"types":"./lib/cjs/types/index.d.ts","default":"./lib/cjs/index.js"}}},"types":"./lib/cjs/types/index.d.ts","main":"./lib/cjs/index.js","scripts":{"clean":"rm -rf ./lib","build":"yarn clean && yarn build:esm && yarn build:cjs","build:esm":"tsc -p ./configs/tsconfig.esm.json && mv lib/esm/index.js lib/esm/index.mjs","build:cjs":"tsc -p ./configs/tsconfig.cjs.json","test":"mocha","semantic-release":"semantic-release","prepack":"npm run build"},"release":{"branches":["master"]},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/alphabatem/nft-amm-sdk.git"},"keywords":["npm","javascript","typescript","esm","cjs","nodejs","commonjs","ecmascript","sdk","aggregator","nft"],"devDependencies":{"ts-node":"^10.9.1","typescript":"^4.7.4"},"description":"This SDK Allows you to interface with the LiquifyNFT Aggregator to provide your users the best price to instantly sell any NFT in any token.","bugs":{"url":"https://alphabatem.com"},"homepage":"https://liquifynft.com/","dependencies":{"@solana/web3.js":"^1.73.0","acorn":"^8.8.1","acorn-walk":"^8.2.0","arg":"^4.1.3","create-require":"^1.1.1","diff":"^4.0.2","make-error":"^1.3.6","v8-compile-cache-lib":"^3.0.1","yn":"^3.1.1"},"_id":"@alphabatem/liquifynft-sdk@1.1.14","dist":{"shasum":"13fe6aceb9a37aa9c96f4f426b42a6d276add9be","integrity":"sha512-G0nWAmdKOjYaIu2mdLuJ4l7M92MMGxrf5E58Xnac0j8zSA447MgzxUetxNQ9opZSKU/uWj2jd0oWB5ptITvD/g==","tarball":"https://registry.npmjs.org/@alphabatem/liquifynft-sdk/-/liquifynft-sdk-1.1.14.tgz","fileCount":118,"unpackedSize":51752,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCD3iev5AWXNiwUUjo6O9dQ1QkStlkmss4GUgZnVlihjwIhAMLQiGV8hxrdw7oBONf2EG5/BW33Qbv/XFGsGtX7DmVs"}]},"_npmUser":{"name":"cloakd","email":"scotthague10@hotmail.com"},"directories":{},"maintainers":[{"name":"cloakd","email":"scotthague10@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/liquifynft-sdk_1.1.14_1687951211337_0.946290106570125"},"_hasShrinkwrap":false},"1.1.15":{"name":"@alphabatem/liquifynft-sdk","version":"1.1.15","author":{"name":"AlphaBatem Labs"},"license":"MIT","exports":{".":{"import":{"types":"./lib/esm/types/index.d.ts","default":"./lib/esm/index.mjs"},"require":{"types":"./lib/cjs/types/index.d.ts","default":"./lib/cjs/index.js"}}},"types":"./lib/cjs/types/index.d.ts","main":"./lib/cjs/index.js","scripts":{"clean":"rm -rf ./lib","build":"yarn clean && yarn build:esm && yarn build:cjs","build:esm":"tsc -p ./configs/tsconfig.esm.json && mv lib/esm/index.js lib/esm/index.mjs","build:cjs":"tsc -p ./configs/tsconfig.cjs.json","test":"mocha","semantic-release":"semantic-release","prepack":"npm run build"},"release":{"branches":["master"]},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/alphabatem/nft-amm-sdk.git"},"keywords":["npm","javascript","typescript","esm","cjs","nodejs","commonjs","ecmascript","sdk","aggregator","nft"],"devDependencies":{"ts-node":"^10.9.1","typescript":"^4.7.4"},"description":"This SDK Allows you to interface with the LiquifyNFT Aggregator to provide your users the best price to instantly sell any NFT in any token.","bugs":{"url":"https://alphabatem.com"},"homepage":"https://liquifynft.com/","dependencies":{"@solana/web3.js":"^1.73.0","acorn":"^8.8.1","acorn-walk":"^8.2.0","arg":"^4.1.3","create-require":"^1.1.1","diff":"^4.0.2","make-error":"^1.3.6","v8-compile-cache-lib":"^3.0.1","yn":"^3.1.1"},"_id":"@alphabatem/liquifynft-sdk@1.1.15","dist":{"shasum":"e914a64c3f23cf2ba7f8cfb389f0b1b1c2bb2d48","integrity":"sha512-0whnr9UoEVQlYt7caBrZbhPpF3gAXyTC/zbMs+vJlgaMZ7OiTDUEW9W21pikjnkl2AZ3o5whW5MDWzGkPRNb1A==","tarball":"https://registry.npmjs.org/@alphabatem/liquifynft-sdk/-/liquifynft-sdk-1.1.15.tgz","fileCount":118,"unpackedSize":52138,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxujwDkgVnsAmohvBkanjvAjMBEYdZxKNxRZJ6IkprNwIhAPiiJ3o1tKUTnfct6KOMLS4ZYM9t9iZX3LlOD6SHVhdv"}]},"_npmUser":{"name":"cloakd","email":"scotthague10@hotmail.com"},"directories":{},"maintainers":[{"name":"cloakd","email":"scotthague10@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/liquifynft-sdk_1.1.15_1688037065939_0.0238460133214089"},"_hasShrinkwrap":false}},"time":{"created":"2023-02-16T08:54:09.483Z","1.1.11":"2023-02-16T08:54:09.703Z","modified":"2023-06-29T11:11:06.234Z","1.1.12":"2023-06-28T10:16:21.109Z","1.1.13":"2023-06-28T10:18:39.027Z","1.1.14":"2023-06-28T11:20:11.500Z","1.1.15":"2023-06-29T11:11:06.112Z"},"maintainers":[{"name":"cloakd","email":"scotthague10@hotmail.com"}],"description":"This SDK Allows you to interface with the LiquifyNFT Aggregator to provide your users the best price to instantly sell any NFT in any token.","homepage":"https://liquifynft.com/","keywords":["npm","javascript","typescript","esm","cjs","nodejs","commonjs","ecmascript","sdk","aggregator","nft"],"repository":{"type":"git","url":"git+https://github.com/alphabatem/nft-amm-sdk.git"},"author":{"name":"AlphaBatem Labs"},"bugs":{"url":"https://alphabatem.com"},"license":"MIT","readme":"# LiquifyNFT SDK\n\nThis SDK Allows you to interface with the LiquifyNFT NFT Aggregator to provide your users the best price to instantly sell any NFT in any token.\n\n## API Reference\n\nAll LiquifyNFT functions can be called directly via API for users not wishing to use the TS package\n\n* [Swagger API Docs](https://api.liquifynft.com/swagger/index.html)\n\n## SDK Reference\n\n- TODO GenDoc\n\n## Examples\n\n### Quote\n\n```js\nconst nft = \"\"\nconst inputMint = \"\"\nconst aToB = true //nftToToken\nconst outputMint = \"\"\nconst slippage = 0.5\nconst walletAddress = \"\"\n\npostQuote(new QuoteRequest(nft, inputMint, outputMint, aToB, slippage, walletAddress)).then(r => {\n\tif (r.error) {\n\t\t//Handle Err\n\t\treturn\n\t}\n\n\t//We have our route - commit to store & start refreshing\n\tconsole.log(\"Available routes\", r.routes)\n})\n```\n\n### Swap\n\n```js\nconst walletAddress = new web3.PublicKey(\"0x0\")\nconst selectedRoute = {} //Route from your quote\nconst priorityFee = 100 //Custom priority fee\n\nconst resp = await postSwap(new SwapRequest(selectedRoute, walletAddress, priorityFee))\nif (resp.error) {\n\tconsole.error(\"Swap failed\", resp.error)\n\t//Handle err\n\treturn\n}\n\n//Convert our raw txns into VersionedTransactions\nconst txns = resp.toTransactions()\n\n//If we can use the `signAllTransactions` method on the wallet - this is preferred to improve UX\nif (wallet.signAllTransactions) {\n\tconst signedTxns = await useWallet().signAllTransactions(txns)\n\tfor (let i = 0; i < signedTxns.length; i++) {\n\t\tlet sig = await this.con.sendRawTransaction(signedTxns[i].serialize(), {\n\t\t\tpreflightCommitment: \"confirmed\",\n\t\t\tskipPreflight: false\n\t\t})\n\n\t\tif (!sig) {\n\t\t\t//Handle err\n\t\t\treturn //Should bail as any other txns will fail after\n\t\t}\n\n\t\t//Handle success\n\t}\n} else {\n\t//Send 1 by 1\n\tfor (let i = 0; i < txns.length; i++) {\n\t\tlet sig = await useWallet().sendTransaction(txns[i], this.con, {\n\t\t\tpreflightCommitment: \"confirmed\",\n\t\t\tskipPreflight: false\n\t\t})\n\n\t\tif (!sig) {\n\t\t\t//Handle err\n\t\t\treturn //Should bail as any other txns will fail after\n\t\t}\n\n\t\t//Handle success\n\t}\n}\n\n//All Txns Sent\nconsole.log(\"Swap Complete\")\n```","readmeFilename":"README.md"}