Broadcaster integration
This page assumes the identity checks in the overview. Send calls to the selected /v1/chains/{chainId} using Content-Type: application/json, positional parameter arrays, and non-null request IDs.
Methods and messages
{"jsonrpc":"2.0","id":"relay-status-1","method":"broadcaster_getStatus","params":[]}
| Method | Content of params | Result |
|---|---|---|
broadcaster_getVersion | [] | apiVersion, protocolVersion |
broadcaster_getStatus | [] | Identity, halt status, scheduling, and source policy |
broadcaster_getTokenSupport | [{tokenAddress}] | Service status and supported |
broadcaster_getGasReference | [{shape}] | SDK gas model and source, or unavailable error |
broadcaster_estimateQuote | [{data,schedule?}] | feeRecipient, feeAmount, maxGas |
broadcaster_getQuote | [{data,schedule?}] | quote, signature, and optional source requirements |
broadcaster_submitTransaction | [{data,quote,signature,memberProof?,proofSidecars?}] | Durable job status |
broadcaster_getTransactionStatus | [{id}] | Current job status |
broadcaster_cancelTransaction | [{id,cancelToken}] | Persisted cancellation or error |
Business query objects reject unknown fields. Amounts, gas limits, chain IDs, deadlines, and schedule times are decimal strings; shape counts and gas-reference gasUnits/sampleCount are JSON numbers. Addresses are 20-byte hex, hashes 32-byte hex, and calldata/signatures hex byte strings.
This read-only example requires a POSIX shell, curl, jq, the full chain route BROADCASTER_RPC_URL, and a real nonzero ERC20 TOKEN_ADDRESS. Token support discovery sends no calldata, estimates no fee, and makes no Provenance call.
: "${BROADCASTER_RPC_URL:?Set the full trusted chain RPC URL}"
: "${TOKEN_ADDRESS:?Set the expected ERC20 contract address}"
jq -n --arg token "$TOKEN_ADDRESS" \
'{jsonrpc:"2.0",id:2,method:"broadcaster_getTokenSupport",params:[{tokenAddress:$token}]}' |
curl --fail-with-body -sS "$BROADCASTER_RPC_URL" \
-H 'Content-Type: application/json' --data-binary @-
supported:true establishes current pricing and service admission capability, not that every operation can receive a quote.
Preparation through submission
- Prepare business intent with the matching SDK, choosing token, recipient, amount, and inputs.
- Call estimateQuote and rebuild with feeRecipient/feeAmount. Re-estimate after structural changes and enforce the user's maxFeeAmount. SDK defaults allow at most four rebuilds.
- Call getQuote for the final fee-bearing calldata. Verify EIP-712 signature, deployment, full requestHash, token, fee, deadline, and execution.
- Freeze every business field before wallet authorization, required proofs, and funding signatures. Shield needs no ZK proving; Credit revoke uses the corresponding owner authorization.
- Prepare public Provenance sidecars according to the signed service policy and SDK recursive memberProof for aggregate execution. Never send private witnesses.
- Persist the complete submit body locally, then call submitTransaction. Save the returned service id, poll status, and independently authenticate chain facts.
The quote domain is InvisiBroadcaster, version 1, bound to chain ID and Protocol contract. A quote contains token, feeRecipient, feeAmount, deadline, maxGas, requestHash, execution, and optional signed schedule. Use the matching SDK's verification rather than implementing hashes manually or changing returned fields.
estimate/getQuote accept no proofSidecars and make no Provenance calls. With source policy enabled, an ordinary Note-input transact submission requires one operationIndex:"0" sidecar; zero-input public funding, Shield, and Credit entries do not. Source rejection or unavailability cannot become allow. Policy changes before first submission require a new quote; already attempted submissions retain the original payload for recovery.
Aggregate execution
The service selects direct or aggregate before authorization and proving; the client cannot switch after quoting. Aggregate submission accepts one member's public recursive evidence, queues it, then constructs the outer proof on the service. Compatible members can share a transaction hash while retaining separate job tracking. A one-member outer aggregate is possible when no peer arrives. Aggregation does not relax receipt or finality requirements.
Job states and lost responses
| state | Meaning and recovery |
|---|---|
pending | Durable send reservation; a hash may not yet exist; retain inputs |
submitted | Sending returned a transaction hash; continue receipt observation |
uncertain | Send outcome unknown; preserve original request and reservations |
queued / proving | Waiting for or generating the outer proof, without on-chain success |
confirmed / reverted | Successful / reverted receipt; evaluate finality separately |
scheduled / preparing | Waiting for schedule / checking due execution |
expired / rejected / cancelled | Window or admission outcome for unsent work; no protocol-signature revocation |
If the submit response is lost before the durable id is known, replay the saved full body unchanged to recover the record. Once the id is known, query it. Do not guess an ID, generate a new quote/proof, or switch services to resend the same inputs. Unknown IDs return -32001, not null.
confirmation is {level,status,block}. level is pending/included/safe/finalized and status is available/unsupported/unavailable/inconsistent. block is the actual inclusion block or null, with a decimal-string number and numeric timestamp. Unavailable native queries neither promote confirmation nor authorize resend. Wallet reservation release still requires canonical chain reconciliation.
Errors and transport budgets
Inspect both HTTP and JSON-RPC. Defaults are a 256 KiB body, at most 16 calls per batch, and a 1 MiB batch response; deployments can tune admission resources. Back off according to Retry-After for 429, reduce bodies for 413, and fix media types for 415. Gateway authentication and CORS depend on the operator.
For -32602, fix parameters. -32000 is generic business rejection, -32002 means no gas model for the shape, -32010 source proof/rule rejection, and -32011 unavailable source results or durable tracking. Do not classify by error text or treat a disconnect as rejection. Use identified requests for every method: id-less notifications are suppressed without execution and cannot submit transactions.