Skip to main content

@midnight-ntwrk/midnight-js-http-client-proof-provider v0.2.5 • API


Midnight.js API Reference v0.2.5 / @midnight-ntwrk/midnight-js-http-client-proof-provider / serializePayload

Function: serializePayload()

serializePayload<K>(unprovenTx, zkConfig?): Promise<ArrayBuffer>

Creates a serialized proving server payload from the given transaction and ZK configuration.

Type parameters

K extends string

Parameters

unprovenTx: UnprovenTransaction

The transaction being proven.

zkConfig?: ZKConfig<K>

The ZK artifacts needed to prove the transaction. Undefined if a deployment transaction is being proven.

Returns

Promise<ArrayBuffer>