{"_id":"@biorswap/sdk","_rev":"3-7889991ea53e66568ae968b30e7a6989","name":"@biorswap/sdk","dist-tags":{"latest":"0.0.4"},"versions":{"0.0.1":{"name":"@biorswap/sdk","version":"0.0.1","keywords":["Biorswap","SDK","Cross-Chain","Multi-Chain","DeFi","Swap"],"author":{"name":"biorswap"},"license":"GPL-3.0","_id":"@biorswap/sdk@0.0.1","maintainers":[{"name":"keithagroves","email":"keithalgroves@gmail.com"}],"homepage":"https://github.com/Biorswap/biorlabs#readme","bugs":{"url":"https://github.com/Biorswap/biorlabs/issues"},"dist":{"shasum":"8106dd6652adadf5691f1ea203ac0da99876b2c6","tarball":"https://registry.npmjs.org/@biorswap/sdk/-/sdk-0.0.1.tgz","fileCount":107,"integrity":"sha512-U5IRLIaLPvmvUpBLfmYs3FvfHA18mZpDtd0OSUBJH0kIsGLr9vVtZi7BPxPxH8iVtC6wJe8Zv3S/Qq5p6W1uDw==","signatures":[{"sig":"MEUCIQCf+lAJBsbezdDzr20wdrOjjMZ+SQlfNwKBHTtDKG6cAgIga3IRvou2gc30IQGSjB1d+XxjI+quO37SmoTK7K5HJzI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":114456},"main":"lib/index.js","type":"module","types":"lib","gitHead":"f51c5ad85d040a505aabc453eb5f13fc76e218e9","scripts":{"lint":"eslint */**/*.{js,ts} --quiet --fix","test":"jest --config jestconfig.json","build":"tsc","clean":"rm -rf lib","format":"prettier --write './**/*.{js,jsx,ts,tsx,css,md,json}' --config ./.prettierrc.json"},"_npmUser":{"name":"keithagroves","email":"keithalgroves@gmail.com"},"repository":{"url":"git+https://github.com/Biorswap/biorlabs.git","type":"git","directory":"packages/api"},"_npmVersion":"10.9.2","description":"Official TypeScript SDK for the Biorswap Exchange","directories":{},"_nodeVersion":"22.17.0","dependencies":{"uuid":"^13.0.0","axios":"^1.13.5","@types/node":"^20.12.2","bignumber.js":"^9.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"^8.57.0","ts-jest":"^29.1.2","prettier":"^3.2.5","typescript":"^5.4.3","@types/jest":"^29.5.12","@types/uuid":"^10.0.0","eslint-plugin-import":"^2.29.1","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.3","@typescript-eslint/parser":"^7.5.0","@typescript-eslint/eslint-plugin":"^7.5.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.0.1_1772673474056_0.6026919604228735","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@biorswap/sdk","version":"0.0.3","keywords":["Biorswap","SDK","Cross-Chain","Multi-Chain","DeFi","Swap"],"author":{"name":"biorswap"},"license":"GPL-3.0","_id":"@biorswap/sdk@0.0.3","maintainers":[{"name":"keithagroves","email":"keithalgroves@gmail.com"}],"homepage":"https://github.com/Biorswap/biorlabs#readme","bugs":{"url":"https://github.com/Biorswap/biorlabs/issues"},"dist":{"shasum":"597e7071e8f04f9ccfa63f25b27b4565b4b29a94","tarball":"https://registry.npmjs.org/@biorswap/sdk/-/sdk-0.0.3.tgz","fileCount":107,"integrity":"sha512-tMOAaO0KgEceni11QGlNu1vsZQEVE2HyFu306PMHvBBk9AB6ikl1oe00fNCx8Dq49/VCdM44TNeOInaJ6gnMqw==","signatures":[{"sig":"MEUCIE/R8hEs8CZEXqbhJDqihg4QvHSs6vCZMZZSI/RJoEYIAiEA+8TJm8p0DlWwNQiFsqDXXxr20X+oVhNfIeXrzO23yrw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":116740},"main":"lib/index.js","type":"module","types":"lib","gitHead":"913ba09760bc3fe4a0f31c82d65fc5f1c36a364f","scripts":{"lint":"eslint src/**/*.{js,ts} --quiet --fix","test":"jest --config jestconfig.json","build":"tsc","clean":"rm -rf lib","format":"prettier --write './**/*.{js,jsx,ts,tsx,css,md,json}' --config ./.prettierrc.json"},"_npmUser":{"name":"keithagroves","email":"keithalgroves@gmail.com"},"repository":{"url":"git+https://github.com/Biorswap/biorlabs.git","type":"git","directory":"packages/api"},"_npmVersion":"10.9.2","description":"Official TypeScript SDK for the Biorswap Exchange","directories":{},"_nodeVersion":"22.17.0","dependencies":{"uuid":"^13.0.0","axios":"^1.13.5","@types/node":"^20.12.2","bignumber.js":"^9.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"^8.57.0","ts-jest":"^29.1.2","prettier":"^3.2.5","typescript":"^5.4.3","@types/jest":"^29.5.12","@types/uuid":"^10.0.0","eslint-plugin-import":"^2.29.1","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.3","@typescript-eslint/parser":"^7.5.0","@typescript-eslint/eslint-plugin":"^7.5.0"},"_npmOperationalInternal":{"tmp":"tmp/sdk_0.0.3_1777403022143_0.533461559970978","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@biorswap/sdk","version":"0.0.4","description":"Official TypeScript SDK for the Biorswap Exchange","type":"module","main":"lib/index.js","types":"lib","repository":{"type":"git","url":"git+https://github.com/Biorswap/biorlabs.git","directory":"packages/api"},"scripts":{"test":"jest --config jestconfig.json","build":"tsc","lint":"eslint \"src/**/*.ts\" --quiet --fix","format":"prettier --write './**/*.{js,jsx,ts,tsx,css,md,json}' --config ./.prettierrc.json","clean":"rm -rf lib"},"keywords":["Biorswap","SDK","Cross-Chain","Multi-Chain","DeFi","Swap"],"author":{"name":"biorswap"},"license":"GPL-3.0","devDependencies":{"@types/jest":"^29.5.12","@types/uuid":"^10.0.0","@typescript-eslint/eslint-plugin":"^7.5.0","@typescript-eslint/parser":"^7.5.0","@typescript-eslint/types":"^7.5.0","eslint":"^8.57.0","eslint-config-prettier":"^9.1.0","eslint-plugin-import":"^2.29.1","eslint-plugin-prettier":"^5.1.3","jest":"^29.7.0","prettier":"^3.2.5","ts-jest":"^29.1.2","typescript":"^5.4.3"},"dependencies":{"@types/node":"^20.12.2","axios":"^1.13.5","bignumber.js":"^9.1.2","uuid":"^13.0.0"},"publishConfig":{"access":"public"},"_id":"@biorswap/sdk@0.0.4","gitHead":"994c1128a808a06a616c5b33db2a74a14188e0ed","bugs":{"url":"https://github.com/Biorswap/biorlabs/issues"},"homepage":"https://github.com/Biorswap/biorlabs#readme","_nodeVersion":"22.17.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-CHHisqSyE3c4XWRn1r07dTWLAORZVgY5tW2cPi0BzARwxPCgc7wtTROmT55YXznBgJiAuvUw75AAKLVGdW6s4g==","shasum":"cabdfe62461ec8dd6e4df29ee465aeb232ee0f60","tarball":"https://registry.npmjs.org/@biorswap/sdk/-/sdk-0.0.4.tgz","fileCount":107,"unpackedSize":117216,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCt2xVVHU+oL4G/R/s+rfeHU8K3YzigO0ZIhrC3AoXj6QIgB+IjIyOWg6nCWOVeOX6k1LrZed97vPfnp49sTGhkpc8="}]},"_npmUser":{"name":"keithagroves","email":"keithalgroves@gmail.com"},"directories":{},"maintainers":[{"name":"keithagroves","email":"keithalgroves@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_0.0.4_1777750990105_0.5876044330323107"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-05T01:17:53.993Z","modified":"2026-05-02T19:43:10.444Z","0.0.1":"2026-03-05T01:17:54.221Z","0.0.3":"2026-04-28T19:03:42.306Z","0.0.4":"2026-05-02T19:43:10.291Z"},"bugs":{"url":"https://github.com/Biorswap/biorlabs/issues"},"author":{"name":"biorswap"},"license":"GPL-3.0","homepage":"https://github.com/Biorswap/biorlabs#readme","keywords":["Biorswap","SDK","Cross-Chain","Multi-Chain","DeFi","Swap"],"repository":{"type":"git","url":"git+https://github.com/Biorswap/biorlabs.git","directory":"packages/api"},"description":"Official TypeScript SDK for the Biorswap Exchange","maintainers":[{"name":"keithagroves","email":"keithalgroves@gmail.com"}],"readme":"# @biorswap/sdk\n\n[![npm version](https://badge.fury.io/js/%40biorswap%2Fsdk.svg)](https://www.npmjs.com/package/@biorswap/sdk)\n[![license](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://github.com/Biorswap/biorlabs/blob/main/LICENSE)\n\nThe official TypeScript SDK for integrating [Biorswap Exchange](https://biorswap.exchange) into your dApp. Access cross-chain swaps, real-time asset data, price history, and transaction management through a simple, typed API.\n\n## Installation\n\n```bash\nnpm install @biorswap/sdk\n```\n\n## Quick Start\n\n```typescript\nimport { SwapClient, AssetsClient } from '@biorswap/sdk';\n\nconst swapClient = new SwapClient({ apiKey: 'YOUR_API_KEY' });\nconst assetsClient = new AssetsClient({ apiKey: 'YOUR_API_KEY' });\n\n// Fetch supported assets\nconst assets = await assetsClient.getAllAssets();\n\n// Get a swap quote\nconst quote = await swapClient.getSwapQuote({\n  from: 'ETH.ETH',\n  to: 'BSC.BNB',\n  amount: '1000000000000000000',\n});\n```\n\n## Clients\n\n### `AssetsClient`\n\nQuery assets and price data across all supported chains.\n\n| Method | Description |\n|---|---|\n| `getAllAssets(start?, limit?, name?)` | Paginated list of all supported assets |\n| `getAssets(formattedAssetIds)` | Fetch specific assets by ID |\n| `getAsset(assetId, price?)` | Fetch a single asset with optional price |\n| `getAssetPriceHistory(assetId, time, timeType?)` | Historical price data for an asset |\n\n### `SwapClient`\n\nExecute and manage cross-chain swaps end-to-end.\n\n| Method | Description |\n|---|---|\n| `getSwapMetadata(params)` | Supported chains, tokens, and swappers |\n| `getAssetsBySearchQuery(params)` | Search assets by name or symbol |\n| `getBalance(input)` | Wallet balance across chains |\n| `getSwapQuote(input)` | Get the best single swap route |\n| `getMultipleSwapQuotes(input)` | Compare multiple routes |\n| `confirmSwap(input)` | Confirm a quote and initiate the swap |\n| `getGasEstimate(input)` | Estimate gas for a swap |\n| `getSwapTransaction(input)` | Retrieve a swap transaction payload |\n| `checkApproval(input)` | Check token approval status |\n| `checkStatus(input)` | Poll swap execution status |\n| `getSwapTransactionHistory(addresses)` | Full transaction history for addresses |\n| `reportSwapFailure(input)` | Report a failed swap |\n| `getAffiliateDashboard(address)` | Affiliate stats for an address |\n| `createAffiliateLink(input)` | Generate an affiliate referral link |\n\n## Supported Chains\n\nBiorswap supports swaps across EVM chains (Ethereum, BNB Chain, Polygon, Avalanche, and more), Solana, Cosmos-based chains, Starknet, and Terra. See the full list in the [docs](https://docs.biorswap.exchange/integration/overview).\n\n## Documentation & Examples\n\n- [Integration Guide](https://docs.biorswap.exchange/integration/overview)\n- [Examples](https://github.com/Biorswap/biorlabs/tree/main/packages/api/examples/)\n  - [MetaMask (EVM)](examples/metamask-example/)\n  - [Phantom (Solana)](examples/phantom-example/)\n  - [Keplr (Cosmos)](examples/keplr-example/)\n  - [Terra](examples/terra-example/)\n\n## Development\n\n```bash\n# Build\nnpm run build\n\n# Test\nnpm run test\n```\n\n## License\n\nGPL-3.0 © [Biorswap](https://biorswap.exchange)\n","readmeFilename":"README.md"}