← All packages
Connect · v0.1.0 · Apache-2.0

@flashyos/wallet-wdk

Governed spending for agents on Tether WDK: the record, the verdict, the verifiers

Governed economic agency for FlashyOS agents on Tether WDK: the AAO WalletCapability, a FlashyOS authorizer client, an MCP elicitation handler, and a WDK policy rule that defers to the authorization plane.

npm install @flashyos/wallet-wdknpm ↗source ↗

Why it exists

An agent that can hold money needs a description of a spend that the agent, the authorization plane and the signer all agree on, and a way to ask for a verdict before anything moves. This package is that description — the OperationRecord and the extractors that derive it from a real call — plus the client that asks the plane, and the verifiers a stranger runs offline against our receipts and our exports.

What it refuses to do
It never signs and never broadcasts. A call no extractor can read is refused rather than guessed, a verdict it cannot parse is never treated as an allow, and nothing in it addresses a mainnet — the signer’s chain table is testnets only.

How it works

A spend is an `OperationRecord`: kind (transfer, swap, bridge), chain as `<family>:<id>`, exact asset or `native`, amount as an integer string in base units, exact destination. The extractors derive one from what an agent is actually about to do — an EVM or TRON transaction, a swap or bridge protocol call, an EIP-3009 typed-data transfer — and a call they cannot read is refused, not passed through. What each pack vouches for is published as a manifest and drift-checked by test.

`FlashyOSAuthorizer` sends the record to the plane and gets one of three verdicts: `ALLOW` with an Ed25519-signed `SpendAuthorization` the signer will later check the real call against; `ESCALATE` with the id of a decision a human resolves; `DENY` with a code such as `PER_TX_CAP` or `DESTINATION_NOT_PERMITTED`. The same verdict can be registered as a rule in WDK’s own policy engine, so the account is governed twice.

The verifiers close the loop for someone who trusts none of this. `verifyReceipt` and `verifyInvoice` check the signed documents two organizations exchange; `verifyPlaneDocument` resolves the key from a plane’s published identity; `verifyExport` recomputes an organization’s hash-chained export and its signed Merkle root, and `metricsFromExport` re-derives the weekly numbers from the bytes. All of it runs offline with a public key.

Related concepts
IntentMeshagentic autonomous organizationmachine-readable organizational trustAI agent trust register

Use it

Derive the record, ask the plane
import { FlashyOSAuthorizer, extractOperation } from '@flashyos/wallet-wdk';

const record = extractOperation('evm:84532', { to: USDT, data: transferCalldata(VENDOR, 12_000_000n) });
const verdict = await new FlashyOSAuthorizer({ baseUrl, orgId, agentToken }).propose(record!);
// ALLOW with a signed authorization · ESCALATE with a decision id · DENY with a code

In practice

Give an agent a budget it cannot exceed
A procurement agent declares the wallet capability, an owner sets an envelope (assets, destinations, per-transaction and daily caps, an auto-approve ceiling), and every proposed transfer is allowed, escalated to a human, or denied with a code — before any key is touched. On a testnet, today.
Check our receipts without asking us
A counterparty who received a plane-signed receipt verifies it against the plane’s published key, offline, and re-derives the week’s settlement numbers from the organization’s export rather than reading them off a page.

How it stays honest

The JSON Schemas under docs/wallet/schema are generated from the validators this package and the API share, and a test fails when the two drift. The signer verifies a fixture authorization the API signed, so the two sides of the boundary cannot disagree silently. The three wallet packages publish together, in dependency order, from one workflow that fires on a version bump to any of them.

.github/workflows/publish-wdk.ymlthe workflow that keeps this current — read it, it hides nothing

Questions

Does @flashyos/wallet-wdk move money?
No. It describes a spend, asks the authorization plane for a verdict, and verifies signed documents. Execution belongs to @flashyos/signer, the one process that holds a seed, and only against an authorization the plane signed.
Which chains does it work on?
It describes calls on EVM and TRON chains and swap or bridge protocol calls. The signer that executes them talks to testnets only — Base, Ethereum, Arbitrum and OP Sepolia, TRON Nile and Shasta — and nothing in either package enables a mainnet.
What happens when an agent proposes something outside its envelope?
The plane denies it with a code — no envelope, kind not permitted, asset or destination not permitted, per-transaction or daily cap — and nothing is signed. Above the auto-approve ceiling but inside the caps, it escalates to a human decision instead.

The licence

Apache-2.0, read from the package’s own manifest. Embed it in anything, including closed software — that is what makes a spec adoptable and a verifier worth running. FlashyOS’s server side is AGPL-3.0-only instead, and a test in the monorepo asserts the direction between them: AGPL code may consume this, this may never consume AGPL code.

Keep reading

Agent paymentsGovernance
Also in connect
@flashyos/agent@flashyos/mcp@flashyos/create-mesh-agent@flashyos/create-mesh-node@flashyos/page@flashyos/eslint-config@flashyos/llm-gateway@flashyos/signer@flashyos/wdk