{"_id":"@bankofai/sun-kit","_rev":"9-c7a248178a5d0f1f4df4b172900c8c45","name":"@bankofai/sun-kit","dist-tags":{"beta":"0.1.0-beta.1","latest":"1.1.0"},"versions":{"0.1.0-beta.0":{"name":"@bankofai/sun-kit","version":"0.1.0-beta.0","keywords":["tron","sunswap","sun.io","defi","sdk"],"author":{"name":"BankOfAI","email":"gummy780j@gmail.com"},"license":"MIT","_id":"@bankofai/sun-kit@0.1.0-beta.0","maintainers":[{"name":"virtual_parson","email":"parson.hu@tron.network"},{"name":"hades.ye","email":"hades.ye@tron.network"},{"name":"leo_tron","email":"leo.wu@tron.network"},{"name":"roger.gan","email":"roger.gan@tron.network"},{"name":"gummy789j","email":"gummy789j@gmail.com"}],"homepage":"https://github.com/BofAI/sun-kit#readme","bugs":{"url":"https://github.com/BofAI/sun-kit/issues"},"dist":{"shasum":"38fc350863f03216762e3e79bc53b6231f867e58","tarball":"https://registry.npmjs.org/@bankofai/sun-kit/-/sun-kit-0.1.0-beta.0.tgz","fileCount":74,"integrity":"sha512-tzIytXD1AELtmNKKlBmXKBzfECV6h3JZp2B5rh3IAGDYGK43s3FREstnHWJBwDpywa1ww0ggHGd9NqHoKORmOg==","signatures":[{"sig":"MEQCIDlnJkrHnYFYYTabNyTnmwHwb74KFJzYBxnEozwHQav7AiAXYODDwpqPB7GLyB2ogA6MwNEMLsLZ2MPwcEbq9FvGkA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":304140},"main":"./dist/index.js","type":"commonjs","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js","require":"./dist/index.js"},"./dist/*":"./dist/*","./package.json":"./package.json"},"gitHead":"00e362b6cb5750ed306494ffe3fcb6315866c1b3","scripts":{"lint":"tsc --noEmit","build":"tsc","clean":"rm -rf dist","publish:beta":"npm publish --tag beta --access public","prepublishOnly":"npm run clean && npm run build","publish:latest":"npm publish --access public"},"_npmUser":{"name":"gummy789j","email":"gummy789j@gmail.com"},"repository":{"url":"git+https://github.com/BofAI/sun-kit.git","type":"git"},"_npmVersion":"11.6.1","description":"SUNSWAP SDK — typed client for SUN.IO read APIs and wallet-dependent on-chain operations (swap, liquidity, positions)","directories":{},"_nodeVersion":"24.7.0","dependencies":{"viem":"^2.0.0","@sun-protocol/permit2-sdk":"^1.0.0","@sun-protocol/universal-router-sdk":"^1.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tronweb":"^6.2.1","typescript":"^5.0.0","@types/node":"^20.0.0"},"peerDependencies":{"tronweb":"^6.2.1"},"peerDependenciesMeta":{"tronweb":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/sun-kit_0.1.0-beta.0_1773253409048_0.8117162670930387","host":"s3://npm-registry-packages-npm-production"}},"0.1.0-beta.1":{"name":"@bankofai/sun-kit","version":"0.1.0-beta.1","keywords":["tron","sunswap","sun.io","defi","sdk"],"author":{"name":"BankOfAI","email":"gummy780j@gmail.com"},"license":"MIT","_id":"@bankofai/sun-kit@0.1.0-beta.1","maintainers":[{"name":"virtual_parson","email":"parson.hu@tron.network"},{"name":"hades.ye","email":"hades.ye@tron.network"},{"name":"leo_tron","email":"leo.wu@tron.network"},{"name":"roger.gan","email":"roger.gan@tron.network"},{"name":"gummy789j","email":"gummy789j@gmail.com"}],"homepage":"https://github.com/BofAI/sun-kit#readme","bugs":{"url":"https://github.com/BofAI/sun-kit/issues"},"dist":{"shasum":"a8c14f7c11b8926fc5991ab0e7af5d0040b46277","tarball":"https://registry.npmjs.org/@bankofai/sun-kit/-/sun-kit-0.1.0-beta.1.tgz","fileCount":74,"integrity":"sha512-9m64A2bmAR0Rnjut8Rq729qix4iuZ4AG0pjsOTDaFQaNpDsHpO360wThgsR+TbzlHDZIjYid4nXcOPm98FNMZA==","signatures":[{"sig":"MEQCIHcBVPi38Hps4C1DocTQbkrGnY/42r8PdhPZgFnHuKfgAiA+g8aKTCeVgJHVpq5OMxIQHV+rSld58Ti6NaRTo6OZkg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":312367},"main":"./dist/index.js","type":"commonjs","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js","require":"./dist/index.js"},"./dist/*":"./dist/*","./package.json":"./package.json"},"gitHead":"2e12cd1994cc1e2b6d609d208d6a1123fd2e675f","scripts":{"lint":"tsc --noEmit","test":"jest","build":"tsc","clean":"rm -rf dist","test:watch":"jest --watch","publish:beta":"npm publish --tag beta --access public","test:coverage":"jest --coverage","prepublishOnly":"npm run clean && npm run build","publish:latest":"npm publish --access public"},"_npmUser":{"name":"gummy789j","email":"gummy789j@gmail.com"},"repository":{"url":"git+https://github.com/BofAI/sun-kit.git","type":"git"},"_npmVersion":"11.6.1","description":"SUNSWAP SDK — typed client for SUN.IO read APIs and wallet-dependent on-chain operations (swap, liquidity, positions)","directories":{},"_nodeVersion":"24.7.0","dependencies":{"viem":"^2.0.0","@sun-protocol/permit2-sdk":"^1.0.0","@sun-protocol/universal-router-sdk":"^1.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"^29.7.0","dotenv":"^16.0.0","tronweb":"^6.2.1","ts-jest":"^29.1.0","ts-node":"^10.9.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0"},"peerDependencies":{"tronweb":"^6.2.1"},"peerDependenciesMeta":{"tronweb":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/sun-kit_0.1.0-beta.1_1773320439814_0.40432459868690995","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@bankofai/sun-kit","version":"1.0.0","keywords":["tron","sunswap","sun.io","defi","sdk"],"author":{"name":"BankOfAI","email":"gummy780j@gmail.com"},"license":"MIT","_id":"@bankofai/sun-kit@1.0.0","maintainers":[{"name":"virtual_parson","email":"parson.hu@tron.network"},{"name":"hades.ye","email":"hades.ye@tron.network"},{"name":"leo_tron","email":"leo.wu@tron.network"},{"name":"roger.gan","email":"roger.gan@tron.network"},{"name":"gummy789j","email":"gummy789j@gmail.com"},{"name":"wzc1206","email":"david.wang@tron.network"}],"homepage":"https://github.com/BofAI/sun-kit#readme","bugs":{"url":"https://github.com/BofAI/sun-kit/issues"},"dist":{"shasum":"102c96799a041ad14df6c53b31334822e0023f3b","tarball":"https://registry.npmjs.org/@bankofai/sun-kit/-/sun-kit-1.0.0.tgz","fileCount":74,"integrity":"sha512-nehNK+9/BPS8ABdo7bgeykwctPYoXQQY3iW1KPwCGgQAJmAj4dqVrcbx4tuRgj3Z+2eN8QAhTFjve8yI0ZXFFg==","signatures":[{"sig":"MEQCIBY3DeTAX4JhCFlwp7sMbyFqn4tyWJ/i2iu2+7QoSviTAiBLWqdtpgjW7v9aAHQFHbmTD+H03qbCn29iVf5+Y5pEXQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":312360},"main":"./dist/index.js","type":"commonjs","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js","require":"./dist/index.js"},"./dist/*":"./dist/*","./package.json":"./package.json"},"gitHead":"82ec707e0afa29f33ff0f99c7e6a4e9668d6b657","scripts":{"lint":"tsc --noEmit","test":"jest","build":"tsc","clean":"rm -rf dist","test:watch":"jest --watch","publish:beta":"npm publish --tag beta --access public","test:coverage":"jest --coverage","prepublishOnly":"npm run clean && npm run build","publish:latest":"npm publish --access public"},"_npmUser":{"name":"gummy789j","email":"gummy789j@gmail.com"},"repository":{"url":"git+https://github.com/BofAI/sun-kit.git","type":"git"},"_npmVersion":"11.6.1","description":"SUNSWAP SDK — typed client for SUN.IO read APIs and wallet-dependent on-chain operations (swap, liquidity, positions)","directories":{},"_nodeVersion":"24.7.0","dependencies":{"viem":"^2.0.0","@sun-protocol/permit2-sdk":"^1.0.0","@sun-protocol/universal-router-sdk":"^1.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","dotenv":"^16.0.0","tronweb":"^6.2.1","ts-jest":"^29.1.0","ts-node":"^10.9.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0"},"peerDependencies":{"tronweb":"^6.2.1"},"peerDependenciesMeta":{"tronweb":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/sun-kit_1.0.0_1773408969158_0.917304673981052","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@bankofai/sun-kit","version":"1.1.0","keywords":["tron","sunswap","sun.io","defi","sdk"],"author":{"name":"BankOfAI","email":"gummy780j@gmail.com"},"license":"MIT","_id":"@bankofai/sun-kit@1.1.0","maintainers":[{"name":"virtual_parson","email":"parson.hu@tron.network"},{"name":"hades.ye","email":"hades.ye@tron.network"},{"name":"leo_tron","email":"leo.wu@tron.network"},{"name":"roger.gan","email":"roger.gan@tron.network"},{"name":"gummy789j","email":"gummy789j@gmail.com"},{"name":"wzc1206","email":"david.wang@tron.network"},{"name":"bobo123123hhh","email":"bobo.liu@tron.network"}],"homepage":"https://github.com/BofAI/sun-kit#readme","bugs":{"url":"https://github.com/BofAI/sun-kit/issues"},"dist":{"shasum":"925e07920cbeb45af181c308d5e38f63919fe0b6","tarball":"https://registry.npmjs.org/@bankofai/sun-kit/-/sun-kit-1.1.0.tgz","fileCount":74,"integrity":"sha512-1aBKKuvRxXWdJ7TboC2KkkaOnlzuCKJNGQdwZSZP0V3Oevq27GUCJlRoMFM+FHR3zjTAUZelYa3CKHzlMgOIxw==","signatures":[{"sig":"MEUCIQDQ9LTvr+oBkYiGR6S3h12NSUDg7cqW1kOWOnT4TlfQZgIgH+uSJnVYn1yb2AkLH5FGxuacuzpbRN5iHLZ6jatUEdU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":312363},"main":"./dist/index.js","type":"commonjs","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js","require":"./dist/index.js"},"./dist/*":"./dist/*","./package.json":"./package.json"},"gitHead":"0e0b7d1d6b38689444645e28483378b078054cc6","scripts":{"lint":"tsc --noEmit","test":"jest","build":"tsc","clean":"rm -rf dist","test:watch":"jest --watch","publish:beta":"npm publish --tag beta --access public","test:coverage":"jest --coverage","prepublishOnly":"npm run clean && npm run build","publish:latest":"npm publish --access public"},"_npmUser":{"name":"gummy789j","email":"gummy789j@gmail.com"},"repository":{"url":"git+https://github.com/BofAI/sun-kit.git","type":"git"},"_npmVersion":"11.11.1","description":"SUNSWAP SDK — typed client for SUN.IO read APIs and wallet-dependent on-chain operations (swap, liquidity, positions)","directories":{},"_nodeVersion":"24.7.0","dependencies":{"viem":"^2.0.0","@sun-protocol/permit2-sdk":"^1.0.0","@sun-protocol/universal-router-sdk":"^1.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","dotenv":"^16.0.0","tronweb":"^6.2.1","ts-jest":"^29.1.0","ts-node":"^10.9.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0"},"peerDependencies":{"tronweb":"^6.2.1"},"peerDependenciesMeta":{"tronweb":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/sun-kit_1.1.0_1774939318267_0.6042748765556356","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-03-11T18:23:28.946Z","modified":"2026-09-16T08:35:50.099Z","0.1.0-beta.0":"2026-03-11T18:23:29.190Z","0.1.0-beta.1":"2026-03-12T13:00:39.959Z","1.0.0":"2026-03-13T13:36:09.473Z","1.1.0":"2026-03-31T06:41:58.410Z"},"bugs":{"url":"https://github.com/BofAI/sun-kit/issues"},"author":{"name":"BankOfAI","email":"gummy780j@gmail.com"},"license":"MIT","homepage":"https://github.com/BofAI/sun-kit#readme","keywords":["tron","sunswap","sun.io","defi","sdk"],"repository":{"url":"git+https://github.com/BofAI/sun-kit.git","type":"git"},"description":"SUNSWAP SDK — typed client for SUN.IO read APIs and wallet-dependent on-chain operations (swap, liquidity, positions)","maintainers":[{"email":"parson.hu@tron.network","name":"virtual_parson"},{"email":"roger.gan@tron.network","name":"roger.gan"},{"email":"gummy789j@gmail.com","name":"gummy789j"},{"email":"david.wang@tron.network","name":"wzc1206"},{"email":"bobo.liu@tron.network","name":"bobo123123hhh"},{"email":"zerodevblock@gmail.com","name":"zerodev0"},{"email":"leon.zhang@tron.network","name":"leonatmoon"}],"readme":"# @bankofai/sun-kit\n\nTypeScript SDK for [SUN.IO](https://sun.io) / SUNSWAP on the TRON blockchain.\n\nProvides two entry points:\n\n- **`SunAPI`** — typed HTTP client for all SUN.IO read-only endpoints (pools, tokens, prices, positions, farms, etc.). Zero dependencies beyond `fetch`.\n- **`SunKit`** — wallet-dependent on-chain operations (swap, liquidity, positions, contract calls). Requires `tronweb`.\n\nBuilt as a shared library for [@bankofai/sun-mcp-server](https://github.com/AnotherOneNewCoder/sun-mcp-server) and the upcoming `sun-cli`.\n\n## Install\n\n```bash\nnpm install @bankofai/sun-kit\n# tronweb is an optional peer dep — install it if you use SunKit (on-chain ops)\nnpm install tronweb\n```\n\n## Quick Start\n\n### Read-only: SunAPI\n\n```typescript\nimport { SunAPI } from '@bankofai/sun-kit'\n\nconst api = new SunAPI()\n\n// Get token prices\nconst prices = await api.getPrice({ symbol: 'TRX,USDT' })\nconsole.log(prices.data)\n\n// Search pools\nconst pools = await api.searchPools({ query: 'USDT', protocol: 'V3' })\n\n// Get user positions\nconst positions = await api.getUserPositions({ userAddress: 'TXxx...' })\n```\n\nNo wallet, no tronweb — just HTTP.\n\n### On-chain: SunKit\n\n```typescript\nimport { SunKit, type Wallet } from '@bankofai/sun-kit'\n\n// You provide a Wallet implementation (see below)\nconst kit = new SunKit({\n  wallet: myWallet,\n  network: 'mainnet', // or 'nile' for testnet\n  tronGridApiKey: process.env.TRON_GRID_API_KEY,\n})\n\n// Swap tokens via Universal Router (auto route-finding + Permit2)\nconst result = await kit.swap({\n  tokenIn: 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t',  // USDT\n  tokenOut: 'T9yD14Nj9j7xAB4dbGeiX9h8unkKHxuWwb',  // TRX\n  amountIn: '1000000', // 1 USDT (6 decimals)\n  slippage: 0.005,\n})\nconsole.log(`txid: ${result.txid}`)\n\n// Add V2 liquidity\nawait kit.addLiquidityV2({\n  routerAddress: 'TKzxdSv2FZKQrEqkKVgp5DcwEXBEKMg2Ax',\n  tokenA: 'TXYZopYRdj2D9XRtbG411XZZ3kM5VkAeBf',\n  tokenB: 'T9yD14Nj9j7xAB4dbGeiX9h8unkKHxuWwb',\n  amountADesired: '1000000',\n  amountBDesired: '2000000',\n})\n\n// Mint a V3 concentrated liquidity position\nawait kit.mintPositionV3({\n  positionManagerAddress: 'T...',\n  token0: 'T...',\n  token1: 'T...',\n  fee: 3000,\n  tickLower: -887220,\n  tickUpper: 887220,\n  amount0Desired: '1000000',\n  amount1Desired: '2000000',\n})\n\n// Read any contract (view/pure)\nconst totalSupply = await kit.readContract({\n  address: 'TTokenAddr',\n  functionName: 'totalSupply',\n})\n\n// Get TRX and TRC20 balances\nconst balances = await kit.getBalances({\n  ownerAddress: 'TYour...',\n  tokens: [\n    { address: '', type: 'TRX' },\n    { address: '', type: 'TRC20', tokenAddress: 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t' },\n  ],\n})\n```\n\n## Wallet Interface\n\nsun-kit does **not** ship a wallet implementation. You bring your own:\n\n```typescript\nimport type { Wallet } from '@bankofai/sun-kit'\n\nclass MyWallet implements Wallet {\n  readonly type = 'my-wallet'\n\n  async getAddress(): Promise<string> { /* ... */ }\n  async getTronWeb(network?: string): Promise<TronWeb> { /* ... */ }\n  async signAndBroadcast(unsignedTx: Record<string, unknown>, network?: string) {\n    // Sign the transaction and broadcast it\n    return { result: true, txid: '...' }\n  }\n  async signMessage(message: string): Promise<string> { /* ... */ }\n  async signTypedData(primaryType, domain, types, message): Promise<string> { /* ... */ }\n}\n```\n\nReference implementations:\n- `LocalWallet` (raw private key) — see [sun-mcp-server/src/wallet/local-wallet.ts](https://github.com/AnotherOneNewCoder/sun-mcp-server)\n- `AgentWalletAdapter` (encrypted agent-wallet) — see [sun-mcp-server/src/wallet/agent-wallet-adapter.ts](https://github.com/AnotherOneNewCoder/sun-mcp-server)\n\n## API Reference\n\n### SunAPI Methods\n\nAll methods return `Promise<ApiResponse<T>>`.\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| `getPrice(params)` | `GET /apiv2/price` | Token prices by address or symbol |\n| `getTokens(params)` | `GET /apiv2/tokens` | List tokens |\n| `searchTokens(params)` | `GET /apiv2/tokens/search` | Search tokens by keyword |\n| `getPools(params)` | `GET /apiv2/pools` | List pools |\n| `searchPools(params)` | `GET /apiv2/pools/search` | Search pools |\n| `searchCountPools(params)` | `GET /apiv2/pools/search/count` | Count matching pools |\n| `getTopApyPoolList(params)` | `GET /apiv2/pools/top_apy_list` | Top APY pools |\n| `getPoolVolHistory(params)` | `GET /apiv2/pools/history/vol` | Pool volume history |\n| `getPoolLiqHistory(params)` | `GET /apiv2/pools/history/liq` | Pool liquidity history |\n| `getPoolHooks()` | `GET /apiv2/pools/hooks` | Pool hooks |\n| `getUserPositions(params)` | `GET /apiv2/positions/user` | User liquidity positions |\n| `getPoolUserPositionTick(params)` | `GET /apiv2/positions/tick` | Position tick info |\n| `getPairs(params)` | `GET /apiv2/pairs` | Token pairs |\n| `getFarms(params)` | `GET /apiv2/farms` | Yield farms |\n| `getFarmTransactions(params)` | `GET /apiv2/farms/transactions` | Farm transactions |\n| `getFarmPositions(params)` | `GET /apiv2/farms/positions/user` | User farm positions |\n| `scanTransactions(params)` | `GET /apiv2/transactions/scan` | Transaction history |\n| `getProtocol(params)` | `GET /apiv2/protocols` | Protocol overview |\n| `getVolHistory(params)` | `GET /apiv2/protocols/history/vol` | Protocol volume history |\n| `getLiqHistory(params)` | `GET /apiv2/protocols/history/liq` | Protocol liquidity history |\n| `getUsersCountHistory(params)` | `GET /apiv2/protocols/history/usersCount` | User count history |\n| `getTransactionsHistory(params)` | `GET /apiv2/protocols/history/transactions` | Transaction count history |\n| `getPoolsCountHistory(params)` | `GET /apiv2/protocols/history/poolsCount` | Pool count history |\n\n### SunKit Methods\n\n| Method | Wallet Required | Description |\n|--------|:-:|-------------|\n| `getBalances(params)` | | TRX and TRC20 balances |\n| `readContract(params)` | | Call view/pure contract functions |\n| `getReadonlyTronWeb(network?)` | | Get a read-only TronWeb instance |\n| `quoteExactInput(params)` | | Quote a swap via smart router |\n| `sendContractTx(params)` | Yes | Send a state-changing contract call |\n| `ensureTokenAllowance(params)` | Yes | Approve token if allowance is insufficient |\n| `swapExactInput(params)` | Yes | Low-level router swap |\n| `swap(params)` | Yes | High-level swap (auto route + Permit2) |\n| `addLiquidityV2(params)` | Yes | Add V2 liquidity (auto TRX/ETH detection) |\n| `removeLiquidityV2(params)` | Yes | Remove V2 liquidity |\n| `mintPositionV3(params)` | Yes | Mint a new V3 concentrated position |\n| `increaseLiquidityV3(params)` | Yes | Increase V3 position liquidity |\n| `decreaseLiquidityV3(params)` | Yes | Decrease V3 position liquidity |\n| `modifyLiquidityV4(params)` | Yes | *Stub — not yet implemented* |\n| `createToken(params)` | Yes | *Stub — not yet implemented* |\n| `pumpSwap(params)` | Yes | *Stub — not yet implemented* |\n\n## Networks\n\n```typescript\nimport { TronNetwork, getNetworkConfig, NETWORKS } from '@bankofai/sun-kit'\n\ngetNetworkConfig('mainnet')  // or 'tron', 'trx'\ngetNetworkConfig('nile')     // or 'testnet'\ngetNetworkConfig('shasta')\n```\n\n## Constants\n\nPre-configured contract addresses for common use:\n\n```typescript\nimport {\n  TRX_ADDRESS,\n  WTRX_MAINNET,\n  SUNSWAP_V2_MAINNET_ROUTER,\n  SUNSWAP_V2_MAINNET_FACTORY,\n  SUNSWAP_V2_NILE_ROUTER,\n  SUNSWAP_V3_MAINNET_FACTORY,\n  SUNSWAP_V3_MAINNET_POSITION_MANAGER,\n  // ...\n} from '@bankofai/sun-kit'\n```\n\n## Error Handling\n\nAll errors thrown by SunKit are instances of `SunKitError`:\n\n```typescript\nimport { SunKitError } from '@bankofai/sun-kit'\n\ntry {\n  await kit.swap({ ... })\n} catch (err) {\n  if (err instanceof SunKitError) {\n    console.error(err.code, err.message)\n  }\n}\n```\n\nError codes:\n\n| Code | Description |\n|------|-------------|\n| `NO_WALLET` | Write operation attempted without a wallet |\n| `NOT_IMPLEMENTED` | Stub method (V4, SunPump) |\n| `NO_ROUTE` | Swap route not found |\n| `UNSUPPORTED_NETWORK` | Network not supported |\n| `CONTRACT_READ_FAILED` | Contract read call failed |\n| `BROADCAST_FAILED` | Transaction broadcast failed |\n| `POOL_NOT_FOUND` | V2 pair does not exist |\n| `ALLOWANCE_FAILED` | Token approve failed |\n| `API_ERROR` | SunAPI HTTP error |\n\n## Architecture\n\n```\n@bankofai/sun-kit\n├── SunAPI          (read-only HTTP, zero deps)\n│   └── 23 typed methods -> SUN.IO open API\n│\n├── SunKit          (wallet-dependent, needs tronweb)\n│   ├── swap        Universal Router + Permit2\n│   ├── liquidity   V2 add/remove, V3 mint/increase/decrease\n│   ├── contracts   read, send, approve\n│   ├── balances    TRX + TRC20\n│   └── stubs       V4 liquidity, SunPump\n│\n├── Wallet          interface only (consumers implement)\n├── chains          network configs (mainnet, nile, shasta)\n└── constants       contract addresses, ABIs\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}