@proto-kit/protocol • Docs
Documentation / @proto-kit/protocol / BlockProverPublicOutput
Class: BlockProverPublicOutput
Extends
Constructors
new BlockProverPublicOutput()
new BlockProverPublicOutput(
value):BlockProverPublicOutput
Parameters
• value
• value.blockHashRoot: Field = Field
• value.blockNumber: Field = Field
• value.eternalTransactionsHash: Field = Field
• value.incomingMessagesHash: Field = Field
• value.networkStateHash: Field = Field
• value.proverStateRemainder: Field = Field
• value.stateRoot: Field = Field
Returns
Inherited from
BlockProverPublicInput.constructor
Defined in
node_modules/o1js/dist/node/lib/provable/types/struct.d.ts:103
Properties
blockHashRoot
blockHashRoot:
Field=Field
Inherited from
BlockProverPublicInput.blockHashRoot
Defined in
packages/protocol/src/prover/block/BlockProvable.ts:74
blockNumber
blockNumber:
Field=Field
Inherited from
BlockProverPublicInput.blockNumber
Defined in
packages/protocol/src/prover/block/BlockProvable.ts:75
eternalTransactionsHash
eternalTransactionsHash:
Field=Field
Inherited from
BlockProverPublicInput.eternalTransactionsHash
Defined in
packages/protocol/src/prover/block/BlockProvable.ts:71
incomingMessagesHash
incomingMessagesHash:
Field=Field
Inherited from
BlockProverPublicInput.incomingMessagesHash
Defined in
packages/protocol/src/prover/block/BlockProvable.ts:72
networkStateHash
networkStateHash:
Field=Field
Inherited from
BlockProverPublicInput.networkStateHash
Defined in
packages/protocol/src/prover/block/BlockProvable.ts:76
proverStateRemainder
proverStateRemainder:
Field=Field
Inherited from
BlockProverPublicInput.proverStateRemainder
Defined in
packages/protocol/src/prover/block/BlockProvable.ts:81
stateRoot
stateRoot:
Field=Field
Inherited from
BlockProverPublicInput.stateRoot
Defined in
packages/protocol/src/prover/block/BlockProvable.ts:73
_isStruct
static_isStruct:true
Inherited from
BlockProverPublicInput._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.blockHashRoot: Field = Field
• value.blockNumber: Field = Field
• value.eternalTransactionsHash: Field = Field
• value.incomingMessagesHash: Field = Field
• value.networkStateHash: Field = Field
• value.proverStateRemainder: Field = Field
• value.stateRoot: Field = Field
Returns
void
Inherited from
Defined in
node_modules/o1js/dist/node/lib/provable/types/provable-intf.d.ts:60
empty()
staticempty: () =>object
Returns
object
blockHashRoot
blockHashRoot:
Field=Field
blockNumber
blockNumber:
Field=Field
eternalTransactionsHash
eternalTransactionsHash:
Field=Field
incomingMessagesHash
incomingMessagesHash:
Field=Field
networkStateHash
networkStateHash:
Field=Field
proverStateRemainder
proverStateRemainder:
Field=Field
stateRoot
stateRoot:
Field=Field
Inherited from
Defined in
node_modules/o1js/dist/node/lib/provable/types/struct.d.ts:113
fromFields()
staticfromFields: (fields) =>object
Parameters
• fields: Field[]
Returns
object
blockHashRoot
blockHashRoot:
Field=Field
blockNumber
blockNumber:
Field=Field
eternalTransactionsHash
eternalTransactionsHash:
Field=Field
incomingMessagesHash
incomingMessagesHash:
Field=Field
networkStateHash
networkStateHash:
Field=Field
proverStateRemainder
proverStateRemainder:
Field=Field
stateRoot
stateRoot:
Field=Field
Inherited from
BlockProverPublicInput.fromFields
Defined in
node_modules/o1js/dist/node/lib/provable/types/provable-intf.d.ts:95
fromJSON()
staticfromJSON: (x) =>object
Parameters
• x
• x.blockHashRoot: string = Field
• x.blockNumber: string = Field
• x.eternalTransactionsHash: string = Field
• x.incomingMessagesHash: string = Field
• x.networkStateHash: string = Field
• x.proverStateRemainder: string = Field
• x.stateRoot: string = Field
Returns
object
blockHashRoot
blockHashRoot:
Field=Field
blockNumber
blockNumber:
Field=Field
eternalTransactionsHash
eternalTransactionsHash:
Field=Field
incomingMessagesHash
incomingMessagesHash:
Field=Field
networkStateHash
networkStateHash:
Field=Field
proverStateRemainder
proverStateRemainder:
Field=Field
stateRoot
stateRoot:
Field=Field
Inherited from
BlockProverPublicInput.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
BlockProverPublicInput.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.blockHashRoot?: Field = Field
• value.blockNumber?: Field = Field
• value.eternalTransactionsHash?: Field = Field
• value.incomingMessagesHash?: Field = Field
• value.networkStateHash?: Field = Field
• value.proverStateRemainder?: Field = Field
• value.stateRoot?: Field = Field
Returns
any[]
An array of any type describing how this T element is made up of “auxiliary” (non-provable) data.
Inherited from
BlockProverPublicInput.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.blockHashRoot: Field = Field
• x.blockNumber: Field = Field
• x.eternalTransactionsHash: Field = Field
• x.incomingMessagesHash: Field = Field
• x.networkStateHash: Field = Field
• x.proverStateRemainder: Field = Field
• x.stateRoot: Field = Field
Returns
object
blockHashRoot
blockHashRoot:
Field=Field
blockNumber
blockNumber:
Field=Field
eternalTransactionsHash
eternalTransactionsHash:
Field=Field
incomingMessagesHash
incomingMessagesHash:
Field=Field
networkStateHash
networkStateHash:
Field=Field
proverStateRemainder
proverStateRemainder:
Field=Field
stateRoot
stateRoot:
Field=Field
Inherited from
BlockProverPublicInput.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.blockHashRoot: Field = Field
• value.blockNumber: Field = Field
• value.eternalTransactionsHash: Field = Field
• value.incomingMessagesHash: Field = Field
• value.networkStateHash: Field = Field
• value.proverStateRemainder: Field = Field
• value.stateRoot: Field = Field
Returns
Field[]
A Field array describing how this T element is made up of Field elements.
Inherited from
BlockProverPublicInput.toFields
Defined in
node_modules/o1js/dist/node/lib/provable/types/provable-intf.d.ts:24
toInput()
statictoInput: (x) =>object
Parameters
• x
• x.blockHashRoot: Field = Field
• x.blockNumber: Field = Field
• x.eternalTransactionsHash: Field = Field
• x.incomingMessagesHash: Field = Field
• x.networkStateHash: Field = Field
• x.proverStateRemainder: Field = Field
• x.stateRoot: Field = Field
Returns
object
fields?
optionalfields:Field[]
packed?
optionalpacked: [Field,number][]
Inherited from
BlockProverPublicInput.toInput
Defined in
node_modules/o1js/dist/node/lib/provable/types/struct.d.ts:107
toJSON()
statictoJSON: (x) =>object
Parameters
• x
• x.blockHashRoot: Field = Field
• x.blockNumber: Field = Field
• x.eternalTransactionsHash: Field = Field
• x.incomingMessagesHash: Field = Field
• x.networkStateHash: Field = Field
• x.proverStateRemainder: Field = Field
• x.stateRoot: Field = Field
Returns
object
blockHashRoot
blockHashRoot:
string=Field
blockNumber
blockNumber:
string=Field
eternalTransactionsHash
eternalTransactionsHash:
string=Field
incomingMessagesHash
incomingMessagesHash:
string=Field
networkStateHash
networkStateHash:
string=Field
proverStateRemainder
proverStateRemainder:
string=Field
stateRoot
stateRoot:
string=Field
Inherited from
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.blockHashRoot: Field = Field
• x.blockNumber: Field = Field
• x.eternalTransactionsHash: Field = Field
• x.incomingMessagesHash: Field = Field
• x.networkStateHash: Field = Field
• x.proverStateRemainder: Field = Field
• x.stateRoot: Field = Field
Returns
object
blockHashRoot
blockHashRoot:
bigint=Field
blockNumber
blockNumber:
bigint=Field
eternalTransactionsHash
eternalTransactionsHash:
bigint=Field
incomingMessagesHash
incomingMessagesHash:
bigint=Field
networkStateHash
networkStateHash:
bigint=Field
proverStateRemainder
proverStateRemainder:
bigint=Field
stateRoot
stateRoot:
bigint=Field
Inherited from
BlockProverPublicInput.toValue
Defined in
node_modules/o1js/dist/node/lib/provable/types/provable-intf.d.ts:64
Methods
clone()
clone():
BlockProverPublicInput
Returns
Inherited from
Defined in
packages/protocol/src/prover/block/BlockProvable.ts:92
equals()
equals(
input):Bool
Parameters
• input: BlockProverPublicInput
Returns
Bool
Inherited from
Defined in
packages/protocol/src/prover/block/BlockProvable.ts:84
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
BlockProverPublicInput.sizeInFields
Defined in
node_modules/o1js/dist/node/lib/provable/types/provable-intf.d.ts:51