Skip to content

Documentation / @etherfold/core / serializeWireBatch

Function: serializeWireBatch() ​

serializeWireBatch<ABI>(batch): string

Defined in: packages/core/src/streamBuilder.ts:650

A batch as JSON, with BigInts tagged.

The codec is here, next to the envelope, so that both halves of the wire use the same one: a decoded log's args hold a BigInt for every uint256 an ABI declares, JSON.stringify throws outright on those, and the "123n" suffix convention would revive a contract-emitted string ending in n as a number. See taggedBnReplacer.

Type Parameters ​

ABI ​

ABI extends Abi

Parameters ​

batch ​

WireBatch<ABI>

Returns ​

string