Skip to main content

serializePayload

Midnight.js API Reference v2.0.2


Midnight.js API Reference / @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​

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>