@opaquecash/relayer-client submits a permissionless on-chain call (a PSR
verifyReputation, a future pool withdrawal) through the relayer market so the
submitting wallet is a staked relayer’s, not yours. See
relayer-market.md
for the protocol.
How it works
- You commit to a hidden payload and fund an escrow with the fee (
createJob). - You advertise the job to a relayer node’s HTTP gateway; nodes bid.
- You verify bids (signature, registered key, free stake) and pick a stake-weighted winner.
- You seal the payload to the winner’s x25519 key (NaCl
crypto_box) and deliver it. - The relayer accepts (bonding the fee) and submits. The escrow verifies the payload against the commitment and pays atomically with execution, so a relayer cannot take the fee without doing the work, and one that accepts then stalls is slashed.
submitGasPrivate
The one-call flow over an injected funding step and registry readers:
readers supplies the on-chain truth used to verify bids:
sdk/examples/gas-private-submit.ts.
Building blocks
For custom flows, the steps are exported individually:| Export | Purpose |
|---|---|
prepareJob(payload, opts) | Commitment + advert + the createJob artifact (EVM tx request or Solana instruction) |
buildEvmCreateJob / buildSolanaCreateJob | Escrow funding tx builders |
postAdvert / collectBids / postPayload | HTTP gateway client |
verifyEvmBidSignature / verifyBids / selectWinner | Bid verification + stake-weighted selection |
sealBox / openBox | NaCl crypto_box, byte-compatible with the relayer node |
payloadHash / payloadBytes | Commitment + box plaintext for either chain |
Solana
Pass aSolanaJobPayload ({ chain: 1, instruction }) and opts.creator; the inner
instruction’s accounts must not be signers (the escrow signs nothing on their
behalf). prepareJob returns solanaCreateJob for you to send. Verify Solana bids
with an ed25519 verifier passed as verifySig.
The payload becomes public when the relayer submits it on-chain; the market hides the
submitter, not the action. Fund the escrow from an address unlinked to your primary
wallet (fee-in-proof, which removes this, is deferred to a later version).