@proto-kit/protocol • Docs
Documentation / @proto-kit/protocol / TransactionProverExecutionData
Class: TransactionProverExecutionData
Extends
object
Constructors
new TransactionProverExecutionData()
new TransactionProverExecutionData(
value):TransactionProverExecutionData
Parameters
• value
• value.args: TransactionProverArguments = TransactionProverArguments
• value.transaction: TransactionProverTransactionArguments = TransactionProverTransactionArguments
Returns
TransactionProverExecutionData
Inherited from
Struct({ transaction: TransactionProverTransactionArguments, args: TransactionProverArguments, }).constructor
Defined in
node_modules/o1js/dist/node/lib/provable/types/struct.d.ts:103
Properties
args
args:
TransactionProverArguments=TransactionProverArguments
Inherited from
Struct({ transaction: TransactionProverTransactionArguments, args: TransactionProverArguments, }).args
Defined in
packages/protocol/src/prover/transaction/TransactionProvable.ts:135
transaction
transaction:
TransactionProverTransactionArguments=TransactionProverTransactionArguments
Inherited from
Struct({ transaction: TransactionProverTransactionArguments, args: TransactionProverArguments, }).transaction
Defined in
packages/protocol/src/prover/transaction/TransactionProvable.ts:134
_isStruct
static_isStruct:true
Inherited from
Struct({ transaction: TransactionProverTransactionArguments, args: TransactionProverArguments, })._isStruct
Defined in
node_modules/o1js/dist/node/lib/provable/types/struct.d.ts:104
check()
staticcheck: (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.args: TransactionProverArguments = TransactionProverArguments
• value.transaction: TransactionProverTransactionArguments = TransactionProverTransactionArguments
Returns
void
Inherited from
Struct({ transaction: TransactionProverTransactionArguments, args: TransactionProverArguments, }).check
Defined in
node_modules/o1js/dist/node/lib/provable/types/provable-intf.d.ts:60
empty()
staticempty: () =>object
Returns
object
args
args:
TransactionProverArguments=TransactionProverArguments
transaction
transaction:
TransactionProverTransactionArguments=TransactionProverTransactionArguments
Inherited from
Struct({ transaction: TransactionProverTransactionArguments, args: TransactionProverArguments, }).empty
Defined in
node_modules/o1js/dist/node/lib/provable/types/struct.d.ts:113
fromFields()
staticfromFields: (fields,aux) =>object
A function that returns an element of type T from the given provable and “auxiliary” data.
This function is the reverse operation of calling toFields and toAuxiliary methods on an element of type T.
Parameters
• fields: Field[]
an array of Field elements describing the provable data of the new T element.
• aux: any[]
an array of any type describing the “auxiliary” data of the new T element, optional.
Returns
object
An element of type T generated from the given provable and “auxiliary” data.
args
args:
TransactionProverArguments=TransactionProverArguments
transaction
transaction:
TransactionProverTransactionArguments=TransactionProverTransactionArguments
Inherited from
Struct({ transaction: TransactionProverTransactionArguments, args: TransactionProverArguments, }).fromFields
Defined in
node_modules/o1js/dist/node/lib/provable/types/provable-intf.d.ts:45
fromJSON()
staticfromJSON: (x) =>object
Parameters
• x
• x.args = TransactionProverArguments
• x.args.bundleListPreimage = BundlePreimage
• x.args.bundleListPreimage.fromStateTransitionsHash: string = Field
• x.args.bundleListPreimage.fromWitnessedRootsHash: string = Field
• x.args.bundleListPreimage.preimage: string = Field
• x.args.networkState = NetworkState
• x.args.networkState.block = CurrentBlock
• x.args.networkState.block.height: string = UInt64
• x.args.networkState.previous = PreviousBlock
• x.args.networkState.previous.rootHash: string = Field
• x.args.pendingSTBatchesHash: string = Field
• x.args.transactionHash: string = Field
• x.args.witnessedRootsHash: string = Field
• x.transaction = TransactionProverTransactionArguments
• x.transaction.signature: any = Signature
• x.transaction.transaction = RuntimeTransaction
• x.transaction.transaction.argsHash: string = Field
• x.transaction.transaction.methodId: string = Field
• x.transaction.transaction.nonce = UInt64Option
• x.transaction.transaction.nonce.isSome: boolean = Bool
• x.transaction.transaction.nonce.value: any = valueType
• x.transaction.transaction.sender = PublicKeyOption
• x.transaction.transaction.sender.isSome: boolean = Bool
• x.transaction.transaction.sender.value: any = valueType
• x.transaction.verificationKeyAttestation = RuntimeVerificationKeyAttestation
• x.transaction.verificationKeyAttestation.verificationKey: string = VerificationKey
• x.transaction.verificationKeyAttestation.witness = VKTreeWitness
• x.transaction.verificationKeyAttestation.witness.isLeft: boolean[]
• x.transaction.verificationKeyAttestation.witness.path: string[]
Returns
object
args
args:
TransactionProverArguments=TransactionProverArguments
transaction
transaction:
TransactionProverTransactionArguments=TransactionProverTransactionArguments
Inherited from
Struct({ transaction: TransactionProverTransactionArguments, args: TransactionProverArguments, }).fromJSON
Defined in
node_modules/o1js/dist/node/lib/provable/types/struct.d.ts:112
fromValue
staticfromValue: (x) =>object& (value) =>object
Convert provable type from a normal JS type.
Inherited from
Struct({ transaction: TransactionProverTransactionArguments, args: TransactionProverArguments, }).fromValue
Defined in
node_modules/o1js/dist/node/lib/provable/types/provable-intf.d.ts:68
toAuxiliary()
statictoAuxiliary: (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.args?: TransactionProverArguments = TransactionProverArguments
• value.transaction?: TransactionProverTransactionArguments = TransactionProverTransactionArguments
Returns
any[]
An array of any type describing how this T element is made up of “auxiliary” (non-provable) data.
Inherited from
Struct({ transaction: TransactionProverTransactionArguments, args: TransactionProverArguments, }).toAuxiliary
Defined in
node_modules/o1js/dist/node/lib/provable/types/provable-intf.d.ts:34
toCanonical()?
staticoptionaltoCanonical: (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.args: TransactionProverArguments = TransactionProverArguments
• x.transaction: TransactionProverTransactionArguments = TransactionProverTransactionArguments
Returns
object
args
args:
TransactionProverArguments=TransactionProverArguments
transaction
transaction:
TransactionProverTransactionArguments=TransactionProverTransactionArguments
Inherited from
Struct({ transaction: TransactionProverTransactionArguments, args: TransactionProverArguments, }).toCanonical
Defined in
node_modules/o1js/dist/node/lib/provable/types/provable-intf.d.ts:85
toFields()
statictoFields: (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.args: TransactionProverArguments = TransactionProverArguments
• value.transaction: TransactionProverTransactionArguments = TransactionProverTransactionArguments
Returns
Field[]
A Field array describing how this T element is made up of Field elements.
Inherited from
Struct({ transaction: TransactionProverTransactionArguments, args: TransactionProverArguments, }).toFields
Defined in
node_modules/o1js/dist/node/lib/provable/types/provable-intf.d.ts:24
toInput()
statictoInput: (x) =>object
Parameters
• x
• x.args: TransactionProverArguments = TransactionProverArguments
• x.transaction: TransactionProverTransactionArguments = TransactionProverTransactionArguments
Returns
object
fields?
optionalfields:Field[]
packed?
optionalpacked: [Field,number][]
Inherited from
Struct({ transaction: TransactionProverTransactionArguments, args: TransactionProverArguments, }).toInput
Defined in
node_modules/o1js/dist/node/lib/provable/types/struct.d.ts:107
toJSON()
statictoJSON: (x) =>object
Parameters
• x
• x.args: TransactionProverArguments = TransactionProverArguments
• x.transaction: TransactionProverTransactionArguments = TransactionProverTransactionArguments
Returns
object
args
args:
object=TransactionProverArguments
args.bundleListPreimage
args.bundleListPreimage:
object=BundlePreimage
args.bundleListPreimage.fromStateTransitionsHash
args.bundleListPreimage.fromStateTransitionsHash:
string=Field
args.bundleListPreimage.fromWitnessedRootsHash
args.bundleListPreimage.fromWitnessedRootsHash:
string=Field
args.bundleListPreimage.preimage
args.bundleListPreimage.preimage:
string=Field
args.networkState
args.networkState:
object=NetworkState
args.networkState.block
args.networkState.block:
object=CurrentBlock
args.networkState.block.height
args.networkState.block.height:
string=UInt64
args.networkState.previous
args.networkState.previous:
object=PreviousBlock
args.networkState.previous.rootHash
args.networkState.previous.rootHash:
string=Field
args.pendingSTBatchesHash
args.pendingSTBatchesHash:
string=Field
args.transactionHash
args.transactionHash:
string=Field
args.witnessedRootsHash
args.witnessedRootsHash:
string=Field
transaction
transaction:
object=TransactionProverTransactionArguments
transaction.signature
transaction.signature:
any=Signature
transaction.transaction
transaction.transaction:
object=RuntimeTransaction
transaction.transaction.argsHash
transaction.transaction.argsHash:
string=Field
transaction.transaction.methodId
transaction.transaction.methodId:
string=Field
transaction.transaction.nonce
transaction.transaction.nonce:
object=UInt64Option
transaction.transaction.nonce.isSome
transaction.transaction.nonce.isSome:
boolean=Bool
transaction.transaction.nonce.value
transaction.transaction.nonce.value:
any=valueType
transaction.transaction.sender
transaction.transaction.sender:
object=PublicKeyOption
transaction.transaction.sender.isSome
transaction.transaction.sender.isSome:
boolean=Bool
transaction.transaction.sender.value
transaction.transaction.sender.value:
any=valueType
transaction.verificationKeyAttestation
transaction.verificationKeyAttestation:
object=RuntimeVerificationKeyAttestation
transaction.verificationKeyAttestation.verificationKey
transaction.verificationKeyAttestation.verificationKey:
string=VerificationKey
transaction.verificationKeyAttestation.witness
transaction.verificationKeyAttestation.witness:
object=VKTreeWitness
transaction.verificationKeyAttestation.witness.isLeft
transaction.verificationKeyAttestation.witness.isLeft:
boolean[]
transaction.verificationKeyAttestation.witness.path
transaction.verificationKeyAttestation.witness.path:
string[]
Inherited from
Struct({ transaction: TransactionProverTransactionArguments, args: TransactionProverArguments, }).toJSON
Defined in
node_modules/o1js/dist/node/lib/provable/types/struct.d.ts:111
toValue()
statictoValue: (x) =>object
Convert provable type to a normal JS type.
Parameters
• x
• x.args: TransactionProverArguments = TransactionProverArguments
• x.transaction: TransactionProverTransactionArguments = TransactionProverTransactionArguments
Returns
object
args
args:
object=TransactionProverArguments
args.bundleListPreimage
args.bundleListPreimage:
object=BundlePreimage
args.bundleListPreimage.fromStateTransitionsHash
args.bundleListPreimage.fromStateTransitionsHash:
bigint=Field
args.bundleListPreimage.fromWitnessedRootsHash
args.bundleListPreimage.fromWitnessedRootsHash:
bigint=Field
args.bundleListPreimage.preimage
args.bundleListPreimage.preimage:
bigint=Field
args.networkState
args.networkState:
object=NetworkState
args.networkState.block
args.networkState.block:
object=CurrentBlock
args.networkState.block.height
args.networkState.block.height:
bigint=UInt64
args.networkState.previous
args.networkState.previous:
object=PreviousBlock
args.networkState.previous.rootHash
args.networkState.previous.rootHash:
bigint=Field
args.pendingSTBatchesHash
args.pendingSTBatchesHash:
bigint=Field
args.transactionHash
args.transactionHash:
bigint=Field
args.witnessedRootsHash
args.witnessedRootsHash:
bigint=Field
transaction
transaction:
object=TransactionProverTransactionArguments
transaction.signature
transaction.signature:
any=Signature
transaction.transaction
transaction.transaction:
object=RuntimeTransaction
transaction.transaction.argsHash
transaction.transaction.argsHash:
bigint=Field
transaction.transaction.methodId
transaction.transaction.methodId:
bigint=Field
transaction.transaction.nonce
transaction.transaction.nonce:
object=UInt64Option
transaction.transaction.nonce.isSome
transaction.transaction.nonce.isSome:
boolean=Bool
transaction.transaction.nonce.value
transaction.transaction.nonce.value:
any=valueType
transaction.transaction.sender
transaction.transaction.sender:
object=PublicKeyOption
transaction.transaction.sender.isSome
transaction.transaction.sender.isSome:
boolean=Bool
transaction.transaction.sender.value
transaction.transaction.sender.value:
any=valueType
transaction.verificationKeyAttestation
transaction.verificationKeyAttestation:
object=RuntimeVerificationKeyAttestation
transaction.verificationKeyAttestation.verificationKey
transaction.verificationKeyAttestation.verificationKey:
object=VerificationKey
transaction.verificationKeyAttestation.verificationKey.data
transaction.verificationKeyAttestation.verificationKey.data:
string
transaction.verificationKeyAttestation.verificationKey.hash
transaction.verificationKeyAttestation.verificationKey.hash:
bigint
transaction.verificationKeyAttestation.witness
transaction.verificationKeyAttestation.witness:
object=VKTreeWitness
transaction.verificationKeyAttestation.witness.isLeft
transaction.verificationKeyAttestation.witness.isLeft:
boolean[]
transaction.verificationKeyAttestation.witness.path
transaction.verificationKeyAttestation.witness.path:
bigint[]
Inherited from
Struct({ transaction: TransactionProverTransactionArguments, args: TransactionProverArguments, }).toValue
Defined in
node_modules/o1js/dist/node/lib/provable/types/provable-intf.d.ts:64
Methods
sizeInFields()
staticsizeInFields():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({ transaction: TransactionProverTransactionArguments, args: TransactionProverArguments, }).sizeInFields
Defined in
node_modules/o1js/dist/node/lib/provable/types/provable-intf.d.ts:51