Skip to main content

Namespace: Encoding

Table of contents

Variables

Functions

Variables

Bijective

Const Bijective: Object

Type declaration

NameType
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

lib/encoding.ts:106


EpochSeed

EpochSeed: Base58<Field>

Defined in

lib/encoding.ts:17


LedgerHash

LedgerHash: Base58<Field>

Defined in

lib/encoding.ts:17


ReceiptChainHash

ReceiptChainHash: Base58<Field>

Defined in

lib/encoding.ts:17


StateHash

StateHash: Base58<Field>

Defined in

lib/encoding.ts:17


TokenId

TokenId: Base58<Field>

Defined in

lib/encoding.ts:17

Functions

bytesFromFields

bytesFromFields(fields): Uint8Array

Decodes a list of Field elements into a Uint8Array.

Parameters

NameType
fieldsField[]

Returns

Uint8Array

Defined in

lib/encoding.ts:75


bytesToFields

bytesToFields(bytes): Field[]

Encodes a Uint8Array into Field elements.

Parameters

NameType
bytesUint8Array

Returns

Field[]

Defined in

lib/encoding.ts:53


stringFromFields

stringFromFields(fields): string

Decodes a list of Field elements into a JavaScript string.

This function is not a valid in-snark computation.

Parameters

NameType
fieldsField[]

Returns

string

Defined in

lib/encoding.ts:43


stringToFields

stringToFields(message): Field[]

Encodes a JavaScript string into a list of Field elements.

This function is not a valid in-snark computation.

Parameters

NameType
messagestring

Returns

Field[]

Defined in

lib/encoding.ts:33