Repository navigation
feat(server): escrow relay prepare and submit endpoints for hires (#96) [chain tracker] - #122
Conversation
Narrow rules scoped by file path and line shape for env var name constants, generated class-name lookups and recorded ledger keys. Migrates the existing allowlist to [[allowlists]], which cannot be mixed with the deprecated [allowlist].
Adds PreparedTransaction, CreateHireResult, HireDetail, Hire, Payment and Puls3ApiException, the escrow_preparation table and the requestId, input and jobId columns of hire. Part of #96.
Reads the preparation validity, inclusion fee and platform fee from the environment with no defaults (ADR-0005 D3). Documents the keys in .env.example. Part of #96.
Integration branch for the chained PRs that replace #119. It carries no changes of its own.
Defines how the relay decodes, compares and re-encodes a transaction envelope. Part of #96.
…opes Adds stellar_dart and crypto. The spike decodes recorded testnet envelopes, re-encodes them byte for byte and checks the network hash and the ed25519 signature. Part of #96.
Decodes a signed envelope, compares it field by field with its preparation (contract, function, arguments, source, time bounds) and verifies the signature. Part of #96.
Adds account sequence lookup and the simulate, send and get-transaction calls that carry an unsigned or signed envelope. Part of #96.
A new preparation supersedes the previous one, and each preparation has at most one submission, proven by a Postgres race test. Part of #96.
Gives the relay its view of a hire: idempotency key, input and escrow job id, with a hire having no status until create_job is confirmed. Part of #96.
prepareCreateJob, prepareFund, prepareComplete and prepareReject build, simulate and store an unsigned envelope. A new preparation supersedes the previous one, and the configuration has no defaults. Part of #96.
submitEscrowCall checks the signed envelope against its preparation, stores a ChainSubmission as submitted and only then sends it. Chain outcomes never throw, and a repeated submit returns the existing record. Part of #96.
HireEscrowEffects.onJobCreated binds the job id once and opens the hire. Part of #96.
createHire returns the hire with an unsigned create_job, and a repeated requestId from the same wallet returns the same hire or IdempotencyKeyReused. Part of #96.
createHire, prepareCreateJob, prepareFund, prepareComplete, prepareReject and submitEscrowCall, each behind requireLogin through an injectable SessionWallet. The production default fails closed with AuthenticationUnavailable until wallet sessions land (#25). Regenerates the endpoint and client. Part of #96.
Lists ChainDataUnavailable for submitEscrowCall, drops the TypeScript sidecar from the ADRs and documents the config keys and the end-to-end run. Part of #96.
Runs the real endpoint, services, codec, RPC client and chain tracker against testnet. The consumer key stays in the process environment. Part of #96.
Deploying puls3 with
|
| Latest commit: |
f54fbb5
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://953dbd20.puls3-4lw.pages.dev |
| Branch Preview URL: | https://feat-96-escrow-relay.puls3-4lw.pages.dev |
|
Thanks for splitting this so cleanly, Moises. Our messages crossed this morning, and the chain works well. I approved #123 to #134. Each slice is part of the code I reviewed in full on #119 at The follow-ups from the #119 review still apply. I'll open an issue for them after the demo. Merge order: to keep each parent's history intact, please merge from the top down with merge commits (not squash), #123 into |
…-12-openspec docs: escrow relay API, ADRs, README, testnet e2e and OpenSpec archive (#96)
…-10-endpoint feat(server): submit signed escrow calls and expose the relay in the hire endpoint (#96)
…-07-prepare feat(server): persist preparations and prepare unsigned escrow envelopes (#96)
…-04-rpc-client feat(server): escrow relay foundations: protocol, config, envelope codec and RPC (#96)
Closes #96
Draft, do not merge until every PR of the chain is reviewed and integrated.
Replaces #119 (about 20k lines), split after its review into 4 chained PRs. The first targets this branch and each later one targets the previous PR's branch, so review each against its parent. This branch carries no changes of its own.
Chain
Authored lines exclude generated code, migrations and recorded fixtures. The ones over 400 are code plus the tests of code that moves funds; they need
size:exception.