@anywalletkit/tx-preview-evm
@anywalletkit/tx-preview-evm
Section titled “@anywalletkit/tx-preview-evm”What an EVM transaction will do, before it is signed. It also handles an approve → call sequence. The output feeds a review screen:
Install
Section titled “Install”npm install @anywalletkit/tx-preview-evm# or: pnpm add @anywalletkit/tx-preview-evm · yarn add @anywalletkit/tx-preview-evmOn npm: @anywalletkit/tx-preview-evm, published from the release workflow with provenance.
- decoded calls — the recipient, the contract, the method;
- approvals and transfers:
approve,increaseAllowance/increaseApproval,setApprovalForAll, EIP-2612permitcalls, Permit2approveandpermit(single and batch); a permit whose arguments can’t be read is theapproval-unparsedwarning; - simulated balance changes at a pinned block (
eth_simulateV1with transfer tracing,eth_callas the fallback); - a verdict made of named checks: unlimited approval, unknown spender, value out, simulation failed…
import { previewEvmTx } from '@anywalletkit/tx-preview-evm'Pure functions over an injected rpc(method, params). The only dependency is viem.
Docs: Transaction preview
Apache-2.0