DocsReference@proto-kit/protocolClassesTransactionProverArguments

@proto-kit/protocolDocs


Documentation / @proto-kit/protocol / TransactionProverArguments

Class: TransactionProverArguments

Extends

  • object

Constructors

new TransactionProverArguments()

new TransactionProverArguments(value): TransactionProverArguments

Parameters

value

value.bundleListPreimage: BundlePreimage = BundlePreimage

value.networkState: NetworkState = NetworkState

value.pendingSTBatchesHash: Field = Field

value.transactionHash: Field = Field

value.witnessedRootsHash: Field = Field

Returns

TransactionProverArguments

Inherited from

Struct({ // Commitment to the list of unprocessed (pending) batches of STs that need to be proven pendingSTBatchesHash: Field, witnessedRootsHash: Field, transactionHash: Field, bundleListPreimage: BundlePreimage, networkState: NetworkState, }).constructor

Defined in

node_modules/o1js/dist/node/lib/provable/types/struct.d.ts:103

Properties

bundleListPreimage

bundleListPreimage: BundlePreimage = BundlePreimage

Inherited from

Struct({ // Commitment to the list of unprocessed (pending) batches of STs that need to be proven pendingSTBatchesHash: Field, witnessedRootsHash: Field, transactionHash: Field, bundleListPreimage: BundlePreimage, networkState: NetworkState, }).bundleListPreimage

Defined in

packages/protocol/src/prover/transaction/TransactionProvable.ts:104


networkState

networkState: NetworkState = NetworkState

Inherited from

Struct({ // Commitment to the list of unprocessed (pending) batches of STs that need to be proven pendingSTBatchesHash: Field, witnessedRootsHash: Field, transactionHash: Field, bundleListPreimage: BundlePreimage, networkState: NetworkState, }).networkState

Defined in

packages/protocol/src/prover/transaction/TransactionProvable.ts:105


pendingSTBatchesHash

pendingSTBatchesHash: Field = Field

Inherited from

Struct({ // Commitment to the list of unprocessed (pending) batches of STs that need to be proven pendingSTBatchesHash: Field, witnessedRootsHash: Field, transactionHash: Field, bundleListPreimage: BundlePreimage, networkState: NetworkState, }).pendingSTBatchesHash

Defined in

packages/protocol/src/prover/transaction/TransactionProvable.ts:101


transactionHash

transactionHash: Field = Field

Inherited from

Struct({ // Commitment to the list of unprocessed (pending) batches of STs that need to be proven pendingSTBatchesHash: Field, witnessedRootsHash: Field, transactionHash: Field, bundleListPreimage: BundlePreimage, networkState: NetworkState, }).transactionHash

Defined in

packages/protocol/src/prover/transaction/TransactionProvable.ts:103


witnessedRootsHash

witnessedRootsHash: Field = Field

Inherited from

Struct({ // Commitment to the list of unprocessed (pending) batches of STs that need to be proven pendingSTBatchesHash: Field, witnessedRootsHash: Field, transactionHash: Field, bundleListPreimage: BundlePreimage, networkState: NetworkState, }).witnessedRootsHash

Defined in

packages/protocol/src/prover/transaction/TransactionProvable.ts:102


_isStruct

static _isStruct: true

Inherited from

Struct({ // Commitment to the list of unprocessed (pending) batches of STs that need to be proven pendingSTBatchesHash: Field, witnessedRootsHash: Field, transactionHash: Field, bundleListPreimage: BundlePreimage, networkState: NetworkState, })._isStruct

Defined in

node_modules/o1js/dist/node/lib/provable/types/struct.d.ts:104


check()

static check: (value) => void

Add assertions to the proof to check if value is a valid member of type T. This function does not return anything, instead it creates any number of assertions to prove that value is a valid member of the type T.

For instance, calling check function on the type Bool asserts that the value of the element is either 1 or 0.

Parameters

value

the element of type T to put assertions on.

value.bundleListPreimage: BundlePreimage = BundlePreimage

value.networkState: NetworkState = NetworkState

value.pendingSTBatchesHash: Field = Field

value.transactionHash: Field = Field

value.witnessedRootsHash: Field = Field

Returns

void

Inherited from

Struct({ // Commitment to the list of unprocessed (pending) batches of STs that need to be proven pendingSTBatchesHash: Field, witnessedRootsHash: Field, transactionHash: Field, bundleListPreimage: BundlePreimage, networkState: NetworkState, }).check

Defined in

node_modules/o1js/dist/node/lib/provable/types/provable-intf.d.ts:60


empty()

static empty: () => object

Returns

object

bundleListPreimage

bundleListPreimage: BundlePreimage = BundlePreimage

networkState

networkState: NetworkState = NetworkState

pendingSTBatchesHash

pendingSTBatchesHash: Field = Field

transactionHash

transactionHash: Field = Field

witnessedRootsHash

witnessedRootsHash: Field = Field

Inherited from

Struct({ // Commitment to the list of unprocessed (pending) batches of STs that need to be proven pendingSTBatchesHash: Field, witnessedRootsHash: Field, transactionHash: Field, bundleListPreimage: BundlePreimage, networkState: NetworkState, }).empty

Defined in

node_modules/o1js/dist/node/lib/provable/types/struct.d.ts:113


fromFields()

static fromFields: (fields) => object

Parameters

fields: Field[]

Returns

object

bundleListPreimage

bundleListPreimage: BundlePreimage = BundlePreimage

networkState

networkState: NetworkState = NetworkState

pendingSTBatchesHash

pendingSTBatchesHash: Field = Field

transactionHash

transactionHash: Field = Field

witnessedRootsHash

witnessedRootsHash: Field = Field

Inherited from

Struct({ // Commitment to the list of unprocessed (pending) batches of STs that need to be proven pendingSTBatchesHash: Field, witnessedRootsHash: Field, transactionHash: Field, bundleListPreimage: BundlePreimage, networkState: NetworkState, }).fromFields

Defined in

node_modules/o1js/dist/node/lib/provable/types/provable-intf.d.ts:95


fromJSON()

static fromJSON: (x) => object

Parameters

x

x.bundleListPreimage = BundlePreimage

x.bundleListPreimage.fromStateTransitionsHash: string = Field

x.bundleListPreimage.fromWitnessedRootsHash: string = Field

x.bundleListPreimage.preimage: string = Field

x.networkState = NetworkState

x.networkState.block = CurrentBlock

x.networkState.block.height: string = UInt64

x.networkState.previous = PreviousBlock

x.networkState.previous.rootHash: string = Field

x.pendingSTBatchesHash: string = Field

x.transactionHash: string = Field

x.witnessedRootsHash: string = Field

Returns

object

bundleListPreimage

bundleListPreimage: BundlePreimage = BundlePreimage

networkState

networkState: NetworkState = NetworkState

pendingSTBatchesHash

pendingSTBatchesHash: Field = Field

transactionHash

transactionHash: Field = Field

witnessedRootsHash

witnessedRootsHash: Field = Field

Inherited from

Struct({ // Commitment to the list of unprocessed (pending) batches of STs that need to be proven pendingSTBatchesHash: Field, witnessedRootsHash: Field, transactionHash: Field, bundleListPreimage: BundlePreimage, networkState: NetworkState, }).fromJSON

Defined in

node_modules/o1js/dist/node/lib/provable/types/struct.d.ts:112


fromValue

static fromValue: (x) => object & (value) => object

Convert provable type from a normal JS type.

Inherited from

Struct({ // Commitment to the list of unprocessed (pending) batches of STs that need to be proven pendingSTBatchesHash: Field, witnessedRootsHash: Field, transactionHash: Field, bundleListPreimage: BundlePreimage, networkState: NetworkState, }).fromValue

Defined in

node_modules/o1js/dist/node/lib/provable/types/provable-intf.d.ts:68


toAuxiliary()

static toAuxiliary: (value?) => any[]

A function that takes value (optional), an element of type T, as argument and returns an array of any type that make up the “auxiliary” (non-provable) data of value.

Parameters

value?

the element of type T to generate the auxiliary data array from, optional. If not provided, a default value for auxiliary data is returned.

value.bundleListPreimage?: BundlePreimage = BundlePreimage

value.networkState?: NetworkState = NetworkState

value.pendingSTBatchesHash?: Field = Field

value.transactionHash?: Field = Field

value.witnessedRootsHash?: Field = Field

Returns

any[]

An array of any type describing how this T element is made up of “auxiliary” (non-provable) data.

Inherited from

Struct({ // Commitment to the list of unprocessed (pending) batches of STs that need to be proven pendingSTBatchesHash: Field, witnessedRootsHash: Field, transactionHash: Field, bundleListPreimage: BundlePreimage, networkState: NetworkState, }).toAuxiliary

Defined in

node_modules/o1js/dist/node/lib/provable/types/provable-intf.d.ts:34


toCanonical()?

static optional toCanonical: (x) => object

Optional method which transforms a provable type into its canonical representation.

This is needed for types that have multiple representations of the same underlying value, and might even not have perfect completeness for some of those representations.

An example is the ForeignField class, which allows non-native field elements to exist in unreduced form. The unreduced form is not perfectly complete, for example, addition of two unreduced field elements can cause a prover error.

Specific protocols need to be able to protect themselves against incomplete operations at all costs. For example, when using actions and reducer, the reducer must be able to produce a proof regardless of the input action. toCanonical() converts any input into a safe form and enables us to handle cases like this generically.

Note: For most types, this method is the identity function. The identity function will also be used when the toCanonical() is not present on a type.

Parameters

x

x.bundleListPreimage: BundlePreimage = BundlePreimage

x.networkState: NetworkState = NetworkState

x.pendingSTBatchesHash: Field = Field

x.transactionHash: Field = Field

x.witnessedRootsHash: Field = Field

Returns

object

bundleListPreimage

bundleListPreimage: BundlePreimage = BundlePreimage

networkState

networkState: NetworkState = NetworkState

pendingSTBatchesHash

pendingSTBatchesHash: Field = Field

transactionHash

transactionHash: Field = Field

witnessedRootsHash

witnessedRootsHash: Field = Field

Inherited from

Struct({ // Commitment to the list of unprocessed (pending) batches of STs that need to be proven pendingSTBatchesHash: Field, witnessedRootsHash: Field, transactionHash: Field, bundleListPreimage: BundlePreimage, networkState: NetworkState, }).toCanonical

Defined in

node_modules/o1js/dist/node/lib/provable/types/provable-intf.d.ts:85


toFields()

static toFields: (value) => Field[]

A function that takes value, an element of type T, as argument and returns an array of Field elements that make up the provable data of value.

Parameters

value

the element of type T to generate the Field array from.

value.bundleListPreimage: BundlePreimage = BundlePreimage

value.networkState: NetworkState = NetworkState

value.pendingSTBatchesHash: Field = Field

value.transactionHash: Field = Field

value.witnessedRootsHash: Field = Field

Returns

Field[]

A Field array describing how this T element is made up of Field elements.

Inherited from

Struct({ // Commitment to the list of unprocessed (pending) batches of STs that need to be proven pendingSTBatchesHash: Field, witnessedRootsHash: Field, transactionHash: Field, bundleListPreimage: BundlePreimage, networkState: NetworkState, }).toFields

Defined in

node_modules/o1js/dist/node/lib/provable/types/provable-intf.d.ts:24


toInput()

static toInput: (x) => object

Parameters

x

x.bundleListPreimage: BundlePreimage = BundlePreimage

x.networkState: NetworkState = NetworkState

x.pendingSTBatchesHash: Field = Field

x.transactionHash: Field = Field

x.witnessedRootsHash: Field = Field

Returns

object

fields?

optional fields: Field[]

packed?

optional packed: [Field, number][]

Inherited from

Struct({ // Commitment to the list of unprocessed (pending) batches of STs that need to be proven pendingSTBatchesHash: Field, witnessedRootsHash: Field, transactionHash: Field, bundleListPreimage: BundlePreimage, networkState: NetworkState, }).toInput

Defined in

node_modules/o1js/dist/node/lib/provable/types/struct.d.ts:107


toJSON()

static toJSON: (x) => object

Parameters

x

x.bundleListPreimage: BundlePreimage = BundlePreimage

x.networkState: NetworkState = NetworkState

x.pendingSTBatchesHash: Field = Field

x.transactionHash: Field = Field

x.witnessedRootsHash: Field = Field

Returns

object

bundleListPreimage

bundleListPreimage: object = BundlePreimage

bundleListPreimage.fromStateTransitionsHash

bundleListPreimage.fromStateTransitionsHash: string = Field

bundleListPreimage.fromWitnessedRootsHash

bundleListPreimage.fromWitnessedRootsHash: string = Field

bundleListPreimage.preimage

bundleListPreimage.preimage: string = Field

networkState

networkState: object = NetworkState

networkState.block

networkState.block: object = CurrentBlock

networkState.block.height

networkState.block.height: string = UInt64

networkState.previous

networkState.previous: object = PreviousBlock

networkState.previous.rootHash

networkState.previous.rootHash: string = Field

pendingSTBatchesHash

pendingSTBatchesHash: string = Field

transactionHash

transactionHash: string = Field

witnessedRootsHash

witnessedRootsHash: string = Field

Inherited from

Struct({ // Commitment to the list of unprocessed (pending) batches of STs that need to be proven pendingSTBatchesHash: Field, witnessedRootsHash: Field, transactionHash: Field, bundleListPreimage: BundlePreimage, networkState: NetworkState, }).toJSON

Defined in

node_modules/o1js/dist/node/lib/provable/types/struct.d.ts:111


toValue()

static toValue: (x) => object

Convert provable type to a normal JS type.

Parameters

x

x.bundleListPreimage: BundlePreimage = BundlePreimage

x.networkState: NetworkState = NetworkState

x.pendingSTBatchesHash: Field = Field

x.transactionHash: Field = Field

x.witnessedRootsHash: Field = Field

Returns

object

bundleListPreimage

bundleListPreimage: object = BundlePreimage

bundleListPreimage.fromStateTransitionsHash

bundleListPreimage.fromStateTransitionsHash: bigint = Field

bundleListPreimage.fromWitnessedRootsHash

bundleListPreimage.fromWitnessedRootsHash: bigint = Field

bundleListPreimage.preimage

bundleListPreimage.preimage: bigint = Field

networkState

networkState: object = NetworkState

networkState.block

networkState.block: object = CurrentBlock

networkState.block.height

networkState.block.height: bigint = UInt64

networkState.previous

networkState.previous: object = PreviousBlock

networkState.previous.rootHash

networkState.previous.rootHash: bigint = Field

pendingSTBatchesHash

pendingSTBatchesHash: bigint = Field

transactionHash

transactionHash: bigint = Field

witnessedRootsHash

witnessedRootsHash: bigint = Field

Inherited from

Struct({ // Commitment to the list of unprocessed (pending) batches of STs that need to be proven pendingSTBatchesHash: Field, witnessedRootsHash: Field, transactionHash: Field, bundleListPreimage: BundlePreimage, networkState: NetworkState, }).toValue

Defined in

node_modules/o1js/dist/node/lib/provable/types/provable-intf.d.ts:64

Methods

sizeInFields()

static sizeInFields(): number

Return the size of the T type in terms of Field type, as Field is the primitive type.

Returns

number

A number representing the size of the T type in terms of Field type.

Inherited from

Struct({ // Commitment to the list of unprocessed (pending) batches of STs that need to be proven pendingSTBatchesHash: Field, witnessedRootsHash: Field, transactionHash: Field, bundleListPreimage: BundlePreimage, networkState: NetworkState, }).sizeInFields

Defined in

node_modules/o1js/dist/node/lib/provable/types/provable-intf.d.ts:51