info
Please note that zkApp programmability is not yet available on Mina, but zkApps can now be deployed to Berkeley QANet. These docs are a preview of work that is currently in progress.
SnarkyJS API Reference
To write a zkApp, we recommend using the Mina zkApp CLI, which makes writing a zkApp easy by including SnarkyJS & providing project scaffolding, a test framework, and formatting.
Table of contents
Namespaces
Classes
- Bool
- Character
- Circuit
- CircuitString
- CircuitValue
- EndoScalar
- Field
- Group
- Int64
- Keypair
- Ledger
- Party
- PrivateKey
- Proof
- PublicKey
- Scalar
- Signature
- SmartContract
- UInt32
- UInt64
- VerificationKey
Interfaces
Type Aliases
- DeployArgs
- FeePayerUnsigned
- JSONValue
- LazyControl
- LazyProof
- LazySignature
- Parties
- Permission
- Preconditions
- SetOrKeep
- State
Variables
Functions
- State
- addCachedAccount
- addMissingProofs
- addMissingSignatures
- arrayProp
- asFieldElementsToConstant
- circuitMain
- circuitValueEquals
- cloneCircuitValue
- declareMethods
- declareState
- deploy
- fetchAccount
- fetchLastBlock
- getSrs
- matrixProp
- method
- parseFetchedAccount
- partiesToJson
- prop
- public_
- recoverVerificationKey
- sendZkapp
- sendZkappQuery
- serializeVerificationKey
- setGraphqlEndpoint
- shutdown
- signFeePayer
- signJsonTransaction
- state
- toPartiesUnsafe
- toPartyUnsafe
Classes
Class: Bool
Table of contents
Constructors
Properties
Methods
- and
- assertEquals
- assertFalse
- assertTrue
- equals
- not
- or
- sizeInFields
- toBoolean
- toField
- toFields
- toJSON
- toString
- and
- assertEqual
- count
- equal
- fromJSON
- not
- ofFields
- or
- sizeInFields
- toField
- toFields
- toJSON
Constructors
constructor
• new Bool(x
)
Parameters
Name | Type |
---|---|
x | boolean | Bool |
Defined in
Properties
Unsafe
▪ Static
Unsafe: Object
Type declaration
Name | Type |
---|---|
ofField | (x : string | number | boolean | Field ) => Bool |
Defined in
false
▪ Static
false: Bool
The constant [[Bool
]] that is false
.
Defined in
true
▪ Static
true: Bool
The constant [[Bool
]] that is true
.
Defined in
Methods
and
▸ and(y
): Bool
Parameters
Name | Type | Description |
---|---|---|
y | boolean | Bool | A [[Bool ]] to AND with this [[Bool ]]. |
Returns
a new [[Bool
]] that is set to true only if
this [[Bool
]] and y
are also true.
Defined in
assertEquals
▸ assertEquals(y
): void
Proves that this [[Bool
]] is equal to y
.
Parameters
Name | Type | Description |
---|---|---|
y | boolean | Bool | a [[Bool ]]. |
Returns
void
Defined in
assertFalse
▸ assertFalse(): void
Proves that this [[Bool
]] is false
.
Returns
void
Defined in
assertTrue
▸ assertTrue(): void
Proves that this [[Bool
]] is true
.
Returns
void
Defined in
equals
▸ equals(y
): Bool
Returns true if this [[Bool
]] is equal to y
.
Parameters
Name | Type | Description |
---|---|---|
y | boolean | Bool | a [[Bool ]]. |
Returns
Defined in
not
▸ not(): Bool
Returns
a new [[Bool
]] that is the negation of this [[Bool
]].
Defined in
or
▸ or(y
): Bool
Parameters
Name | Type | Description |
---|---|---|
y | boolean | Bool | a [[Bool ]] to OR with this [[Bool ]]. |
Returns
a new [[Bool
]] that is set to true if either
this [[Bool
]] or y
is true.
Defined in
sizeInFields
▸ sizeInFields(): number
Returns
number
Defined in
toBoolean
▸ toBoolean(): boolean
This converts the [[Bool
]] to a javascript [[boolean]].
This can only be called on non-witness values.
Returns
boolean
Defined in
toField
▸ toField(): Field
Converts a [[Bool
]] to a [[Field
]]. false
becomes 0 and true
becomes 1.
Returns
Defined in
toFields
▸ toFields(): Field
[]
Returns
Field
[]
Defined in
toJSON
▸ toJSON(): JSONValue
Serialize the [[Bool
]] to a JSON string.
This operation does NOT affect the circuit and can't be used to prove anything about the string representation of the Field.
Returns
Defined in
toString
▸ toString(): string
Serialize the [[Bool
]] to a string, e.g. for printing.
This operation does NOT affect the circuit and can't be used to prove anything about the string representation of the Field.
Returns
string
Defined in
and
▸ Static
and(x
, y
): Bool
Parameters
Name | Type |
---|---|
x | boolean | Bool |
y | boolean | Bool |
Returns
Defined in
assertEqual
▸ Static
assertEqual(x
, y
): void
Parameters
Name | Type |
---|---|
x | boolean | Bool |
y | boolean | Bool |
Returns
void
Defined in
count
▸ Static
count(x
): Field
Parameters
Name | Type |
---|---|
x | boolean [] | Bool |
Returns
Defined in
equal
▸ Static
equal(x
, y
): Bool
Parameters
Name | Type |
---|---|
x | boolean | Bool |
y | boolean | Bool |
Returns
Defined in
fromJSON
▸ Static
fromJSON(x
): null
| Bool
Parameters
Name | Type |
---|---|
x | JSONValue |
Returns
null
| Bool
Defined in
not
▸ Static
not(x
): Bool
Parameters
Name | Type |
---|---|
x | boolean | Bool |
Returns
Defined in
ofFields
▸ Static
ofFields(fields
): Bool
Parameters
Name | Type |
---|---|
fields | Field [] |
Returns
Defined in
or
▸ Static
or(x
, y
): Bool
Parameters
Name | Type |
---|---|
x | boolean | Bool |
y | boolean | Bool |
Returns
Defined in
sizeInFields
▸ Static
sizeInFields(): number
Returns
number
Defined in
toField
▸ Static
toField(x
): Field
Parameters
Name | Type |
---|---|
x | boolean | Bool |
Returns
Defined in
toFields
▸ Static
toFields(x
): Field
[]
Parameters
Name | Type |
---|---|
x | boolean | Bool |
Returns
Field
[]
Defined in
toJSON
▸ Static
toJSON(x
): JSONValue
Parameters
Name | Type |
---|---|
x | Bool |
Returns
Defined in
snarkyjs / Exports / Character
Class: Character
Hierarchy
↳
Character
Table of contents
Constructors
Properties
Methods
- assertEquals
- equals
- isNull
- toField
- toFields
- toJSON
- toString
- check
- fromJSON
- fromString
- ofFields
- sizeInFields
- toConstant
- toFields
- toJSON
Constructors
constructor
• new Character(value
)
Parameters
Name | Type |
---|---|
value | Field |
Overrides
Defined in
Properties
value
• value: Field
Defined in
Methods
assertEquals
▸ assertEquals(this
, x
): void
Parameters
Name | Type |
---|---|
this | Character |
x | Character |
Returns
void
Inherited from
Defined in
equals
▸ equals(this
, x
): Bool
Parameters
Name | Type |
---|---|
this | Character |
x | Character |
Returns
Inherited from
Defined in
isNull
▸ isNull(): Bool
Returns
Defined in
toField
▸ toField(): Field
Returns
Defined in
toFields
▸ toFields(): Field
[]
Returns
Field
[]
Inherited from
Defined in
toJSON
▸ toJSON(): JSONValue
Returns
Inherited from
Defined in
toString
▸ toString(): string
Returns
string
Defined in
check
▸ Static
check(c
): void
Parameters
Name | Type |
---|---|
c | Character |
Returns
void
Defined in
fromJSON
▸ Static
fromJSON<T
>(this
, value
): null
| T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
value | JSONValue |
Returns
null
| T
Inherited from
Defined in
fromString
▸ Static
fromString(str
): Character
Parameters
Name | Type |
---|---|
str | string |
Returns
Defined in
ofFields
▸ Static
ofFields<T
>(this
, xs
): T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
xs | Field [] |
Returns
T
Inherited from
Defined in
sizeInFields
▸ Static
sizeInFields(): number
Returns
number
Inherited from
Defined in
toConstant
▸ Static
toConstant<T
>(this
, t
): T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
t | T |
Returns
T
Inherited from
Defined in
toFields
▸ Static
toFields<T
>(this
, v
): Field
[]
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
v | T |
Returns
Field
[]
Inherited from
Defined in
toJSON
▸ Static
toJSON<T
>(this
, v
): JSONValue
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
v | T |
Returns
Inherited from
Defined in
Class: Circuit
Table of contents
Constructors
Methods
- addConstraint
- array
- asProver
- assertEqual
- equal
- generateKeypair
- if
- inCheckedComputation
- inProver
- newVariable
- prove
- runAndCheck
- toFields
- verify
- witness
Constructors
constructor
• new Circuit()
Methods
addConstraint
▸ Static
addConstraint(this
, kind
, x
, y
, z
): void
Parameters
Name | Type |
---|---|
this | Circuit |
kind | "multiply" |
x | Field |
y | Field |
z | Field |
Returns
void
Defined in
▸ Static
addConstraint(this
, kind
, x
, y
, z
): void
Parameters
Name | Type |
---|---|
this | Circuit |
kind | "add" |
x | Field |
y | Field |
z | Field |
Returns
void
Defined in
▸ Static
addConstraint(this
, kind
, x
, y
, z
): void
Parameters
Name | Type |
---|---|
this | Circuit |
kind | "equal" |
x | Field |
y | Field |
z | Field |
Returns
void
Defined in
▸ Static
addConstraint(this
, kind
, x
, y
, z
): void
Parameters
Name | Type |
---|---|
this | Circuit |
kind | "boolean" |
x | Field |
y | Field |
z | Field |
Returns
void
Defined in
array
▸ Static
array<T
>(ctor
, length
): AsFieldElements
<T
[]>
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
ctor | AsFieldElements <T > |
length | number |
Returns
AsFieldElements
<T
[]>
Defined in
asProver
▸ Static
asProver(f
): void
Parameters
Name | Type |
---|---|
f | () => void |
Returns
void
Defined in
assertEqual
▸ Static
assertEqual<T
>(ctor
, x
, y
): void
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
ctor | Object |
ctor.toFields | (x : T ) => Field [] |
x | T |
y | T |
Returns
void
Defined in
▸ Static
assertEqual<T
>(x
, y
): void
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
x | T |
y | T |
Returns
void
Defined in
equal
▸ Static
equal<T
>(ctor
, x
, y
): Bool
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
ctor | Object |
ctor.toFields | (x : T ) => Field [] |
x | T |
y | T |
Returns
Defined in
▸ Static
equal<T
>(x
, y
): Bool
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
x | T |
y | T |
Returns
Defined in
generateKeypair
▸ Static
generateKeypair(): Keypair
Returns
Defined in
if
▸ Static
if<T
>(b
, ctor
, x
, y
): T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
b | boolean | Bool |
ctor | AsFieldElements <T > |
x | T |
y | T |
Returns
T
Defined in
▸ Static
if<T
>(b
, x
, y
): T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
b | boolean | Bool |
x | T |
y | T |
Returns
T
Defined in
inCheckedComputation
▸ Static
inCheckedComputation(): boolean
Returns
boolean
Defined in
inProver
▸ Static
inProver(): boolean
Returns
boolean
Defined in
newVariable
▸ Static
newVariable(f
): Field
Parameters
Name | Type |
---|---|
f | () => string | number | boolean | Field |
Returns
Defined in
prove
▸ Static
prove(privateInput
, publicInput
, kp
): Proof
Parameters
Name | Type |
---|---|
privateInput | any [] |
publicInput | any [] |
kp | Keypair |
Returns
Defined in
runAndCheck
▸ Static
runAndCheck<T
>(f
): T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
f | () => T |
Returns
T
Defined in
toFields
▸ Static
toFields<A
>(a
): Field
[]
Type parameters
Name |
---|
A |
Parameters
Name | Type |
---|---|
a | A |
Returns
Field
[]
Defined in
verify
▸ Static
verify(publicInput
, vk
, pi
): boolean
Parameters
Name | Type |
---|---|
publicInput | any [] |
vk | VerificationKey |
pi | Proof |
Returns
boolean
Defined in
witness
▸ Static
witness<T
, S
>(ctor
, f
): T
Type parameters
Name | Type |
---|---|
T | T |
S | extends AsFieldElements <T , S > = AsFieldElements <T > |
Parameters
Name | Type |
---|---|
ctor | S |
f | () => T |
Returns
T
Defined in
snarkyjs / Exports / CircuitString
Class: CircuitString
Hierarchy
↳
CircuitString
Table of contents
Constructors
Properties
Methods
- append
- assertEquals
- computeLengthAndMask
- equals
- hash
- length
- lengthMask
- maxLength
- substring
- toFields
- toJSON
- toString
- fromJSON
- fromString
- ofFields
- sizeInFields
- toConstant
- toFields
- toJSON
Constructors
constructor
• new CircuitString(values
)
Parameters
Name | Type |
---|---|
values | Character [] |
Overrides
Defined in
Properties
values
• values: Character
[]
Defined in
maxLength
▪ Static
maxLength: number
= DEFAULT_STRING_LENGTH
Defined in
Methods
append
▸ append(str
): CircuitString
appends another string to this one, returns the result and proves that it fits
within the maxLength
of this string (the other string can have a different maxLength)
Parameters
Name | Type |
---|---|
str | CircuitString |
Returns
Defined in
assertEquals
▸ assertEquals(this
, x
): void
Parameters
Name | Type |
---|---|
this | CircuitString |
x | CircuitString |
Returns
void
Inherited from
Defined in
computeLengthAndMask
▸ Private
computeLengthAndMask(): Object
Returns
Object
Name | Type |
---|---|
length | Field |
mask | Bool [] |
Defined in
equals
▸ equals(this
, x
): Bool
Parameters
Name | Type |
---|---|
this | CircuitString |
x | CircuitString |
Returns
Inherited from
Defined in
hash
▸ hash(): Field
returns true if str
is found in this CircuitString
Returns
Defined in
length
▸ Private
length(): Field
Returns
Defined in
lengthMask
▸ Private
lengthMask(): Bool
[]
Returns
Bool
[]
Defined in
maxLength
▸ Private
maxLength(): number
Returns
number
Defined in
substring
▸ substring(start
, end
): CircuitString
Parameters
Name | Type |
---|---|
start | number |
end | number |
Returns
Defined in
toFields
▸ toFields(): Field
[]
Returns
Field
[]
Inherited from
Defined in
toJSON
▸ toJSON(): JSONValue
Returns
Inherited from
Defined in
toString
▸ toString(): string
Returns
string
Defined in
fromJSON
▸ Static
fromJSON<T
>(this
, value
): null
| T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
value | JSONValue |
Returns
null
| T
Inherited from
Defined in
fromString
▸ Static
fromString(str
): CircuitString
Parameters
Name | Type |
---|---|
str | string |
Returns
Defined in
ofFields
▸ Static
ofFields<T
>(this
, xs
): T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
xs | Field [] |
Returns
T
Inherited from
Defined in
sizeInFields
▸ Static
sizeInFields(): number
Returns
number
Inherited from
Defined in
toConstant
▸ Static
toConstant<T
>(this
, t
): T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
t | T |
Returns
T
Inherited from
Defined in
toFields
▸ Static
toFields<T
>(this
, v
): Field
[]
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
v | T |
Returns
Field
[]
Inherited from
Defined in
toJSON
▸ Static
toJSON<T
>(this
, v
): JSONValue
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
v | T |
Returns
Inherited from
Defined in
snarkyjs / Exports / CircuitValue
Class: CircuitValue
Hierarchy
Table of contents
Constructors
Methods
Constructors
constructor
• new CircuitValue()
Methods
assertEquals
▸ assertEquals(this
, x
): void
Parameters
Name | Type |
---|---|
this | CircuitValue |
x | CircuitValue |
Returns
void
Defined in
equals
▸ equals(this
, x
): Bool
Parameters
Name | Type |
---|---|
this | CircuitValue |
x | CircuitValue |
Returns
Defined in
toFields
▸ toFields(): Field
[]
Returns
Field
[]
Defined in
toJSON
▸ toJSON(): JSONValue
Returns
Defined in
fromJSON
▸ Static
fromJSON<T
>(this
, value
): null
| T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
value | JSONValue |
Returns
null
| T
Defined in
ofFields
▸ Static
ofFields<T
>(this
, xs
): T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
xs | Field [] |
Returns
T
Defined in
sizeInFields
▸ Static
sizeInFields(): number
Returns
number
Defined in
toConstant
▸ Static
toConstant<T
>(this
, t
): T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
t | T |
Returns
T
Defined in
toFields
▸ Static
toFields<T
>(this
, v
): Field
[]
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
v | T |
Returns
Field
[]
Defined in
toJSON
▸ Static
toJSON<T
>(this
, v
): JSONValue
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
v | T |
Returns
Defined in
snarkyjs / Exports / EndoScalar
Class: EndoScalar
Table of contents
Constructors
Methods
Constructors
constructor
• new EndoScalar()
Methods
ofFields
▸ Static
ofFields(fields
): Scalar
Parameters
Name | Type |
---|---|
fields | Field [] |
Returns
Defined in
sizeInFields
▸ Static
sizeInFields(): number
Returns
number
Defined in
toFields
▸ Static
toFields(x
): Field
[]
Parameters
Name | Type |
---|---|
x | Scalar |
Returns
Field
[]
Defined in
Class: Field
Table of contents
Constructors
Properties
Methods
- add
- assertBoolean
- assertEquals
- assertGt
- assertGte
- assertLt
- assertLte
- div
- equals
- gt
- gte
- inv
- isConstant
- isZero
- lt
- lte
- mul
- neg
- ofFields
- rangeCheckHelper
- seal
- sizeInFields
- sqrt
- square
- sub
- toBigInt
- toBits
- toConstant
- toFields
- toJSON
- toString
- fromBigInt
- fromJSON
- fromNumber
- fromString
- ofBits
- ofFields
- random
- sizeInFields
- toFields
Constructors
constructor
• new Field(x
)
Coerces anything field-like to a [[Field
]].
Parameters
Name | Type |
---|---|
x | string | number | bigint | boolean | Field |
Defined in
Properties
ORDER
▪ Static
ORDER: bigint
The field order as a bigint
.
Defined in
minusOne
▪ Static
minusOne: Field
The number -1 as a [[Field
]].
Defined in
one
▪ Static
one: Field
The number 1 as a [[Field
]].
Defined in
zero
▪ Static
zero: Field
The number 0 as a [[Field
]].
Defined in
Methods
add
▸ add(y
): Field
Adds this [[Field
]] element to another coercible to a field.
Parameters
Name | Type |
---|---|
y | string | number | boolean | Field |
Returns
Defined in
assertBoolean
▸ assertBoolean(): void
Assert that this [[Field
]] is either 0 or 1.
Field.zero.assertBoolean();
This function can only be called inside a checked computation, like a SmartContract method, and throws an error if the assertion fails.
Returns
void
Defined in
assertEquals
▸ assertEquals(y
): void
Assert that this [[Field
]] equals another Field-like value.
Throws an error if the assertion fails.
Field.one.assertEquals(1);
Parameters
Name | Type |
---|---|
y | string | number | boolean | Field |
Returns
void
Defined in
assertGt
▸ assertGt(y
): void
Assert that this [[Field
]] is greater than another Field-like value.
Field.one.assertGt(0);
This function can only be called inside a checked computation, like a SmartContract method, and causes it to fail if the assertion fails.
Parameters
Name | Type |
---|---|
y | string | number | boolean | Field |
Returns
void
Defined in
assertGte
▸ assertGte(y
): void
Assert that this [[Field
]] is greater than or equal to another Field-like value.
Field.one.assertGte(0);
This function can only be called inside a checked computation, like a SmartContract method, and causes it to fail if the assertion fails.
Parameters
Name | Type |
---|---|
y | string | number | boolean | Field |
Returns
void
Defined in
assertLt
▸ assertLt(y
): void
Assert that this [[Field
]] is lower than another Field-like value.
Field.one.assertLt(2);
This function can only be called inside a checked computation, like a SmartContract method, and causes it to fail if the assertion fails.
Parameters
Name | Type |
---|---|
y | string | number | boolean | Field |
Returns
void
Defined in
assertLte
▸ assertLte(y
): void
Assert that this [[Field
]] is lower than or equal to another Field-like value.
Field.one.assertLte(2);
This function can only be called inside a checked computation, like a SmartContract method, and causes it to fail if the assertion fails.
Parameters
Name | Type |
---|---|
y | string | number | boolean | Field |
Returns
void
Defined in
div
▸ div(y
): Field
Divides this [[Field
]] element through another coercible to a field.
Parameters
Name | Type |
---|---|
y | string | number | boolean | Field |
Returns
Defined in
equals
▸ equals(y
): Bool
Check if this [[Field
]] equals another [[Field
]]-like value.
Returns a [[Bool
]].
Field(2).equals(2); // Bool(true)
Parameters
Name | Type |
---|---|
y | string | number | boolean | Field |
Returns
Defined in
gt
▸ gt(y
): Bool
Check if this [[Field
]] is greater than another Field-like value.
Returns a [[Bool
]].
Field(2).gt(1); // Bool(true)
Parameters
Name | Type |
---|---|
y | string | number | boolean | Field |
Returns
Defined in
gte
▸ gte(y
): Bool
Check if this [[Field
]] is greater than or equal to another Field-like value.
Returns a [[Bool
]].
Field(2).gte(1); // Bool(true)
Parameters
Name | Type |
---|---|
y | string | number | boolean | Field |
Returns
Defined in
inv
▸ inv(): Field
Inverts this [[Field
]] element.
const invX = x.inv();
invX.assertEquals(Field.one.div(x));
Returns
A field element that is equivalent to one divided by this element.
Defined in
isConstant
▸ isConstant(): boolean
Returns
boolean
Defined in
isZero
▸ isZero(): Bool
Returns
Defined in
lt
▸ lt(y
): Bool
Check if this [[Field
]] is lower than another Field-like value.
Returns a [[Bool
]].
Field(2).lt(3); // Bool(true)
Parameters
Name | Type |
---|---|
y | string | number | boolean | Field |
Returns
Defined in
lte
▸ lte(y
): Bool
Check if this [[Field
]] is lower than or equal to another Field-like value.
Returns a [[Bool
]].
Field(2).lte(3); // Bool(true)
Parameters
Name | Type |
---|---|
y | string | number | boolean | Field |
Returns
Defined in
mul
▸ mul(y
): Field
Multiplies this [[Field
]] element with another coercible to a field.
Parameters
Name | Type |
---|---|
y | string | number | boolean | Field |
Returns
Defined in
neg
▸ neg(): Field
Negates this [[Field
]]. This is equivalent to multiplying the [[Field
]]
by -1.
const negOne = Field.one.neg();
negOne.assertEquals(-1);
Returns
Defined in
ofFields
▸ ofFields(fields
): Field
Parameters
Name | Type |
---|---|
fields | Field [] |
Returns
Defined in
rangeCheckHelper
▸ rangeCheckHelper(numBits
): Field
Parameters
Name | Type |
---|---|
numBits | number |
Returns
Defined in
seal
▸ seal(): Field
Returns
Defined in
sizeInFields
▸ sizeInFields(): number
Returns
number
Defined in
sqrt
▸ sqrt(): Field
Square roots this [[Field
]] element.
x.square().sqrt().assertEquals(x);
Returns
Defined in
square
▸ square(): Field
Squares this [[Field
]] element.
const x2 = x.square();
x2.assertEquals(x.mul(x));
Returns
Defined in
sub
▸ sub(y
): Field
Subtracts another [[Field
]]-like element from this one.
Parameters
Name | Type |
---|---|
y | string | number | boolean | Field |
Returns
Defined in
toBigInt
▸ toBigInt(): bigint
Serialize the [[Field
]] to a bigint.
This operation does NOT affect the circuit and can't be used to prove anything about the bigint representation of the Field.
Returns
bigint
Defined in
toBits
▸ toBits(): Bool
[]
Little endian binary representation of the field element.
Returns
Bool
[]
Defined in
▸ toBits(length
): Bool
[]
Little endian binary representation of the field element.
Fails if the field element cannot fit in length
bits.
Parameters
Name | Type |
---|---|
length | number |
Returns
Bool
[]
Defined in
toConstant
▸ toConstant(): Field
Returns
Defined in
toFields
▸ toFields(): Field
[]
Returns
Field
[]
Defined in
toJSON
▸ toJSON(): JSONValue
Serialize the [[Field
]] to a JSON string.
This operation does NOT affect the circuit and can't be used to prove anything about the string representation of the Field.
Returns
Defined in
toString
▸ toString(): string
Serialize the [[Field
]] to a string, e.g. for printing.
This operation does NOT affect the circuit and can't be used to prove anything about the string representation of the Field.
Returns
string
Defined in
fromBigInt
▸ Static
fromBigInt(x
): Field
Parameters
Name | Type |
---|---|
x | bigint |
Returns
Defined in
fromJSON
▸ Static
fromJSON(x
): null
| Field
Parameters
Name | Type |
---|---|
x | JSONValue |
Returns
null
| Field
Defined in
fromNumber
▸ Static
fromNumber(x
): Field
Parameters
Name | Type |
---|---|
x | number |
Returns
Defined in
fromString
▸ Static
fromString(x
): Field
Parameters
Name | Type |
---|---|
x | string |
Returns
Defined in
ofBits
▸ Static
ofBits(x
): Field
Converts a bit array into a field element (little endian) Fails if the field element cannot fit given too many bits.
TODO: Rename to fromBits
Parameters
Name | Type |
---|---|
x | (boolean | Bool )[] |
Returns
Defined in
ofFields
▸ Static
ofFields(fields
): Field
Parameters
Name | Type |
---|---|
fields | Field [] |
Returns
Defined in
random
▸ Static
random(): Field
A random field element.
Returns
Defined in
sizeInFields
▸ Static
sizeInFields(): number
Returns
number
Defined in
toFields
▸ Static
toFields(x
): Field
[]
Parameters
Name | Type |
---|---|
x | Field |
Returns
Field
[]
Defined in
Class: Group
Table of contents
Constructors
Properties
Methods
- add
- assertEquals
- equals
- neg
- scale
- sub
- toJSON
- add
- assertEqual
- equal
- fromJSON
- neg
- ofFields
- scale
- sizeInFields
- sub
- toFields
- toJSON
Constructors
constructor
• new Group(args
)
Parameters
Name | Type |
---|---|
args | Object |
args.x | string | number | boolean | Field |
args.y | string | number | boolean | Field |
Defined in
• new Group(x
, y
)
Parameters
Name | Type |
---|---|
x | string | number | boolean | Field |
y | string | number | boolean | Field |
Defined in
Properties
x
• x: Field
Defined in
y
• y: Field
Defined in
generator
▪ Static
generator: Group
Defined in
Methods
add
▸ add(y
): Group
Parameters
Name | Type |
---|---|
y | Group |
Returns
Defined in
assertEquals
▸ assertEquals(y
): void
Parameters
Name | Type |
---|---|
y | Group |
Returns
void
Defined in
equals
▸ equals(y
): Bool
Parameters
Name | Type |
---|---|
y | Group |
Returns
Defined in
neg
▸ neg(): Group
Returns
Defined in
scale
▸ scale(y
): Group
Parameters
Name | Type |
---|---|
y | Scalar |
Returns
Defined in
sub
▸ sub(y
): Group
Parameters
Name | Type |
---|---|
y | Group |
Returns
Defined in
toJSON
▸ toJSON(): JSONValue
Returns
Defined in
add
▸ Static
add(x
, y
): Group
Parameters
Name | Type |
---|---|
x | Group |
y | Group |
Returns
Defined in
assertEqual
▸ Static
assertEqual(x
, y
): void
Parameters
Name | Type |
---|---|
x | Group |
y | Group |
Returns
void
Defined in
equal
▸ Static
equal(x
, y
): Bool
Parameters
Name | Type |
---|---|
x | Group |
y | Group |
Returns
Defined in
fromJSON
▸ Static
fromJSON(__namedParameters
): null
| Group
Parameters
Name | Type |
---|---|
__namedParameters | Object |
__namedParameters.x | string | number |
__namedParameters.y | string | number |
Returns
null
| Group
Defined in
neg
▸ Static
neg(x
): Group
Parameters
Name | Type |
---|---|
x | Group |
Returns
Defined in
ofFields
▸ Static
ofFields(fields
): Group
Parameters
Name | Type |
---|---|
fields | Field [] |
Returns
Defined in
scale
▸ Static
scale(x
, y
): Group
Parameters
Name | Type |
---|---|
x | Group |
y | Scalar |
Returns
Defined in
sizeInFields
▸ Static
sizeInFields(): number
Returns
number
Defined in
sub
▸ Static
sub(x
, y
): Group
Parameters
Name | Type |
---|---|
x | Group |
y | Group |
Returns
Defined in
toFields
▸ Static
toFields(x
): Field
[]
Parameters
Name | Type |
---|---|
x | Group |
Returns
Field
[]
Defined in
toJSON
▸ Static
toJSON(x
): JSONValue
Parameters
Name | Type |
---|---|
x | Group |
Returns
Defined in
Class: Int64
Hierarchy
↳
Int64
Implements
BalanceChange
Table of contents
Constructors
Properties
Accessors
Methods
- add
- assertEquals
- div
- equals
- isConstant
- isPositive
- mod
- mul
- neg
- sub
- toField
- toFields
- toJSON
- toString
- check
- from
- fromBigInt
- fromField
- fromFieldUnchecked
- fromJSON
- fromNumber
- fromString
- fromUnsigned
- ofFields
- sizeInFields
- toConstant
- toFields
- toJSON
Constructors
constructor
• new Int64(magnitude
, sgn?
)
Parameters
Name | Type | Default value |
---|---|---|
magnitude | UInt64 | undefined |
sgn | Field | Field.one |
Overrides
Defined in
Properties
magnitude
• magnitude: UInt64
Implementation of
BalanceChange.magnitude
Defined in
sgn
• sgn: Field
Implementation of
BalanceChange.sgn
Defined in
Accessors
minusOne
• Static
get
minusOne(): Int64
Returns
Defined in
one
• Static
get
one(): Int64
Returns
Defined in
zero
• Static
get
zero(): Int64
Returns
Defined in
Methods
add
▸ add(y
): Int64
Parameters
Name | Type |
---|---|
y | string | number | bigint | UInt32 | UInt64 | Int64 |
Returns
Defined in
assertEquals
▸ assertEquals(y
): void
Parameters
Name | Type |
---|---|
y | string | number | bigint | UInt32 | UInt64 | Int64 |
Returns
void
Overrides
Defined in
div
▸ div(y
): Int64
Parameters
Name | Type |
---|---|
y | string | number | bigint | UInt32 | UInt64 | Int64 |
Returns
Defined in
equals
▸ equals(y
): Bool
Parameters
Name | Type |
---|---|
y | string | number | bigint | UInt32 | UInt64 | Int64 |
Returns
Overrides
Defined in
isConstant
▸ isConstant(): boolean
Returns
boolean
Defined in
isPositive
▸ isPositive(): Bool
Returns
Defined in
mod
▸ mod(y
): Int64
Parameters
Name | Type |
---|---|
y | string | number | bigint | UInt32 | UInt64 |
Returns
Defined in
mul
▸ mul(y
): Int64
Parameters
Name | Type |
---|---|
y | string | number | bigint | UInt32 | UInt64 | Int64 |
Returns
Defined in
neg
▸ neg(): Int64
Returns
Defined in
sub
▸ sub(y
): Int64
Parameters
Name | Type |
---|---|
y | string | number | bigint | UInt32 | UInt64 | Int64 |
Returns
Defined in
toField
▸ toField(): Field
Returns
Defined in
toFields
▸ toFields(): Field
[]
Returns
Field
[]
Inherited from
Defined in
toJSON
▸ toJSON(): JSONValue
Returns
Inherited from
Defined in
toString
▸ toString(): string
Returns
string
Defined in
check
▸ Static
check(x
): void
Parameters
Name | Type |
---|---|
x | Int64 |
Returns
void
Defined in
from
▸ Static
from(x
): Int64
Parameters
Name | Type |
---|---|
x | string | number | bigint | Field | UInt32 | UInt64 | Int64 |
Returns
Defined in
fromBigInt
▸ Static
fromBigInt(x
): Int64
Parameters
Name | Type |
---|---|
x | bigint |
Returns
Defined in
fromField
▸ Static
fromField(x
): Int64
Parameters
Name | Type |
---|---|
x | Field |
Returns
Defined in
fromFieldUnchecked
▸ Static
Private
fromFieldUnchecked(x
): Int64
Parameters
Name | Type |
---|---|
x | Field |
Returns
Defined in
fromJSON
▸ Static
fromJSON<T
>(this
, value
): null
| T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
value | JSONValue |
Returns
null
| T
Inherited from
Defined in
fromNumber
▸ Static
fromNumber(x
): Int64
Parameters
Name | Type |
---|---|
x | number |
Returns
Defined in
fromString
▸ Static
fromString(x
): Int64
Parameters
Name | Type |
---|---|
x | string |
Returns
Defined in
fromUnsigned
▸ Static
fromUnsigned(x
): Int64
Parameters
Name | Type |
---|---|
x | UInt32 | UInt64 |
Returns
Defined in
ofFields
▸ Static
ofFields<T
>(this
, xs
): T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
xs | Field [] |
Returns
T
Inherited from
Defined in
sizeInFields
▸ Static
sizeInFields(): number
Returns
number
Inherited from
Defined in
toConstant
▸ Static
toConstant<T
>(this
, t
): T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
t | T |
Returns
T
Inherited from
Defined in
toFields
▸ Static
toFields<T
>(this
, v
): Field
[]
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
v | T |
Returns
Field
[]
Inherited from
Defined in
toJSON
▸ Static
toJSON<T
>(this
, v
): JSONValue
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
v | T |
Returns
Inherited from
Defined in
Class: Keypair
Contains a proving key and [[VerificationKey]] which can be used to verify proofs.
Table of contents
Constructors
Methods
Constructors
constructor
• new Keypair()
Methods
verificationKey
▸ verificationKey(): VerificationKey
Returns
Defined in
Class: Ledger
Table of contents
Constructors
Methods
- addAccount
- applyJsonTransaction
- getAccount
- create
- fieldOfBase58
- fieldToBase58
- fieldsOfJson
- hashPartyFromFields
- hashTransaction
- hashTransactionChecked
- memoToBase58
- privateKeyOfString
- privateKeyToString
- publicKeyOfString
- publicKeyToString
- signFeePayer
- signFieldElement
- signOtherParty
- transactionCommitments
- transactionStatement
- verifyPartyProof
Constructors
constructor
• new Ledger()
Methods
addAccount
▸ addAccount(publicKey
, balance
): void
Parameters
Name | Type |
---|---|
publicKey | Object |
publicKey.g | Group |
balance | string |
Returns
void
Defined in
applyJsonTransaction
▸ applyJsonTransaction(txJson
, accountCreationFee
): Account
[]
Parameters
Name | Type |
---|---|
txJson | string |
accountCreationFee | string |
Returns
Account
[]
Defined in
getAccount
▸ getAccount(publicKey
): undefined
| Account
Parameters
Name | Type |
---|---|
publicKey | Object |
publicKey.g | Group |
Returns
undefined
| Account
Defined in
create
▸ Static
create(genesisAccounts
): Ledger
Parameters
Name | Type |
---|---|
genesisAccounts | { balance : string ; publicKey : { g : Group } }[] |
Returns
Defined in
fieldOfBase58
▸ Static
fieldOfBase58(fieldBase58
): Field
Parameters
Name | Type |
---|---|
fieldBase58 | string |
Returns
Defined in
fieldToBase58
▸ Static
fieldToBase58(field
): string
Parameters
Name | Type |
---|---|
field | Field |
Returns
string
Defined in
fieldsOfJson
▸ Static
fieldsOfJson(json
): Field
[]
Parameters
Name | Type |
---|---|
json | string |
Returns
Field
[]
Defined in
hashPartyFromFields
▸ Static
hashPartyFromFields(fields
): Field
Parameters
Name | Type |
---|---|
fields | Field [] |
Returns
Defined in
hashTransaction
▸ Static
hashTransaction(partyHash
): Field
Parameters
Name | Type |
---|---|
partyHash | Field |
Returns
Defined in
hashTransactionChecked
▸ Static
hashTransactionChecked(partyHash
): Field
Parameters
Name | Type |
---|---|
partyHash | Field |
Returns
Defined in
memoToBase58
▸ Static
memoToBase58(memoString
): string
Parameters
Name | Type |
---|---|
memoString | string |
Returns
string
Defined in
privateKeyOfString
▸ Static
privateKeyOfString(privateKeyBase58
): Scalar
Parameters
Name | Type |
---|---|
privateKeyBase58 | string |
Returns
Defined in
privateKeyToString
▸ Static
privateKeyToString(privateKey
): string
Parameters
Name | Type |
---|---|
privateKey | Object |
privateKey.s | Scalar |
Returns
string
Defined in
publicKeyOfString
▸ Static
publicKeyOfString(publicKeyBase58
): Group
Parameters
Name | Type |
---|---|
publicKeyBase58 | string |
Returns
Defined in
publicKeyToString
▸ Static
publicKeyToString(publicKey
): string
Parameters
Name | Type |
---|---|
publicKey | Object |
publicKey.g | Group |
Returns
string
Defined in
signFeePayer
▸ Static
signFeePayer(txJson
, privateKey
): string
Parameters
Name | Type |
---|---|
txJson | string |
privateKey | Object |
privateKey.s | Scalar |
Returns
string
Defined in
signFieldElement
▸ Static
signFieldElement(messageHash
, privateKey
): string
Parameters
Name | Type |
---|---|
messageHash | Field |
privateKey | Object |
privateKey.s | Scalar |
Returns
string
Defined in
signOtherParty
▸ Static
signOtherParty(txJson
, privateKey
, i
): string
Parameters
Name | Type |
---|---|
txJson | string |
privateKey | Object |
privateKey.s | Scalar |
i | number |
Returns
string
Defined in
transactionCommitments
▸ Static
transactionCommitments(txJson
): Object
Parameters
Name | Type |
---|---|
txJson | string |
Returns
Object
Name | Type |
---|---|
commitment | Field |
fullCommitment | Field |
Defined in
transactionStatement
▸ Static
transactionStatement(txJson
, partyIndex
): Statement
Parameters
Name | Type |
---|---|
txJson | string |
partyIndex | number |
Returns
Statement
Defined in
verifyPartyProof
▸ Static
verifyPartyProof(statement
, proof
, verificationKey
): Promise
<boolean
>
Parameters
Name | Type |
---|---|
statement | Statement |
proof | string |
verificationKey | string |
Returns
Promise
<boolean
>
Defined in
Class: Party
Table of contents
Constructors
Properties
Accessors
Methods
- hash
- setNoncePrecondition
- sign
- signInPlace
- toFields
- assertBetween
- assertEquals
- clone
- createSigned
- createUnsigned
- defaultFeePayer
- defaultParty
- dummyFeePayer
- fundNewAccount
- getNonce
- setValue
- signFeePayerInPlace
Constructors
constructor
• new Party(body
, authorization?
)
Parameters
Name | Type |
---|---|
body | Body |
authorization? | LazyControl |
Defined in
Properties
account
• account: PreconditionClassType
<AccountPrecondition
>
Defined in
authorization
• authorization: LazyControl
Defined in
body
• body: Body
Defined in
isSelf
• Private
isSelf: boolean
Defined in
network
• network: PreconditionClassType
<{ blockchainLength
: { lower
: UInt32
; upper
: UInt32
} ; globalSlotSinceGenesis
: { lower
: UInt32
; upper
: UInt32
} ; globalSlotSinceHardFork
: { lower
: UInt32
; upper
: UInt32
} ; minWindowDensity
: { lower
: UInt32
; upper
: UInt32
} ; nextEpochData
: { epochLength
: { lower
: UInt32
; upper
: UInt32
} ; ledger
: { hash
: { isSome
: Bool
; value
: Field
} ; totalCurrency
: { lower
: UInt64
; upper
: UInt64
} } ; lockCheckpoint
: { isSome
: Bool
; value
: Field
} ; seed
: { isSome
: Bool
; value
: Field
} ; startCheckpoint
: { isSome
: Bool
; value
: Field
} } ; snarkedLedgerHash
: { isSome
: Bool
; value
: Field
} ; stakingEpochData
: { epochLength
: { lower
: UInt32
; upper
: UInt32
} ; ledger
: { hash
: { isSome
: Bool
; value
: Field
} ; totalCurrency
: { lower
: UInt64
; upper
: UInt64
} } ; lockCheckpoint
: { isSome
: Bool
; value
: Field
} ; seed
: { isSome
: Bool
; value
: Field
} ; startCheckpoint
: { isSome
: Bool
; value
: Field
} } ; timestamp
: { lower
: UInt64
; upper
: UInt64
} ; totalCurrency
: { lower
: UInt64
; upper
: UInt64
} }>
Defined in
Accessors
balance
• get
balance(): Object
Returns
Object
Name | Type |
---|---|
addInPlace | (x : string | number | bigint | UInt32 | UInt64 | Int64 ) => void |
subInPlace | (x : string | number | bigint | UInt32 | UInt64 | Int64 ) => void |
Defined in
publicKey
• get
publicKey(): PublicKey
Returns
Defined in
update
• get
update(): Object
Returns
Object
Name | Type |
---|---|
appState | { isSome : Bool ; value : Field }[] |
delegate | { isSome : Bool ; value : PublicKey } |
delegate.isSome | Bool |
delegate.value | PublicKey |
permissions | { isSome : Bool ; value : { editSequenceState : AuthRequired ; editState : AuthRequired ; incrementNonce : AuthRequired ; receive : AuthRequired ; send : AuthRequired ; setDelegate : AuthRequired ; setPermissions : AuthRequired ; setTokenSymbol : AuthRequired ; setVerificationKey : AuthRequired ; setVotingFor : AuthRequired ; setZkappUri : AuthRequired } } |
permissions.isSome | Bool |
permissions.value | { editSequenceState : AuthRequired ; editState : AuthRequired ; incrementNonce : AuthRequired ; receive : AuthRequired ; send : AuthRequired ; setDelegate : AuthRequired ; setPermissions : AuthRequired ; setTokenSymbol : AuthRequired ; setVerificationKey : AuthRequired ; setVotingFor : AuthRequired ; setZkappUri : AuthRequired } |
permissions.value.editSequenceState | AuthRequired |
permissions.value.editState | AuthRequired |
permissions.value.incrementNonce | AuthRequired |
permissions.value.receive | AuthRequired |
permissions.value.send | AuthRequired |
permissions.value.setDelegate | AuthRequired |
permissions.value.setPermissions | AuthRequired |
permissions.value.setTokenSymbol | AuthRequired |
permissions.value.setVerificationKey | AuthRequired |
permissions.value.setVotingFor | AuthRequired |
permissions.value.setZkappUri | AuthRequired |
timing | { isSome : Bool ; value : { cliffAmount : UInt64 ; cliffTime : UInt32 ; initialMinimumBalance : UInt64 ; vestingIncrement : UInt64 ; vestingPeriod : UInt32 } } |
timing.isSome | Bool |
timing.value | { cliffAmount : UInt64 ; cliffTime : UInt32 ; initialMinimumBalance : UInt64 ; vestingIncrement : UInt64 ; vestingPeriod : UInt32 } |
timing.value.cliffAmount | UInt64 |
timing.value.cliffTime | UInt32 |
timing.value.initialMinimumBalance | UInt64 |
timing.value.vestingIncrement | UInt64 |
timing.value.vestingPeriod | UInt32 |
tokenSymbol | { isSome : Bool ; value : { data : string ; hash : Field } } |
tokenSymbol.isSome | Bool |
tokenSymbol.value | { data : string ; hash : Field } |
tokenSymbol.value.data | string |
tokenSymbol.value.hash | Field |
verificationKey | { isSome : Bool ; value : { data : string ; hash : Field } } |
verificationKey.isSome | Bool |
verificationKey.value | { data : string ; hash : Field } |
verificationKey.value.data | string |
verificationKey.value.hash | Field |
votingFor | { isSome : Bool ; value : Field } |
votingFor.isSome | Bool |
votingFor.value | Field |
zkappUri | { isSome : Bool ; value : { data : string ; hash : Field } } |
zkappUri.isSome | Bool |
zkappUri.value | { data : string ; hash : Field } |
zkappUri.value.data | string |
zkappUri.value.hash | Field |
Defined in
Methods
hash
▸ hash(): Field
Returns
Defined in
setNoncePrecondition
▸ setNoncePrecondition(fallbackToZero?
): UInt32
Parameters
Name | Type | Default value |
---|---|---|
fallbackToZero | boolean | false |
Returns
Defined in
sign
▸ sign(privateKey?
): any
Parameters
Name | Type |
---|---|
privateKey? | PrivateKey |
Returns
any
Defined in
signInPlace
▸ signInPlace(privateKey?
, fallbackToZeroNonce?
): void
Parameters
Name | Type | Default value |
---|---|---|
privateKey? | PrivateKey | undefined |
fallbackToZeroNonce | boolean | false |
Returns
void
Defined in
toFields
▸ toFields(): Field
[]
Returns
Field
[]
Defined in
assertBetween
▸ Static
assertBetween<T
>(property
, lower
, upper
): void
Constrain a property to lie between lower and upper bounds.
Type parameters
Name |
---|
T |
Parameters
Name | Type | Description |
---|---|---|
property | ClosedInterval <T > | The property to constrain |
lower | T | The lower bound |
upper | T | The upper bound Example: To constrain the account balance of a SmartContract to lie between 0 and 20 MINA, you can use ts @method onlyRunsWhenBalanceIsLow() { let lower = UInt64.zero; let upper = UInt64.fromNumber(20e9); Party.assertBetween(this.self.body.accountPrecondition.balance, lower, upper); // ... } |
Returns
void
Defined in
assertEquals
▸ Static
assertEquals<T
>(property
, value
): void
Fix a property to a certain value.
Type parameters
Name |
---|
T |
Parameters
Name | Type | Description |
---|---|---|
property | ClosedInterval <T > | OrIgnore <T > | The property to constrain |
value | T | The value it is fixed to Example: To fix the account nonce of a SmartContract to 0, you can use ts @method onlyRunsWhenNonceIsZero() { Party.assertEquals(this.self.body.accountPrecondition.nonce, UInt32.zero); // ... } |
Returns
void
Defined in
clone
▸ Static
clone(party
): any
Parameters
Name | Type |
---|---|
party | Party |
Returns
any
Defined in
createSigned
▸ Static
createSigned(signer
, options?
): Party
Parameters
Name | Type |
---|---|
signer | PrivateKey |
options? | Object |
options.isSameAsFeePayer? | boolean | Bool |
options.nonce? | UInt32 |
Returns
Defined in
createUnsigned
▸ Static
createUnsigned(publicKey
): Party
Parameters
Name | Type |
---|---|
publicKey | PublicKey |
Returns
Defined in
defaultFeePayer
▸ Static
defaultFeePayer(address
, key
, nonce
): FeePayerUnsigned
Parameters
Name | Type |
---|---|
address | PublicKey |
key | PrivateKey |
nonce | UInt32 |
Returns
Defined in
defaultParty
▸ Static
defaultParty(address
): Party
Parameters
Name | Type |
---|---|
address | PublicKey |
Returns
Defined in
dummyFeePayer
▸ Static
dummyFeePayer(): FeePayerUnsigned
Returns
Defined in
fundNewAccount
▸ Static
fundNewAccount(feePayerKey
, initialBalance?
): void
Use this method to pay the account creation fee for another account. Beware that you don't need to pass in the new account! Instead, the protocol will automatically identify accounts in your transaction that need funding.
If you provide an optional initialBalance
, this will be subtracted from the fee-paying account as well,
but you have to separately ensure that it's added to the new account's balance.
Parameters
Name | Type | Description |
---|---|---|
feePayerKey | PrivateKey | the private key of the account that pays the fee |
initialBalance | Object | the initial balance of the new account (default: 0) |
initialBalance.initialBalance | undefined | string | number | UInt64 | - |
initialBalance.isSameAsFeePayer | undefined | boolean | Bool | - |
Returns
void
Defined in
getNonce
▸ Static
getNonce(party
, fallbackToZero?
): UInt32
Parameters
Name | Type | Default value |
---|---|---|
party | Party | FeePayerUnsigned | undefined |
fallbackToZero | boolean | false |
Returns
Defined in
setValue
▸ Static
setValue<T
>(maybeValue
, value
): void
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
maybeValue | SetOrKeep <T > |
value | T |
Returns
void
Defined in
signFeePayerInPlace
▸ Static
signFeePayerInPlace(feePayer
, privateKey?
, fallbackToZeroNonce?
): void
Parameters
Name | Type | Default value |
---|---|---|
feePayer | FeePayerUnsigned | undefined |
privateKey? | PrivateKey | undefined |
fallbackToZeroNonce | boolean | false |
Returns
void
Defined in
snarkyjs / Exports / PrivateKey
Class: PrivateKey
A signing key. You can generate one via random.
Hierarchy
↳
PrivateKey
Table of contents
Constructors
Properties
Methods
- assertEquals
- equals
- toBase58
- toFields
- toJSON
- toPublicKey
- fromBase58
- fromJSON
- ofBits
- ofFields
- random
- sizeInFields
- toBase58
- toConstant
- toFields
- toJSON
Constructors
constructor
• new PrivateKey(s
)
Parameters
Name | Type |
---|---|
s | Scalar |
Overrides
Defined in
Properties
s
• s: Scalar
Defined in
Methods
assertEquals
▸ assertEquals(this
, x
): void
Parameters
Name | Type |
---|---|
this | PrivateKey |
x | PrivateKey |
Returns
void
Inherited from
Defined in
equals
▸ equals(this
, x
): Bool
Parameters
Name | Type |
---|---|
this | PrivateKey |
x | PrivateKey |
Returns
Inherited from
Defined in
toBase58
▸ toBase58(): string
Returns
string
Defined in
toFields
▸ toFields(): Field
[]
Returns
Field
[]
Inherited from
Defined in
toJSON
▸ toJSON(): JSONValue
Returns
Inherited from
Defined in
toPublicKey
▸ toPublicKey(): PublicKey
Derives the associated public key.
Returns
a PublicKey.
Defined in
fromBase58
▸ Static
fromBase58(privateKeyBase58
): PrivateKey
Parameters
Name | Type |
---|---|
privateKeyBase58 | string |
Returns
Defined in
fromJSON
▸ Static
fromJSON<T
>(this
, value
): null
| T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
value | JSONValue |
Returns
null
| T
Inherited from
Defined in
ofBits
▸ Static
ofBits(bs
): PrivateKey
Deserializes a list of bits into a PrivateKey.
Parameters
Name | Type | Description |
---|---|---|
bs | Bool [] | a list of Bools. |
Returns
a PrivateKey.
Defined in
ofFields
▸ Static
ofFields<T
>(this
, xs
): T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
xs | Field [] |
Returns
T
Inherited from
Defined in
random
▸ Static
random(): PrivateKey
You can use this method to generate a private key. You can then obtain the associated public key via toPublicKey. And generate signatures via Signature.create.
Returns
a new PrivateKey.
Defined in
sizeInFields
▸ Static
sizeInFields(): number
Returns
number
Inherited from
Defined in
toBase58
▸ Static
toBase58(privateKey
): string
Parameters
Name | Type |
---|---|
privateKey | Object |
privateKey.s | Scalar |
Returns
string
Defined in
toConstant
▸ Static
toConstant<T
>(this
, t
): T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
t | T |
Returns
T
Inherited from
Defined in
toFields
▸ Static
toFields<T
>(this
, v
): Field
[]
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
v | T |
Returns
Field
[]
Inherited from
Defined in
toJSON
▸ Static
toJSON<T
>(this
, v
): JSONValue
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
v | T |
Returns
Inherited from
Defined in
Class: Proof
Proofs can be verified using a [[VerificationKey]] and the public input.
Table of contents
Constructors
Methods
Constructors
constructor
• new Proof()
Methods
verify
▸ verify(verificationKey
, publicInput
): boolean
Parameters
Name | Type |
---|---|
verificationKey | VerificationKey |
publicInput | any [] |
Returns
boolean
Defined in
snarkyjs / Exports / PublicKey
Class: PublicKey
Hierarchy
↳
PublicKey
Table of contents
Constructors
Properties
Methods
- assertEquals
- equals
- isEmpty
- toBase58
- toFields
- toJSON
- empty
- fromBase58
- fromJSON
- fromPrivateKey
- ofFields
- sizeInFields
- toBase58
- toConstant
- toFields
- toJSON
Constructors
constructor
• new PublicKey(g
)
Parameters
Name | Type |
---|---|
g | Group |
Overrides
Defined in
Properties
g
• g: Group
Defined in
Methods
assertEquals
▸ assertEquals(this
, x
): void
Parameters
Name | Type |
---|---|
this | PublicKey |
x | PublicKey |
Returns
void
Inherited from
Defined in
equals
▸ equals(this
, x
): Bool
Parameters
Name | Type |
---|---|
this | PublicKey |
x | PublicKey |
Returns
Inherited from
Defined in
isEmpty
▸ isEmpty(): Bool
Returns
Defined in
toBase58
▸ toBase58(): string
Returns
string
Defined in
toFields
▸ toFields(): Field
[]
Returns
Field
[]
Inherited from
Defined in
toJSON
▸ toJSON(): JSONValue
Returns
Inherited from
Defined in
empty
▸ Static
empty(): PublicKey
Returns
Defined in
fromBase58
▸ Static
fromBase58(publicKeyBase58
): PublicKey
Parameters
Name | Type |
---|---|
publicKeyBase58 | string |
Returns
Defined in
fromJSON
▸ Static
fromJSON<T
>(this
, value
): null
| T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
value | JSONValue |
Returns
null
| T
Inherited from
Defined in
fromPrivateKey
▸ Static
fromPrivateKey(p
): PublicKey
Parameters
Name | Type |
---|---|
p | PrivateKey |
Returns
Defined in
ofFields
▸ Static
ofFields<T
>(this
, xs
): T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
xs | Field [] |
Returns
T
Inherited from
Defined in
sizeInFields
▸ Static
sizeInFields(): number
Returns
number
Inherited from
Defined in
toBase58
▸ Static
toBase58(publicKey
): string
Parameters
Name | Type |
---|---|
publicKey | PublicKey |
Returns
string
Defined in
toConstant
▸ Static
toConstant<T
>(this
, t
): T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
t | T |
Returns
T
Inherited from
Defined in
toFields
▸ Static
toFields<T
>(this
, v
): Field
[]
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
v | T |
Returns
Field
[]
Inherited from
Defined in
toJSON
▸ Static
toJSON<T
>(this
, v
): JSONValue
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
v | T |
Returns
Inherited from
Defined in
Class: Scalar
Table of contents
Constructors
Methods
Constructors
constructor
• new Scalar()
Methods
add
▸ add(y
): Scalar
Add scalar field elements. Can only be called outside of circuit execution
Parameters
Name | Type |
---|---|
y | Scalar |
Returns
Defined in
div
▸ div(y
): Scalar
Divide scalar field elements. Can only be called outside of circuit execution
Parameters
Name | Type |
---|---|
y | Scalar |
Returns
Defined in
mul
▸ mul(y
): Scalar
Multiply scalar field elements. Can only be called outside of circuit execution
Parameters
Name | Type |
---|---|
y | Scalar |
Returns
Defined in
neg
▸ neg(): Scalar
Negate a scalar field element. Can only be called outside of circuit execution
Returns
Defined in
sub
▸ sub(y
): Scalar
Subtract scalar field elements. Can only be called outside of circuit execution
Parameters
Name | Type |
---|---|
y | Scalar |
Returns
Defined in
toFields
▸ toFields(this
): Field
[]
Parameters
Name | Type |
---|---|
this | Scalar |
Returns
Field
[]
Defined in
toJSON
▸ toJSON(): JSONValue
Returns
Defined in
fromJSON
▸ Static
fromJSON(x
): null
| Scalar
Parameters
Name | Type |
---|---|
x | JSONValue |
Returns
null
| Scalar
Defined in
ofBits
▸ Static
ofBits(bits
): Scalar
Parameters
Name | Type |
---|---|
bits | Bool [] |
Returns
Defined in
ofFields
▸ Static
ofFields(fields
): Scalar
Parameters
Name | Type |
---|---|
fields | Field [] |
Returns
Defined in
random
▸ Static
random(): Scalar
Returns
Defined in
sizeInFields
▸ Static
sizeInFields(): number
Returns
number
Defined in
toFields
▸ Static
toFields(x
): Field
[]
Parameters
Name | Type |
---|---|
x | Scalar |
Returns
Field
[]
Defined in
toJSON
▸ Static
toJSON(x
): JSONValue
Parameters
Name | Type |
---|---|
x | Scalar |
Returns
Defined in
snarkyjs / Exports / Signature
Class: Signature
Hierarchy
↳
Signature
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new Signature(r
, s
)
Parameters
Name | Type |
---|---|
r | Field |
s | Scalar |
Overrides
Defined in
Properties
r
• r: Field
Defined in
s
• s: Scalar
Defined in
Methods
assertEquals
▸ assertEquals(this
, x
): void
Parameters
Name | Type |
---|---|
this | Signature |
x | Signature |
Returns
void
Inherited from
Defined in
equals
▸ equals(this
, x
): Bool
Parameters
Name | Type |
---|---|
this | Signature |
x | Signature |
Returns
Inherited from
Defined in
toFields
▸ toFields(): Field
[]
Returns
Field
[]
Inherited from
Defined in
toJSON
▸ toJSON(): JSONValue
Returns
Inherited from
Defined in
verify
▸ verify(publicKey
, msg
): Bool
Parameters
Name | Type |
---|---|
publicKey | PublicKey |
msg | Field [] |
Returns
Defined in
create
▸ Static
create(privKey
, msg
): Signature
Parameters
Name | Type |
---|---|
privKey | PrivateKey |
msg | Field [] |
Returns
Defined in
fromJSON
▸ Static
fromJSON<T
>(this
, value
): null
| T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
value | JSONValue |
Returns
null
| T
Inherited from
Defined in
ofFields
▸ Static
ofFields<T
>(this
, xs
): T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
xs | Field [] |
Returns
T
Inherited from
Defined in
sizeInFields
▸ Static
sizeInFields(): number
Returns
number
Inherited from
Defined in
toConstant
▸ Static
toConstant<T
>(this
, t
): T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
t | T |
Returns
T
Inherited from
Defined in
toFields
▸ Static
toFields<T
>(this
, v
): Field
[]
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
v | T |
Returns
Field
[]
Inherited from
Defined in
toJSON
▸ Static
toJSON<T
>(this
, v
): JSONValue
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
v | T |
Returns
Inherited from
Defined in
snarkyjs / Exports / SmartContract
Class: SmartContract
The main zkapp class. To write a zkapp, extend this class as such:
class YourSmartContract extends SmartContract {
// your smart contract code here
}
Table of contents
Constructors
Properties
Accessors
Methods
Constructors
constructor
• new SmartContract(address
)
Parameters
Name | Type |
---|---|
address | PublicKey |
Defined in
Properties
_executionState
• Private
_executionState: undefined
| ExecutionState
Defined in
address
• address: PublicKey
Defined in
_methods
▪ Static
Optional
_methods: methodEntry
<SmartContract
>[]
Defined in
_provers
▪ Static
Optional
_provers: Prover
[]
Defined in
_verificationKey
▪ Static
Optional
_verificationKey: Object
Type declaration
Name | Type |
---|---|
data | string |
hash | Field |
Defined in
Accessors
account
• get
account(): PreconditionClassType
<AccountPrecondition
>
Returns
PreconditionClassType
<AccountPrecondition
>
Defined in
balance
• get
balance(): Object
Returns
Object
Name | Type |
---|---|
addInPlace | (x : string | number | bigint | UInt32 | UInt64 | Int64 ) => void |
subInPlace | (x : string | number | bigint | UInt32 | UInt64 | Int64 ) => void |
Defined in
network
• get
network(): PreconditionClassType
<{ blockchainLength
: { lower
: UInt32
; upper
: UInt32
} ; globalSlotSinceGenesis
: { lower
: UInt32
; upper
: UInt32
} ; globalSlotSinceHardFork
: { lower
: UInt32
; upper
: UInt32
} ; minWindowDensity
: { lower
: UInt32
; upper
: UInt32
} ; nextEpochData
: { epochLength
: { lower
: UInt32
; upper
: UInt32
} ; ledger
: { hash
: { isSome
: Bool
; value
: Field
} ; totalCurrency
: { lower
: UInt64
; upper
: UInt64
} } ; lockCheckpoint
: { isSome
: Bool
; value
: Field
} ; seed
: { isSome
: Bool
; value
: Field
} ; startCheckpoint
: { isSome
: Bool
; value
: Field
} } ; snarkedLedgerHash
: { isSome
: Bool
; value
: Field
} ; stakingEpochData
: { epochLength
: { lower
: UInt32
; upper
: UInt32
} ; ledger
: { hash
: { isSome
: Bool
; value
: Field
} ; totalCurrency
: { lower
: UInt64
; upper
: UInt64
} } ; lockCheckpoint
: { isSome
: Bool
; value
: Field
} ; seed
: { isSome
: Bool
; value
: Field
} ; startCheckpoint
: { isSome
: Bool
; value
: Field
} } ; timestamp
: { lower
: UInt64
; upper
: UInt64
} ; totalCurrency
: { lower
: UInt64
; upper
: UInt64
} }>
Returns
PreconditionClassType
<{ blockchainLength
: { lower
: UInt32
; upper
: UInt32
} ; globalSlotSinceGenesis
: { lower
: UInt32
; upper
: UInt32
} ; globalSlotSinceHardFork
: { lower
: UInt32
; upper
: UInt32
} ; minWindowDensity
: { lower
: UInt32
; upper
: UInt32
} ; nextEpochData
: { epochLength
: { lower
: UInt32
; upper
: UInt32
} ; ledger
: { hash
: { isSome
: Bool
; value
: Field
} ; totalCurrency
: { lower
: UInt64
; upper
: UInt64
} } ; lockCheckpoint
: { isSome
: Bool
; value
: Field
} ; seed
: { isSome
: Bool
; value
: Field
} ; startCheckpoint
: { isSome
: Bool
; value
: Field
} } ; snarkedLedgerHash
: { isSome
: Bool
; value
: Field
} ; stakingEpochData
: { epochLength
: { lower
: UInt32
; upper
: UInt32
} ; ledger
: { hash
: { isSome
: Bool
; value
: Field
} ; totalCurrency
: { lower
: UInt64
; upper
: UInt64
} } ; lockCheckpoint
: { isSome
: Bool
; value
: Field
} ; seed
: { isSome
: Bool
; value
: Field
} ; startCheckpoint
: { isSome
: Bool
; value
: Field
} } ; timestamp
: { lower
: UInt64
; upper
: UInt64
} ; totalCurrency
: { lower
: UInt64
; upper
: UInt64
} }>
Defined in
nonce
• get
nonce(): UInt32
Returns
Defined in
self
• get
self(): Party
Returns
Defined in
Methods
deploy
▸ deploy(__namedParameters
): void
Parameters
Name | Type |
---|---|
__namedParameters | Object |
__namedParameters.verificationKey? | Object |
__namedParameters.verificationKey.data | string |
__namedParameters.verificationKey.hash | string | Field |
__namedParameters.zkappKey? | PrivateKey |
Returns
void
Defined in
executionState
▸ Private
executionState(): ExecutionState
Returns
ExecutionState
Defined in
setPermissions
▸ setPermissions(permissions
): void
Parameters
Name | Type |
---|---|
permissions | Permissions |
Returns
void
Defined in
setValue
▸ setValue<T
>(maybeValue
, value
): void
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
maybeValue | SetOrKeep <T > |
value | T |
Returns
void
Defined in
sign
▸ sign(zkappKey?
, fallbackToZeroNonce?
): void
Parameters
Name | Type |
---|---|
zkappKey? | PrivateKey |
fallbackToZeroNonce? | boolean |
Returns
void
Defined in
compile
▸ Static
compile(address?
): Promise
<{ provers
: (statement
: Statement
) => Promise
<unknown
>[] ; verificationKey
: { data
: string
; hash
: string
} ; verify
: (statement
: Statement
, proof
: unknown
) => Promise
<boolean
> }>
Parameters
Name | Type |
---|---|
address? | PublicKey |
Returns
Promise
<{ provers
: (statement
: Statement
) => Promise
<unknown
>[] ; verificationKey
: { data
: string
; hash
: string
} ; verify
: (statement
: Statement
, proof
: unknown
) => Promise
<boolean
> }>
Defined in
Class: UInt32
Hierarchy
↳
UInt32
Implements
Table of contents
Constructors
Properties
Accessors
Methods
- add
- assertEquals
- assertGt
- assertLt
- assertLte
- div
- divMod
- equals
- gt
- lt
- lte
- mod
- mul
- sub
- toFields
- toJSON
- toString
- toUInt64
- MAXINT
- check
- checkConstant
- from
- fromBigInt
- fromJSON
- fromNumber
- fromString
- ofFields
- sizeInFields
- toConstant
- toFields
- toJSON
Constructors
constructor
• new UInt32(value
)
Parameters
Name | Type |
---|---|
value | Field |
Overrides
Defined in
Properties
_type
• Optional
_type: "UInt32"
Implementation of
Types.UInt32._type
Defined in
value
• value: Field
Implementation of
Types.UInt32.value
Defined in
NUM_BITS
▪ Static
NUM_BITS: number
= 32
Defined in
Accessors
one
• Static
get
one(): UInt32
Returns
Defined in
zero
• Static
get
zero(): UInt32
Returns
Defined in
Methods
add
▸ add(y
): UInt32
Parameters
Name | Type |
---|---|
y | number | UInt32 |
Returns
Defined in
assertEquals
▸ assertEquals(this
, x
): void
Parameters
Name | Type |
---|---|
this | UInt32 |
x | UInt32 |
Returns
void
Inherited from
Defined in
assertGt
▸ assertGt(y
): void
Parameters
Name | Type |
---|---|
y | UInt32 |
Returns
void
Defined in
assertLt
▸ assertLt(y
): void
Parameters
Name | Type |
---|---|
y | UInt32 |
Returns
void
Defined in
assertLte
▸ assertLte(y
): void
Parameters
Name | Type |
---|---|
y | UInt32 |
Returns
void
Defined in
div
▸ div(y
): UInt32
Parameters
Name | Type |
---|---|
y | number | UInt32 |
Returns
Defined in
divMod
▸ divMod(y
): Object
Parameters
Name | Type |
---|---|
y | string | number | UInt32 |
Returns
Object
Name | Type |
---|---|
quotient | UInt32 |
rest | UInt32 |
Defined in
equals
▸ equals(this
, x
): Bool
Parameters
Name | Type |
---|---|
this | UInt32 |
x | UInt32 |
Returns
Inherited from
Defined in
gt
▸ gt(y
): Bool
Parameters
Name | Type |
---|---|
y | UInt32 |
Returns
Defined in
lt
▸ lt(y
): Bool
Parameters
Name | Type |
---|---|
y | UInt32 |
Returns
Defined in
lte
▸ lte(y
): Bool
Parameters
Name | Type |
---|---|
y | UInt32 |
Returns
Defined in
mod
▸ mod(y
): UInt32
Parameters
Name | Type |
---|---|
y | number | UInt32 |
Returns
Defined in
mul
▸ mul(y
): UInt32
Parameters
Name | Type |
---|---|
y | number | UInt32 |
Returns
Defined in
sub
▸ sub(y
): UInt32
Parameters
Name | Type |
---|---|
y | number | UInt32 |
Returns
Defined in
toFields
▸ toFields(): Field
[]
Returns
Field
[]
Inherited from
Defined in
toJSON
▸ toJSON(): JSONValue
Returns
Inherited from
Defined in
toString
▸ toString(): string
Returns
string
Defined in
toUInt64
▸ toUInt64(): UInt64
Returns
Defined in
MAXINT
▸ Static
MAXINT(): UInt32
Returns
Defined in
check
▸ Static
check(x
): void
Parameters
Name | Type |
---|---|
x | UInt32 |
Returns
void
Defined in
checkConstant
▸ Static
Private
checkConstant(x
): Field
Parameters
Name | Type |
---|---|
x | Field |
Returns
Defined in
from
▸ Static
from(x
): UInt32
Parameters
Name | Type |
---|---|
x | string | number | bigint | Field | UInt32 |
Returns
Defined in
fromBigInt
▸ Static
fromBigInt(x
): UInt32
Parameters
Name | Type |
---|---|
x | bigint |
Returns
Defined in
fromJSON
▸ Static
fromJSON<T
>(this
, value
): null
| T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
value | JSONValue |
Returns
null
| T
Inherited from
Defined in
fromNumber
▸ Static
fromNumber(x
): UInt32
Parameters
Name | Type |
---|---|
x | number |
Returns
Defined in
fromString
▸ Static
fromString(x
): UInt32
Parameters
Name | Type |
---|---|
x | string |
Returns
Defined in
ofFields
▸ Static
ofFields<T
>(this
, xs
): T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
xs | Field [] |
Returns
T
Inherited from
Defined in
sizeInFields
▸ Static
sizeInFields(): number
Returns
number
Inherited from
Defined in
toConstant
▸ Static
toConstant<T
>(this
, t
): T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
t | T |
Returns
T
Inherited from
Defined in
toFields
▸ Static
toFields<T
>(this
, v
): Field
[]
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
v | T |
Returns
Field
[]
Inherited from
Defined in
toJSON
▸ Static
toJSON<T
>(this
, v
): JSONValue
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
v | T |
Returns
Inherited from
Defined in
Class: UInt64
Hierarchy
↳
UInt64
Implements
Table of contents
Constructors
Properties
Accessors
Methods
- add
- assertEquals
- assertGt
- assertLt
- assertLte
- div
- divMod
- equals
- gt
- lt
- lte
- mod
- mul
- sub
- toFields
- toJSON
- toString
- MAXINT
- check
- checkConstant
- from
- fromBigInt
- fromJSON
- fromNumber
- fromString
- ofFields
- sizeInFields
- toConstant
- toFields
- toJSON
Constructors
constructor
• new UInt64(value
)
Parameters
Name | Type |
---|---|
value | Field |
Overrides
Defined in
Properties
_type
• Optional
_type: "UInt64"
Implementation of
Types.UInt64._type
Defined in
value
• value: Field
Implementation of
Types.UInt64.value
Defined in
NUM_BITS
▪ Static
NUM_BITS: number
= 64
Defined in
Accessors
one
• Static
get
one(): UInt64
Returns
Defined in
zero
• Static
get
zero(): UInt64
Returns
Defined in
Methods
add
▸ add(y
): UInt64
Addition with overflow checking.
Parameters
Name | Type |
---|---|
y | number | UInt64 |
Returns
Defined in
assertEquals
▸ assertEquals(this
, x
): void
Parameters
Name | Type |
---|---|
this | UInt64 |
x | UInt64 |
Returns
void
Inherited from
Defined in
assertGt
▸ assertGt(y
): void
Parameters
Name | Type |
---|---|
y | UInt64 |
Returns
void
Defined in
assertLt
▸ assertLt(y
): void
Parameters
Name | Type |
---|---|
y | UInt64 |
Returns
void
Defined in
assertLte
▸ assertLte(y
): void
Parameters
Name | Type |
---|---|
y | UInt64 |
Returns
void
Defined in
div
▸ div(y
): UInt64
Integer division.
x.div(y)
returns the floor of x / y
, that is, the greatest
z
such that x * y <= x
.
Parameters
Name | Type |
---|---|
y | number | UInt64 |
Returns
Defined in
divMod
▸ divMod(y
): Object
Parameters
Name | Type |
---|---|
y | string | number | UInt64 |
Returns
Object
Name | Type |
---|---|
quotient | UInt64 |
rest | UInt64 |
Defined in
equals
▸ equals(this
, x
): Bool
Parameters
Name | Type |
---|---|
this | UInt64 |
x | UInt64 |
Returns
Inherited from
Defined in
gt
▸ gt(y
): Bool
Parameters
Name | Type |
---|---|
y | UInt64 |
Returns
Defined in
lt
▸ lt(y
): Bool
Parameters
Name | Type |
---|---|
y | UInt64 |
Returns
Defined in
lte
▸ lte(y
): Bool
Parameters
Name | Type |
---|---|
y | UInt64 |
Returns
Defined in
mod
▸ mod(y
): UInt64
Integer remainder.
x.mod(y)
returns the value z
such that 0 <= z < y
and
x - z
is divisble by y
.
Parameters
Name | Type |
---|---|
y | number | UInt64 |
Returns
Defined in
mul
▸ mul(y
): UInt64
Multiplication with overflow checking.
Parameters
Name | Type |
---|---|
y | number | UInt64 |
Returns
Defined in
sub
▸ sub(y
): UInt64
Subtraction with underflow checking.
Parameters
Name | Type |
---|---|
y | number | UInt64 |
Returns
Defined in
toFields
▸ toFields(): Field
[]
Returns
Field
[]
Inherited from
Defined in
toJSON
▸ toJSON(): JSONValue
Returns
Inherited from
Defined in
toString
▸ toString(): string
Returns
string
Defined in
MAXINT
▸ Static
MAXINT(): UInt64
Returns
Defined in
check
▸ Static
check(x
): void
Parameters
Name | Type |
---|---|
x | UInt64 |
Returns
void
Defined in
checkConstant
▸ Static
Private
checkConstant(x
): Field
Parameters
Name | Type |
---|---|
x | Field |
Returns
Defined in
from
▸ Static
from(x
): UInt64
Parameters
Name | Type |
---|---|
x | string | number | bigint | Field | UInt32 | UInt64 |
Returns
Defined in
fromBigInt
▸ Static
fromBigInt(x
): UInt64
Parameters
Name | Type |
---|---|
x | bigint |
Returns
Defined in
fromJSON
▸ Static
fromJSON<T
>(this
, value
): null
| T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
value | JSONValue |
Returns
null
| T
Inherited from
Defined in
fromNumber
▸ Static
fromNumber(x
): UInt64
Parameters
Name | Type |
---|---|
x | number |
Returns
Defined in
fromString
▸ Static
fromString(x
): UInt64
Parameters
Name | Type |
---|---|
x | string |
Returns
Defined in
ofFields
▸ Static
ofFields<T
>(this
, xs
): T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
xs | Field [] |
Returns
T
Inherited from
Defined in
sizeInFields
▸ Static
sizeInFields(): number
Returns
number
Inherited from
Defined in
toConstant
▸ Static
toConstant<T
>(this
, t
): T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
t | T |
Returns
T
Inherited from
Defined in
toFields
▸ Static
toFields<T
>(this
, v
): Field
[]
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
v | T |
Returns
Field
[]
Inherited from
Defined in
toJSON
▸ Static
toJSON<T
>(this
, v
): JSONValue
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
this | Constructor <T > |
v | T |
Returns
Inherited from
Defined in
snarkyjs / Exports / VerificationKey
Class: VerificationKey
Part of the circuit [[Keypair]]. A verification key can be used to verify a [[Proof]] when you provide the correct public input.
Table of contents
Constructors
Methods
Constructors
constructor
• new VerificationKey()
Methods
verify
▸ verify(publicInput
, proof
): boolean
Parameters
Name | Type |
---|---|
publicInput | any [] |
proof | Proof |
Returns
boolean
Defined in
Interfaces
snarkyjs / Exports / AsFieldElements
Interface: AsFieldElements<T>
Type parameters
Name |
---|
T |
Table of contents
Methods
Methods
check
▸ Optional
check(x
): void
Parameters
Name | Type |
---|---|
x | T |
Returns
void
Defined in
ofFields
▸ ofFields(x
): T
Parameters
Name | Type |
---|---|
x | Field [] |
Returns
T
Defined in
sizeInFields
▸ sizeInFields(): number
Returns
number
Defined in
toFields
▸ toFields(x
): Field
[]
Parameters
Name | Type |
---|---|
x | T |
Returns
Field
[]
Defined in
Interface: Body
The body of describing how some [[Party]] should change.
TODO: We need to rename this still.
Hierarchy
PartyBody
↳
Body
Table of contents
Properties
- balanceChange
- callData
- callDepth
- caller
- events
- incrementNonce
- preconditions
- publicKey
- sequenceEvents
- tokenId
- update
- useFullCommitment
Properties
balanceChange
• balanceChange: Int64
By what [[Int64]] should the balance of this account change. All balanceChanges must balance by the end of smart contract execution.
Overrides
PartyBody.balanceChange
Defined in
callData
• callData: Field
Overrides
PartyBody.callData
Defined in
callDepth
• callDepth: number
Overrides
PartyBody.callDepth
Defined in
caller
• caller: Field
Overrides
PartyBody.caller
Defined in
events
• events: Events
Recent events that have been emitted from this account.
TODO: Add a reference to general explanation of events.
Overrides
PartyBody.events
Defined in
incrementNonce
• incrementNonce: Bool
Overrides
PartyBody.incrementNonce
Defined in
preconditions
• preconditions: Object
Type declaration
Name | Type |
---|---|
account | { balance : { lower : UInt64 ; upper : UInt64 } ; delegate : { isSome : Bool ; value : PublicKey } ; nonce : { lower : UInt32 ; upper : UInt32 } ; provedState : { isSome : Bool ; value : Bool } ; receiptChainHash : { isSome : Bool ; value : Field } ; sequenceState : Field ; state : { isSome : Bool ; value : Field }[] } |
account.balance | { lower : UInt64 ; upper : UInt64 } |
account.balance.lower | UInt64 |
account.balance.upper | UInt64 |
account.delegate | { isSome : Bool ; value : PublicKey } |
account.delegate.isSome | Bool |
account.delegate.value | PublicKey |
account.nonce | { lower : UInt32 ; upper : UInt32 } |
account.nonce.lower | UInt32 |
account.nonce.upper | UInt32 |
account.provedState | { isSome : Bool ; value : Bool } |
account.provedState.isSome | Bool |
account.provedState.value | Bool |
account.receiptChainHash | { isSome : Bool ; value : Field } |
account.receiptChainHash.isSome | Bool |
account.receiptChainHash.value | Field |
account.sequenceState | Field |
account.state | { isSome : Bool ; value : Field }[] |
network | { blockchainLength : { lower : UInt32 ; upper : UInt32 } ; globalSlotSinceGenesis : { lower : UInt32 ; upper : UInt32 } ; globalSlotSinceHardFork : { lower : UInt32 ; upper : UInt32 } ; minWindowDensity : { lower : UInt32 ; upper : UInt32 } ; nextEpochData : { epochLength : { lower : UInt32 ; upper : UInt32 } ; ledger : { hash : { isSome : Bool ; value : Field } ; totalCurrency : { lower : UInt64 ; upper : UInt64 } } ; lockCheckpoint : { isSome : Bool ; value : Field } ; seed : { isSome : Bool ; value : Field } ; startCheckpoint : { isSome : Bool ; value : Field } } ; snarkedLedgerHash : { isSome : Bool ; value : Field } ; stakingEpochData : { epochLength : { lower : UInt32 ; upper : UInt32 } ; ledger : { hash : { isSome : Bool ; value : Field } ; totalCurrency : { lower : UInt64 ; upper : UInt64 } } ; lockCheckpoint : { isSome : Bool ; value : Field } ; seed : { isSome : Bool ; value : Field } ; startCheckpoint : { isSome : Bool ; value : Field } } ; timestamp : { lower : UInt64 ; upper : UInt64 } ; totalCurrency : { lower : UInt64 ; upper : UInt64 } } |
network.blockchainLength | { lower : UInt32 ; upper : UInt32 } |
network.blockchainLength.lower | UInt32 |
network.blockchainLength.upper | UInt32 |
network.globalSlotSinceGenesis | { lower : UInt32 ; upper : UInt32 } |
network.globalSlotSinceGenesis.lower | UInt32 |
network.globalSlotSinceGenesis.upper | UInt32 |
network.globalSlotSinceHardFork | { lower : UInt32 ; upper : UInt32 } |
network.globalSlotSinceHardFork.lower | UInt32 |
network.globalSlotSinceHardFork.upper | UInt32 |
network.minWindowDensity | { lower : UInt32 ; upper : UInt32 } |
network.minWindowDensity.lower | UInt32 |
network.minWindowDensity.upper | UInt32 |
network.nextEpochData | { epochLength : { lower : UInt32 ; upper : UInt32 } ; ledger : { hash : { isSome : Bool ; value : Field } ; totalCurrency : { lower : UInt64 ; upper : UInt64 } } ; lockCheckpoint : { isSome : Bool ; value : Field } ; seed : { isSome : Bool ; value : Field } ; startCheckpoint : { isSome : Bool ; value : Field } } |
network.nextEpochData.epochLength | { lower : UInt32 ; upper : UInt32 } |
network.nextEpochData.epochLength.lower | UInt32 |
network.nextEpochData.epochLength.upper | UInt32 |
network.nextEpochData.ledger | { hash : { isSome : Bool ; value : Field } ; totalCurrency : { lower : UInt64 ; upper : UInt64 } } |
network.nextEpochData.ledger.hash | { isSome : Bool ; value : Field } |
network.nextEpochData.ledger.hash.isSome | Bool |
network.nextEpochData.ledger.hash.value | Field |
network.nextEpochData.ledger.totalCurrency | { lower : UInt64 ; upper : UInt64 } |
network.nextEpochData.ledger.totalCurrency.lower | UInt64 |
network.nextEpochData.ledger.totalCurrency.upper | UInt64 |
network.nextEpochData.lockCheckpoint | { isSome : Bool ; value : Field } |
network.nextEpochData.lockCheckpoint.isSome | Bool |
network.nextEpochData.lockCheckpoint.value | Field |
network.nextEpochData.seed | { isSome : Bool ; value : Field } |
network.nextEpochData.seed.isSome | Bool |
network.nextEpochData.seed.value | Field |
network.nextEpochData.startCheckpoint | { isSome : Bool ; value : Field } |
network.nextEpochData.startCheckpoint.isSome | Bool |
network.nextEpochData.startCheckpoint.value | Field |
network.snarkedLedgerHash | { isSome : Bool ; value : Field } |
network.snarkedLedgerHash.isSome | Bool |
network.snarkedLedgerHash.value | Field |
network.stakingEpochData | { epochLength : { lower : UInt32 ; upper : UInt32 } ; ledger : { hash : { isSome : Bool ; value : Field } ; totalCurrency : { lower : UInt64 ; upper : UInt64 } } ; lockCheckpoint : { isSome : Bool ; value : Field } ; seed : { isSome : Bool ; value : Field } ; startCheckpoint : { isSome : Bool ; value : Field } } |
network.stakingEpochData.epochLength | { lower : UInt32 ; upper : UInt32 } |
network.stakingEpochData.epochLength.lower | UInt32 |
network.stakingEpochData.epochLength.upper | UInt32 |
network.stakingEpochData.ledger | { hash : { isSome : Bool ; value : Field } ; totalCurrency : { lower : UInt64 ; upper : UInt64 } } |
network.stakingEpochData.ledger.hash | { isSome : Bool ; value : Field } |
network.stakingEpochData.ledger.hash.isSome | Bool |
network.stakingEpochData.ledger.hash.value | Field |
network.stakingEpochData.ledger.totalCurrency | { lower : UInt64 ; upper : UInt64 } |
network.stakingEpochData.ledger.totalCurrency.lower | UInt64 |
network.stakingEpochData.ledger.totalCurrency.upper | UInt64 |
network.stakingEpochData.lockCheckpoint | { isSome : Bool ; value : Field } |
network.stakingEpochData.lockCheckpoint.isSome | Bool |
network.stakingEpochData.lockCheckpoint.value | Field |
network.stakingEpochData.seed | { isSome : Bool ; value : Field } |
network.stakingEpochData.seed.isSome | Bool |
network.stakingEpochData.seed.value | Field |
network.stakingEpochData.startCheckpoint | { isSome : Bool ; value : Field } |
network.stakingEpochData.startCheckpoint.isSome | Bool |
network.stakingEpochData.startCheckpoint.value | Field |
network.timestamp | { lower : UInt64 ; upper : UInt64 } |
network.timestamp.lower | UInt64 |
network.timestamp.upper | UInt64 |
network.totalCurrency | { lower : UInt64 ; upper : UInt64 } |
network.totalCurrency.lower | UInt64 |
network.totalCurrency.upper | UInt64 |
Overrides
PartyBody.preconditions
Defined in
publicKey
• publicKey: PublicKey
The address for this body.
Overrides
PartyBody.publicKey
Defined in
sequenceEvents
• sequenceEvents: Events
Overrides
PartyBody.sequenceEvents
Defined in
tokenId
• tokenId: Field
The TokenId for this account.
Overrides
PartyBody.tokenId
Defined in
update
• update: Object
Specify [[Update]]s to tweakable pieces of the account record backing this address in the ledger.
Type declaration
Name | Type |
---|---|
appState | { isSome : Bool ; value : Field }[] |
delegate | { isSome : Bool ; value : PublicKey } |
delegate.isSome | Bool |
delegate.value | PublicKey |
permissions | { isSome : Bool ; value : { editSequenceState : AuthRequired ; editState : AuthRequired ; incrementNonce : AuthRequired ; receive : AuthRequired ; send : AuthRequired ; setDelegate : AuthRequired ; setPermissions : AuthRequired ; setTokenSymbol : AuthRequired ; setVerificationKey : AuthRequired ; setVotingFor : AuthRequired ; setZkappUri : AuthRequired } } |
permissions.isSome | Bool |
permissions.value | { editSequenceState : AuthRequired ; editState : AuthRequired ; incrementNonce : AuthRequired ; receive : AuthRequired ; send : AuthRequired ; setDelegate : AuthRequired ; setPermissions : AuthRequired ; setTokenSymbol : AuthRequired ; setVerificationKey : AuthRequired ; setVotingFor : AuthRequired ; setZkappUri : AuthRequired } |
permissions.value.editSequenceState | AuthRequired |
permissions.value.editState | AuthRequired |
permissions.value.incrementNonce | AuthRequired |
permissions.value.receive | AuthRequired |
permissions.value.send | AuthRequired |
permissions.value.setDelegate | AuthRequired |
permissions.value.setPermissions | AuthRequired |
permissions.value.setTokenSymbol | AuthRequired |
permissions.value.setVerificationKey | AuthRequired |
permissions.value.setVotingFor | AuthRequired |
permissions.value.setZkappUri | AuthRequired |
timing | { isSome : Bool ; value : { cliffAmount : UInt64 ; cliffTime : UInt32 ; initialMinimumBalance : UInt64 ; vestingIncrement : UInt64 ; vestingPeriod : UInt32 } } |
timing.isSome | Bool |
timing.value | { cliffAmount : UInt64 ; cliffTime : UInt32 ; initialMinimumBalance : UInt64 ; vestingIncrement : UInt64 ; vestingPeriod : UInt32 } |
timing.value.cliffAmount | UInt64 |
timing.value.cliffTime | UInt32 |
timing.value.initialMinimumBalance | UInt64 |
timing.value.vestingIncrement | UInt64 |
timing.value.vestingPeriod | UInt32 |
tokenSymbol | { isSome : Bool ; value : { data : string ; hash : Field } } |
tokenSymbol.isSome | Bool |
tokenSymbol.value | { data : string ; hash : Field } |
tokenSymbol.value.data | string |
tokenSymbol.value.hash | Field |
verificationKey | { isSome : Bool ; value : { data : string ; hash : Field } } |
verificationKey.isSome | Bool |
verificationKey.value | { data : string ; hash : Field } |
verificationKey.value.data | string |
verificationKey.value.hash | Field |
votingFor | { isSome : Bool ; value : Field } |
votingFor.isSome | Bool |
votingFor.value | Field |
zkappUri | { isSome : Bool ; value : { data : string ; hash : Field } } |
zkappUri.isSome | Bool |
zkappUri.value | { data : string ; hash : Field } |
zkappUri.value.data | string |
zkappUri.value.hash | Field |
Overrides
PartyBody.update
Defined in
useFullCommitment
• useFullCommitment: Bool
Overrides
PartyBody.useFullCommitment
Defined in
snarkyjs / Exports / CircuitMain
Interface: CircuitMain<W, P>
Type parameters
Name |
---|
W |
P |
Table of contents
Properties
Methods
Properties
snarkyPublicTyp
• snarkyPublicTyp: AsFieldElements
<P
>
Defined in
snarkyWitnessTyp
• snarkyWitnessTyp: AsFieldElements
<W
>
Defined in
Methods
snarkyMain
▸ snarkyMain(w
, p
): void
Parameters
Name | Type |
---|---|
w | W |
p | P |
Returns
void
Defined in
snarkyjs / Exports / Permissions
Interface: Permissions
Permissions specify how specific aspects of the zkapp account are allowed to be modified. All fields are denominated by a [[Permission]].
Hierarchy
Permissions_
↳
Permissions
Table of contents
Properties
- editSequenceState
- editState
- incrementNonce
- receive
- send
- setDelegate
- setPermissions
- setTokenSymbol
- setVerificationKey
- setVotingFor
- setZkappUri
Properties
editSequenceState
• editSequenceState: AuthRequired
The [[Permission]] corresponding to the ability to change the sequence state associated with the account.
TODO: Define sequence state here as well.
Overrides
Permissions_.editSequenceState
Defined in
editState
• editState: AuthRequired
The [[Permission]] corresponding to the 8 state fields associated with an account.
Overrides
Permissions_.editState
Defined in
incrementNonce
• incrementNonce: AuthRequired
Overrides
Permissions_.incrementNonce
Defined in
receive
• receive: AuthRequired
The [[Permission]] corresponding to the ability to receive transactions to this account.
Overrides
Permissions_.receive
Defined in
send
• send: AuthRequired
The [[Permission]] corresponding to the ability to send transactions from this account.
Overrides
Permissions_.send
Defined in
setDelegate
• setDelegate: AuthRequired
The [[Permission]] corresponding to the ability to set the delegate field of the account.
Overrides
Permissions_.setDelegate
Defined in
setPermissions
• setPermissions: AuthRequired
The [[Permission]] corresponding to the ability to set the permissions field of the account.
Overrides
Permissions_.setPermissions
Defined in
setTokenSymbol
• setTokenSymbol: AuthRequired
The [[Permission]] corresponding to the ability to set the token symbol for this account.
Overrides
Permissions_.setTokenSymbol
Defined in
setVerificationKey
• setVerificationKey: AuthRequired
The [[Permission]] corresponding to the ability to set the verification key associated with the circuit tied to this account. Effectively "upgradability" of the smart contract.
Overrides
Permissions_.setVerificationKey
Defined in
setVotingFor
• setVotingFor: AuthRequired
Overrides
Permissions_.setVotingFor
Defined in
setZkappUri
• setZkappUri: AuthRequired
The [[Permission]] corresponding to the ability to set the zkapp uri typically pointing to the source code of the smart contract. Usually this should be changed whenever the [[Permissions.setVerificationKey]] is changed. Effectively "upgradability" of the smart contract.
Overrides
Permissions_.setZkappUri
Defined in
snarkyjs / Exports
Type Aliases
DeployArgs
Ƭ DeployArgs: Object
Type declaration
Name | Type |
---|---|
verificationKey? | { data : string ; hash : string | Field } |
verificationKey.data | string |
verificationKey.hash | string | Field |
zkappKey? | PrivateKey |
Defined in
FeePayerUnsigned
Ƭ FeePayerUnsigned: Object
Type declaration
Name | Type |
---|---|
authorization | UnfinishedSignature | string |
body | FeePayerBody |
Defined in
JSONValue
Ƭ JSONValue: number
| string
| boolean
| null
| JSONValue
[] | { [key: string]
: JSONValue
; }
Defined in
LazyControl
Ƭ LazyControl: Control
| LazySignature
| LazyProof
Defined in
LazyProof
Ƭ LazyProof: Object
Type declaration
Name | Type |
---|---|
ZkappClass | typeof SmartContract |
args | any [] |
kind | "lazy-proof" |
method | Function |
Defined in
LazySignature
Ƭ LazySignature: Object
Type declaration
Name | Type |
---|---|
kind | "lazy-signature" |
privateKey? | PrivateKey |
Defined in
Parties
Ƭ Parties: Object
Type declaration
Name | Type |
---|---|
feePayer | FeePayerUnsigned |
memo | string |
otherParties | Party [] |
Defined in
Permission
Ƭ Permission: AuthRequired
One specific permission value.
A [[Permission]] tells one specific permission for our zkapp how it should behave when presented with requested modifications.
Use static factory methods on this class to use a specific behavior. See documentation on those methods to learn more.
Defined in
Preconditions
Ƭ Preconditions: PartyBody
["preconditions"
]
Preconditions for the network and accounts
Defined in
SetOrKeep
Ƭ SetOrKeep<T
>: Object
Either set a value or keep it the same.
Type parameters
Name |
---|
T |
Type declaration
Name | Type |
---|---|
isSome | Bool |
value | T |
Defined in
State
Ƭ State<A
>: Object
Gettable and settable state that can be checked for equality.
Type parameters
Name |
---|
A |
Type declaration
Name | Type |
---|---|
assertEquals | (a : A ) => void |
fetch | () => Promise <undefined | A > |
get | () => A |
set | (a : A ) => void |
Defined in
Variables
Body
• Body: Object
Type declaration
Name | Type |
---|---|
dummy | () => Body |
keepAll | (publicKey : PublicKey ) => Body |
noUpdate | () => { appState : { isSome : Bool ; value : Field }[] ; delegate : { isSome : Bool ; value : PublicKey } ; permissions : { isSome : Bool ; value : { editSequenceState : AuthRequired ; editState : AuthRequired ; incrementNonce : AuthRequired ; receive : AuthRequired ; send : AuthRequired ; setDelegate : AuthRequired ; setPermissions : AuthRequired ; setTokenSymbol : AuthRequired ; setVerificationKey : AuthRequired ; setVotingFor : AuthRequired ; setZkappUri : AuthRequired } } ; timing : { isSome : Bool ; value : { cliffAmount : UInt64 ; cliffTime : UInt32 ; initialMinimumBalance : UInt64 ; vestingIncrement : UInt64 ; vestingPeriod : UInt32 } } ; tokenSymbol : { isSome : Bool ; value : { data : string ; hash : Field } } ; verificationKey : { isSome : Bool ; value : { data : string ; hash : Field } } ; votingFor : { isSome : Bool ; value : Field } ; zkappUri : { isSome : Bool ; value : { data : string ; hash : Field } } } |
Defined in
Permission
• Permission: Object
Type declaration
Name | Type |
---|---|
impossible | () => AuthRequired |
none | () => AuthRequired |
proof | () => AuthRequired |
proofOrSignature | () => AuthRequired |
signature | () => AuthRequired |
Defined in
Permissions
• Permissions: Object
Type declaration
Name | Type |
---|---|
default | () => Permissions |
impossible | () => AuthRequired |
initial | () => Permissions |
none | () => AuthRequired |
proof | () => AuthRequired |
proofOrSignature | () => AuthRequired |
signature | () => AuthRequired |
Defined in
Pickles
• Const
Pickles: Object
Type declaration
Name | Type |
---|---|
compile | (rules : [0 , string , (statement : Statement ) => void ][]) => { provers : (statement : Statement ) => Promise <unknown >[] ; getVerificationKeyArtifact : () => { data : string ; hash : string } ; verify : (statement : Statement , proof : unknown ) => Promise <boolean > } |
proofToString | (proof : unknown ) => string |
Defined in
Poseidon
• Const
Poseidon: Object
Type declaration
Name | Type |
---|---|
Sponge | typeof Sponge |
hash | (xs : Field []) => Field |
Defined in
Preconditions
• Preconditions: Object
Type declaration
Name | Type |
---|---|
ignoreAll | () => { account : { balance : { lower : UInt64 ; upper : UInt64 } ; delegate : { isSome : Bool ; value : PublicKey } ; nonce : { lower : UInt32 ; upper : UInt32 } ; provedState : { isSome : Bool ; value : Bool } ; receiptChainHash : { isSome : Bool ; value : Field } ; sequenceState : Field ; state : { isSome : Bool ; value : Field }[] } ; network : { blockchainLength : { lower : UInt32 ; upper : UInt32 } ; globalSlotSinceGenesis : { lower : UInt32 ; upper : UInt32 } ; globalSlotSinceHardFork : { lower : UInt32 ; upper : UInt32 } ; minWindowDensity : { lower : UInt32 ; upper : UInt32 } ; nextEpochData : { epochLength : { lower : UInt32 ; upper : UInt32 } ; ledger : { hash : { isSome : Bool ; value : Field } ; totalCurrency : { lower : UInt64 ; upper : UInt64 } } ; lockCheckpoint : { isSome : Bool ; value : Field } ; seed : { isSome : Bool ; value : Field } ; startCheckpoint : { isSome : Bool ; value : Field } } ; snarkedLedgerHash : { isSome : Bool ; value : Field } ; stakingEpochData : { epochLength : { lower : UInt32 ; upper : UInt32 } ; ledger : { hash : { isSome : Bool ; value : Field } ; totalCurrency : { lower : UInt64 ; upper : UInt64 } } ; lockCheckpoint : { isSome : Bool ; value : Field } ; seed : { isSome : Bool ; value : Field } ; startCheckpoint : { isSome : Bool ; value : Field } } ; timestamp : { lower : UInt64 ; upper : UInt64 } ; totalCurrency : { lower : UInt64 ; upper : UInt64 } } } |
Defined in
ZkappStateLength
• Const
ZkappStateLength: 8
Defined in
isReady
• isReady: Promise
<undefined
>
A Promise that resolves when SnarkyJS is ready to be used
Defined in
jsLayout
• jsLayout: Object
Type declaration
Name | Type |
---|---|
Parties | { docs : null = null; layout : ({ docs : null = null; key : string = 'feePayer'; value : { docs : null = null; inner : undefined ; layout : ({ docs : null = null; key : string = 'body'; value : { docs : null = null; layout : ({ docs : null = null; key : string = 'publicKey'; value : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : undefined = null; inner : undefined ; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'PublicKey' } } | { docs : null = null; key : string = 'update'; value : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : null = null; inner : undefined ; layout : ({ docs : null = null; key : string = 'appState'; value : { inner : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : undefined = null; inner : { type : string = 'Field' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'flaggedOption'; type : string = 'option' } ; optionType : undefined = 'flaggedOption'; type : string = 'array' } } | { docs : null = null; key : string = 'delegate'; value : { inner : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : undefined = null; inner : undefined ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : undefined = 'flaggedOption'; type : string = 'PublicKey' } ; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'verificationKey'; value : { inner : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : null = null; inner : undefined ; layout : { docs : null = null; key : string = 'data'; value : { type : string = 'string' } }[] ; name : string = 'VerificationKeyWithHash'; optionType : undefined = 'flaggedOption'; type : string = 'object' } ; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'zkappUri'; value : { inner : { checkedType : { docs : null = null; layout : { docs : null = null; key : string = 'data'; value : { type : string = 'string' } }[] ; name : string = 'Events'; type : string = 'object' } ; checkedTypeName : string = 'StringWithHash'; docs : undefined = null; inner : undefined ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : undefined = 'flaggedOption'; type : string = 'string' } ; optionType : string = 'flaggedOption'; type : string = 'option' } })[] ; name : string = 'PartyUpdate'; type : string = 'object' } } | { docs : null = null; key : string = 'events'; value : { checkedType : { docs : null = null; layout : ({ docs : null = null; key : string = 'data'; value : { inner : { inner : { type : string = 'Field' } ; type : string = 'array' } ; type : string = 'array' } } | { docs : null = null; key : string = 'hash'; value : { inner : undefined ; type : string = 'Field' } })[] ; name : string = 'Events'; type : string = 'object' } ; checkedTypeName : string = 'Events'; docs : undefined = null; inner : { inner : { type : string = 'Field' } ; type : string = 'array' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'array' } } | { docs : null = null; key : string = 'networkPrecondition'; value : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : null = null; inner : undefined ; layout : ({ docs : null = null; key : string = 'snarkedLedgerHash'; value : { docs : undefined = null; inner : { docs : undefined = null; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'Field' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'timestamp'; value : { docs : undefined = null; inner : { docs : null = null; layout : { docs : null = null; key : string = 'lower'; value : { type : string = 'UInt64' } }[] ; name : string = 'BlockTimeInterval'; type : string = 'object' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'implicit'; type : string = 'option' } } | { docs : null = null; key : string = 'stakingEpochData'; value : { docs : null = null; inner : undefined ; layout : ({ docs : null = null; key : string = 'ledger'; value : { docs : null = null; inner : undefined ; layout : ({ docs : null = null; key : string = 'hash'; value : { inner : { docs : undefined = null; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'Field' } ; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'totalCurrency'; value : { inner : { docs : null = null; layout : { docs : null = null; key : string = 'lower'; value : { type : string = 'UInt64' } }[] ; name : string = 'CurrencyAmountInterval'; type : string = 'object' } ; optionType : string = 'implicit'; type : string = 'option' } })[] ; name : string = 'EpochLedgerPrecondition'; optionType : undefined = 'flaggedOption'; type : string = 'object' } } | { docs : null = null; key : string = 'seed'; value : { docs : undefined = null; inner : { docs : undefined = null; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'Field' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'epochLength'; value : { docs : undefined = null; inner : { docs : null = null; layout : { docs : null = null; key : string = 'lower'; value : { type : string = 'UInt32' } }[] ; name : string = 'LengthInterval'; type : string = 'object' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'implicit'; type : string = 'option' } })[] ; name : string = 'EpochDataPrecondition'; optionType : undefined = 'flaggedOption'; type : string = 'object' } })[] ; name : string = 'NetworkPrecondition'; type : string = 'object' } })[] ; name : string = 'FeePayerPartyBody'; type : string = 'object' } } | { docs : null = null; key : string = 'authorization'; value : { docs : undefined = null; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'string' } })[] ; name : string = 'ZkappPartyFeePayer'; type : string = 'object' } } | { docs : null = null; key : string = 'otherParties'; value : { docs : undefined = null; inner : { docs : string = 'A party to a zkApp transaction'; layout : ({ docs : null = null; key : string = 'body'; value : { docs : null = null; layout : ({ docs : null = null; key : string = 'publicKey'; value : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : undefined = null; inner : undefined ; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'PublicKey' } } | { docs : null = null; key : string = 'update'; value : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : null = null; inner : undefined ; layout : ({ docs : null = null; key : string = 'appState'; value : { inner : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : undefined = null; inner : { type : string = 'Field' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'flaggedOption'; type : string = 'option' } ; optionType : undefined = 'flaggedOption'; type : string = 'array' } } | { docs : null = null; key : string = 'delegate'; value : { inner : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : undefined = null; inner : undefined ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : undefined = 'flaggedOption'; type : string = 'PublicKey' } ; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'verificationKey'; value : { inner : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : null = null; inner : undefined ; layout : { docs : null = null; key : string = 'data'; value : { type : string = 'string' } }[] ; name : string = 'VerificationKeyWithHash'; optionType : undefined = 'flaggedOption'; type : string = 'object' } ; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'zkappUri'; value : { inner : { checkedType : { docs : null = null; layout : { docs : null = null; key : string = 'data'; value : { type : string = 'string' } }[] ; name : string = 'Events'; type : string = 'object' } ; checkedTypeName : string = 'StringWithHash'; docs : undefined = null; inner : undefined ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : undefined = 'flaggedOption'; type : string = 'string' } ; optionType : string = 'flaggedOption'; type : string = 'option' } })[] ; name : string = 'PartyUpdate'; type : string = 'object' } } | { docs : null = null; key : string = 'balanceChange'; value : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : null = null; inner : undefined ; layout : { docs : null = null; key : string = 'magnitude'; value : { type : string = 'UInt64' } }[] ; name : string = 'BalanceChange'; type : string = 'object' } } | { docs : null = null; key : string = 'events'; value : { checkedType : { docs : null = null; layout : ({ docs : null = null; key : string = 'data'; value : { inner : { inner : { type : string = 'Field' } ; type : string = 'array' } ; type : string = 'array' } } | { docs : null = null; key : string = 'hash'; value : { inner : undefined ; type : string = 'Field' } })[] ; name : string = 'Events'; type : string = 'object' } ; checkedTypeName : string = 'Events'; docs : undefined = null; inner : { inner : { type : string = 'Field' } ; type : string = 'array' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'array' } } | { docs : null = null; key : string = 'preconditions'; value : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : null = null; inner : undefined ; layout : ({ docs : null = null; key : string = 'network'; value : { docs : null = null; layout : ({ docs : null = null; key : string = 'snarkedLedgerHash'; value : { docs : undefined = null; inner : { docs : undefined = null; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'Field' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'timestamp'; value : { docs : undefined = null; inner : { docs : null = null; layout : { docs : null = null; key : string = 'lower'; value : { type : string = 'UInt64' } }[] ; name : string = 'BlockTimeInterval'; type : string = 'object' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'implicit'; type : string = 'option' } } | { docs : null = null; key : string = 'stakingEpochData'; value : { docs : null = null; inner : undefined ; layout : ({ docs : null = null; key : string = 'ledger'; value : { docs : null = null; inner : undefined ; layout : ({ docs : null = null; key : string = 'hash'; value : { inner : { docs : undefined = null; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'Field' } ; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'totalCurrency'; value : { inner : { docs : null = null; layout : { docs : null = null; key : string = 'lower'; value : { type : string = 'UInt64' } }[] ; name : string = 'CurrencyAmountInterval'; type : string = 'object' } ; optionType : string = 'implicit'; type : string = 'option' } })[] ; name : string = 'EpochLedgerPrecondition'; optionType : undefined = 'flaggedOption'; type : string = 'object' } } | { docs : null = null; key : string = 'seed'; value : { docs : undefined = null; inner : { docs : undefined = null; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'Field' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'epochLength'; value : { docs : undefined = null; inner : { docs : null = null; layout : { docs : null = null; key : string = 'lower'; value : { type : string = 'UInt32' } }[] ; name : string = 'LengthInterval'; type : string = 'object' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'implicit'; type : string = 'option' } })[] ; name : string = 'EpochDataPrecondition'; optionType : undefined = 'flaggedOption'; type : string = 'object' } })[] ; name : string = 'NetworkPrecondition'; type : string = 'object' } } | { docs : null = null; key : string = 'account'; value : { docs : null = null; layout : ({ docs : null = null; key : string = 'balance'; value : { inner : { docs : null = null; inner : undefined ; layout : { docs : null = null; key : string = 'lower'; value : { type : string = 'UInt64' } }[] ; name : string = 'BalanceInterval'; optionType : undefined = 'flaggedOption'; type : string = 'object' } ; optionType : string = 'implicit'; type : string = 'option' } } | { docs : null = null; key : string = 'receiptChainHash'; value : { inner : { docs : undefined = null; inner : undefined ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : undefined = 'flaggedOption'; type : string = 'Field' } ; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'state'; value : { inner : { docs : undefined = null; inner : { type : string = 'Field' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'flaggedOption'; type : string = 'option' } ; optionType : undefined = 'flaggedOption'; type : string = 'array' } })[] ; name : string = 'AccountPrecondition'; type : string = 'object' } })[] ; name : string = 'Preconditions'; type : string = 'object' } })[] ; name : string = 'PartyBody'; type : string = 'object' } } | { docs : null = null; key : string = 'authorization'; value : { docs : null = null; layout : { docs : null = null; key : string = 'proof'; value : { inner : { type : string = 'string' } ; optionType : string = 'orUndefined'; type : string = 'option' } }[] ; name : string = 'Control'; type : string = 'object' } })[] ; name : string = 'ZkappParty'; type : string = 'object' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'array' } } | { docs : null = null; key : string = 'memo'; value : { docs : undefined = null; inner : undefined ; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'string' } })[] ; name : string = 'Parties'; type : string = 'object' } |
Parties.docs | null |
Parties.layout | ({ docs : null = null; key : string = 'feePayer'; value : { docs : null = null; inner : undefined ; layout : ({ docs : null = null; key : string = 'body'; value : { docs : null = null; layout : ({ docs : null = null; key : string = 'publicKey'; value : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : undefined = null; inner : undefined ; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'PublicKey' } } | { docs : null = null; key : string = 'update'; value : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : null = null; inner : undefined ; layout : ({ docs : null = null; key : string = 'appState'; value : { inner : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : undefined = null; inner : { type : string = 'Field' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'flaggedOption'; type : string = 'option' } ; optionType : undefined = 'flaggedOption'; type : string = 'array' } } | { docs : null = null; key : string = 'delegate'; value : { inner : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : undefined = null; inner : undefined ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : undefined = 'flaggedOption'; type : string = 'PublicKey' } ; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'verificationKey'; value : { inner : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : null = null; inner : undefined ; layout : { docs : null = null; key : string = 'data'; value : { type : string = 'string' } }[] ; name : string = 'VerificationKeyWithHash'; optionType : undefined = 'flaggedOption'; type : string = 'object' } ; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'zkappUri'; value : { inner : { checkedType : { docs : null = null; layout : { docs : null = null; key : string = 'data'; value : { type : string = 'string' } }[] ; name : string = 'Events'; type : string = 'object' } ; checkedTypeName : string = 'StringWithHash'; docs : undefined = null; inner : undefined ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : undefined = 'flaggedOption'; type : string = 'string' } ; optionType : string = 'flaggedOption'; type : string = 'option' } })[] ; name : string = 'PartyUpdate'; type : string = 'object' } } | { docs : null = null; key : string = 'events'; value : { checkedType : { docs : null = null; layout : ({ docs : null = null; key : string = 'data'; value : { inner : { inner : { type : string = 'Field' } ; type : string = 'array' } ; type : string = 'array' } } | { docs : null = null; key : string = 'hash'; value : { inner : undefined ; type : string = 'Field' } })[] ; name : string = 'Events'; type : string = 'object' } ; checkedTypeName : string = 'Events'; docs : undefined = null; inner : { inner : { type : string = 'Field' } ; type : string = 'array' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'array' } } | { docs : null = null; key : string = 'networkPrecondition'; value : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : null = null; inner : undefined ; layout : ({ docs : null = null; key : string = 'snarkedLedgerHash'; value : { docs : undefined = null; inner : { docs : undefined = null; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'Field' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'timestamp'; value : { docs : undefined = null; inner : { docs : null = null; layout : { docs : null = null; key : string = 'lower'; value : { type : string = 'UInt64' } }[] ; name : string = 'BlockTimeInterval'; type : string = 'object' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'implicit'; type : string = 'option' } } | { docs : null = null; key : string = 'stakingEpochData'; value : { docs : null = null; inner : undefined ; layout : ({ docs : null = null; key : string = 'ledger'; value : { docs : null = null; inner : undefined ; layout : ({ docs : null = null; key : string = 'hash'; value : { inner : { docs : undefined = null; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'Field' } ; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'totalCurrency'; value : { inner : { docs : null = null; layout : { docs : null = null; key : string = 'lower'; value : { type : string = 'UInt64' } }[] ; name : string = 'CurrencyAmountInterval'; type : string = 'object' } ; optionType : string = 'implicit'; type : string = 'option' } })[] ; name : string = 'EpochLedgerPrecondition'; optionType : undefined = 'flaggedOption'; type : string = 'object' } } | { docs : null = null; key : string = 'seed'; value : { docs : undefined = null; inner : { docs : undefined = null; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'Field' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'epochLength'; value : { docs : undefined = null; inner : { docs : null = null; layout : { docs : null = null; key : string = 'lower'; value : { type : string = 'UInt32' } }[] ; name : string = 'LengthInterval'; type : string = 'object' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'implicit'; type : string = 'option' } })[] ; name : string = 'EpochDataPrecondition'; optionType : undefined = 'flaggedOption'; type : string = 'object' } })[] ; name : string = 'NetworkPrecondition'; type : string = 'object' } })[] ; name : string = 'FeePayerPartyBody'; type : string = 'object' } } | { docs : null = null; key : string = 'authorization'; value : { docs : undefined = null; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'string' } })[] ; name : string = 'ZkappPartyFeePayer'; type : string = 'object' } } | { docs : null = null; key : string = 'otherParties'; value : { docs : undefined = null; inner : { docs : string = 'A party to a zkApp transaction'; layout : ({ docs : null = null; key : string = 'body'; value : { docs : null = null; layout : ({ docs : null = null; key : string = 'publicKey'; value : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : undefined = null; inner : undefined ; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'PublicKey' } } | { docs : null = null; key : string = 'update'; value : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : null = null; inner : undefined ; layout : ({ docs : null = null; key : string = 'appState'; value : { inner : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : undefined = null; inner : { type : string = 'Field' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'flaggedOption'; type : string = 'option' } ; optionType : undefined = 'flaggedOption'; type : string = 'array' } } | { docs : null = null; key : string = 'delegate'; value : { inner : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : undefined = null; inner : undefined ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : undefined = 'flaggedOption'; type : string = 'PublicKey' } ; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'verificationKey'; value : { inner : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : null = null; inner : undefined ; layout : { docs : null = null; key : string = 'data'; value : { type : string = 'string' } }[] ; name : string = 'VerificationKeyWithHash'; optionType : undefined = 'flaggedOption'; type : string = 'object' } ; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'zkappUri'; value : { inner : { checkedType : { docs : null = null; layout : { docs : null = null; key : string = 'data'; value : { type : string = 'string' } }[] ; name : string = 'Events'; type : string = 'object' } ; checkedTypeName : string = 'StringWithHash'; docs : undefined = null; inner : undefined ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : undefined = 'flaggedOption'; type : string = 'string' } ; optionType : string = 'flaggedOption'; type : string = 'option' } })[] ; name : string = 'PartyUpdate'; type : string = 'object' } } | { docs : null = null; key : string = 'balanceChange'; value : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : null = null; inner : undefined ; layout : { docs : null = null; key : string = 'magnitude'; value : { type : string = 'UInt64' } }[] ; name : string = 'BalanceChange'; type : string = 'object' } } | { docs : null = null; key : string = 'events'; value : { checkedType : { docs : null = null; layout : ({ docs : null = null; key : string = 'data'; value : { inner : { inner : { type : string = 'Field' } ; type : string = 'array' } ; type : string = 'array' } } | { docs : null = null; key : string = 'hash'; value : { inner : undefined ; type : string = 'Field' } })[] ; name : string = 'Events'; type : string = 'object' } ; checkedTypeName : string = 'Events'; docs : undefined = null; inner : { inner : { type : string = 'Field' } ; type : string = 'array' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'array' } } | { docs : null = null; key : string = 'preconditions'; value : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : null = null; inner : undefined ; layout : ({ docs : null = null; key : string = 'network'; value : { docs : null = null; layout : ({ docs : null = null; key : string = 'snarkedLedgerHash'; value : { docs : undefined = null; inner : { docs : undefined = null; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'Field' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'timestamp'; value : { docs : undefined = null; inner : { docs : null = null; layout : { docs : null = null; key : string = 'lower'; value : { type : string = 'UInt64' } }[] ; name : string = 'BlockTimeInterval'; type : string = 'object' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'implicit'; type : string = 'option' } } | { docs : null = null; key : string = 'stakingEpochData'; value : { docs : null = null; inner : undefined ; layout : ({ docs : null = null; key : string = 'ledger'; value : { docs : null = null; inner : undefined ; layout : ({ docs : null = null; key : string = 'hash'; value : { inner : { docs : undefined = null; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'Field' } ; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'totalCurrency'; value : { inner : { docs : null = null; layout : { docs : null = null; key : string = 'lower'; value : { type : string = 'UInt64' } }[] ; name : string = 'CurrencyAmountInterval'; type : string = 'object' } ; optionType : string = 'implicit'; type : string = 'option' } })[] ; name : string = 'EpochLedgerPrecondition'; optionType : undefined = 'flaggedOption'; type : string = 'object' } } | { docs : null = null; key : string = 'seed'; value : { docs : undefined = null; inner : { docs : undefined = null; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'Field' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'epochLength'; value : { docs : undefined = null; inner : { docs : null = null; layout : { docs : null = null; key : string = 'lower'; value : { type : string = 'UInt32' } }[] ; name : string = 'LengthInterval'; type : string = 'object' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'implicit'; type : string = 'option' } })[] ; name : string = 'EpochDataPrecondition'; optionType : undefined = 'flaggedOption'; type : string = 'object' } })[] ; name : string = 'NetworkPrecondition'; type : string = 'object' } } | { docs : null = null; key : string = 'account'; value : { docs : null = null; layout : ({ docs : null = null; key : string = 'balance'; value : { inner : { docs : null = null; inner : undefined ; layout : { docs : null = null; key : string = 'lower'; value : { type : string = 'UInt64' } }[] ; name : string = 'BalanceInterval'; optionType : undefined = 'flaggedOption'; type : string = 'object' } ; optionType : string = 'implicit'; type : string = 'option' } } | { docs : null = null; key : string = 'receiptChainHash'; value : { inner : { docs : undefined = null; inner : undefined ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : undefined = 'flaggedOption'; type : string = 'Field' } ; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'state'; value : { inner : { docs : undefined = null; inner : { type : string = 'Field' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'flaggedOption'; type : string = 'option' } ; optionType : undefined = 'flaggedOption'; type : string = 'array' } })[] ; name : string = 'AccountPrecondition'; type : string = 'object' } })[] ; name : string = 'Preconditions'; type : string = 'object' } })[] ; name : string = 'PartyBody'; type : string = 'object' } } | { docs : null = null; key : string = 'authorization'; value : { docs : null = null; layout : { docs : null = null; key : string = 'proof'; value : { inner : { type : string = 'string' } ; optionType : string = 'orUndefined'; type : string = 'option' } }[] ; name : string = 'Control'; type : string = 'object' } })[] ; name : string = 'ZkappParty'; type : string = 'object' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'array' } } | { docs : null = null; key : string = 'memo'; value : { docs : undefined = null; inner : undefined ; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'string' } })[] |
Parties.name | string |
Parties.type | string |
Party | { docs : string = 'A party to a zkApp transaction'; layout : ({ docs : null = null; key : string = 'body'; value : { docs : null = null; layout : ({ docs : null = null; key : string = 'publicKey'; value : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : undefined = null; inner : undefined ; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'PublicKey' } } | { docs : null = null; key : string = 'update'; value : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : null = null; inner : undefined ; layout : ({ docs : null = null; key : string = 'appState'; value : { inner : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : undefined = null; inner : { type : string = 'Field' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'flaggedOption'; type : string = 'option' } ; optionType : undefined = 'flaggedOption'; type : string = 'array' } } | { docs : null = null; key : string = 'delegate'; value : { inner : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : undefined = null; inner : undefined ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : undefined = 'flaggedOption'; type : string = 'PublicKey' } ; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'verificationKey'; value : { inner : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : null = null; inner : undefined ; layout : { docs : null = null; key : string = 'data'; value : { type : string = 'string' } }[] ; name : string = 'VerificationKeyWithHash'; optionType : undefined = 'flaggedOption'; type : string = 'object' } ; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'zkappUri'; value : { inner : { checkedType : { docs : null = null; layout : { docs : null = null; key : string = 'data'; value : { type : string = 'string' } }[] ; name : string = 'Events'; type : string = 'object' } ; checkedTypeName : string = 'StringWithHash'; docs : undefined = null; inner : undefined ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : undefined = 'flaggedOption'; type : string = 'string' } ; optionType : string = 'flaggedOption'; type : string = 'option' } })[] ; name : string = 'PartyUpdate'; type : string = 'object' } } | { docs : null = null; key : string = 'balanceChange'; value : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : null = null; inner : undefined ; layout : { docs : null = null; key : string = 'magnitude'; value : { type : string = 'UInt64' } }[] ; name : string = 'BalanceChange'; type : string = 'object' } } | { docs : null = null; key : string = 'events'; value : { checkedType : { docs : null = null; layout : ({ docs : null = null; key : string = 'data'; value : { inner : { inner : { type : string = 'Field' } ; type : string = 'array' } ; type : string = 'array' } } | { docs : null = null; key : string = 'hash'; value : { inner : undefined ; type : string = 'Field' } })[] ; name : string = 'Events'; type : string = 'object' } ; checkedTypeName : string = 'Events'; docs : undefined = null; inner : { inner : { type : string = 'Field' } ; type : string = 'array' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'array' } } | { docs : null = null; key : string = 'preconditions'; value : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : null = null; inner : undefined ; layout : ({ docs : null = null; key : string = 'network'; value : { docs : null = null; layout : ({ docs : null = null; key : string = 'snarkedLedgerHash'; value : { docs : undefined = null; inner : { docs : undefined = null; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'Field' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'timestamp'; value : { docs : undefined = null; inner : { docs : null = null; layout : { docs : null = null; key : string = 'lower'; value : { type : string = 'UInt64' } }[] ; name : string = 'BlockTimeInterval'; type : string = 'object' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'implicit'; type : string = 'option' } } | { docs : null = null; key : string = 'stakingEpochData'; value : { docs : null = null; inner : undefined ; layout : ({ docs : null = null; key : string = 'ledger'; value : { docs : null = null; inner : undefined ; layout : ({ docs : null = null; key : string = 'hash'; value : { inner : { docs : undefined = null; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'Field' } ; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'totalCurrency'; value : { inner : { docs : null = null; layout : { docs : null = null; key : string = 'lower'; value : { type : string = 'UInt64' } }[] ; name : string = 'CurrencyAmountInterval'; type : string = 'object' } ; optionType : string = 'implicit'; type : string = 'option' } })[] ; name : string = 'EpochLedgerPrecondition'; optionType : undefined = 'flaggedOption'; type : string = 'object' } } | { docs : null = null; key : string = 'seed'; value : { docs : undefined = null; inner : { docs : undefined = null; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'Field' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'epochLength'; value : { docs : undefined = null; inner : { docs : null = null; layout : { docs : null = null; key : string = 'lower'; value : { type : string = 'UInt32' } }[] ; name : string = 'LengthInterval'; type : string = 'object' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'implicit'; type : string = 'option' } })[] ; name : string = 'EpochDataPrecondition'; optionType : undefined = 'flaggedOption'; type : string = 'object' } })[] ; name : string = 'NetworkPrecondition'; type : string = 'object' } } | { docs : null = null; key : string = 'account'; value : { docs : null = null; layout : ({ docs : null = null; key : string = 'balance'; value : { inner : { docs : null = null; inner : undefined ; layout : { docs : null = null; key : string = 'lower'; value : { type : string = 'UInt64' } }[] ; name : string = 'BalanceInterval'; optionType : undefined = 'flaggedOption'; type : string = 'object' } ; optionType : string = 'implicit'; type : string = 'option' } } | { docs : null = null; key : string = 'receiptChainHash'; value : { inner : { docs : undefined = null; inner : undefined ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : undefined = 'flaggedOption'; type : string = 'Field' } ; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'state'; value : { inner : { docs : undefined = null; inner : { type : string = 'Field' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'flaggedOption'; type : string = 'option' } ; optionType : undefined = 'flaggedOption'; type : string = 'array' } })[] ; name : string = 'AccountPrecondition'; type : string = 'object' } })[] ; name : string = 'Preconditions'; type : string = 'object' } })[] ; name : string = 'PartyBody'; type : string = 'object' } } | { docs : null = null; key : string = 'authorization'; value : { docs : null = null; layout : { docs : null = null; key : string = 'proof'; value : { inner : { type : string = 'string' } ; optionType : string = 'orUndefined'; type : string = 'option' } }[] ; name : string = 'Control'; type : string = 'object' } })[] ; name : string = 'ZkappParty'; type : string = 'object' } |
Party.docs | string |
Party.layout | ({ docs : null = null; key : string = 'body'; value : { docs : null = null; layout : ({ docs : null = null; key : string = 'publicKey'; value : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : undefined = null; inner : undefined ; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'PublicKey' } } | { docs : null = null; key : string = 'update'; value : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : null = null; inner : undefined ; layout : ({ docs : null = null; key : string = 'appState'; value : { inner : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : undefined = null; inner : { type : string = 'Field' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'flaggedOption'; type : string = 'option' } ; optionType : undefined = 'flaggedOption'; type : string = 'array' } } | { docs : null = null; key : string = 'delegate'; value : { inner : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : undefined = null; inner : undefined ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : undefined = 'flaggedOption'; type : string = 'PublicKey' } ; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'verificationKey'; value : { inner : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : null = null; inner : undefined ; layout : { docs : null = null; key : string = 'data'; value : { type : string = 'string' } }[] ; name : string = 'VerificationKeyWithHash'; optionType : undefined = 'flaggedOption'; type : string = 'object' } ; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'zkappUri'; value : { inner : { checkedType : { docs : null = null; layout : { docs : null = null; key : string = 'data'; value : { type : string = 'string' } }[] ; name : string = 'Events'; type : string = 'object' } ; checkedTypeName : string = 'StringWithHash'; docs : undefined = null; inner : undefined ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : undefined = 'flaggedOption'; type : string = 'string' } ; optionType : string = 'flaggedOption'; type : string = 'option' } })[] ; name : string = 'PartyUpdate'; type : string = 'object' } } | { docs : null = null; key : string = 'balanceChange'; value : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : null = null; inner : undefined ; layout : { docs : null = null; key : string = 'magnitude'; value : { type : string = 'UInt64' } }[] ; name : string = 'BalanceChange'; type : string = 'object' } } | { docs : null = null; key : string = 'events'; value : { checkedType : { docs : null = null; layout : ({ docs : null = null; key : string = 'data'; value : { inner : { inner : { type : string = 'Field' } ; type : string = 'array' } ; type : string = 'array' } } | { docs : null = null; key : string = 'hash'; value : { inner : undefined ; type : string = 'Field' } })[] ; name : string = 'Events'; type : string = 'object' } ; checkedTypeName : string = 'Events'; docs : undefined = null; inner : { inner : { type : string = 'Field' } ; type : string = 'array' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'array' } } | { docs : null = null; key : string = 'preconditions'; value : { checkedType : undefined ; checkedTypeName : undefined = 'Events'; docs : null = null; inner : undefined ; layout : ({ docs : null = null; key : string = 'network'; value : { docs : null = null; layout : ({ docs : null = null; key : string = 'snarkedLedgerHash'; value : { docs : undefined = null; inner : { docs : undefined = null; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'Field' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'timestamp'; value : { docs : undefined = null; inner : { docs : null = null; layout : { docs : null = null; key : string = 'lower'; value : { type : string = 'UInt64' } }[] ; name : string = 'BlockTimeInterval'; type : string = 'object' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'implicit'; type : string = 'option' } } | { docs : null = null; key : string = 'stakingEpochData'; value : { docs : null = null; inner : undefined ; layout : ({ docs : null = null; key : string = 'ledger'; value : { docs : null = null; inner : undefined ; layout : ({ docs : null = null; key : string = 'hash'; value : { inner : { docs : undefined = null; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'Field' } ; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'totalCurrency'; value : { inner : { docs : null = null; layout : { docs : null = null; key : string = 'lower'; value : { type : string = 'UInt64' } }[] ; name : string = 'CurrencyAmountInterval'; type : string = 'object' } ; optionType : string = 'implicit'; type : string = 'option' } })[] ; name : string = 'EpochLedgerPrecondition'; optionType : undefined = 'flaggedOption'; type : string = 'object' } } | { docs : null = null; key : string = 'seed'; value : { docs : undefined = null; inner : { docs : undefined = null; layout : undefined ; name : undefined = 'NetworkPrecondition'; type : string = 'Field' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'epochLength'; value : { docs : undefined = null; inner : { docs : null = null; layout : { docs : null = null; key : string = 'lower'; value : { type : string = 'UInt32' } }[] ; name : string = 'LengthInterval'; type : string = 'object' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'implicit'; type : string = 'option' } })[] ; name : string = 'EpochDataPrecondition'; optionType : undefined = 'flaggedOption'; type : string = 'object' } })[] ; name : string = 'NetworkPrecondition'; type : string = 'object' } } | { docs : null = null; key : string = 'account'; value : { docs : null = null; layout : ({ docs : null = null; key : string = 'balance'; value : { inner : { docs : null = null; inner : undefined ; layout : { docs : null = null; key : string = 'lower'; value : { type : string = 'UInt64' } }[] ; name : string = 'BalanceInterval'; optionType : undefined = 'flaggedOption'; type : string = 'object' } ; optionType : string = 'implicit'; type : string = 'option' } } | { docs : null = null; key : string = 'receiptChainHash'; value : { inner : { docs : undefined = null; inner : undefined ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : undefined = 'flaggedOption'; type : string = 'Field' } ; optionType : string = 'flaggedOption'; type : string = 'option' } } | { docs : null = null; key : string = 'state'; value : { inner : { docs : undefined = null; inner : { type : string = 'Field' } ; layout : undefined ; name : undefined = 'NetworkPrecondition'; optionType : string = 'flaggedOption'; type : string = 'option' } ; optionType : undefined = 'flaggedOption'; type : string = 'array' } })[] ; name : string = 'AccountPrecondition'; type : string = 'object' } })[] ; name : string = 'Preconditions'; type : string = 'object' } })[] ; name : string = 'PartyBody'; type : string = 'object' } } | { docs : null = null; key : string = 'authorization'; value : { docs : null = null; layout : { docs : null = null; key : string = 'proof'; value : { inner : { type : string = 'string' } ; optionType : string = 'orUndefined'; type : string = 'option' } }[] ; name : string = 'Control'; type : string = 'object' } })[] |
Party.name | string |
Party.type | string |
Defined in
Functions
State
▸ State<A
>(): State
<A
>
Type parameters
Name |
---|
A |
Returns
State
<A
>
Defined in
addCachedAccount
▸ addCachedAccount(account
, graphqlEndpoint?
): void
Parameters
Name | Type | Default value |
---|---|---|
account | Object | undefined |
account.balance? | string | number | UInt64 | undefined |
account.nonce | string | number | UInt32 | undefined |
account.publicKey | string | PublicKey | undefined |
account.zkapp? | Object | undefined |
account.zkapp.appState | (string | number | Field )[] | undefined |
graphqlEndpoint | string | defaultGraphqlEndpoint |
Returns
void
Defined in
addMissingProofs
▸ addMissingProofs(parties
): Promise
<PartiesProved
>
Parameters
Name | Type |
---|---|
parties | Parties |
Returns
Promise
<PartiesProved
>
Defined in
addMissingSignatures
▸ addMissingSignatures(parties
, additionalKeys?
): PartiesSigned
Parameters
Name | Type |
---|---|
parties | Parties |
additionalKeys | PrivateKey [] |
Returns
PartiesSigned
Defined in
arrayProp
▸ arrayProp<T
>(elementType
, length
): (target
: any
, key
: string
) => void
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
elementType | AsFieldElements <T > |
length | number |
Returns
fn
▸ (target
, key
): void
Parameters
Name | Type |
---|---|
target | any |
key | string |
Returns
void
Defined in
asFieldElementsToConstant
▸ asFieldElementsToConstant<T
>(typ
, t
): T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
typ | AsFieldElements <T > |
t | T |
Returns
T
Defined in
circuitMain
▸ circuitMain(target
, propertyName
, _descriptor?
): any
Parameters
Name | Type |
---|---|
target | any |
propertyName | string |
_descriptor? | PropertyDescriptor |
Returns
any
Defined in
circuitValueEquals
▸ circuitValueEquals<T
>(a
, b
): boolean
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
a | T |
b | T |
Returns
boolean
Defined in
cloneCircuitValue
▸ cloneCircuitValue<T
>(obj
): T
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
obj | T |
Returns
T
Defined in
declareMethods
▸ declareMethods<T
>(SmartContract
, methodArguments
): void
declareMethods
can be used in place of the @method
decorator
to declare SmartContract methods along with their list of arguments.
It should be placed after the class declaration.
Here is an example of declaring a method update
, which takes a single argument of type Field
:
class MyContract extends SmartContract {
// ...
update(x: Field) {
// ...
}
}
declareMethods(MyContract, { update: [Field] }); // `[Field]` is the list of arguments!
Note that a method of the same name must still be defined on the class, just without the decorator.
Type parameters
Name | Type |
---|---|
T | extends typeof SmartContract |
Parameters
Name | Type |
---|---|
SmartContract | T |
methodArguments | Record <string , AsFieldElements <unknown >[]> |
Returns
void
Defined in
declareState
▸ declareState<T
>(SmartContract
, states
): void
declareState
can be used in place of the @state
decorator to declare on-chain state on a SmartContract.
It should be placed after the class declaration.
Here is an example of declaring a state property x
of type Field
.
class MyContract extends SmartContract {
x = State<Field>();
// ...
}
declareState(MyContract, { x: Field });
If you're using pure JS, it's not possible to use the built-in class field syntax, i.e. the following will not work:
// THIS IS WRONG IN JS!
class MyContract extends SmartContract {
x = State();
}
declareState(MyContract, { x: Field });
Instead, add a constructor where you assign the property:
class MyContract extends SmartContract {
constructor(x) {
super();
this.x = State();
}
}
declareState(MyContract, { x: Field });
Type parameters
Name | Type |
---|---|
T | extends typeof SmartContract |
Parameters
Name | Type |
---|---|
SmartContract | T |
states | Record <string , AsFieldElements <unknown >> |
Returns
void
Defined in
deploy
▸ deploy<S
>(SmartContract
, __namedParameters
): Promise
<string
>
Type parameters
Name | Type |
---|---|
S | extends typeof SmartContract |
Parameters
Name | Type |
---|---|
SmartContract | S |
__namedParameters | Object |
__namedParameters.feePayerKey? | PrivateKey |
__namedParameters.feePayerNonce? | string | number |
__namedParameters.initialBalance? | string | number |
__namedParameters.memo? | string |
__namedParameters.shouldSignFeePayer? | boolean |
__namedParameters.transactionFee? | string | number |
__namedParameters.verificationKey | Object |
__namedParameters.verificationKey.data | string |
__namedParameters.verificationKey.hash | string | Field |
__namedParameters.zkappKey | PrivateKey |
Returns
Promise
<string
>
Defined in
fetchAccount
▸ fetchAccount(publicKey
, graphqlEndpoint?
, config?
): Promise
<{ account
: Account
; error
: undefined
} | { account
: undefined
; error
: FetchError
}>
Gets account information on the specified publicKey by performing a GraphQL query to the specified endpoint. This will call the 'GetAccountInfo' query which fetches zkapp related account information.
If an error is returned by the specified endpoint, an error is thrown. Otherwise, the data is returned.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
publicKey | string | PublicKey | undefined | The specified account to get account information on |
graphqlEndpoint | string | defaultGraphqlEndpoint | The graphql endpoint to fetch from |
config | Object | {} | An object that exposes an additional timeout option |
config.timeout | undefined | number | undefined | - |
Returns
Promise
<{ account
: Account
; error
: undefined
} | { account
: undefined
; error
: FetchError
}>
zkapp information on the specified account or an error is thrown
Defined in
fetchLastBlock
▸ fetchLastBlock(graphqlEndpoint?
): Promise
<PreconditionBaseTypes
<{ blockchainLength
: { lower
: UInt32
; upper
: UInt32
} ; globalSlotSinceGenesis
: { lower
: UInt32
; upper
: UInt32
} ; globalSlotSinceHardFork
: { lower
: UInt32
; upper
: UInt32
} ; minWindowDensity
: { lower
: UInt32
; upper
: UInt32
} ; nextEpochData
: { epochLength
: { lower
: UInt32
; upper
: UInt32
} ; ledger
: { hash
: { isSome
: Bool
; value
: Field
} ; totalCurrency
: { lower
: UInt64
; upper
: UInt64
} } ; lockCheckpoint
: { isSome
: Bool
; value
: Field
} ; seed
: { isSome
: Bool
; value
: Field
} ; startCheckpoint
: { isSome
: Bool
; value
: Field
} } ; snarkedLedgerHash
: { isSome
: Bool
; value
: Field
} ; stakingEpochData
: { epochLength
: { lower
: UInt32
; upper
: UInt32
} ; ledger
: { hash
: { isSome
: Bool
; value
: Field
} ; totalCurrency
: { lower
: UInt64
; upper
: UInt64
} } ; lockCheckpoint
: { isSome
: Bool
; value
: Field
} ; seed
: { isSome
: Bool
; value
: Field
} ; startCheckpoint
: { isSome
: Bool
; value
: Field
} } ; timestamp
: { lower
: UInt64
; upper
: UInt64
} ; totalCurrency
: { lower
: UInt64
; upper
: UInt64
} }>>
Parameters
Name | Type | Default value |
---|---|---|
graphqlEndpoint | string | defaultGraphqlEndpoint |
Returns
Promise
<PreconditionBaseTypes
<{ blockchainLength
: { lower
: UInt32
; upper
: UInt32
} ; globalSlotSinceGenesis
: { lower
: UInt32
; upper
: UInt32
} ; globalSlotSinceHardFork
: { lower
: UInt32
; upper
: UInt32
} ; minWindowDensity
: { lower
: UInt32
; upper
: UInt32
} ; nextEpochData
: { epochLength
: { lower
: UInt32
; upper
: UInt32
} ; ledger
: { hash
: { isSome
: Bool
; value
: Field
} ; totalCurrency
: { lower
: UInt64
; upper
: UInt64
} } ; lockCheckpoint
: { isSome
: Bool
; value
: Field
} ; seed
: { isSome
: Bool
; value
: Field
} ; startCheckpoint
: { isSome
: Bool
; value
: Field
} } ; snarkedLedgerHash
: { isSome
: Bool
; value
: Field
} ; stakingEpochData
: { epochLength
: { lower
: UInt32
; upper
: UInt32
} ; ledger
: { hash
: { isSome
: Bool
; value
: Field
} ; totalCurrency
: { lower
: UInt64
; upper
: UInt64
} } ; lockCheckpoint
: { isSome
: Bool
; value
: Field
} ; seed
: { isSome
: Bool
; value
: Field
} ; startCheckpoint
: { isSome
: Bool
; value
: Field
} } ; timestamp
: { lower
: UInt64
; upper
: UInt64
} ; totalCurrency
: { lower
: UInt64
; upper
: UInt64
} }>>
Defined in
getSrs
▸ getSrs(keypair
): typeof WasmFpSrs
Parameters
Name | Type | Description |
---|---|---|
keypair | Keypair | SNARK keypair, as returned by Circuit.generateKeypair |
Returns
typeof WasmFpSrs
The SRS (structured reference string), needed to reconstruct the keypair later
Defined in
matrixProp
▸ matrixProp<T
>(elementType
, nRows
, nColumns
): (target
: any
, key
: string
) => void
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
elementType | AsFieldElements <T > |
nRows | number |
nColumns | number |
Returns
fn
▸ (target
, key
): void
Parameters
Name | Type |
---|---|
target | any |
key | string |
Returns
void
Defined in
method
▸ method<T
>(target
, methodName
, descriptor
): void
A decorator to use in a zkapp to mark a method as callable by anyone. You can use inside your zkapp class as:
@method myMethod(someArg: Field) {
// your code here
}
Type parameters
Name | Type |
---|---|
T | extends SmartContract <T > |
Parameters
Name | Type |
---|---|
target | T & { constructor : any } |
methodName | keyof T & string |
descriptor | PropertyDescriptor |
Returns
void
Defined in
parseFetchedAccount
▸ parseFetchedAccount(account
): Account
Parameters
Name | Type |
---|---|
account | FetchedAccount |
Returns
Account
Defined in
▸ parseFetchedAccount(account
): Partial
<Account
>
Parameters
Name | Type |
---|---|
account | Partial <FetchedAccount > |
Returns
Partial
<Account
>
Defined in
partiesToJson
▸ partiesToJson(parties
): Parties
Parameters
Name | Type |
---|---|
parties | Parties |
Returns
Defined in
prop
▸ prop(this
, target
, key
): void
Parameters
Name | Type |
---|---|
this | any |
target | any |
key | string |
Returns
void
Defined in
public_
▸ public_(target
, _key
, index
): void
Parameters
Name | Type |
---|---|
target | any |
_key | string | symbol |
index | number |
Returns
void
Defined in
recoverVerificationKey
▸ recoverVerificationKey(srs
, serializedVk
): VerificationKey
Parameters
Name | Type | Description |
---|---|---|
srs | typeof WasmFpSrs | the "structured reference string", a set of precomputed values needed for verifying proofs |
serializedVk | string | string representation of a Circuit verification key |
Returns
the recovered verification key
Defined in
sendZkapp
▸ sendZkapp(json
, graphqlEndpoint?
, __namedParameters?
): Promise
<[FetchResponse
, undefined
] | [undefined
, FetchError
]>
Parameters
Name | Type | Default value |
---|---|---|
json | string | undefined |
graphqlEndpoint | string | defaultGraphqlEndpoint |
__namedParameters | Object | {} |
__namedParameters.timeout | undefined | number | undefined |
Returns
Promise
<[FetchResponse
, undefined
] | [undefined
, FetchError
]>
Defined in
sendZkappQuery
▸ sendZkappQuery(json
): string
Parameters
Name | Type |
---|---|
json | string |
Returns
string
Defined in
serializeVerificationKey
▸ serializeVerificationKey(verificationKey
): string
Parameters
Name | Type | Description |
---|---|---|
verificationKey | VerificationKey | the verification key of a Circuit |
Returns
string
string representation of the verification key
Defined in
setGraphqlEndpoint
▸ setGraphqlEndpoint(graphqlEndpoint
): void
Parameters
Name | Type |
---|---|
graphqlEndpoint | string |
Returns
void
Defined in
shutdown
▸ shutdown(): Promise
<undefined
>
This function must be called at the end of a nodejs program, otherwise the worker threads will continue running and the program will never terminate. From web applications, this function is a no-op.
Returns
Promise
<undefined
>
Defined in
signFeePayer
▸ signFeePayer(transactionJson
, feePayerKey
, __namedParameters
): string
Parameters
Name | Type |
---|---|
transactionJson | string |
feePayerKey | string | PrivateKey |
__namedParameters | Object |
Returns
string
Defined in
signJsonTransaction
▸ signJsonTransaction(transactionJson
, privateKey
): string
Sign all parties of a transaction which belong to the account determined by [[privateKey
]].
Parameters
Name | Type |
---|---|
transactionJson | string |
privateKey | string | PrivateKey |
Returns
string
the modified transaction JSON
Defined in
state
▸ state<A
>(stateType
): (target
: SmartContract
& { constructor
: any
}, key
: string
, _descriptor?
: PropertyDescriptor
) => void
A decorator to use within a zkapp to indicate what will be stored on-chain.
For example, if you want to store a field element some_state
in a zkapp,
you can use the following in the declaration of your zkapp:
@state(Field) some_state = State<Field>();
Type parameters
Name |
---|
A |
Parameters
Name | Type |
---|---|
stateType | AsFieldElements <A > |
Returns
fn
▸ (target
, key
, _descriptor?
): void
Parameters
Name | Type |
---|---|
target | SmartContract & { constructor : any } |
key | string |
_descriptor? | PropertyDescriptor |
Returns
void
Defined in
toPartiesUnsafe
▸ toPartiesUnsafe(__namedParameters
): Parties
Parameters
Name | Type |
---|---|
__namedParameters | Object |
__namedParameters.feePayer | FeePayerUnsigned |
__namedParameters.memo | string |
__namedParameters.otherParties | Party [] |
Returns
Defined in
toPartyUnsafe
▸ toPartyUnsafe(__namedParameters
): Party
Parameters
Name | Type |
---|---|
__namedParameters | Party |
Returns
Defined in
Modules
Namespace: Encoding
Table of contents
Variables
Functions
Variables
Bijective
• Const
Bijective: Object
Type declaration
Name | Type |
---|---|
Fp | { fromBytes : (bytes : Uint8Array ) => Field [] ; toBytes : (fields : Field []) => Uint8Array ; fromString : (message : string ) => Field [] ; toString : (fields : Field []) => string } |
Fp.fromBytes | (bytes : Uint8Array ) => Field [] |
Fp.toBytes | (fields : Field []) => Uint8Array |
Fp.fromString | [object Object] |
Fp.toString | [object Object] |
Fq | { fromBytes : (bytes : Uint8Array ) => Field [] ; toBytes : (fields : Field []) => Uint8Array ; fromString : (message : string ) => Field [] ; toString : (fields : Field []) => string } |
Fq.fromBytes | (bytes : Uint8Array ) => Field [] |
Fq.toBytes | (fields : Field []) => Uint8Array |
Fq.fromString | [object Object] |
Fq.toString | [object Object] |
Defined in
Functions
bytesFromFields
▸ bytesFromFields(fields
): Uint8Array
Parameters
Name | Type |
---|---|
fields | Field [] |
Returns
Uint8Array
Defined in
bytesToFields
▸ bytesToFields(bytes
): Field
[]
Parameters
Name | Type |
---|---|
bytes | Uint8Array |
Returns
Field
[]
Defined in
stringFromFields
▸ stringFromFields(fields
): string
Parameters
Name | Type |
---|---|
fields | Field [] |
Returns
string
Defined in
stringToFields
▸ stringToFields(message
): Field
[]
Parameters
Name | Type |
---|---|
message | string |
Returns
Field
[]
Defined in
snarkyjs / Exports / Encryption
Namespace: Encryption
Table of contents
Functions
Functions
decrypt
▸ decrypt(__namedParameters
, privateKey
): Field
[]
Parameters
Name | Type |
---|---|
__namedParameters | CipherText |
privateKey | PrivateKey |
Returns
Field
[]
Defined in
encrypt
▸ encrypt(message
, otherPublicKey
): Object
Parameters
Name | Type |
---|---|
message | Field [] |
otherPublicKey | PublicKey |
Returns
Object
Name | Type |
---|---|
cipherText | Field [] |
publicKey | Group |
Defined in
Namespace: Mina
Table of contents
Type Aliases
Variables
Functions
- BerkeleyQANet
- LocalBlockchain
- accountCreationFee
- createTransaction
- createUnsignedTransaction
- currentSlot
- getAccount
- getBalance
- getNetworkState
- sendTransaction
- setActiveInstance
- setCurrentTransaction
- transaction
Type Aliases
CurrentTransaction
Ƭ CurrentTransaction: undefined
| { fetchMode
: FetchMode
; nextPartyIndex
: number
; parties
: Party
[] ; sender?
: PrivateKey
}
Defined in
Variables
currentTransaction
• currentTransaction: CurrentTransaction
= undefined
Defined in
nextTransactionId
• nextTransactionId: Object
Type declaration
Name | Type |
---|---|
value | number |
Defined in
Functions
BerkeleyQANet
▸ BerkeleyQANet(graphqlEndpoint
): Mina
Parameters
Name | Type |
---|---|
graphqlEndpoint | string |
Returns
Mina
Defined in
LocalBlockchain
▸ LocalBlockchain(__namedParameters?
): MockMina
A mock Mina blockchain running locally and useful for testing.
Parameters
Name | Type |
---|---|
__namedParameters | Object |
__namedParameters.accountCreationFee | undefined | string | number |
Returns
MockMina
Defined in
accountCreationFee
▸ accountCreationFee(): UInt64
Returns
Defined in
createTransaction
▸ createTransaction(feePayer
, f
, __namedParameters?
): Transaction
Parameters
Name | Type |
---|---|
feePayer | SenderSpec |
f | () => unknown |
__namedParameters | Object |
__namedParameters.fetchMode | undefined | FetchMode |
Returns
Transaction
Defined in
createUnsignedTransaction
▸ createUnsignedTransaction(f
, __namedParameters?
): Transaction
Parameters
Name | Type |
---|---|
f | () => unknown |
__namedParameters | Object |
__namedParameters.fetchMode | undefined | FetchMode |
Returns
Transaction
Defined in
currentSlot
▸ currentSlot(): UInt32
Returns
The current slot number, according to the active Mina instance.
Defined in
getAccount
▸ getAccount(pubkey
): Account
Parameters
Name | Type |
---|---|
pubkey | PublicKey |
Returns
Account
The account data associated to the given public key.
Defined in
getBalance
▸ getBalance(pubkey
): UInt64
Parameters
Name | Type |
---|---|
pubkey | PublicKey |
Returns
The balance associated to the given public key.
Defined in
getNetworkState
▸ getNetworkState(): PreconditionBaseTypes
<{ blockchainLength
: { lower
: UInt32
; upper
: UInt32
} ; globalSlotSinceGenesis
: { lower
: UInt32
; upper
: UInt32
} ; globalSlotSinceHardFork
: { lower
: UInt32
; upper
: UInt32
} ; minWindowDensity
: { lower
: UInt32
; upper
: UInt32
} ; nextEpochData
: { epochLength
: { lower
: UInt32
; upper
: UInt32
} ; ledger
: { hash
: { isSome
: Bool
; value
: Field
} ; totalCurrency
: { lower
: UInt64
; upper
: UInt64
} } ; lockCheckpoint
: { isSome
: Bool
; value
: Field
} ; seed
: { isSome
: Bool
; value
: Field
} ; startCheckpoint
: { isSome
: Bool
; value
: Field
} } ; snarkedLedgerHash
: { isSome
: Bool
; value
: Field
} ; stakingEpochData
: { epochLength
: { lower
: UInt32
; upper
: UInt32
} ; ledger
: { hash
: { isSome
: Bool
; value
: Field
} ; totalCurrency
: { lower
: UInt64
; upper
: UInt64
} } ; lockCheckpoint
: { isSome
: Bool
; value
: Field
} ; seed
: { isSome
: Bool
; value
: Field
} ; startCheckpoint
: { isSome
: Bool
; value
: Field
} } ; timestamp
: { lower
: UInt64
; upper
: UInt64
} ; totalCurrency
: { lower
: UInt64
; upper
: UInt64
} }>
Returns
PreconditionBaseTypes
<{ blockchainLength
: { lower
: UInt32
; upper
: UInt32
} ; globalSlotSinceGenesis
: { lower
: UInt32
; upper
: UInt32
} ; globalSlotSinceHardFork
: { lower
: UInt32
; upper
: UInt32
} ; minWindowDensity
: { lower
: UInt32
; upper
: UInt32
} ; nextEpochData
: { epochLength
: { lower
: UInt32
; upper
: UInt32
} ; ledger
: { hash
: { isSome
: Bool
; value
: Field
} ; totalCurrency
: { lower
: UInt64
; upper
: UInt64
} } ; lockCheckpoint
: { isSome
: Bool
; value
: Field
} ; seed
: { isSome
: Bool
; value
: Field
} ; startCheckpoint
: { isSome
: Bool
; value
: Field
} } ; snarkedLedgerHash
: { isSome
: Bool
; value
: Field
} ; stakingEpochData
: { epochLength
: { lower
: UInt32
; upper
: UInt32
} ; ledger
: { hash
: { isSome
: Bool
; value
: Field
} ; totalCurrency
: { lower
: UInt64
; upper
: UInt64
} } ; lockCheckpoint
: { isSome
: Bool
; value
: Field
} ; seed
: { isSome
: Bool
; value
: Field
} ; startCheckpoint
: { isSome
: Bool
; value
: Field
} } ; timestamp
: { lower
: UInt64
; upper
: UInt64
} ; totalCurrency
: { lower
: UInt64
; upper
: UInt64
} }>
Data associated with the current state of the Mina network.
Defined in
sendTransaction
▸ sendTransaction(txn
): TransactionId
Parameters
Name | Type |
---|---|
txn | Transaction |
Returns
TransactionId
Defined in
setActiveInstance
▸ setActiveInstance(m
): void
Set the currently used Mina instance.
Parameters
Name | Type |
---|---|
m | Mina |
Returns
void
Defined in
setCurrentTransaction
▸ setCurrentTransaction(transaction
): void
Parameters
Name | Type |
---|---|
transaction | CurrentTransaction |
Returns
void
Defined in
transaction
▸ transaction(f
): Promise
<Transaction
>
Construct a smart contract transaction. Within the callback passed to this function, you can call into the methods of smart contracts.
transaction(() => {
myZkapp.update();
someOtherZkapp.someOtherMethod();
});
Parameters
Name | Type |
---|---|
f | () => void |
Returns
Promise
<Transaction
>
A transaction that can subsequently be submitted to the chain.
Defined in
▸ transaction(sender
, f
): Promise
<Transaction
>
Parameters
Name | Type |
---|---|
sender | SenderSpec |
f | () => void |
Returns
Promise
<Transaction
>
Defined in
snarkyjs / Exports / Types / Json
Namespace: Json
Types.Json
Table of contents
Type Aliases
Type Aliases
AuthRequired
Ƭ AuthRequired: "Signature"
| "Proof"
| "Either"
| "None"
| "Impossible"
Defined in
snarky/parties-leaves-json.ts:11
Bool
Ƭ Bool: boolean
Defined in
snarky/parties-leaves-json.ts:6
Field
Ƭ Field: string
Defined in
snarky/parties-leaves-json.ts:5
Parties
Ƭ Parties: Object
Type declaration
Name | Type |
---|---|
feePayer | { authorization : string ; body : { events : Field [][] ; fee : UInt64 ; networkPrecondition : { blockchainLength : { lower : UInt32 ; upper : UInt32 } | null ; globalSlotSinceGenesis : { lower : UInt32 ; upper : UInt32 } | null ; globalSlotSinceHardFork : { lower : UInt32 ; upper : UInt32 } | null ; minWindowDensity : { lower : UInt32 ; upper : UInt32 } | null ; nextEpochData : { epochLength : { lower : UInt32 ; upper : UInt32 } | null ; ledger : { hash : Field | null ; totalCurrency : { lower : UInt64 ; upper : UInt64 } | null } ; lockCheckpoint : Field | null ; seed : Field | null ; startCheckpoint : Field | null } ; snarkedLedgerHash : Field | null ; stakingEpochData : { epochLength : { lower : UInt32 ; upper : UInt32 } | null ; ledger : { hash : Field | null ; totalCurrency : { lower : UInt64 ; upper : UInt64 } | null } ; lockCheckpoint : Field | null ; seed : Field | null ; startCheckpoint : Field | null } ; timestamp : { lower : UInt64 ; upper : UInt64 } | null ; totalCurrency : { lower : UInt64 ; upper : UInt64 } | null } ; nonce : UInt32 ; publicKey : PublicKey ; sequenceEvents : Field [][] ; update : { appState : (Field | null )[] ; delegate : PublicKey | null ; permissions : { editSequenceState : AuthRequired ; editState : AuthRequired ; incrementNonce : AuthRequired ; receive : AuthRequired ; send : AuthRequired ; setDelegate : AuthRequired ; setPermissions : AuthRequired ; setTokenSymbol : AuthRequired ; setVerificationKey : AuthRequired ; setVotingFor : AuthRequired ; setZkappUri : AuthRequired } | null ; timing : { cliffAmount : UInt64 ; cliffTime : UInt32 ; initialMinimumBalance : UInt64 ; vestingIncrement : UInt64 ; vestingPeriod : UInt32 } | null ; tokenSymbol : string | null ; verificationKey : { data : string ; hash : Field } | null ; votingFor : Field | null ; zkappUri : string | null } } } |
feePayer.authorization | string |
feePayer.body | { events : Field [][] ; fee : UInt64 ; networkPrecondition : { blockchainLength : { lower : UInt32 ; upper : UInt32 } | null ; globalSlotSinceGenesis : { lower : UInt32 ; upper : UInt32 } | null ; globalSlotSinceHardFork : { lower : UInt32 ; upper : UInt32 } | null ; minWindowDensity : { lower : UInt32 ; upper : UInt32 } | null ; nextEpochData : { epochLength : { lower : UInt32 ; upper : UInt32 } | null ; ledger : { hash : Field | null ; totalCurrency : { lower : UInt64 ; upper : UInt64 } | null } ; lockCheckpoint : Field | null ; seed : Field | null ; startCheckpoint : Field | null } ; snarkedLedgerHash : Field | null ; stakingEpochData : { epochLength : { lower : UInt32 ; upper : UInt32 } | null ; ledger : { hash : Field | null ; totalCurrency : { lower : UInt64 ; upper : UInt64 } | null } ; lockCheckpoint : Field | null ; seed : Field | null ; startCheckpoint : Field | null } ; timestamp : { lower : UInt64 ; upper : UInt64 } | null ; totalCurrency : { lower : UInt64 ; upper : UInt64 } | null } ; nonce : UInt32 ; publicKey : PublicKey ; sequenceEvents : Field [][] ; update : { appState : (Field | null )[] ; delegate : PublicKey | null ; permissions : { editSequenceState : AuthRequired ; editState : AuthRequired ; incrementNonce : AuthRequired ; receive : AuthRequired ; send : AuthRequired ; setDelegate : AuthRequired ; setPermissions : AuthRequired ; setTokenSymbol : AuthRequired ; setVerificationKey : AuthRequired ; setVotingFor : AuthRequired ; setZkappUri : AuthRequired } | null ; timing : { cliffAmount : UInt64 ; cliffTime : UInt32 ; initialMinimumBalance : UInt64 ; vestingIncrement : UInt64 ; vestingPeriod : UInt32 } | null ; tokenSymbol : string | null ; verificationKey : { data : string ; hash : Field } | null ; votingFor : Field | null ; zkappUri : string | null } } |
feePayer.body.events | Field [][] |
feePayer.body.fee | UInt64 |
feePayer.body.networkPrecondition | { blockchainLength : { lower : UInt32 ; upper : UInt32 } | null ; globalSlotSinceGenesis : { lower : UInt32 ; upper : UInt32 } | null ; globalSlotSinceHardFork : { lower : UInt32 ; upper : UInt32 } | null ; minWindowDensity : { lower : UInt32 ; upper : UInt32 } | null ; nextEpochData : { epochLength : { lower : UInt32 ; upper : UInt32 } | null ; ledger : { hash : Field | null ; totalCurrency : { lower : UInt64 ; upper : UInt64 } | null } ; lockCheckpoint : Field | null ; seed : Field | null ; startCheckpoint : Field | null } ; snarkedLedgerHash : Field | null ; stakingEpochData : { epochLength : { lower : UInt32 ; upper : UInt32 } | null ; ledger : { hash : Field | null ; totalCurrency : { lower : UInt64 ; upper : UInt64 } | null } ; lockCheckpoint : Field | null ; seed : Field | null ; startCheckpoint : Field | null } ; timestamp : { lower : UInt64 ; upper : UInt64 } | null ; totalCurrency : { lower : UInt64 ; upper : UInt64 } | null } |
feePayer.body.networkPrecondition.blockchainLength | { lower : UInt32 ; upper : UInt32 } | null |
feePayer.body.networkPrecondition.globalSlotSinceGenesis | { lower : UInt32 ; upper : UInt32 } | null |
feePayer.body.networkPrecondition.globalSlotSinceHardFork | { lower : UInt32 ; upper : UInt32 } | null |
feePayer.body.networkPrecondition.minWindowDensity | { lower : UInt32 ; upper : UInt32 } | null |
feePayer.body.networkPrecondition.nextEpochData | { epochLength : { lower : UInt32 ; upper : UInt32 } | null ; ledger : { hash : Field | null ; totalCurrency : { lower : UInt64 ; upper : UInt64 } | null } ; lockCheckpoint : Field | null ; seed : Field | null ; startCheckpoint : Field | null } |
feePayer.body.networkPrecondition.nextEpochData.epochLength | { lower : UInt32 ; upper : UInt32 } | null |
feePayer.body.networkPrecondition.nextEpochData.ledger | { hash : Field | null ; totalCurrency : { lower : UInt64 ; upper : UInt64 } | null } |
feePayer.body.networkPrecondition.nextEpochData.ledger.hash | Field | null |
feePayer.body.networkPrecondition.nextEpochData.ledger.totalCurrency | { lower : UInt64 ; upper : UInt64 } | null |
feePayer.body.networkPrecondition.nextEpochData.lockCheckpoint | Field | null |
feePayer.body.networkPrecondition.nextEpochData.seed | Field | null |
feePayer.body.networkPrecondition.nextEpochData.startCheckpoint | Field | null |
feePayer.body.networkPrecondition.snarkedLedgerHash | Field | null |
feePayer.body.networkPrecondition.stakingEpochData | { epochLength : { lower : UInt32 ; upper : UInt32 } | null ; ledger : { hash : Field | null ; totalCurrency : { lower : UInt64 ; upper : UInt64 } | null } ; lockCheckpoint : Field | null ; seed : Field | null ; startCheckpoint : Field | null } |
feePayer.body.networkPrecondition.stakingEpochData.epochLength | { lower : UInt32 ; upper : UInt32 } | null |
feePayer.body.networkPrecondition.stakingEpochData.ledger | { hash : Field | null ; totalCurrency : { lower : UInt64 ; upper : UInt64 } | null } |
feePayer.body.networkPrecondition.stakingEpochData.ledger.hash | Field | null |
feePayer.body.networkPrecondition.stakingEpochData.ledger.totalCurrency | { lower : UInt64 ; upper : UInt64 } | null |
feePayer.body.networkPrecondition.stakingEpochData.lockCheckpoint | Field | null |
feePayer.body.networkPrecondition.stakingEpochData.seed | Field | null |
feePayer.body.networkPrecondition.stakingEpochData.startCheckpoint | Field | null |
feePayer.body.networkPrecondition.timestamp | { lower : UInt64 ; upper : UInt64 } | null |
feePayer.body.networkPrecondition.totalCurrency | { lower : UInt64 ; upper : UInt64 } | null |
feePayer.body.nonce | UInt32 |
feePayer.body.publicKey | PublicKey |
feePayer.body.sequenceEvents | Field [][] |
feePayer.body.update | { appState : (Field | null )[] ; delegate : PublicKey | null ; permissions : { editSequenceState : AuthRequired ; editState : AuthRequired ; incrementNonce : AuthRequired ; receive : AuthRequired ; send : AuthRequired ; setDelegate : AuthRequired ; setPermissions : AuthRequired ; setTokenSymbol : AuthRequired ; setVerificationKey : AuthRequired ; setVotingFor : AuthRequired ; setZkappUri : AuthRequired } | null ; timing : { cliffAmount : UInt64 ; cliffTime : UInt32 ; initialMinimumBalance : UInt64 ; vestingIncrement : UInt64 ; vestingPeriod : UInt32 } | null ; tokenSymbol : string | null ; verificationKey : { data : string ; hash : Field } | null ; votingFor : Field | null ; zkappUri : string | null } |
feePayer.body.update.appState | (Field | null )[] |
feePayer.body.update.delegate | PublicKey | null |
feePayer.body.update.permissions | { editSequenceState : AuthRequired ; editState : AuthRequired ; incrementNonce : AuthRequired ; receive : AuthRequired ; send : AuthRequired ; setDelegate : AuthRequired ; setPermissions : AuthRequired ; setTokenSymbol : AuthRequired ; setVerificationKey : AuthRequired ; setVotingFor : AuthRequired ; setZkappUri : AuthRequired } | null |
feePayer.body.update.timing | { cliffAmount : UInt64 ; cliffTime : UInt32 ; initialMinimumBalance : UInt64 ; vestingIncrement : UInt64 ; vestingPeriod : UInt32 } | null |
feePayer.body.update.tokenSymbol | string | null |
feePayer.body.update.verificationKey | { data : string ; hash : Field } | null |
feePayer.body.update.votingFor | Field | null |
feePayer.body.update.zkappUri | string | null |
memo | string |
otherParties | { authorization : { proof : string | null ; signature : string | null } ; body : { balanceChange : { magnitude : UInt64 ; sgn : Sign } ; callData : Field ; callDepth : number ; caller : TokenId ; events : Field [][] ; incrementNonce : Bool ; preconditions : { account : { balance : { lower : UInt64 ; upper : UInt64 } | null ; delegate : PublicKey | null ; nonce : { lower : UInt32 ; upper : UInt32 } | null ; provedState : Bool | null ; receiptChainHash : Field | null ; sequenceState : Field | null ; state : (Field | null )[] } ; network : { blockchainLength : { lower : UInt32 ; upper : UInt32 } | null ; globalSlotSinceGenesis : { lower : UInt32 ; upper : UInt32 } | null ; globalSlotSinceHardFork : { lower : UInt32 ; upper : UInt32 } | null ; minWindowDensity : { lower : UInt32 ; upper : UInt32 } | null ; nextEpochData : { epochLength : { lower : UInt32 ; upper : UInt32 } | null ; ledger : { hash : Field | null ; totalCurrency : { lower : UInt64 ; upper : UInt64 } | null } ; lockCheckpoint : Field | null ; seed : Field | null ; startCheckpoint : Field | null } ; snarkedLedgerHash : Field | null ; stakingEpochData : { epochLength : { lower : UInt32 ; upper : UInt32 } | null ; ledger : { hash : Field | null ; totalCurrency : { lower : UInt64 ; upper : UInt64 } | null } ; lockCheckpoint : Field | null ; seed : Field | null ; startCheckpoint : Field | null } ; timestamp : { lower : UInt64 ; upper : UInt64 } | null ; totalCurrency : { lower : UInt64 ; upper : UInt64 } | null } } ; publicKey : PublicKey ; sequenceEvents : Field [][] ; tokenId : TokenId ; update : { appState : (Field | null )[] ; delegate : PublicKey | null ; permissions : { editSequenceState : AuthRequired ; editState : AuthRequired ; incrementNonce : AuthRequired ; receive : AuthRequired ; send : AuthRequired ; setDelegate : AuthRequired ; setPermissions : AuthRequired ; setTokenSymbol : AuthRequired ; setVerificationKey : AuthRequired ; setVotingFor : AuthRequired ; setZkappUri : AuthRequired } | null ; timing : { cliffAmount : UInt64 ; cliffTime : UInt32 ; initialMinimumBalance : UInt64 ; vestingIncrement : UInt64 ; vestingPeriod : UInt32 } | null ; tokenSymbol : string | null ; verificationKey : { data : string ; hash : Field } | null ; votingFor : Field | null ; zkappUri : string | null } ; useFullCommitment : Bool } }[] |
Defined in
Party
Ƭ Party: Object
Type declaration
Name | Type |
---|---|
authorization | { proof : string | null ; signature : string | null } |
authorization.proof | string | null |
authorization.signature | string | null |
body | { balanceChange : { magnitude : UInt64 ; sgn : Sign } ; callData : Field ; callDepth : number ; caller : TokenId ; events : Field [][] ; incrementNonce : Bool ; preconditions : { account : { balance : { lower : UInt64 ; upper : UInt64 } | null ; delegate : PublicKey | null ; nonce : { lower : UInt32 ; upper : UInt32 } | null ; provedState : Bool | null ; receiptChainHash : Field | null ; sequenceState : Field | null ; state : (Field | null )[] } ; network : { blockchainLength : { lower : UInt32 ; upper : UInt32 } | null ; globalSlotSinceGenesis : { lower : UInt32 ; upper : UInt32 } | null ; globalSlotSinceHardFork : { lower : UInt32 ; upper : UInt32 } | null ; minWindowDensity : { lower : UInt32 ; upper : UInt32 } | null ; nextEpochData : { epochLength : { lower : UInt32 ; upper : UInt32 } | null ; ledger : { hash : Field | null ; totalCurrency : { lower : UInt64 ; upper : UInt64 } | null } ; lockCheckpoint : Field | null ; seed : Field | null ; startCheckpoint : Field | null } ; snarkedLedgerHash : Field | null ; stakingEpochData : { epochLength : { lower : UInt32 ; upper : UInt32 } | null ; ledger : { hash : Field | null ; totalCurrency : { lower : UInt64 ; upper : UInt64 } | null } ; lockCheckpoint : Field | null ; seed : Field | null ; startCheckpoint : Field | null } ; timestamp : { lower : UInt64 ; upper : UInt64 } | null ; totalCurrency : { lower : UInt64 ; upper : UInt64 } | null } } ; publicKey : PublicKey ; sequenceEvents : Field [][] ; tokenId : TokenId ; update : { appState : (Field | null )[] ; delegate : PublicKey | null ; permissions : { editSequenceState : AuthRequired ; editState : AuthRequired ; incrementNonce : AuthRequired ; receive : AuthRequired ; send : AuthRequired ; setDelegate : AuthRequired ; setPermissions : AuthRequired ; setTokenSymbol : AuthRequired ; setVerificationKey : AuthRequired ; setVotingFor : AuthRequired ; setZkappUri : AuthRequired } | null ; timing : { cliffAmount : UInt64 ; cliffTime : UInt32 ; initialMinimumBalance : UInt64 ; vestingIncrement : UInt64 ; vestingPeriod : UInt32 } | null ; tokenSymbol : string | null ; verificationKey : { data : string ; hash : Field } | null ; votingFor : Field | null ; zkappUri : string | null } ; useFullCommitment : Bool } |
body.balanceChange | { magnitude : UInt64 ; sgn : Sign } |
body.balanceChange.magnitude | UInt64 |
body.balanceChange.sgn | Sign |
body.callData | Field |
body.callDepth | number |
body.caller | TokenId |
body.events | Field [][] |
body.incrementNonce | Bool |
body.preconditions | { account : { balance : { lower : UInt64 ; upper : UInt64 } | null ; delegate : PublicKey | null ; nonce : { lower : UInt32 ; upper : UInt32 } | null ; provedState : Bool | null ; receiptChainHash : Field | null ; sequenceState : Field | null ; state : (Field | null )[] } ; network : { blockchainLength : { lower : UInt32 ; upper : UInt32 } | null ; globalSlotSinceGenesis : { lower : UInt32 ; upper : UInt32 } | null ; globalSlotSinceHardFork : { lower : UInt32 ; upper : UInt32 } | null ; minWindowDensity : { lower : UInt32 ; upper : UInt32 } | null ; nextEpochData : { epochLength : { lower : UInt32 ; upper : UInt32 } | null ; ledger : { hash : Field | null ; totalCurrency : { lower : UInt64 ; upper : UInt64 } | null } ; lockCheckpoint : Field | null ; seed : Field | null ; startCheckpoint : Field | null } ; snarkedLedgerHash : Field | null ; stakingEpochData : { epochLength : { lower : UInt32 ; upper : UInt32 } | null ; ledger : { hash : Field | null ; totalCurrency : { lower : UInt64 ; upper : UInt64 } | null } ; lockCheckpoint : Field | null ; seed : Field | null ; startCheckpoint : Field | null } ; timestamp : { lower : UInt64 ; upper : UInt64 } | null ; totalCurrency : { lower : UInt64 ; upper : UInt64 } | null } } |
body.preconditions.account | { balance : { lower : UInt64 ; upper : UInt64 } | null ; delegate : PublicKey | null ; nonce : { lower : UInt32 ; upper : UInt32 } | null ; provedState : Bool | null ; receiptChainHash : Field | null ; sequenceState : Field | null ; state : (Field | null )[] } |
body.preconditions.account.balance | { lower : UInt64 ; upper : UInt64 } | null |
body.preconditions.account.delegate | PublicKey | null |
body.preconditions.account.nonce | { lower : UInt32 ; upper : UInt32 } | null |
body.preconditions.account.provedState | Bool | null |
body.preconditions.account.receiptChainHash | Field | null |
body.preconditions.account.sequenceState | Field | null |
body.preconditions.account.state | (Field | null )[] |
body.preconditions.network | { blockchainLength : { lower : UInt32 ; upper : UInt32 } | null ; globalSlotSinceGenesis : { lower : UInt32 ; upper : UInt32 } | null ; globalSlotSinceHardFork : { lower : UInt32 ; upper : UInt32 } | null ; minWindowDensity : { lower : UInt32 ; upper : UInt32 } | null ; nextEpochData : { epochLength : { lower : UInt32 ; upper : UInt32 } | null ; ledger : { hash : Field | null ; totalCurrency : { lower : UInt64 ; upper : UInt64 } | null } ; lockCheckpoint : Field | null ; seed : Field | null ; startCheckpoint : Field | null } ; snarkedLedgerHash : Field | null ; stakingEpochData : { epochLength : { lower : UInt32 ; upper : UInt32 } | null ; ledger : { hash : Field | null ; totalCurrency : { lower : UInt64 ; upper : UInt64 } | null } ; lockCheckpoint : Field | null ; seed : Field | null ; startCheckpoint : Field | null } ; timestamp : { lower : UInt64 ; upper : UInt64 } | null ; totalCurrency : { lower : UInt64 ; upper : UInt64 } | null } |
body.preconditions.network.blockchainLength | { lower : UInt32 ; upper : UInt32 } | null |
body.preconditions.network.globalSlotSinceGenesis | { lower : UInt32 ; upper : UInt32 } | null |
body.preconditions.network.globalSlotSinceHardFork | { lower : UInt32 ; upper : UInt32 } | null |
body.preconditions.network.minWindowDensity | { lower : UInt32 ; upper : UInt32 } | null |
body.preconditions.network.nextEpochData | { epochLength : { lower : UInt32 ; upper : UInt32 } | null ; ledger : { hash : Field | null ; totalCurrency : { lower : UInt64 ; upper : UInt64 } | null } ; lockCheckpoint : Field | null ; seed : Field | null ; startCheckpoint : Field | null } |
body.preconditions.network.nextEpochData.epochLength | { lower : UInt32 ; upper : UInt32 } | null |
body.preconditions.network.nextEpochData.ledger | { hash : Field | null ; totalCurrency : { lower : UInt64 ; upper : UInt64 } | null } |
body.preconditions.network.nextEpochData.ledger.hash | Field | null |
body.preconditions.network.nextEpochData.ledger.totalCurrency | { lower : UInt64 ; upper : UInt64 } | null |
body.preconditions.network.nextEpochData.lockCheckpoint | Field | null |
body.preconditions.network.nextEpochData.seed | Field | null |
body.preconditions.network.nextEpochData.startCheckpoint | Field | null |
body.preconditions.network.snarkedLedgerHash | Field | null |
body.preconditions.network.stakingEpochData | { epochLength : { lower : UInt32 ; upper : UInt32 } | null ; ledger : { hash : Field | null ; totalCurrency : { lower : UInt64 ; upper : UInt64 } | null } ; lockCheckpoint : Field | null ; seed : Field | null ; startCheckpoint : Field | null } |
body.preconditions.network.stakingEpochData.epochLength | { lower : UInt32 ; upper : UInt32 } | null |
body.preconditions.network.stakingEpochData.ledger | { hash : Field | null ; totalCurrency : { lower : UInt64 ; upper : UInt64 } | null } |
body.preconditions.network.stakingEpochData.ledger.hash | Field | null |
body.preconditions.network.stakingEpochData.ledger.totalCurrency | { lower : UInt64 ; upper : UInt64 } | null |
body.preconditions.network.stakingEpochData.lockCheckpoint | Field | null |
body.preconditions.network.stakingEpochData.seed | Field | null |
body.preconditions.network.stakingEpochData.startCheckpoint | Field | null |
body.preconditions.network.timestamp | { lower : UInt64 ; upper : UInt64 } | null |
body.preconditions.network.totalCurrency | { lower : UInt64 ; upper : UInt64 } | null |
body.publicKey | PublicKey |
body.sequenceEvents | Field [][] |
body.tokenId | TokenId |
body.update | { appState : (Field | null )[] ; delegate : PublicKey | null ; permissions : { editSequenceState : AuthRequired ; editState : AuthRequired ; incrementNonce : AuthRequired ; receive : AuthRequired ; send : AuthRequired ; setDelegate : AuthRequired ; setPermissions : AuthRequired ; setTokenSymbol : AuthRequired ; setVerificationKey : AuthRequired ; setVotingFor : AuthRequired ; setZkappUri : AuthRequired } | null ; timing : { cliffAmount : UInt64 ; cliffTime : UInt32 ; initialMinimumBalance : UInt64 ; vestingIncrement : UInt64 ; vestingPeriod : UInt32 } | null ; tokenSymbol : string | null ; verificationKey : { data : string ; hash : Field } | null ; votingFor : Field | null ; zkappUri : string | null } |
body.update.appState | (Field | null )[] |
body.update.delegate | PublicKey | null |
body.update.permissions | { editSequenceState : AuthRequired ; editState : AuthRequired ; incrementNonce : AuthRequired ; receive : AuthRequired ; send : AuthRequired ; setDelegate : AuthRequired ; setPermissions : AuthRequired ; setTokenSymbol : AuthRequired ; setVerificationKey : AuthRequired ; setVotingFor : AuthRequired ; setZkappUri : AuthRequired } | null |
body.update.timing | { cliffAmount : UInt64 ; cliffTime : UInt32 ; initialMinimumBalance : UInt64 ; vestingIncrement : UInt64 ; vestingPeriod : UInt32 } | null |
body.update.tokenSymbol | string | null |
body.update.verificationKey | { data : string ; hash : Field } | null |
body.update.votingFor | Field | null |
body.update.zkappUri | string | null |
body.useFullCommitment | Bool |
Defined in
snarky/gen/parties-json.ts:249
PublicKey
Ƭ PublicKey: string
Defined in
snarky/parties-leaves-json.ts:9
Sign
Ƭ Sign: "Positive"
| "Negative"
Defined in
snarky/parties-leaves-json.ts:10
TokenId
Ƭ TokenId: Field
Defined in
snarky/parties-leaves-json.ts:12
TypeMap
Ƭ TypeMap: Object
Type declaration
Name | Type |
---|---|
AuthRequired | AuthRequired |
BlockTimeInterval | null |
Bool | Bool |
Field | Field |
PublicKey | PublicKey |
Sign | Sign |
TokenId | TokenId |
UInt32 | UInt32 |
UInt64 | UInt64 |
null | null |
number | number |
string | string |
undefined | null |
Defined in
snarky/parties-leaves-json.ts:15
UInt32
Ƭ UInt32: string
Defined in
snarky/parties-leaves-json.ts:8
UInt64
Ƭ UInt64: string
Defined in
snarky/parties-leaves-json.ts:7
Namespace: Types
Table of contents
References
Namespaces
Type Aliases
Variables
Functions
- convertEventsToFields
- convertEventsToJson
- convertStringWithHashToFields
- convertStringWithHashToJson
- toFields
- toJson
References
Bool
Re-exports Bool
Field
Re-exports Field
Type Aliases
AuthRequired
Ƭ AuthRequired: Object
Type declaration
Name | Type |
---|---|
constant | Bool |
signatureNecessary | Bool |
signatureSufficient | Bool |
Defined in
Parties
Ƭ Parties: Object
Type declaration
Name | Type |
---|---|
feePayer | { authorization : string ; body : { events : { data : Field [][] ; hash : Field } ; fee : UInt64 ; networkPrecondition : { blockchainLength : { lower : UInt32 ; upper : UInt32 } ; globalSlotSinceGenesis : { lower : UInt32 ; upper : UInt32 } ; globalSlotSinceHardFork : { lower : UInt32 ; upper : UInt32 } ; minWindowDensity : { lower : UInt32 ; upper : UInt32 } ; nextEpochData : { epochLength : { lower : UInt32 ; upper : UInt32 } ; ledger : { hash : { isSome : Bool ; value : Field } ; totalCurrency : { lower : UInt64 ; upper : UInt64 } } ; lockCheckpoint : { isSome : Bool ; value : Field } ; seed : { isSome : Bool ; value : Field } ; startCheckpoint : { isSome : Bool ; value : Field } } ; snarkedLedgerHash : { isSome : Bool ; value : Field } ; stakingEpochData : { epochLength : { lower : UInt32 ; upper : UInt32 } ; ledger : { hash : { isSome : Bool ; value : Field } ; totalCurrency : { lower : UInt64 ; upper : UInt64 } } ; lockCheckpoint : { isSome : Bool ; value : Field } ; seed : { isSome : Bool ; value : Field } ; startCheckpoint : { isSome : Bool ; value : Field } } ; timestamp : { lower : UInt64 ; upper : UInt64 } ; totalCurrency : { lower : UInt64 ; upper : UInt64 } } ; nonce : UInt32 ; publicKey : PublicKey ; sequenceEvents : { data : Field [][] ; hash : Field } ; update : { appState : { isSome : Bool ; value : Field }[] ; delegate : { isSome : Bool ; value : PublicKey } ; permissions : { isSome : Bool ; value : { editSequenceState : AuthRequired ; editState : AuthRequired ; incrementNonce : AuthRequired ; receive : AuthRequired ; send : AuthRequired ; setDelegate : AuthRequired ; setPermissions : AuthRequired ; setTokenSymbol : AuthRequired ; setVerificationKey : AuthRequired ; setVotingFor : AuthRequired ; setZkappUri : AuthRequired } } ; timing : { isSome : Bool ; value : { cliffAmount : UInt64 ; cliffTime : UInt32 ; initialMinimumBalance : UInt64 ; vestingIncrement : UInt64 ; vestingPeriod : UInt32 } } ; tokenSymbol : { isSome : Bool ; value : { data : string ; hash : Field } } ; verificationKey : { isSome : Bool ; value : { data : string ; hash : Field } } ; votingFor : { isSome : Bool ; value : Field } ; zkappUri : { isSome : Bool ; value : { data : string ; hash : Field } } } } } |
feePayer.authorization | string |
feePayer.body | { events : { data : Field [][] ; hash : Field } ; fee : UInt64 ; networkPrecondition : { blockchainLength : { lower : UInt32 ; upper : UInt32 } ; globalSlotSinceGenesis : { lower : |