{"_id":"@buglefamily/sdk-core","_rev":"4-eb9c885d7362988d6f12ea23b2a754f2","name":"@buglefamily/sdk-core","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.1":{"name":"@buglefamily/sdk-core","version":"1.0.1","keywords":["buglefamily","ethereum"],"license":"MIT","_id":"@buglefamily/sdk-core@1.0.1","maintainers":[{"name":"buglefamily","email":"buglefamily@proton.me"}],"homepage":"https://github.com/buglefamily/sdk-core#readme","bugs":{"url":"https://github.com/buglefamily/sdk-core/issues"},"dist":{"shasum":"0cf134c1c173d3e015464a4e65141877ee0613ba","tarball":"https://registry.npmjs.org/@buglefamily/sdk-core/-/sdk-core-1.0.1.tgz","fileCount":32,"integrity":"sha512-tqowvzAhaFOsWOaX/RTBSV2BG71lpRuLh+beDnqigODjd4NSLekHE41ksLyzg8AK6MD0b1udvtE3mbl0tbmS1A==","signatures":[{"sig":"MEUCIQDkUO+oqLmvy+xyROK1yZ5f5NxJfTk0zsrjfeUbjLYkqgIgbJhWyGjKjC9soAO60tgS38m2zQNqh2dTvjPuQTlG4K4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":401168},"main":"dist/index.js","module":"dist/sdk-core.esm.js","engines":{"node":">=10"},"gitHead":"eda1fca1d2586177c3b64be31ccdf23c41b09943","scripts":{"lint":"tsdx lint src","test":"tsdx test","build":"tsdx build","start":"tsdx watch"},"typings":"dist/index.d.ts","_npmUser":{"name":"buglefamily","email":"buglefamily@proton.me"},"prettier":{"semi":false,"printWidth":120,"singleQuote":true},"repository":{"url":"git+https://github.com/buglefamily/sdk-core.git","type":"git"},"_npmVersion":"10.8.2","description":"⚒️ An SDK for building applications on top of buglefamily","directories":{},"resolutions":{"typescript":"3.9.10","@babel/core":"7.23.7","@babel/parser":"7.23.6","@babel/runtime":"7.18.9"},"_nodeVersion":"20.20.2","dependencies":{"jsbi":"^3.1.4","big.js":"^5.2.2","toformat":"^2.0.0","tiny-invariant":"^1.1.0","decimal.js-light":"^2.5.0","@ethersproject/bytes":"^5.7.0","@ethersproject/address":"^5.0.2","@ethersproject/strings":"5.7.0","@ethersproject/keccak256":"5.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsdx":"^0.14.1","typescript":"3.9.10","@types/jest":"^24.0.25","@types/big.js":"^4.0.5","@babel/preset-typescript":"7.23.3"},"_npmOperationalInternal":{"tmp":"tmp/sdk-core_1.0.1_1789055576777_0.0990602265549052","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@buglefamily/sdk-core","version":"1.0.2","keywords":["buglefamily","ethereum"],"license":"MIT","_id":"@buglefamily/sdk-core@1.0.2","maintainers":[{"name":"buglefamily","email":"buglefamily@proton.me"}],"homepage":"https://github.com/buglefamily/sdk-core#readme","bugs":{"url":"https://github.com/buglefamily/sdk-core/issues"},"dist":{"shasum":"7ab3b7bb8b14c77e8a6ef0024021439b2305a92e","tarball":"https://registry.npmjs.org/@buglefamily/sdk-core/-/sdk-core-1.0.2.tgz","fileCount":32,"integrity":"sha512-ym1U6SbdS5yAbHwfZeOUQKUbJOsx7vWmHWKv6SknlYKTCfiHTksiIsRRLGAszMqD7MfvbC0QyxH+FuaU/dbu0A==","signatures":[{"sig":"MEUCIBgqU65jlFLfDEBfaLYOmcOMtB1EGJ4m49x2HSuMQpRfAiEA1HnIBTcACvxaOBG2Xa8QBkWYbHHLzYlVcsYcJY68CiI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":400777},"main":"dist/index.js","module":"dist/sdk-core.esm.js","engines":{"node":">=10"},"gitHead":"3e5afd92e082ed8ae1ef32adab405a24e555fcbc","scripts":{"lint":"tsdx lint src","test":"tsdx test","build":"tsdx build","start":"tsdx watch"},"typings":"dist/index.d.ts","_npmUser":{"name":"buglefamily","email":"buglefamily@proton.me"},"prettier":{"semi":false,"printWidth":120,"singleQuote":true},"repository":{"url":"git+https://github.com/buglefamily/sdk-core.git","type":"git"},"_npmVersion":"10.8.2","description":"⚒️ An SDK for building applications on top of buglefamily","directories":{},"resolutions":{"typescript":"3.9.10","@babel/core":"7.23.7","@babel/parser":"7.23.6","@babel/runtime":"7.18.9"},"_nodeVersion":"20.20.2","dependencies":{"jsbi":"^3.1.4","big.js":"^5.2.2","toformat":"^2.0.0","tiny-invariant":"^1.1.0","decimal.js-light":"^2.5.0","@ethersproject/bytes":"^5.7.0","@ethersproject/address":"^5.0.2","@ethersproject/strings":"5.7.0","@ethersproject/keccak256":"5.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsdx":"^0.14.1","typescript":"3.9.10","@types/jest":"^24.0.25","@types/big.js":"^4.0.5","@babel/preset-typescript":"7.23.3"},"_npmOperationalInternal":{"tmp":"tmp/sdk-core_1.0.2_1789110810917_0.6597183830450724","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@buglefamily/sdk-core","version":"1.0.3","keywords":["buglefamily","ethereum"],"license":"MIT","_id":"@buglefamily/sdk-core@1.0.3","maintainers":[{"name":"buglefamily","email":"buglefamily@proton.me"}],"homepage":"https://github.com/buglefamily/sdk-core#readme","bugs":{"url":"https://github.com/buglefamily/sdk-core/issues"},"dist":{"shasum":"6e09123540f0d333b048193009ce7045f0ee6a1c","tarball":"https://registry.npmjs.org/@buglefamily/sdk-core/-/sdk-core-1.0.3.tgz","fileCount":33,"integrity":"sha512-bkJDiq5ZLdLHoT8Iqv7fh4zlPHH1OzKPYDm7LOKsoxoIam2DJ31pOQzfmEfYjfaWgEqH4PvBdtjFsMtcwaMjAA==","signatures":[{"sig":"MEYCIQC4/0IHVE00mx3p+6bQn4d/xxjboIVRvY3IUcdgJQO9vQIhAOBpM3qT1NXDKRUWccPE74k4AQVCv1HUBgccVQ6SxBzO","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":408301},"main":"dist/index.js","module":"dist/sdk-core.esm.js","engines":{"node":">=10"},"gitHead":"187074dc6ff3ea097bce9ec3903cac6b1d8fffa8","scripts":{"lint":"tsdx lint src","test":"tsdx test","build":"tsdx build","start":"tsdx watch"},"typings":"dist/index.d.ts","_npmUser":{"name":"buglefamily","email":"buglefamily@proton.me"},"prettier":{"semi":false,"printWidth":120,"singleQuote":true},"repository":{"url":"git+https://github.com/buglefamily/sdk-core.git","type":"git"},"_npmVersion":"10.8.2","description":"⚒️ An SDK for building applications on top of buglefamily","directories":{},"resolutions":{"typescript":"3.9.10","@babel/core":"7.23.7","@babel/parser":"7.23.6","@babel/runtime":"7.18.9"},"_nodeVersion":"20.20.2","dependencies":{"jsbi":"^3.1.4","big.js":"^5.2.2","toformat":"^2.0.0","tiny-invariant":"^1.1.0","decimal.js-light":"^2.5.0","@ethersproject/bytes":"^5.7.0","@ethersproject/address":"^5.0.2","@ethersproject/strings":"5.7.0","@ethersproject/keccak256":"5.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsdx":"^0.14.1","typescript":"3.9.10","@types/jest":"^24.0.25","@types/big.js":"^4.0.5","@babel/preset-typescript":"7.23.3"},"_npmOperationalInternal":{"tmp":"tmp/sdk-core_1.0.3_1789121216626_0.21665422640155163","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@buglefamily/sdk-core","description":"⚒️ An SDK for building applications on top of buglefamily","version":"1.0.4","repository":{"type":"git","url":"git+https://github.com/buglefamily/sdk-core.git"},"keywords":["buglefamily","ethereum"],"license":"MIT","main":"dist/index.js","typings":"dist/index.d.ts","module":"dist/sdk-core.esm.js","engines":{"node":">=10"},"scripts":{"build":"tsdx build","lint":"tsdx lint src","start":"tsdx watch","test":"tsdx test"},"dependencies":{"@ethersproject/address":"^5.0.2","@ethersproject/bytes":"^5.7.0","@ethersproject/keccak256":"5.7.0","@ethersproject/strings":"5.7.0","big.js":"^5.2.2","decimal.js-light":"^2.5.0","jsbi":"^3.1.4","tiny-invariant":"^1.1.0","toformat":"^2.0.0"},"devDependencies":{"@babel/preset-typescript":"7.23.3","@types/big.js":"^4.0.5","@types/jest":"^24.0.25","tsdx":"^0.14.1","typescript":"3.9.10"},"resolutions":{"@babel/core":"7.23.7","@babel/parser":"7.23.6","@babel/runtime":"7.18.9","typescript":"3.9.10"},"prettier":{"printWidth":120,"semi":false,"singleQuote":true},"publishConfig":{"access":"public"},"_id":"@buglefamily/sdk-core@1.0.4","gitHead":"ba575dbf0bbb32b29badaa6f6ad9fd7804fd0a85","bugs":{"url":"https://github.com/buglefamily/sdk-core/issues"},"homepage":"https://github.com/buglefamily/sdk-core#readme","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-2KieDofqOMDL73eM7di+SqlodYIQIRtkGEHEyfLBeLIBGgMgfs9l5ghPGuTyQYCpbvKctA0EyzP3xoCGYBRhbA==","shasum":"21dcda06f637812b5da30e95caf71c819fe8600b","tarball":"https://registry.npmjs.org/@buglefamily/sdk-core/-/sdk-core-1.0.4.tgz","fileCount":33,"unpackedSize":414913,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC2eAi57HTbZkoq14gj4p26omcRDC43PbOOo2XgLYg/nQIgbfWVHaTw4lXJ71atv4rHfXJ7zrh8U4IjcbePmVwLABM="}]},"_npmUser":{"name":"buglefamily","email":"buglefamily@proton.me"},"directories":{},"maintainers":[{"name":"buglefamily","email":"buglefamily@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk-core_1.0.4_1789548798574_0.4026328212885708"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-10T15:52:56.476Z","modified":"2026-09-16T08:53:19.138Z","1.0.1":"2026-09-10T15:52:56.982Z","1.0.2":"2026-09-11T07:13:31.080Z","1.0.3":"2026-09-11T10:06:56.819Z","1.0.4":"2026-09-16T08:53:18.701Z"},"bugs":{"url":"https://github.com/buglefamily/sdk-core/issues"},"license":"MIT","homepage":"https://github.com/buglefamily/sdk-core#readme","keywords":["buglefamily","ethereum"],"repository":{"type":"git","url":"git+https://github.com/buglefamily/sdk-core.git"},"description":"⚒️ An SDK for building applications on top of buglefamily","maintainers":[{"name":"buglefamily","email":"buglefamily@proton.me"}],"readme":"# @buglefamily/sdk-core\n\nCore primitives for the Buglefamily TypeScript SDKs: chain IDs, contract addresses, currency/token entities, and exact fractional math. Higher-level SDKs should depend on this package instead of reinventing amounts and addresses.\n\nForked from [Uniswap/sdks](https://github.com/Uniswap/sdks) `@uniswap/sdk-core-v5.9.0` (`f0ec7ee`).\n\n## Install\n\n```bash\nnpm install @buglefamily/sdk-core\n# or\nyarn add @buglefamily/sdk-core\n```\n\nRequires Node.js `>= 10`. Built and published from CI on Node.js 20.\n\n## Core concepts\n\n| Module | Purpose |\n| --- | --- |\n| `ChainId` / `SUPPORTED_CHAINS` | Supported chain enum and list |\n| `Token` / `Ether` / `WETH9` | ERC20 tokens, native currency, and wrapped native tokens |\n| `CurrencyAmount` / `Price` / `Percent` / `Fraction` | JSBI-based exact amount and price math |\n| `CHAIN_TO_ADDRESSES_MAP` and `*_ADDRESSES` | V2 / V3 / V4 contract addresses |\n| `validateAndParseAddress` / `computePriceImpact` / `sqrt` | Address validation and trade helpers |\n\n## Usage\n\n```ts\nimport { ChainId, Ether, Token, CurrencyAmount, Percent, WETH9 } from '@buglefamily/sdk-core'\n\nconst USDC = new Token(\n  ChainId.MAINNET,\n  '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',\n  6,\n  'USDC',\n  'USD Coin'\n)\n\nconst eth = Ether.onChain(ChainId.MAINNET)\nconst weth = WETH9[ChainId.MAINNET]\n\nconst amount = CurrencyAmount.fromRawAmount(USDC, 1_000_000) // 1 USDC\namount.toSignificant(6) // '1'\n\nconst slippage = new Percent(50, 10_000) // 0.50%\n```\n\nLook up contract addresses on a given chain:\n\n```ts\nimport { ChainId, V3_CORE_FACTORY_ADDRESSES, SWAP_ROUTER_02_ADDRESSES } from '@buglefamily/sdk-core'\n\nV3_CORE_FACTORY_ADDRESSES[ChainId.MAINNET]\nSWAP_ROUTER_02_ADDRESSES(ChainId.BASE)\n```\n\n## Development\n\n```bash\nyarn install\nyarn test\nyarn lint\nyarn build\n```\n\nBuild output lives in `dist/`: CJS (`dist/index.js`), ESM (`dist/sdk-core.esm.js`), and type declarations (`dist/index.d.ts`).\n\n## License\n\n[MIT](./LICENSE)\n","readmeFilename":"README.md"}