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
EpochSeed
• EpochSeed: Base58
<Field
>
Defined in
LedgerHash
• LedgerHash: Base58
<Field
>
Defined in
ReceiptChainHash
• ReceiptChainHash: Base58
<Field
>
Defined in
StateHash
• StateHash: Base58
<Field
>
Defined in
TokenId
• TokenId: Base58
<Field
>
Defined in
Functions
bytesFromFields
▸ bytesFromFields(fields
): Uint8Array
Decodes a list of Field elements into a Uint8Array.
Parameters
Name | Type |
---|---|
fields | Field [] |
Returns
Uint8Array
Defined in
bytesToFields
▸ bytesToFields(bytes
): Field
[]
Encodes a Uint8Array into Field elements.
Parameters
Name | Type |
---|---|
bytes | Uint8Array |
Returns
Field
[]
Defined in
stringFromFields
▸ stringFromFields(fields
): string
Decodes a list of Field elements into a JavaScript string.
This function is not a valid in-snark computation.
Parameters
Name | Type |
---|---|
fields | Field [] |
Returns
string
Defined in
stringToFields
▸ stringToFields(message
): Field
[]
Encodes a JavaScript string into a list of Field elements.
This function is not a valid in-snark computation.
Parameters
Name | Type |
---|---|
message | string |
Returns
Field
[]