@sperax/defi-utils
v0.2.2
Published
defi-utils — part of the SperaxOS agent workspace.
Maintainers
Readme
@sperax/defi-utils
Install
npm install @sperax/defi-utils@sperax/defi-utils
Centralised token addresses, chain metadata, gas helpers, and ERC-20 ABI fragments used across multiple builtin tool packages.
Usage
Source-first workspace package — there is no build step. TypeScript resolves it through
workspace:*, so importing it is all that is required:
import { CHAIN_IDS, ERC20_ABI, fmtAmount } from '@sperax/defi-utils';Exports
@sperax/defi-utils
CHAIN_IDS · ERC20_ABI · fmtAmount · fmtPct · fmtUsd · getChainId · getNativeToken · isNativeToken · NATIVE_TOKENS · resolveTokenAddress · TOKEN_ADDRESSES · validateAddress · validateAmount
Development
This package has no tests yet. New tests go in packages/defi-utils/src/__tests__/, with the basename matching the source file.
Source: packages/defi-utils
Part of SperaxOS — the open-source AI agent workspace for DeFi. See CONTRIBUTING.md before opening a pull request.
License
defi-utils is released under the Apache-2.0 license.
