landedTransactions
landedTransactions(
transactions):Required<Pick<JSONRPCOptions,"eth_getTransactionByHash"|"eth_getTransactionReceipt">>
Defined in: packages/synapse-core/src/mocks/jsonrpc/transactions.ts:130
JSON-RPC handlers for transactions an SP submitted. Spread them into JSONRPC options. Unknown hashes have no transaction or receipt, so a receipt wait keeps polling.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
transactions |
Record<`0x${string}`, LandedTransaction> | ((hash) => LandedTransaction | undefined) |
How each transaction landed, keyed by hash, or a lookup that returns undefined for unknown hashes. |
Returns
Section titled “Returns”Required<Pick<JSONRPCOptions, "eth_getTransactionByHash" | "eth_getTransactionReceipt">>
eth_getTransactionByHash and eth_getTransactionReceipt handlers.
Example
Section titled “Example”server.use(
Mocks.JSONRPC({
...Mocks.presets.basic,
...Mocks.landedTransactions({ [txHash]: { dataSetId: 1n, pieceIds: [0n] } }),
})
)