{"_id":"@aqua-solvent/core","_rev":"6-533457965094a3095b0cabd112d151ac","name":"@aqua-solvent/core","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.0":{"name":"@aqua-solvent/core","version":"0.1.0","keywords":["solvent","1inch","aqua","swapvm","market-making","thegraph","defi"],"license":"MIT","_id":"@aqua-solvent/core@0.1.0","maintainers":[{"name":"aman0035","email":"aman@push.org"}],"homepage":"https://github.com/Aman035/solvent#readme","bugs":{"url":"https://github.com/Aman035/solvent/issues"},"dist":{"shasum":"982763df48d41b1be552d60bd875f6f071d99c10","tarball":"https://registry.npmjs.org/@aqua-solvent/core/-/core-0.1.0.tgz","fileCount":35,"integrity":"sha512-r1SlmYk+Hox12ygJ/TQModyxm+XJ9/AIHmzS2Y+9kuUSh4OH+QURnhJcwFb1Qtzlj6Ysjq9DmM2dwvvTSmDDwA==","signatures":[{"sig":"MEYCIQCT9O6EA3TKeFHxHzxuf9LSWF0kfAn4KafLX4fKzVWJCQIhAMuBgyf3xINkyOVMky3g6vDzzsdUfawH/rPk2Iez40sK","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":73807},"main":"src/index.ts","type":"module","gitHead":"02f05b69f56b56a7663505c8a85b8b91da9f416b","scripts":{"build":"tsc -p tsconfig.build.json","prepack":"pnpm build"},"_npmUser":{"name":"aman0035","email":"aman@push.org"},"deprecated":"Broken package layout, use 0.1.1 or later.","repository":{"url":"git+https://github.com/Aman035/solvent.git","type":"git","directory":"packages/core"},"_npmVersion":"11.2.0","description":"SDK for Solvent: solvency-aware market making on 1inch Aqua. Maker balance sheets on four chains, SwapVM program building, and the settlement score.","directories":{},"_nodeVersion":"23.7.0","dependencies":{"zod":"^3.24.1","viem":"^2.21.55","dotenv":"^16.4.7"},"publishConfig":{"main":"dist/index.js","types":"dist/index.d.ts","access":"public","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}}},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2"},"_npmOperationalInternal":{"tmp":"tmp/core_0.1.0_1788894320885_0.5676293020394254","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@aqua-solvent/core","version":"0.1.1","keywords":["solvent","1inch","aqua","swapvm","market-making","thegraph","defi"],"license":"MIT","_id":"@aqua-solvent/core@0.1.1","maintainers":[{"name":"aman0035","email":"aman@push.org"}],"homepage":"https://github.com/Aman035/solvent#readme","bugs":{"url":"https://github.com/Aman035/solvent/issues"},"dist":{"shasum":"4a25c01bb3f5ac4ff2a543d5ce8f92e32fa51f2d","tarball":"https://registry.npmjs.org/@aqua-solvent/core/-/core-0.1.1.tgz","fileCount":34,"integrity":"sha512-0sbrL8MuClrZgCwUhvtqVbFVnvbWLfH7KyudPecGLJvLxr53Ee3gvVITAkZXAY1xozVkW9dfs6z4T4l7VZ0gFw==","signatures":[{"sig":"MEUCIQDOit+X/4aniFAz22OLXwe0w88gCpMTatQgkFGrsmgW/AIgSb1leqvI+c+zQDSVLgcnIZzfGfnJkKJjrIgO51su/BE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQDrKoUTrs8aX26PgQgLigC5/m2oh1Rh9uMF53Y5YaJU9QIhAPF+tUJMxlDEADIGyA9zCg4976Lu3IfJPeofSfmtrsmi","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":73457},"main":"dist/index.js","type":"module","_from":"file:aqua-solvent-core-0.1.1.tgz","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"build":"tsc -p tsconfig.build.json","release":"pnpm publish --access public"},"_npmUser":{"name":"aman0035","email":"aman@push.org"},"_resolved":"/private/var/folders/52/f48djnds5bx39qy1v4rf_h040000gn/T/03c7b82f01c9711e549d4a447c4775db/aqua-solvent-core-0.1.1.tgz","_integrity":"sha512-0sbrL8MuClrZgCwUhvtqVbFVnvbWLfH7KyudPecGLJvLxr53Ee3gvVITAkZXAY1xozVkW9dfs6z4T4l7VZ0gFw==","deprecated":"Subgraph URLs moved; use 0.1.2 or later.","repository":{"url":"git+https://github.com/Aman035/solvent.git","type":"git","directory":"packages/core"},"_npmVersion":"11.2.0","description":"SDK for Solvent: solvency-aware market making on 1inch Aqua. Maker balance sheets on four chains, SwapVM program building, and the settlement score.","directories":{},"_nodeVersion":"23.7.0","dependencies":{"zod":"^3.24.1","viem":"^2.21.55","dotenv":"^16.4.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2"},"_npmOperationalInternal":{"tmp":"tmp/core_0.1.1_1788894807682_0.2907234311378166","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@aqua-solvent/core","version":"0.1.2","keywords":["solvent","1inch","aqua","swapvm","market-making","thegraph","defi"],"license":"MIT","_id":"@aqua-solvent/core@0.1.2","maintainers":[{"name":"aman0035","email":"aman@push.org"}],"homepage":"https://github.com/Aman035/solvent#readme","bugs":{"url":"https://github.com/Aman035/solvent/issues"},"dist":{"shasum":"1cd9f036f308da0f406f4433bd9f418f580fad5b","tarball":"https://registry.npmjs.org/@aqua-solvent/core/-/core-0.1.2.tgz","fileCount":34,"integrity":"sha512-0cft9ZrzyQJBPBYSHRv3jNuEiQmC6a3/mE6jOYxtmz6APi3ZQyQaH5K+Dy0cMb/sg0QFAd26wUyOULFS/dAYLQ==","signatures":[{"sig":"MEUCIG3U//8goOaLkk83N7mBIN6CO088kPtmcEH9tM7Viy66AiEAqRivpyPaBUsWN0jcqJuguOT0fDfqZNPnOR5Cp5JHKvA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQCa4LxdMmAFAa2f8b6oBb1Q5GZS35rMFSfzqqcWmBp6FgIgVD5OUtodoT0mmpBP+OJh0P+BfN4H6NjEy300Goo2lEU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":74556},"main":"dist/index.js","type":"module","_from":"file:aqua-solvent-core-0.1.2.tgz","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"build":"tsc -p tsconfig.build.json","release":"pnpm publish --access public"},"_npmUser":{"name":"aman0035","email":"aman@push.org"},"_resolved":"/private/var/folders/52/f48djnds5bx39qy1v4rf_h040000gn/T/c66e453c931043157e56413ba752d662/aqua-solvent-core-0.1.2.tgz","_integrity":"sha512-0cft9ZrzyQJBPBYSHRv3jNuEiQmC6a3/mE6jOYxtmz6APi3ZQyQaH5K+Dy0cMb/sg0QFAd26wUyOULFS/dAYLQ==","repository":{"url":"git+https://github.com/Aman035/solvent.git","type":"git","directory":"packages/core"},"_npmVersion":"11.2.0","description":"SDK for Solvent: solvency-aware market making on 1inch Aqua. Maker balance sheets on four chains, SwapVM program building, and the settlement score.","directories":{},"_nodeVersion":"23.7.0","dependencies":{"zod":"^3.24.1","viem":"^2.21.55","dotenv":"^16.4.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2"},"_npmOperationalInternal":{"tmp":"tmp/core_0.1.2_1789143667636_0.3210223841847548","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"_id":"@aqua-solvent/core@0.1.3","bugs":{"url":"https://github.com/Aman035/solvent/issues"},"dist":{"shasum":"2d3d4b2a5b969b73f624ee51b4b4d3a2bba10781","tarball":"https://registry.npmjs.org/@aqua-solvent/core/-/core-0.1.3.tgz","fileCount":34,"integrity":"sha512-DscqnXfWl1wwsxSLiRzVHAJjjymF/dvQtvzOCpM0TrYLy/+gqN3E0jhSKtX89AZwxJNC8LKrGyM4Tb6eTYa99w==","signatures":[{"sig":"MEQCIA4JoVFu8xRItgibmVTAt1D+DihzYBumnY+gnzLcR8LTAiBEpYDGp0nGqrmHUGKDofQYa4zr1HRaUhcabVBcwhRUIQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBMDnBY1CqeCp1BMckGS/X4DvtX7lSF0t5PH7lMUftKkAiB9rGGdo8Wz0xEvpfP6mX6kUBMS6p53azxGfYqkCZlc2Q=="}],"unpackedSize":76989},"main":"dist/index.js","name":"@aqua-solvent/core","type":"module","_from":"file:aqua-solvent-core-0.1.3.tgz","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"license":"MIT","scripts":{"build":"tsc -p tsconfig.build.json","release":"pnpm publish --access public"},"version":"0.1.3","_npmUser":{"name":"aman0035","email":"aman@push.org"},"homepage":"https://github.com/Aman035/solvent#readme","keywords":["solvent","1inch","aqua","swapvm","market-making","thegraph","defi"],"_resolved":"/private/var/folders/52/f48djnds5bx39qy1v4rf_h040000gn/T/f5e668d62e20e113c45e5eb000929542/aqua-solvent-core-0.1.3.tgz","_integrity":"sha512-DscqnXfWl1wwsxSLiRzVHAJjjymF/dvQtvzOCpM0TrYLy/+gqN3E0jhSKtX89AZwxJNC8LKrGyM4Tb6eTYa99w==","repository":{"url":"git+https://github.com/Aman035/solvent.git","type":"git","directory":"packages/core"},"_npmVersion":"11.2.0","description":"SDK for Solvent: solvency-aware market making on 1inch Aqua. Maker balance sheets on four chains, SwapVM program building, and the settlement score.","directories":{},"maintainers":[{"name":"aman0035","email":"aman@push.org"}],"_nodeVersion":"23.7.0","dependencies":{"zod":"^3.24.1","viem":"^2.21.55","dotenv":"^16.4.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/core_0.1.3_1789146001681_0.98057987135747"}}},"time":{"created":"2026-09-08T19:05:20.747Z","modified":"2026-09-11T17:00:02.245Z","0.1.0":"2026-09-08T19:05:21.025Z","0.1.1":"2026-09-08T19:13:27.766Z","0.1.2":"2026-09-11T16:21:07.721Z","0.1.3":"2026-09-11T17:00:01.782Z"},"bugs":{"url":"https://github.com/Aman035/solvent/issues"},"license":"MIT","homepage":"https://github.com/Aman035/solvent#readme","keywords":["solvent","1inch","aqua","swapvm","market-making","thegraph","defi"],"repository":{"url":"git+https://github.com/Aman035/solvent.git","type":"git","directory":"packages/core"},"description":"SDK for Solvent: solvency-aware market making on 1inch Aqua. Maker balance sheets on four chains, SwapVM program building, and the settlement score.","maintainers":[{"name":"aman0035","email":"aman@push.org"}],"readme":"# @aqua-solvent/core\n\nSDK for [Solvent](https://github.com/Aman035/solvent): solvency-aware market making\non 1inch Aqua. Query every Aqua maker's live balance sheet on four chains, build\nSwapVM programs that price their own solvency risk, and read the settlement score.\n\n## Install\n\n```bash\nnpm i @aqua-solvent/core\n```\n\n## Read any maker's balance sheet (no keys, no config)\n\n```ts\nimport { createSolvent, SolventChain } from \"@aqua-solvent/core\";\n\nconst solvent = createSolvent({ chain: SolventChain.Base });\n\nconst books = await solvent.books.top(10);\nfor (const b of books) {\n  console.log(b.maker, b.token, `${b.utilisationBps / 100}% utilised`,\n    `promised ${b.committed} backed ${b.backing}`);\n}\n```\n\nBase, Arbitrum, and Optimism watch the official 1inch Aqua deployment and are\n**read-only today**: the index is live, the contracts are coming. Base Sepolia is\n**full mode**: contracts, quoting, and the index.\n\n| Chain | Mode | What works |\n| --- | --- | --- |\n| `SolventChain.BaseSepolia` | full | books, contracts, strategy builder, quoting |\n| `SolventChain.Base` | read-only | books, index health |\n| `SolventChain.Arbitrum` | read-only | books, index health |\n| `SolventChain.Optimism` | read-only | books, index health |\n\nAnything needing contracts on a read-only chain throws `ReadOnlyChainError`.\n\n## Build a self-defending strategy (full-mode chains)\n\n```ts\nconst sepolia = createSolvent({ chain: SolventChain.BaseSepolia });\n\nconst program = sepolia.strategy()\n  .solvencyFloor(9_500)          // refuse to quote above 95% utilisation\n  .solvencySkew(5_000, 400_000)  // widen up to 4% as the wallet thins past 50%\n  .xyc()                         // constant-product pricing\n  .fee(30_000)                   // 0.30% base fee\n  .encode();                     // SwapVM bytecode, ready to ship() on Aqua\n```\n\nThe oracle addresses are filled in per chain; `sepolia.contracts` has the full\ndeployment (router, SolventBook, score, all verified on Basescan).\n\n## Query The Graph Network with your own key\n\nAll four indexes are published on The Graph's decentralized network. Pass a gateway API\nkey (free from [Subgraph Studio](https://thegraph.com/studio/apikeys/)) and reads go\nthere instead of the rate-limited Studio endpoint, falling back to Studio if the gateway\nerrors:\n\n```ts\nconst solvent = createSolvent({ chain: SolventChain.Base, graphApiKey: process.env.GRAPH_API_KEY });\n```\n\n`gatewayUrl(chain, apiKey)` returns the raw query URL, and each chain's network ID is on\n`SOLVENT_CHAINS[chain].networkSubgraphId`.\n\n## Overrides\n\n```ts\ncreateSolvent({\n  chain: SolventChain.Base,\n  rpcUrl: \"https://your-endpoint\",       // default: public RPC\n  subgraphUrl: \"https://your-endpoint\",  // replaces both the gateway and Studio\n});\n```\n\n## Utilities\n\n`computeUtilisationBps`, `computeScore`, and the raw instruction encoders are\nexported directly, bit-exact against the Solidity contracts (1009-case\ndifferential suite in the main repo).\n","readmeFilename":"README.md"}