@fidesbuild/net
v0.2.1
Published
FIDES NET: cross-service settlement netting for autonomous agents, settled under a FIDES with its roots published onchain.
Maintainers
Readme
@fidesbuild/net
FIDES is a Transaction Builder for autonomous agents. FIDES NET nets the payments owed between agents and services to one final position per party, and settles the FIDES Account's side in one bundle under a FIDES, with both roots published onchain.
npm install @fidesbuild/net @fidesbuild/sdk viemimport { netObligations, settle } from "@fidesbuild/net"
import { FidesBuilder } from "@fidesbuild/sdk"
const result = netObligations(obligations) // who owes who, per token
const { actions } = settle(result, { account: fides.account })
const plan = await new FidesBuilder({ client, fides, agent }).add(actions).build()
await plan.simulate()
await plan.execute() // net transfers + roots, one transactionThe FIDES must allow transfer on the token and publish (0x70dbe710) on FidesNetRoots, 0x2f57277b2170d189c6329cbd0e796ae9a984dd8c on Robinhood Chain. Anyone holding the obligations can recompute the settlement with verifySettlement and prove a single obligation or transfer against the published roots.
Links
- Docs: https://fidesbuilder.xyz/docs
- App: https://fidesbuilder.xyz/app
MIT licensed.
