circles-types
Shared types for the Circles protocol: RPC models, events, pathfinding structures, flow matrix types, contract bindings, and configuration. Used across all crates in this workspace.
Highlights
- Alloy-backed primitives re-exported as
Address,TxHash,U256,U192, etc. - RPC/query models:
JsonRpcRequest/Response,QueryParams,PagedQueryParams,FilterPredicate,CirclesQueryResponse. - Pathfinding + flow:
FindPathParams,PathfindingResult,FlowMatrix,TransferStep,SimulatedBalance. - Events:
CirclesEvent,CirclesEventType(25+ variants) with unknown-event fallback. - Config:
CirclesConfigshared across SDK/RPC/pathfinder/transfers. - Profiles/trust/tokens/groups:
AvatarInfo,Profile,TrustRelation,TokenInfo,GroupRow, and friends.
Quickstart
use ;
let config = CirclesConfig ;
let params = FindPathParams ;
let avatar = AvatarInfo ;
Usage notes
- Designed for
serderound-trips against Circles RPC responses and contract bindings generated incrates/abis. - Unknown event types are preserved via
CrcUnknownEventto keep WS/HTTP parsing resilient. FindPathParams.target_flowisU256(RPC contract), but downstream helpers cap toU192for flow matrix safety.
Links
- Workspace overview:
../../README.md - TypeScript reference: https://github.com/aboutcircles/circles-sdk
- Alloy docs: https://alloy-rs.github.io/alloy/