{"_id":"@1inch-extension/balances","name":"@1inch-extension/balances","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.2":{"name":"@1inch-extension/balances","version":"1.0.2","author":{"name":"1inch"},"homepage":"https://1inch.io","license":"GPL-3.0-or-later","publishConfig":{"access":"public"},"repository":{"directory":"packages/balances","type":"git","url":"git+https://github.com/talismansociety/talisman.git"},"main":"dist/1inch-extension-balances.cjs.js","module":"dist/1inch-extension-balances.esm.js","engines":{"node":">=18"},"scripts":{"test":"jest","lint":"eslint src --max-warnings 0","clean":"rm -rf dist .turbo node_modules"},"dependencies":{"@metaplex-foundation/mpl-token-metadata":"^3.4.0","@metaplex-foundation/umi":"^1.2.0","@polkadot-api/utils":"0.2.0","@solana/spl-token":"^0.4.13","@solana/web3.js":"^1.98.2","@supercharge/promise-pool":"^3.2.0","@1inch-extension/chain-connectors":"workspace:*","@1inch-extension/chaindata-provider":"workspace:*","@1inch-extension/crypto":"workspace:*","@1inch-extension/sapi":"workspace:*","@1inch-extension/scale":"workspace:*","@1inch-extension/solana":"workspace:*","@1inch-extension/token-rates":"workspace:*","@1inch-extension/util":"workspace:*","anylogger":"^1.0.11","bignumber.js":"^9.1.2","dexie":"^4.0.9","lodash-es":"4.17.21","p-queue":"^8.1.0","pako":"^2.1.0","polkadot-api":"1.13.1","rxjs":"^7.8.1","scale-ts":"^1.6.1","viem":"^2.27.3","zod":"^3.25.76"},"devDependencies":{"@polkadot/api-contract":"16.1.2","@polkadot/types":"16.1.2","@polkadot/util":"13.5.3","@polkadot/util-crypto":"13.5.3","@substrate/txwrapper-core":"7.5.3","@talismn/eslint-config":"workspace:*","@talismn/tsconfig":"workspace:*","@types/jest":"^29.5.14","@types/lodash-es":"^4.17.12","@types/pako":"^2.0.3","eslint":"^8.57.1","jest":"^29.7.0","ts-jest":"^29.2.5","typescript":"^5.6.3"},"peerDependencies":{"@polkadot/api-contract":"*","@polkadot/types":"*","@polkadot/util":"*","@polkadot/util-crypto":"*","@substrate/txwrapper-core":"*"},"preconstruct":{"entrypoints":["index.ts"]},"eslintConfig":{"root":true,"extends":["@talismn/eslint-config/base"]},"_id":"@1inch-extension/balances@1.0.2","gitHead":"0c9b3c770d93acfe15564aed1af0f483afd6a8ba","types":"./dist/1inch-extension-balances.cjs.d.ts","description":"<img src=\"talisman.svg\" alt=\"Talisman\" width=\"15%\" align=\"right\" />","bugs":{"url":"https://github.com/talismansociety/talisman/issues"},"_nodeVersion":"22.19.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-odHAAFIH4L/TWhH1pQxEN8RSStj7nBNYwWkaOvAXYOCtKM3X78TSPfO3OBvyQ0s6MZaPiJUVatTK3v6oaRcchQ==","shasum":"4e3596d7fbc429f6d5c8af19600d2f07452dbe5f","tarball":"https://registry.npmjs.org/@1inch-extension/balances/-/balances-1.0.2.tgz","fileCount":4,"unpackedSize":44164,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCoqrNBaxLUDEyAgMUecsHW2w0qWoLp6+VlCZJnF3038AIgYNjM3OPqtji139cpNGx2TF00aBK1nGRSe7BNLoU2L8g="}]},"_npmUser":{"name":"cryptodapps","email":"gextension@cryptodapps.ltd"},"directories":{},"maintainers":[{"name":"cryptodapps","email":"gextension@cryptodapps.ltd"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/balances_1.0.2_1757206998800_0.5411125676347672"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-07T01:03:18.426Z","1.0.2":"2025-09-07T01:03:18.999Z","modified":"2025-09-07T01:03:19.251Z"},"maintainers":[{"name":"cryptodapps","email":"gextension@cryptodapps.ltd"}],"description":"<img src=\"talisman.svg\" alt=\"Talisman\" width=\"15%\" align=\"right\" />","homepage":"https://1inch.io","repository":{"directory":"packages/balances","type":"git","url":"git+https://github.com/talismansociety/talisman.git"},"author":{"name":"1inch"},"bugs":{"url":"https://github.com/talismansociety/talisman/issues"},"license":"GPL-3.0-or-later","readme":"# @talismn/balances\r\n\r\n<img src=\"talisman.svg\" alt=\"Talisman\" width=\"15%\" align=\"right\" />\r\n\r\n[![license](https://img.shields.io/github/license/talismansociety/talisman?style=flat-square)](https://github.com/TalismanSociety/talisman/blob/dev/LICENSE)\r\n[![npm-version](https://img.shields.io/npm/v/@talismn/balances?style=flat-square)](https://www.npmjs.com/package/@talismn/balances)\r\n[![npm-downloads](https://img.shields.io/npm/dw/@talismn/balances?style=flat-square)](https://www.npmjs.com/package/@talismn/balances)\r\n\r\n**@talismn/balances** is the core of a set of packages used to subscribe to on-chain account token balances.\r\n\r\nA quick rundown on each package is given below.\r\n\r\n### This (the core) package:\r\n\r\n**@talismn/balances** (this package) includes:\r\n\r\n- An API which wallets / dapps can use to access balances\r\n- An interface for balance modules to implement\r\n- A shared database (powered by dexie) for balance modules to store balances in\r\n- Helpers (utility functions) for balance modules to use\r\n- Provides a plugin architecture, which is used by the balance module packages to specify their balance types\r\n\r\n### The react API for wallets & dapps:\r\n\r\n**@talismn/balances-react** includes:\r\n\r\n- React hooks for subscribing to on-chain account token balances\r\n- (soon™): recoil atoms for on-chain account token balances\r\n\r\n### The balance modules:\r\n\r\n**@talismn/balances-default-modules**\r\n\r\n- Collates the default balance modules (which can be found below) into a single package\r\n\r\n**@talismn/substrate-native**\r\n\r\n- A balance module for substrate native tokens\r\n- Subscribes to the `system.account` state query balance for each token\r\n- Also subscribes to the crowdloans pallet balances\r\n- Also subscribes to the nompools pallet balances\r\n\r\n**@talismn/substrate-orml**\r\n\r\n- A proof-of-concept balance module for ORML token pallet tokens\r\n- Attempts to auto-detect tokens\r\n- **You should use @talismn/substrate-tokens instead**\r\n\r\n**@talismn/substrate-tokens**\r\n\r\n- A balance module for substrate ORML token pallet tokens\r\n- Supports any token which can be queried via the `tokens.accounts` state query\r\n- Requires configuration for each token (no auto-detection)\r\n- We recommend that you use this module for ORML tokens\r\n\r\n**@talismn/substrate-assets**\r\n\r\n- A balance module for substrate assets pallet tokens\r\n- Supports any token which can be queried via the `assets.account` state query\r\n- Requires configuration for each token (no auto-detection)\r\n\r\n**@talismn/substrate-equilibrium**\r\n\r\n- A balance module for substrate eqBalances pallet tokens\r\n- Used by [Equilibrium](https://equilibrium.io/) and [Genshiro](https://genshiro.io/)\r\n- Supports auto-detection\r\n\r\n**@talismn/evm-native**\r\n\r\n- A balance module for evm native tokens\r\n\r\n**@talismn/evm-erc20**\r\n\r\n- A balance module for evm erc20 tokens\r\n\r\n### The chain connectors:\r\n\r\n**@talismn/chain-connector**\r\n\r\n- A package which manages the open RPC connections to substrate chains\r\n- Allows developers to say \"Send this query to the chain with this id\", without them needing to specify which RPCs to use\r\n- Ensures that connections are only opened to the chains which are in use by the wallet/dapp\r\n- Ensures that only one connection is open per chain\r\n- Handles exponential backoff in the case of network failures\r\n- Provides an interface which can be shared between a serviceworker and frontend, which enables the two to share the pool of open connections\r\n- Provides an interface which mimics a polkadot-js `WsProvider`, which can be plugged into polkadot-js to make it use the shared pool of open connections\r\n\r\n**@talismn/chain-connector-evm**\r\n\r\n- A package which manages the connections to evm chains\r\n- Allows developers to say \"Send this query to the chain with this id\", without them needing to specify which RPC to use\r\n\r\n### The chaindata provider:\r\n\r\n**@talismn/chaindata-provider**\r\n\r\n- A database (powered by dexie) to store chains, evm chains and tokens in\r\n- An interface to interact with the database\r\n- Syncs with the list in the [chaindata repository](https://github.com/talismansociety/chaindata) via graphql\r\n- Supports custom (end-user-defined) chains and rpc overrides\r\n- Provides a plugin architecture, which is used by the balance module packages to specify their token types\r\n\r\n### The remaining packages:\r\n\r\n**@talismn/connection-meta**\r\n\r\n- Contains a small db which is used to optimise network performance in the wallet.\r\n- Two metrics are kept:\r\n  - chainPriorityRpc (the last known well-behaved RPC for a chain)\r\n  - chainBackoffInterval (the amount of time the wallet should wait before attempting to connect to a unreachable chain again)\r\n\r\n**@talismn/mutate-metadata**\r\n\r\n- A package which can splice a chain's metadata into smaller pieces\r\n- Enables us to make state queries across many chains at once without using all of the browser's memory\r\n\r\n**@talismn/token-rates**\r\n\r\n- Fetches and stores coingecko rates for each token in the @talismn/chaindata-provider database\r\n\r\n**@talismn/util**\r\n\r\n- Utility functions shared by the other packages, as well as the wallet and the portal\r\n","readmeFilename":"README.md","_rev":"1-d5d46f22923502f82143f7deb7800140"}