Description
Follow-up from the #79 spike (see docs/spikes/issue-79-retry-session-multisig.md).
MultiSigEscrowClient keeps operation state in an in-memory Map, scoped to one process. Per the
README, signers are expected to submit their signed XDR independently, which requires state
visible across processes. The spike defined the target abstraction, MultiSigStateStore (in
src/types/multisig.ts), and added exportState/importState as a non-breaking stopgap, but did
not implement a real backend-backed store since that requires new backend endpoints.
Proposal
- Add backend REST endpoints for multisig operations: create, add-signature, get-status
(mirroring the current MultiSigEscrowClient sync methods), authorized via the existing
auth/session token.
- Implement
MultiSigStateStore in the SDK against those endpoints.
- Wire it into
MultiSigEscrowClient as an injectable store (defaulting to the current in-memory
Map for local/offline use).
Note
Every MultiSigEscrowClient method is currently synchronous. Wiring in an async store is a
breaking API change (methods become Promise-returning) and should ship behind a major version
bump, with the sync in-memory path kept available for local testing.
Acceptance Criteria
Description
Follow-up from the #79 spike (see
docs/spikes/issue-79-retry-session-multisig.md).MultiSigEscrowClientkeeps operation state in an in-memoryMap, scoped to one process. Per theREADME, signers are expected to submit their signed XDR independently, which requires state
visible across processes. The spike defined the target abstraction,
MultiSigStateStore(insrc/types/multisig.ts), and addedexportState/importStateas a non-breaking stopgap, but didnot implement a real backend-backed store since that requires new backend endpoints.
Proposal
(mirroring the current
MultiSigEscrowClientsync methods), authorized via the existingauth/session token.
MultiSigStateStorein the SDK against those endpoints.MultiSigEscrowClientas an injectable store (defaulting to the current in-memoryMapfor local/offline use).Note
Every
MultiSigEscrowClientmethod is currently synchronous. Wiring in an async store is abreaking API change (methods become
Promise-returning) and should ship behind a major versionbump, with the sync in-memory path kept available for local testing.
Acceptance Criteria
MultiSigStateStoreimplementation against those endpointsMultiSigEscrowClientaccepts an injectable store (async), default remains in-memory