@sperax/community-tool-token-approvals
v0.2.2
Published
Example: token approval checker plugin — demonstrates wallet integration pattern
Maintainers
Readme
@sperax/community-tool-token-approvals
Install
npm install @sperax/community-tool-token-approvals@sperax/community-tool-token-approvals
Example: token approval checker plugin — demonstrates wallet integration pattern
Example Plugin: Token Approval Checker
Demonstrates the action-tool pattern with wallet integration. Checks which ERC-20/ERC-721 approvals a wallet has granted and flags risky (unlimited or stale) allowances.
Key patterns shown:
permissions.wallet: trueto declare wallet address accesspermissions.networkallowlist for external API calls- Structured
statewith risk scoring for downstream rendering
Usage
Source-first workspace package — there is no build step. TypeScript resolves it through
workspace:*, so importing it is all that is required:
import { manifest, tokenApprovalsTool } from '@sperax/community-tool-token-approvals';Exports
@sperax/community-tool-token-approvals
manifest · tokenApprovalsTool
@sperax/community-tool-token-approvals/executor
executor
Development
This package has no tests yet. New tests go in packages/example-plugin-token-approvals/src/__tests__/, with the basename matching the source file.
Source: packages/example-plugin-token-approvals
Part of SperaxOS — the open-source AI agent workspace for DeFi. See CONTRIBUTING.md before opening a pull request.
License
example-plugin-token-approvals is released under the Apache-2.0 license.
