@anywalletkit/conformance
v0.4.6
Published
Conformance suites and golden vectors every Any Wallet Kit chain and protocol module must pass.
Readme
@anywalletkit/conformance
Test suites every Any Wallet Kit chain and protocol module runs, and the pinned derivation vectors they check against.
Install
npm install -D @anywalletkit/conformance vitest
# or: pnpm add -D @anywalletkit/conformance vitest · yarn add -D @anywalletkit/conformance vitestOn npm: @anywalletkit/conformance, published from the release workflow with provenance. A dev dependency for module authors; vitest is its peer.
| Export | Checks |
|---|---|
| describeChainModule | a chain package: derivation against derivationVectors (several seeds and account indexes), signing, read-only accounts that never write |
| describeProtocolModule | a protocol module's shape: required methods, a read-only account cannot write, a read or quote never signs or sends (any sign* / send* / transfer / approve / broadcast* call on the account fails it, even one the mock lacks, even when the quote then throws); reads listed in mustResolve must succeed with their samples |
| describeProtocolBehaviour | a swap2 module run to the review gate: only own or declared recipients, approvals exactly to the declared spender, amounts equal to the quote |
| describeActivitySuite | describeActivity recognizes the module's recorded real transactions |
| namesSuite | a NameResolver implementation |
| createMockAccount | a recording IWalletAccount for tests |
| derivationVectors | golden addresses, public keys and signatures per chain |
The suites run under Vitest:
pnpm add -D @anywalletkit/conformance vitestApache-2.0
