Skip to main content

1.13.3

🧰 Functions

initialize

FunctionType
initialize(intf: any) => void

getLastAnswerId

FunctionType
getLastAnswerId() => any

sendMessageToNode

FunctionType
sendMessageToNode(url: any, schemaId: any, object: any) => Promise<unknown>

sendWalletToOperatorMessage

FunctionType
sendWalletToOperatorMessage<T = unknown>(url: any, schemaId: any, object: any) => Promise<T>

🔧 Constants

TYPE_UNKNOWN

ConstantType
TYPE_UNKNOWN0

TYPE_ARRAY

ConstantType
TYPE_ARRAY1

TYPE_OBJECT

ConstantType
TYPE_OBJECT2

TYPE_STRING

ConstantType
TYPE_STRING3

TYPE_NUMBER

ConstantType
TYPE_NUMBER4

TYPE_BOOLEAN

ConstantType
TYPE_BOOLEAN5

TYPE_NULL

ConstantType
TYPE_NULL6

TYPE_UINT8

ConstantType
TYPE_UINT87

TYPE_UINT16

ConstantType
TYPE_UINT168

TYPE_UINT24

ConstantType
TYPE_UINT249

TYPE_UINT32

ConstantType
TYPE_UINT3210

TYPE_UINT48

ConstantType
TYPE_UINT4811

TYPE_BINARY

ConstantType
TYPE_BINARY12

TYPE_BIN256

ConstantType
TYPE_BIN25613

TYPE_HASH_STR

ConstantType
TYPE_HASH_STR14

TYPE_MAIN

ConstantType
TYPE_MAIN31

TYPE_ARRAY_OF

ConstantType
TYPE_ARRAY_OF32

TYPE_NAMES

ConstantType
TYPE_NAMESstring[]

HASHABLE

ConstantType
HASHABLE1

MASKABLE

ConstantType
MASKABLE2

PROPERTIES

ConstantType
PROPERTIES3

REDACTED

ConstantType
REDACTED4

HASHED

ConstantType
HASHED8

MASKED

ConstantType
MASKED16

FORMAT

ConstantType
FORMAT28

MAGIC_STRING

ConstantType
MAGIC_STRING"CMTS"

PROTOCOL_VERSION

ConstantType
PROTOCOL_VERSION1

VB_ACCOUNT

ConstantType
VB_ACCOUNT0

VB_VALIDATOR_NODE

ConstantType
VB_VALIDATOR_NODE1

VB_ORGANIZATION

ConstantType
VB_ORGANIZATION2

VB_APPLICATION

ConstantType
VB_APPLICATION3

VB_APP_LEDGER

ConstantType
VB_APP_LEDGER4

N_VIRTUAL_BLOCKCHAINS

ConstantType
N_VIRTUAL_BLOCKCHAINS5

VB_NAME

ConstantType
VB_NAMEstring[]

MAX_MICROBLOCK_PAST_DELAY

ConstantType
MAX_MICROBLOCK_PAST_DELAY300

MAX_MICROBLOCK_FUTURE_DELAY

ConstantType
MAX_MICROBLOCK_FUTURE_DELAY60

MB_STATUS_UNRECOVERABLE_ERROR

ConstantType
MB_STATUS_UNRECOVERABLE_ERROR1

MB_STATUS_TIMESTAMP_ERROR

ConstantType
MB_STATUS_TIMESTAMP_ERROR2

MB_STATUS_PREVIOUS_HASH_ERROR

ConstantType
MB_STATUS_PREVIOUS_HASH_ERROR3

ERROR

ConstantType
ERRORSchema

RECORD_DESCRIPTION

ConstantType
RECORD_DESCRIPTIONSchema

ACCOUNT_STATE

ConstantType
ACCOUNT_STATESchema

ACCOUNT_HISTORY

ConstantType
ACCOUNT_HISTORYSchema

VIRTUAL_BLOCKCHAIN_STATE

ConstantType
VIRTUAL_BLOCKCHAIN_STATESchema

VB_STATES

ConstantType
VB_STATESSchema[]

BLOCK_INFORMATION

ConstantType
BLOCK_INFORMATION{ label: string; definition: { name: string; type: number; }[]; }

BLOCK_CONTENT

ConstantType
BLOCK_CONTENT{ label: string; definition: { name: string; type: number; definition: { name: string; type: number; }[]; }[]; }

MICROBLOCK_HEADER_PREVIOUS_HASH_OFFSET

ConstantType
MICROBLOCK_HEADER_PREVIOUS_HASH_OFFSET12

MICROBLOCK_HEADER_BODY_HASH_OFFSET

ConstantType
MICROBLOCK_HEADER_BODY_HASH_OFFSET57

MICROBLOCK_HEADER_SIZE

ConstantType
MICROBLOCK_HEADER_SIZE89

MICROBLOCK_HEADER

ConstantType
MICROBLOCK_HEADERSchema

MICROBLOCK_SECTION

ConstantType
MICROBLOCK_SECTIONSchema

MICROBLOCK_BODY

ConstantType
MICROBLOCK_BODYSchema

MICROBLOCK_VB_INFORMATION

ConstantType
MICROBLOCK_VB_INFORMATIONSchema

MSG_ERROR

ConstantType
MSG_ERROR0

MSG_GET_CHAIN_INFORMATION

ConstantType
MSG_GET_CHAIN_INFORMATION1

MSG_CHAIN_INFORMATION

ConstantType
MSG_CHAIN_INFORMATION2

MSG_GET_BLOCK_INFORMATION

ConstantType
MSG_GET_BLOCK_INFORMATION3

MSG_BLOCK_INFORMATION

ConstantType
MSG_BLOCK_INFORMATION4

MSG_GET_BLOCK_CONTENT

ConstantType
MSG_GET_BLOCK_CONTENT5

MSG_BLOCK_CONTENT

ConstantType
MSG_BLOCK_CONTENT6

MSG_GET_VIRTUAL_BLOCKCHAIN_STATE

ConstantType
MSG_GET_VIRTUAL_BLOCKCHAIN_STATE7

MSG_VIRTUAL_BLOCKCHAIN_STATE

ConstantType
MSG_VIRTUAL_BLOCKCHAIN_STATE8

MSG_GET_VIRTUAL_BLOCKCHAIN_UPDATE

ConstantType
MSG_GET_VIRTUAL_BLOCKCHAIN_UPDATE9

MSG_VIRTUAL_BLOCKCHAIN_UPDATE

ConstantType
MSG_VIRTUAL_BLOCKCHAIN_UPDATE10

MSG_GET_MICROBLOCK_INFORMATION

ConstantType
MSG_GET_MICROBLOCK_INFORMATION11

MSG_MICROBLOCK_INFORMATION

ConstantType
MSG_MICROBLOCK_INFORMATION12

MSG_AWAIT_MICROBLOCK_ANCHORING

ConstantType
MSG_AWAIT_MICROBLOCK_ANCHORING13

MSG_MICROBLOCK_ANCHORING

ConstantType
MSG_MICROBLOCK_ANCHORING14

MSG_GET_MICROBLOCK_BODYS

ConstantType
MSG_GET_MICROBLOCK_BODYS15

MSG_MICROBLOCK_BODYS

ConstantType
MSG_MICROBLOCK_BODYS16

MSG_GET_ACCOUNT_STATE

ConstantType
MSG_GET_ACCOUNT_STATE17

MSG_ACCOUNT_STATE

ConstantType
MSG_ACCOUNT_STATE18

MSG_GET_ACCOUNT_HISTORY

ConstantType
MSG_GET_ACCOUNT_HISTORY19

MSG_ACCOUNT_HISTORY

ConstantType
MSG_ACCOUNT_HISTORY20

MSG_GET_ACCOUNT_BY_PUBLIC_KEY_HASH

ConstantType
MSG_GET_ACCOUNT_BY_PUBLIC_KEY_HASH21

MSG_ACCOUNT_BY_PUBLIC_KEY_HASH

ConstantType
MSG_ACCOUNT_BY_PUBLIC_KEY_HASH22

MSG_GET_VALIDATOR_NODE_BY_ADDRESS

ConstantType
MSG_GET_VALIDATOR_NODE_BY_ADDRESS23

MSG_VALIDATOR_NODE_BY_ADDRESS

ConstantType
MSG_VALIDATOR_NODE_BY_ADDRESS24

MSG_GET_OBJECT_LIST

ConstantType
MSG_GET_OBJECT_LIST25

MSG_OBJECT_LIST

ConstantType
MSG_OBJECT_LIST26

MSG_GET_GENESIS_SNAPSHOT

ConstantType
MSG_GET_GENESIS_SNAPSHOT27

MSG_GENESIS_SNAPSHOT

ConstantType
MSG_GENESIS_SNAPSHOT28

NODE_MESSAGES

ConstantType
NODE_MESSAGESSchema[]

WI_MAX_SERVER_URL_LENGTH

ConstantType
WI_MAX_SERVER_URL_LENGTH100

WI_QR_CODE

ConstantType
WI_QR_CODESchema

WIMSG_REQUEST

ConstantType
WIMSG_REQUEST0

WIMSG_UPDATE_QR

ConstantType
WIMSG_UPDATE_QR1

WIMSG_CONNECTION_TOKEN

ConstantType
WIMSG_CONNECTION_TOKEN2

WIMSG_FORWARDED_ANSWER

ConstantType
WIMSG_FORWARDED_ANSWER3

WIMSG_GET_CONNECTION_INFO

ConstantType
WIMSG_GET_CONNECTION_INFO4

WIMSG_ANSWER

ConstantType
WIMSG_ANSWER5

WIMSG_CONNECTION_INFO

ConstantType
WIMSG_CONNECTION_INFO6

WIMSG_CONNECTION_ACCEPTED

ConstantType
WIMSG_CONNECTION_ACCEPTED7

WIMSG_FORWARDED_REQUEST

ConstantType
WIMSG_FORWARDED_REQUEST8

WI_MESSAGES

ConstantType
WI_MESSAGESSchema[]

WIRQ_AUTH_BY_PUBLIC_KEY

ConstantType
WIRQ_AUTH_BY_PUBLIC_KEY0

WIRQ_DATA_APPROVAL

ConstantType
WIRQ_DATA_APPROVAL1

WIRQ_GET_EMAIL

ConstantType
WIRQ_GET_EMAIL2

WIRQ_GET_USER_DATA

ConstantType
WIRQ_GET_USER_DATA3

WI_REQUESTS

ConstantType
WI_REQUESTSSchema[]

WI_ANSWERS

ConstantType
WI_ANSWERSSchema[]

MSG_ANS_ERROR

ConstantType
MSG_ANS_ERROR0

MSG_APPROVAL_HANDSHAKE

ConstantType
MSG_APPROVAL_HANDSHAKE1

MSG_ACTOR_KEY

ConstantType
MSG_ACTOR_KEY2

MSG_APPROVAL_SIGNATURE

ConstantType
MSG_APPROVAL_SIGNATURE3

MSG_ANS_ACTOR_KEY_REQUIRED

ConstantType
MSG_ANS_ACTOR_KEY_REQUIRED4

MSG_ANS_APPROVAL_DATA

ConstantType
MSG_ANS_APPROVAL_DATA5

MSG_ANS_APPROVAL_SIGNATURE

ConstantType
MSG_ANS_APPROVAL_SIGNATURE6

WALLET_OP_MESSAGES

ConstantType
WALLET_OP_MESSAGESSchema[]

ALL_SCHEMAS

ConstantType
ALL_SCHEMAS{ singles: Schema[]; collections: { label: string; list: Schema[]; }[]; }

TOKEN_NAME

ConstantType
TOKEN_NAME"CMTS"

TOKEN

ConstantType
TOKEN100000

CENTITOKEN

ConstantType
CENTITOKEN1000

MILLITOKEN

ConstantType
MILLITOKEN100

INITIAL_OFFER

ConstantType
INITIAL_OFFERnumber

MINIMUM_GAS_PRICE

ConstantType
MINIMUM_GAS_PRICE1

MAXIMUM_GAS_PRICE

ConstantType
MAXIMUM_GAS_PRICEnumber

FIXED_GAS_FEE

ConstantType
FIXED_GAS_FEE1000

GAS_PER_BYTE

ConstantType
GAS_PER_BYTE1

GAS_UNIT

ConstantType
GAS_UNIT1000

BK_PLUS

ConstantType
BK_PLUS1

BK_PAID_TX_FEES

ConstantType
BK_PAID_TX_FEES0

BK_PAID_BLOCK_FEES

ConstantType
BK_PAID_BLOCK_FEES2

BK_SENT_ISSUANCE

ConstantType
BK_SENT_ISSUANCE4

BK_SALE

ConstantType
BK_SALE6

BK_SENT_PAYMENT

ConstantType
BK_SENT_PAYMENT8

BK_EARNED_TX_FEES

ConstantType
BK_EARNED_TX_FEESnumber

BK_EARNED_BLOCK_FEES

ConstantType
BK_EARNED_BLOCK_FEESnumber

BK_RECEIVED_ISSUANCE

ConstantType
BK_RECEIVED_ISSUANCEnumber

BK_PURCHASE

ConstantType
BK_PURCHASEnumber

BK_RECEIVED_PAYMENT

ConstantType
BK_RECEIVED_PAYMENTnumber

BK_REF_BLOCK

ConstantType
BK_REF_BLOCK0

BK_REF_MICROBLOCK

ConstantType
BK_REF_MICROBLOCK1

BK_REF_SECTION

ConstantType
BK_REF_SECTION2

BK_REFERENCES

ConstantType
BK_REFERENCESnumber[]

BK_NAMES

ConstantType
BK_NAMESstring[]

ACCOUNT_BURNT_TOKENS

ConstantType
ACCOUNT_BURNT_TOKENS0

ACCOUNT_STANDARD

ConstantType
ACCOUNT_STANDARD1

ACCOUNT_BLOCK_FEES

ConstantType
ACCOUNT_BLOCK_FEES2

ACCOUNT_LOCKED_TOKENS

ConstantType
ACCOUNT_LOCKED_TOKENS3

ACCOUNT_NAMES

ConstantType
ACCOUNT_NAMESstring[]

ACCOUNT_ALLOWED_TRANSFERS

ConstantType
ACCOUNT_ALLOWED_TRANSFERSnumber[]

ZERO

ConstantType
ZERO0

ONE

ConstantType
ONE1

AT_LEAST_ONE

ConstantType
AT_LEAST_ONE2

AT_MOST_ONE

ConstantType
AT_MOST_ONE3

ANY

ConstantType
ANY4

CONSTRAINT_NAMES

ConstantType
CONSTRAINT_NAMESstring[]

ACCOUNT_SIG_ALGORITHM

ConstantType
ACCOUNT_SIG_ALGORITHMSectionType.ACCOUNT_SIG_ALGORITHM

ACCOUNT_PUBLIC_KEY

ConstantType
ACCOUNT_PUBLIC_KEYSectionType.ACCOUNT_PUBLIC_KEY

ACCOUNT_TOKEN_ISSUANCE

ConstantType
ACCOUNT_TOKEN_ISSUANCESectionType.ACCOUNT_TOKEN_ISSUANCE

ACCOUNT_CREATION

ConstantType
ACCOUNT_CREATIONSectionType.ACCOUNT_CREATION

ACCOUNT_TRANSFER

ConstantType
ACCOUNT_TRANSFERSectionType.ACCOUNT_TRANSFER

ACCOUNT_SIGNATURE

ConstantType
ACCOUNT_SIGNATURESectionType.ACCOUNT_SIGNATURE

VN_SIG_ALGORITHM

ConstantType
VN_SIG_ALGORITHM0

VN_DECLARATION

ConstantType
VN_DECLARATION1

VN_DESCRIPTION

ConstantType
VN_DESCRIPTION2

VN_RPC_ENDPOINT

ConstantType
VN_RPC_ENDPOINT3

VN_NETWORK_INTEGRATION

ConstantType
VN_NETWORK_INTEGRATION4

VN_SIGNATURE

ConstantType
VN_SIGNATURE5

ORG_SIG_ALGORITHM

ConstantType
ORG_SIG_ALGORITHMSectionType.ORG_SIG_ALGORITHM

ORG_PUBLIC_KEY

ConstantType
ORG_PUBLIC_KEYSectionType.ORG_PUBLIC_KEY

ORG_DESCRIPTION

ConstantType
ORG_DESCRIPTIONSectionType.ORG_DESCRIPTION

ORG_SERVER

ConstantType
ORG_SERVERSectionType.ORG_SERVER

ORG_SIGNATURE

ConstantType
ORG_SIGNATURESectionType.ORG_SIGNATURE

APP_SIG_ALGORITHM

ConstantType
APP_SIG_ALGORITHMSectionType.APP_SIG_ALGORITHM

APP_DECLARATION

ConstantType
APP_DECLARATIONSectionType.APP_DECLARATION

APP_DESCRIPTION

ConstantType
APP_DESCRIPTIONSectionType.APP_DESCRIPTION

APP_SIGNATURE

ConstantType
APP_SIGNATURESectionType.APP_SIGNATURE

APP_LEDGER_SIG_ALGORITHM

ConstantType
APP_LEDGER_SIG_ALGORITHMSectionType.APP_LEDGER_SIG_ALGORITHM

APP_LEDGER_PKE_ALGORITHM

ConstantType
APP_LEDGER_PKE_ALGORITHMSectionType.APP_LEDGER_PKE_ALGORITHM

APP_LEDGER_DECLARATION

ConstantType
APP_LEDGER_DECLARATIONSectionType.APP_LEDGER_DECLARATION

APP_LEDGER_ACTOR_CREATION

ConstantType
APP_LEDGER_ACTOR_CREATIONSectionType.APP_LEDGER_ACTOR_CREATION

APP_LEDGER_CHANNEL_CREATION

ConstantType
APP_LEDGER_CHANNEL_CREATIONSectionType.APP_LEDGER_CHANNEL_CREATION

APP_LEDGER_SHARED_SECRET

ConstantType
APP_LEDGER_SHARED_SECRETSectionType.APP_LEDGER_SHARED_SECRET

APP_LEDGER_CHANNEL_INVITATION

ConstantType
APP_LEDGER_CHANNEL_INVITATIONSectionType.APP_LEDGER_CHANNEL_INVITATION

APP_LEDGER_ACTOR_SUBSCRIPTION

ConstantType
APP_LEDGER_ACTOR_SUBSCRIPTIONSectionType.APP_LEDGER_ACTOR_SUBSCRIPTION

APP_LEDGER_PUBLIC_CHANNEL_DATA

ConstantType
APP_LEDGER_PUBLIC_CHANNEL_DATASectionType.APP_LEDGER_PUBLIC_CHANNEL_DATA

APP_LEDGER_PRIVATE_CHANNEL_DATA

ConstantType
APP_LEDGER_PRIVATE_CHANNEL_DATASectionType.APP_LEDGER_PRIVATE_CHANNEL_DATA

APP_LEDGER_AUTHOR

ConstantType
APP_LEDGER_AUTHORSectionType.APP_LEDGER_AUTHOR

APP_LEDGER_ENDORSER

ConstantType
APP_LEDGER_ENDORSERSectionType.APP_LEDGER_ENDORSER

APP_LEDGER_ENDORSER_SIGNATURE

ConstantType
APP_LEDGER_ENDORSER_SIGNATURESectionType.APP_LEDGER_ENDORSER_SIGNATURE

APP_LEDGER_AUTHOR_SIGNATURE

ConstantType
APP_LEDGER_AUTHOR_SIGNATURESectionType.APP_LEDGER_AUTHOR_SIGNATURE

ALL_SECTIONS_SCHEMAS

ConstantType
ALL_SECTIONS_SCHEMAS{ [x: number]: Schema; length: number; toString(): string; toLocaleString(): string; toLocaleString(locales: string or string[], options?: (NumberFormatOptions and DateTimeFormatOptions) or undefined): string; ... 30 more ...; [Symbol.unscopables]: { ...; }; }

DEF

ConstantType
DEFSchema[][]

WI_INVALID_SIGNATURE

ConstantType
WI_INVALID_SIGNATURE0

Utf8Encoder

ConstantType
Utf8Encoder{ encode: (str: any) => Uint8Array<ArrayBuffer>; decode: (array: any) => string; }

Utils

ConstantType
Utils{ numberToHexa: (value: number, size?: number or undefined) => string; truncateString: (str: string, size: number) => string; truncateStringMiddle: (str: string, leadingSize: number, trailingSize: number) => string; ... 14 more ...; getGenesisEpochInTimestamp: () => number; }

Random

ConstantType
Random{ getBytes: (n: any) => Uint8Array<ArrayBufferLike>; getInteger: (max: any) => number; getKey256: () => string; }

Hashes

ConstantType
Hashes{ sha256AsBinary: (data: Uint8Array<ArrayBufferLike>) => Uint8Array<ArrayBufferLike>; sha256: (data: Uint8Array<ArrayBufferLike>) => string; sha512AsBinary: (data: any) => Uint8Array<...>; sha512: (data: any) => string; }

Aes

ConstantType
Aes{ encryptGcm: (key: any, data: any, iv: any) => Uint8Array<ArrayBufferLike>; decryptGcm: (key: any, data: any, iv: any) => false or Uint8Array<ArrayBufferLike>; }

MLDsa

ConstantType
MLDsa{ generateKeyPair: (seed: any) => { publicKey: Uint8Array<ArrayBufferLike>; privateKey: Uint8Array<ArrayBufferLike>; }; sign: (privateKey: any, data: any) => Uint8Array<...>; verify: (publicKey: any, data: any, signature: any) => boolean; }

MLKem

ConstantType
MLKem{ generateKeyPair: (seed: any) => { publicKey: Uint8Array<ArrayBufferLike>; secretKey: Uint8Array<ArrayBufferLike>; }; encapsulate: (publicKey: any) => { ...; }; decapsulate: (cipherText: any, privateKey: any) => Uint8Array<...>; }

Secp256k1

ConstantType
Secp256k1{ publicKeyFromPrivateKey: (privateKey: any) => Bytes; sign: (privateKey: any, data: any) => Bytes; verify: (publicKey: any, data: any, signature: any) => boolean; }

Crypto

ConstantType
Crypto{ KEM_ALGORITHMS: { name: string; }[]; Random: { getBytes: (n: any) => Uint8Array<ArrayBufferLike>; getInteger: (max: any) => number; getKey256: () => string; }; Hashes: { ...; }; ... 7 more ...; ML_DSA: number; }

BlockchainUtils

ConstantType
BlockchainUtils{ checkHeaderList: (headers: any) => { valid: boolean; hashes: never[]; }; previousHashFromHeader: (header: any) => any; decodeMicroblockHeader: (data: Uint8Array<ArrayBufferLike>) => MicroBlockHeaderDto; ... 5 more ...; decodeVirtualBlockchainCustomState: (type: number, data: Uint8Array<...>) => object; }

PathManager

ConstantType
PathManager{ parsePrefix: (pathString: any) => { prefix: string; pathString: any; }; toNumericPath: (irObject: any, pathString: any) => never[]; fromNumericPath: (irObject: any, numericPath: any) => string; processCallback: (irObject: any, pathString: any, callback: any) => void; fromParents: (parents: any) => string; }

MaskManager

ConstantType
MaskManager{ getListFromRegex: (str: any, regex: any, substitution: any) => any; applyMask: (str: any, list: any) => { visible: any; hidden: any; }; getVisibleText: (visible: any) => any; getFullText: (visible: any, hidden: any) => any; }

RPCNodeStatusResponseSchema

ConstantType
RPCNodeStatusResponseSchemaZodObject<{ jsonrpc: ZodLiteral<"2.0">; id: ZodNumber; result: ZodObject<{ node_info: ZodObject<{ protocol_version: ZodObject<{ p2p: ZodString; block: ZodString; app: ZodString; }, "strip", ZodTypeAny, { ...; }, { ...; }>; ... 6 more ...; other: ZodObject<...>; }, "strip", ZodTypeAny, { ...; }, { ...; }>; sync_info:...

Base64

ConstantType
Base64{ BASE64: string; URL: string; encodeString: (str: any, alphabet?: string, padding?: boolean) => string; decodeString: (str: any, alphabet?: string) => string; encodeBinary: (bin: any, alphabet?: string, padding?: boolean) => string; decodeBinary: (str: any, alphabet?: string) => Uint8Array<...>; }

Economics

ConstantType
Economics{ getAccountTypeFromIdentifier: (accountIdentifier: Uint8Array<ArrayBufferLike>) => number; getSpecialAccountTypeIdentifier: (type: number) => Uint8Array<...>; isAllowedTransfer: (accountType: number, transferType: number) => number; }

NewBlockEventSchema

ConstantType
NewBlockEventSchemaZodObject<{ jsonrpc: ZodLiteral<"2.0">; id: ZodNumber; result: ZodObject<{ query: ZodString; data: ZodObject<{ type: ZodLiteral<"tendermint/event/NewBlock">; value: ZodObject<...>; }, "strip", ZodTypeAny, { ...; }, { ...; }>; events: ZodObject<...>; }, "strip", ZodTypeAny, { ...; }, { ...; }>; }, "strip", ZodTypeAny...

RADIX_CST

ConstantType
RADIX_CST{ CACHE_HORIZON: number; HASH_SIZE: number; ROOT_ANCHORING_HASH: Uint8Array<ArrayBuffer>; }

RadixUtils

ConstantType
RadixUtils{ keyDifference: (depth: any, key: any, node: any) => 0 or 1; getHashList: (msk: any, node: any) => never[]; }

RadixChecker

ConstantType
RadixChecker{ verifyProof: (key: any, value: any, proof: any) => Promise<any>; }

🏭 EncoderFactory

EncoderFactory is a class responsible for providing encoder instances. It contains static utility methods to create and retrieve encoders for specific purposes.

Static Methods

defaultBytesToStringEncoder

Provides the default encoder for converting Uint8Array bytes to a hexadecimal string representation.

MethodType
defaultBytesToStringEncoder() => EncoderInterface<Uint8Array<ArrayBufferLike>, string>

bytesToBase64Encoder

Provides an encoder for converting Uint8Array bytes to a base64 string representation.

MethodType
bytesToBase64Encoder() => EncoderInterface<Uint8Array<ArrayBufferLike>, string>

bytesToHexEncoder

Retrieves an encoder instance that converts bytes (Uint8Array) into a hexadecimal string representation.

MethodType
bytesToHexEncoder() => EncoderInterface<Uint8Array<ArrayBufferLike>, string>

🏭 BytesToBase64Encoder

A class that implements an encoder to convert between byte arrays (Uint8Array) and base64 string representations. It provides methods for both encoding byte arrays to base64 strings and decoding base64 strings back to byte arrays.

This class adheres to the EncoderInterface interface, parameterized with Uint8Array for the input/output data type and string for the encoded format.

Methods:

  • encode: Converts a given Uint8Array into its base64 string equivalent.
  • decode: Converts a base64 string back into a Uint8Array representation.

Methods

decode

Decodes a base64 string into a Uint8Array.

MethodType
decode(data: string) => Uint8Array<ArrayBufferLike>

Parameters:

  • data: The base64 string to decode.

encode

Encodes the given Uint8Array data into a base64 string representation.

MethodType
encode(data: Uint8Array<ArrayBufferLike>) => string

Parameters:

  • data: - The byte array to be encoded.

🏭 BytesToHexEncoder

A class that implements an encoder to convert between byte arrays (Uint8Array) and hexadecimal string representations. It provides methods for both encoding byte arrays to hex strings and decoding hex strings back to byte arrays.

This class adheres to the EncoderInterface interface, parameterized with Uint8Array for the input/output data type and string for the encoded format.

Methods:

  • encode: Converts a given Uint8Array into its hexadecimal string equivalent.
  • decode: Converts a hexadecimal string back into a Uint8Array representation.

Methods

decode

Decodes a hexadecimal string into a Uint8Array.

MethodType
decode(data: string) => Uint8Array<ArrayBufferLike>

Parameters:

  • data: The hexadecimal string to decode.

encode

Encodes the given Uint8Array data into a hexadecimal string representation.

MethodType
encode(data: Uint8Array<ArrayBufferLike>) => string

Parameters:

  • data: - The byte array to be encoded.

🏭 BasePrivateSignatureKey

Abstract base class representing a private signature key. It provides methods for retrieving the private key, generating signatures, and accessing associated metadata and functionalities related to the signature scheme.

Methods

getPrivateKeyAsString

MethodType
getPrivateKeyAsString(encoder?: EncoderInterface<Uint8Array<ArrayBufferLike>, string>) => string

getSignatureAlgorithmId

MethodType
getSignatureAlgorithmId() => SignatureAlgorithmId

getSignatureSize

MethodType
getSignatureSize() => number

🏭 BasePublicSignatureKey

Abstract class representing the base implementation of a public signature key. This class provides a partial implementation for handling public keys and signing operations. It serves as a foundation for specific public signature key implementations.

Methods

getPublicKeyAsString

MethodType
getPublicKeyAsString(encoder?: EncoderInterface<Uint8Array<ArrayBufferLike>, string>) => string

getSignatureSize

MethodType
getSignatureSize() => number

getSignatureAlgorithmId

MethodType
getSignatureAlgorithmId() => SignatureAlgorithmId

🏭 AES256GCMSymmetricEncryptionScheme

Methods

getSymmetricEncryptionSchemeId

MethodType
getSymmetricEncryptionSchemeId() => number

getSupportedKeyLengths

MethodType
getSupportedKeyLengths() => number[]

getDefaultKeyLength

MethodType
getDefaultKeyLength() => number

🏭 AES256GCMSymmetricEncryptionKey

This class provides methods for creating, managing, and utilizing a symmetric encryption key specifically designed for AES-256-GCM encryption. It implements the SymmetricEncryptionKey interface, enabling compatibility with other cryptographic operations requiring symmetric key encryption.

AES-256-GCM (Advanced Encryption Standard with 256-bit keys in Galois/Counter Mode) ensures high-level cryptographic security with authenticated encryption, combining data confidentiality with integrity protection.

Static Methods

generate

Generates a new AES-256-GCM symmetric encryption key.

MethodType
generate() => AES256GCMSymmetricEncryptionKey

createFromBytes

Creates an instance of AES256GCMSymmetricEncryptionKey from the given byte array.

MethodType
createFromBytes(keyBytes: Uint8Array<ArrayBufferLike>) => AES256GCMSymmetricEncryptionKey

Parameters:

  • keyBytes: - The byte array representing the encryption key.

Methods

getRawSecretKey

Retrieves the raw secret key as a Uint8Array. This method provides access to the underlying key data stored in this instance.

MethodType
getRawSecretKey() => Uint8Array<ArrayBufferLike>

getSymmetricEncryptionSchemeId

Retrieves the identifier of the encryption algorithm being used.

MethodType
getSymmetricEncryptionSchemeId() => number

encrypt

Encrypts the given plaintext using AES-GCM encryption. A random initialization vector (IV) is generated for each encryption operation. The result is a concatenation of the IV and the encrypted ciphertext.

MethodType
encrypt(plaintext: Uint8Array<ArrayBufferLike>) => Uint8Array<ArrayBufferLike>

Parameters:

  • plaintext: - The plaintext data to be encrypted.

decrypt

Decrypts the provided ciphertext using the GCM block cipher mode with the instance's key.

MethodType
decrypt(ciphertext: Uint8Array<ArrayBufferLike>) => Uint8Array<ArrayBufferLike>

Parameters:

  • ciphertext: - The encrypted data to be decrypted. The first 12 bytes are assumed to be the initialization vector (IV), and the rest is the encrypted content.

🏭 ExtendedSymmetricEncryptionKey

A class that extends the functionality of a symmetric encryption key. This class enables encryption and decryption of strings, while delegating the underlying encryption and decryption operations to a wrapped key.

Methods

encryptString

Encrypts a given plaintext string and returns the encrypted data as a Base64-encoded string.

MethodType
encryptString(plaintext: string) => string

Parameters:

  • plaintext: - The plain text string to be encrypted.

decryptString

Decrypts a given string that is encoded in Base64 format.

MethodType
decryptString(ciphertext: string) => string

Parameters:

  • ciphertext: The Base64 encoded string to be decrypted.

getSymmetricEncryptionSchemeId

Retrieves the identifier of the encryption algorithm used.

MethodType
getSymmetricEncryptionSchemeId() => number

encrypt

Encrypts the given plaintext using the wrapped key.

MethodType
encrypt(plaintext: Uint8Array<ArrayBufferLike>) => Uint8Array<ArrayBufferLike>

Parameters:

  • plaintext: - The data to be encrypted.

decrypt

Decrypts the provided ciphertext using the wrapped key.

MethodType
decrypt(ciphertext: Uint8Array<ArrayBufferLike>) => Uint8Array<ArrayBufferLike>

Parameters:

  • ciphertext: - The ciphertext to be decrypted.

getRawSecretKey

Retrieves the raw secret key from the wrapped key.

MethodType
getRawSecretKey() => Uint8Array<ArrayBufferLike>

🏭 MLDSA65SignatureScheme

Methods

getSignatureAlgorithmId

MethodType
getSignatureAlgorithmId() => number

getSignatureSize

MethodType
getSignatureSize() => number

🏭 MLDSA65PublicSignatureKey

Represents a public signature key for the MLDSA65 signature scheme.

This class provides functionalities to verify digital signatures and retrieve the raw public key used in the signing process. It extends the MLDSA44SignatureScheme and implements the PublicSignatureKey interface.

Constructors

public: Constructs an instance of the class.

Parameters:

  • publicKey: - The public key used for initialization.

Methods

getPublicKeyAsString

MethodType
getPublicKeyAsString(encoder?: EncoderInterface<Uint8Array<ArrayBufferLike>, string>) => string

verify

Verifies the provided data and its signature using the stored public key.

MethodType
verify(data: Uint8Array<ArrayBufferLike>, signature: Uint8Array<ArrayBufferLike>) => boolean

Parameters:

  • data: - The data to be verified.
  • signature: - The signature of the data to be verified.

getPublicKeyAsBytes

Retrieves the raw public key as a Uint8Array.

MethodType
getPublicKeyAsBytes() => Uint8Array<ArrayBufferLike>

getScheme

MethodType
getScheme() => SignatureScheme

🏭 MLDSA65PrivateSignatureKey

Represents a private signature key for the MLDSA65 signature scheme.

Constructors

public: Constructs a new instance of the class, initializes the public and private keys using the provided seed value.

Parameters:

  • seed: - The seed value used to generate key pairs.

Static Methods

gen

Generates and returns a new private signature key.

This method creates a private signature key instance using a randomly generated 32-byte seed.

MethodType
gen() => MLDSA65PrivateSignatureKey

Methods

getPrivateKeyAsString

MethodType
getPrivateKeyAsString(encoder: EncoderInterface<Uint8Array<ArrayBufferLike>, string>) => string

getPublicKey

Retrieves the public signature key associated with this instance.

MethodType
getPublicKey() => MLDSA65PublicSignatureKey

getPrivateKeyAsBytes

MethodType
getPrivateKeyAsBytes() => Uint8Array<ArrayBufferLike>

sign

Signs the provided data using the signature key.

MethodType
sign(data: Uint8Array<ArrayBufferLike>) => Uint8Array<ArrayBufferLike>

Parameters:

  • data: - The data to be signed.

getScheme

MethodType
getScheme() => SignatureScheme

🏭 Sha256CryptographicHash

Methods

getHashSchemeId

MethodType
getHashSchemeId() => CryptographicHashAlgorithmId

hash

MethodType
hash(data: Uint8Array<ArrayBufferLike>) => Uint8Array<ArrayBufferLike>

🏭 Secp256k1SignatureScheme

The Secp256k1SignatureScheme class implements the SignatureScheme interface and provides functionality specific to the Secp256k1 elliptic curve cryptographic signature scheme.

Methods

getSignatureAlgorithmId

MethodType
getSignatureAlgorithmId() => number

getSignatureSize

MethodType
getSignatureSize() => number

🏭 Secp256k1PublicSignatureKey

A class representing a Secp256k1 public signature key. This class is responsible for handling the public key operations such as retrieving the raw public key and verifying signatures against specified data.

This class extends the Secp256k1SignatureScheme and implements the PublicSignatureKey interface.

Methods

getPublicKeyAsBytes

MethodType
getPublicKeyAsBytes() => Uint8Array<ArrayBufferLike>

verify

MethodType
verify(data: Uint8Array<ArrayBufferLike>, signature: Uint8Array<ArrayBufferLike>) => boolean

getScheme

MethodType
getScheme() => SignatureScheme

🏭 Secp256k1PrivateSignatureKey

Represents a private signature key using the Secp256k1 curve. This class extends from Secp256k1PublicSignatureKey and implements the PrivateSignatureKey interface. It provides functionality to generate a private key, derive its corresponding public key, and sign data.

Methods enable key generation, retrieving the associated public key, and signing cryptographic hashes.

Static Methods

gen

Generates and returns a new instance of Secp256k1PrivateSignatureKey initialized with a randomly generated private key.

MethodType
gen() => Secp256k1PrivateSignatureKey

genFromSeed

Generates a Secp256k1 private signature key from a given seed.

MethodType
genFromSeed(seed: Uint8Array<ArrayBufferLike>) => Secp256k1PrivateSignatureKey

Parameters:

  • seed: - The seed used to generate the private key.

Methods

getPrivateKeyAsString

MethodType
getPrivateKeyAsString(encoder: EncoderInterface<Uint8Array<ArrayBufferLike>, string>) => string

getPublicKey

MethodType
getPublicKey() => PublicSignatureKey

getPrivateKeyAsBytes

MethodType
getPrivateKeyAsBytes() => Uint8Array<ArrayBufferLike>

sign

MethodType
sign(data: Uint8Array<ArrayBufferLike>) => Uint8Array<ArrayBufferLike>

getScheme

MethodType
getScheme() => SignatureScheme

🏭 PasswordBasedKeyDerivationFunction

Methods

deriveKeyNoSalt

MethodType
deriveKeyNoSalt(password: string, keyLength: number) => Uint8Array<ArrayBufferLike>

🏭 PBKDF2

Methods

getKeyDerivationFunctionAlgorithmId

MethodType
getKeyDerivationFunctionAlgorithmId() => PasswordBasedKeyDerivationFunctionAlgorithmId

deriveKey

MethodType
deriveKey(password: string, salt: string, keyLength: number) => Uint8Array<ArrayBufferLike>

🏭 KeyDerivationFunction

Methods

deriveKeyNoSalt

MethodType
deriveKeyNoSalt(inputKeyingMaterial: Uint8Array<ArrayBufferLike>, info: Uint8Array<ArrayBufferLike>, keyLength: number) => Uint8Array<...>

🏭 HKDF

Methods

getKeyDerivationFunctionAlgorithmId

MethodType
getKeyDerivationFunctionAlgorithmId() => KeyDerivationFunctionAlgorithmId

deriveKey

MethodType
deriveKey(inputKeyingMaterial: Uint8Array<ArrayBufferLike>, salt: Uint8Array<ArrayBufferLike>, info: Uint8Array<ArrayBufferLike>, keyLength: number) => Uint8Array<...>

🏭 AbstractPublicKeyEncryptionScheme

🏭 AbstractPublicEncryptionKey

Methods

encode

MethodType
encode(encoder?: EncoderInterface<Uint8Array<ArrayBufferLike>, string>) => string

getSchemeId

MethodType
getSchemeId() => PublicKeyEncryptionAlgorithmId

🏭 AbstractPrivateDecryptionKey

Methods

encode

MethodType
encode(encoder?: EncoderInterface<Uint8Array<ArrayBufferLike>, string>) => string

🏭 MlKemPublicKeyEncryptionScheme

Methods

getSchemeId

Returns the identifier of the scheme.

MethodType
getSchemeId() => PublicKeyEncryptionAlgorithmId

getSupportedSeedLength

MethodType
getSupportedSeedLength() => number[]

🏭 MlKemCiphertextEncoder

Methods

encode

MethodType
encode(encryptedSharedSecret: Uint8Array<ArrayBufferLike>, encryptedMessage: Uint8Array<ArrayBufferLike>) => Uint8Array<ArrayBufferLike>

decode

MethodType
decode(ciphertext: Uint8Array<ArrayBufferLike>) => MlKemCiphertextType

🏭 MlKemPublicEncryptionKey

Methods

encrypt

MethodType
encrypt(message: Uint8Array<ArrayBufferLike>) => Uint8Array<ArrayBufferLike>

getRawPublicKey

MethodType
getRawPublicKey() => Uint8Array<ArrayBufferLike>

getScheme

MethodType
getScheme() => AbstractPublicKeyEncryptionScheme

🏭 MlKemPrivateDecryptionKey

Static Methods

genFromSeed

Generates a private decryption key from a seed.

MethodType
genFromSeed(seed: Uint8Array<ArrayBufferLike>) => MlKemPrivateDecryptionKey

gen

Generates a random private decryption key.

MethodType
gen() => MlKemPrivateDecryptionKey

Methods

getSupportedSeedLength

Returns the supported seed lengths for the scheme.

MethodType
getSupportedSeedLength() => number[]

getScheme

MethodType
getScheme() => MlKemPublicKeyEncryptionScheme

getPublicKey

MethodType
getPublicKey() => MlKemPublicEncryptionKey

getRawPrivateKey

MethodType
getRawPrivateKey() => Uint8Array<ArrayBufferLike>

decrypt

MethodType
decrypt(ciphertext: Uint8Array<ArrayBufferLike>) => Uint8Array<ArrayBufferLike>

🏭 CryptoSchemeFactory

Static Methods

createPrivateSignatureKey

MethodType
createPrivateSignatureKey(schemeId: number, seed: Uint8Array<ArrayBufferLike>) => PrivateSignatureKey

createVirtualBlockchainPrivateSignature

MethodType
createVirtualBlockchainPrivateSignature(kdf: KeyDerivationFunction, schemeId: SignatureAlgorithmId, walletSeed: Uint8Array<ArrayBufferLike>, vbSeed: Uint8Array<...>) => PrivateSignatureKey

deriveKeyFromPassword

Derives a symmetric encryption key from the provided password using the specified key derivation and encryption algorithms.

MethodType
deriveKeyFromPassword(password: string, pbkdfAlgorithmId?: PasswordBasedKeyDerivationFunctionAlgorithmId, symmetricEncryptionSchemeId?: SymmetricEncryptionAlgorithmId) => SymmetricEncryptionKey

Parameters:

  • password: - The password from which the encryption key will be derived.
  • pbkdfAlgorithmId: - The ID of the password-based key derivation function algorithm to use.
  • symmetricEncryptionSchemeId: - The ID of the symmetric encryption algorithm to create the key for.

createPublicSignatureKey

MethodType
createPublicSignatureKey(schemeId: number, publicKey: Uint8Array<ArrayBufferLike>) => PublicSignatureKey

createPublicEncryptionKey

MethodType
createPublicEncryptionKey(schemeId: number, publicKey: Uint8Array<ArrayBufferLike>) => AbstractPublicEncryptionKey

createPrivateDecryptionKey

MethodType
createPrivateDecryptionKey(schemeId: number, privateKeyOrSeed: Uint8Array<ArrayBufferLike>) => AbstractPrivateDecryptionKey

createSymmetricEncryptionKey

MethodType
createSymmetricEncryptionKey(symmetricEncryptionSchemeId: number, rawKey: Uint8Array<ArrayBufferLike>) => SymmetricEncryptionKey

createSymmetricEncryptionKeyScheme

MethodType
createSymmetricEncryptionKeyScheme(symmetricEncryptionSchemeId: number) => SymmetricEncryptionKeyScheme

createCryptographicHash

MethodType
createCryptographicHash(schemeId: CryptographicHashAlgorithmId) => CryptographicHash

createDefaultCryptographicHash

MethodType
createDefaultCryptographicHash() => CryptographicHash

createDefaultPBKDF

MethodType
createDefaultPBKDF() => PasswordBasedKeyDerivationFunction

createDefaultKDF

MethodType
createDefaultKDF() => HKDF

Methods

createVirtualBlockchainPrivateSignatureScheme

MethodType
createVirtualBlockchainPrivateSignatureScheme(schemeId: SignatureAlgorithmId, walletSeed: Uint8Array<ArrayBufferLike>, vbSeed: Uint8Array<ArrayBufferLike>) => PrivateSignatureKey

createDecapsulationKey

MethodType
createDecapsulationKey(schemeId: number, walletSeed: Uint8Array<ArrayBufferLike>) => DecapsulationKey

createVirtualBlockchainDecapsulationKey

MethodType
createVirtualBlockchainDecapsulationKey(schemeId: number, walletSeed: Uint8Array<ArrayBufferLike>, vbSeed: Uint8Array<ArrayBufferLike>) => DecapsulationKey

createPublicSignatureKey

MethodType
createPublicSignatureKey(schemeId: number, publicKey: Uint8Array<ArrayBufferLike>) => PublicSignatureKey

createSymmetricEncryptionKey

Creates a symmetric encryption key based on the provided encryption scheme ID and raw key data.

MethodType
createSymmetricEncryptionKey(symmetricEncryptionSchemeId: number, rawKey: Uint8Array<ArrayBufferLike>) => SymmetricEncryptionKey

Parameters:

  • symmetricEncryptionSchemeId: - The ID of the symmetric encryption scheme to use.
  • rawKey: - The raw key data used to create the symmetric encryption key.

🏭 HCVDecoded

HCVDecoded class represents the result of decoding an HCV string. It provides methods to access the keys and value, and to check if a given key sequence matches.

Constructors

public: Creates a new HCVDecoded instance.

Parameters:

  • keys: - The list of keys from the decoded string
  • value: - The value from the decoded string

Methods

matchesKeys

Checks if the given keys match the keys in this decoded object.

MethodType
matchesKeys(...keys: string[]) => boolean

Parameters:

  • keys: - The keys to check against

Returns:

True if the keys match, false otherwise

getKeys

Gets the list of keys from the decoded string.

MethodType
getKeys() => string[]

Returns:

The list of keys

getValue

Gets the value from the decoded string.

MethodType
getValue() => string

Returns:

The value

🏭 HCVCodec

HCVCodec (Hierarchical Context Value Codec) provides methods to encode and decode strings in the format key1:key2:...

.

Static Methods

encode

Encodes a list of keys and a value into a string in the format key1:key2:...

. The last parameter is treated as the value, and all preceding parameters are treated as keys.

MethodType
encode(...args: string[]) => string

Parameters:

  • args: - The keys followed by the value (at least one key and one value)

Returns:

The encoded string

decode

Decodes a string in the format key1:key2:...

into an HCVDecoded object.

MethodType
decode(encoded: string) => HCVDecoded

Parameters:

  • encoded: - The encoded string to decode

Returns:

An HCVDecoded object containing the keys and value

🏭 HCVSignatureEncoder

Static Methods

createHexHCVSignatureEncoder

MethodType
createHexHCVSignatureEncoder() => HCVSignatureEncoder

createBase64HCVSignatureEncoder

MethodType
createBase64HCVSignatureEncoder() => HCVSignatureEncoder

Methods

decodeMessage

Decodes the provided message into a Uint8Array.

MethodType
decodeMessage(message: string) => Uint8Array<ArrayBufferLike>

decodePrivateKey

Decodes the provided private key and returns a private signature key object.

MethodType
decodePrivateKey(privateKey: string) => PrivateSignatureKey

decodePublicKey

Decodes a given public key object into a public signature key.

MethodType
decodePublicKey(publicKey: string) => PublicSignatureKey

decodeSignature

Decodes the provided signature into a Uint8Array.

MethodType
decodeSignature(signature: string) => Uint8Array<ArrayBufferLike>

encodeMessage

Encodes a given message into a specific format.

MethodType
encodeMessage(message: Uint8Array<ArrayBufferLike>) => string

encodePrivateKey

Encodes the given private key into a specific format.

MethodType
encodePrivateKey(privateKey: PrivateSignatureKey) => string

encodePublicKey

Encodes the given public signature key into a specific format.

MethodType
encodePublicKey(publicKey: PublicSignatureKey) => string

encodeSignature

Encodes a given digital signature into a specific format.

MethodType
encodeSignature(signature: Uint8Array<ArrayBufferLike>) => string

🏭 BytesSignatureEncoder

Class responsible for encoding and decoding digital signature-related data. Provides methods to convert signatures, public keys, and private keys between raw formats and serialized representations.

Methods

encodeSignature

Encodes a given digital signature into a specific format.

MethodType
encodeSignature(signature: Uint8Array<ArrayBufferLike>) => Uint8Array<ArrayBufferLike>

decodeSignature

Decodes the provided signature into a Uint8Array.

MethodType
decodeSignature(signature: Uint8Array<ArrayBufferLike>) => Uint8Array<ArrayBufferLike>

encodeMessage

Encodes a given message into a specific format.

MethodType
encodeMessage(message: Uint8Array<ArrayBufferLike>) => Uint8Array<ArrayBufferLike>

decodeMessage

Decodes the provided message into a Uint8Array.

MethodType
decodeMessage(message: Uint8Array<ArrayBufferLike>) => Uint8Array<ArrayBufferLike>

encodePublicKey

Encodes the given public signature key into a specific format.

MethodType
encodePublicKey(publicKey: PublicSignatureKey) => Uint8Array<ArrayBufferLike>

decodePublicKey

Decodes a given public key object into a public signature key.

MethodType
decodePublicKey(publicKey: Uint8Array<ArrayBufferLike>) => PublicSignatureKey

encodePrivateKey

Encodes the given private key into a specific format.

MethodType
encodePrivateKey(privateKey: PrivateSignatureKey) => Uint8Array<ArrayBufferLike>

decodePrivateKey

Decodes the provided private key and returns a private signature key object.

MethodType
decodePrivateKey(privateKey: Uint8Array<ArrayBufferLike>) => PrivateSignatureKey

🏭 StringSignatureEncoder

The StringSignatureEncoder class provides encoding and decoding methods for public keys, private keys, and digital signatures. It acts as an intermediate layer, converting between string representations and their binary counterparts using a combination of a bytes encoder and another signature encoder.

Constructors

public: Constructs an instance of the class with the provided encoders.

Parameters:

  • bytesEncoder: - The encoder used to encode or decode bytes.
  • signatureEncoder: - The encoder used to handle signature encoding. Defaults to a new instance of BytesSignatureEncoder.

Static Methods

defaultStringSignatureEncoder

Provides the default encoder for string signatures by utilizing the default bytes-to-string encoder from the EncoderFactory.

MethodType
defaultStringSignatureEncoder() => SignatureEncoderInterface<string>

defaultBytesSignatureEncoder

MethodType
defaultBytesSignatureEncoder() => BytesSignatureEncoder

Methods

encodePublicKey

Encodes a given public signature key into its string representation.

MethodType
encodePublicKey(publicKey: PublicSignatureKey) => string

Parameters:

  • publicKey: - The public signature key to be encoded.

decodePublicKey

Decodes the provided public key string into a PublicSignatureKey object.

MethodType
decodePublicKey(publicKey: string) => PublicSignatureKey

Parameters:

  • publicKey: - The public key string to be decoded.

decodePrivateKey

Decodes a given private key from its string representation to a PrivateSignatureKey object.

MethodType
decodePrivateKey(privateKey: string) => PrivateSignatureKey

Parameters:

  • privateKey: - The private key in its encoded string format to be decoded.

decodeSignature

Decodes a given signature string into a Uint8Array.

MethodType
decodeSignature(signature: string) => Uint8Array<ArrayBufferLike>

Parameters:

  • signature: - The signature string to decode.

encodePrivateKey

Encodes a given private key into a string format.

MethodType
encodePrivateKey(privateKey: PrivateSignatureKey) => string

Parameters:

  • privateKey: - The private key to be encoded.

encodeSignature

Encodes a given signature into a string format.

MethodType
encodeSignature(signature: Uint8Array<ArrayBufferLike>) => string

Parameters:

  • signature: - The signature to be encoded, represented as a Uint8Array.

decodeMessage

Decodes the given encoded message string into a Uint8Array.

MethodType
decodeMessage(message: string) => Uint8Array<ArrayBufferLike>

Parameters:

  • message: - The encoded message as a string.

encodeMessage

Encodes a given Uint8Array message into a string format.

MethodType
encodeMessage(message: Uint8Array<ArrayBufferLike>) => string

Parameters:

  • message: - The message to be encoded as a Uint8Array.

🏭 Hash

Represents a hash object that allows encoding and creation from a string or Uint8Array.

Constructors

public: Constructs a new instance of the class with the provided hash value.

Parameters:

  • hash: - The hash value to be used for this instance.

Static Methods

from

Creates a new instance of Hash from a string or Uint8Array.

const hash = Hash.from('0x1234567890abcdef');
const hash = Hash.from(new Uint8Array([0x12, 0x34, 0x56, 0x78, 0x90, 0xab, 0xcd, 0xef]));
MethodType
from(hash: string or Uint8Array<ArrayBufferLike>) => Hash

Parameters:

  • hash: - The hash input, which can either be a string or a Uint8Array.

Methods

encode

Encodes the current hash using the provided encoder.

const hash = Hash.from('0x1234567890abcdef');
const hexEncoder = EncoderFactory.bytesToHexEncoder();
const hexString = hash.encode(hexEncoder); // '0x1234567890abcdef'
const hexString = hash.encode(); // '0x1234567890abcdef'
MethodType
encode(encoder?: EncoderInterface<Uint8Array<ArrayBufferLike>, string>) => string

Parameters:

  • encoder: - The encoder used to encode the hash. Defaults to a BytesToHexEncoder.

toBytes

Converts and retrieves the hash value as a Uint8Array.

const hash = Hash.from('0x1234567890abcdef');
const bytes = hash.toBytes(); // Uint8Array([0x12, 0x34, 0x56, 0x78, 0x90, 0xab, 0xcd, 0xef])
MethodType
toBytes() => Uint8Array<ArrayBufferLike>

equals

Checks equality of this hash with respect to another hash provided in parameter.

MethodType
equals(other: Hash) => boolean

🏭 IllegalUsageError

🏭 IllegalParameterError

🏭 IllegalStateError

🏭 CarmentisError

Static Methods

isCarmentisError

MethodType
isCarmentisError(error: any) => error is CarmentisError

Methods

getErrorCode

MethodType
getErrorCode() => CarmentisErrorCode

🏭 EmptyBlockError

🏭 InternalError

🏭 TypeCheckingFailureError

🏭 NodeError

🏭 NodeConnectionRefusedError

🏭 NodeEndpointClosedWhileCatchingUpError

🏭 EconomicsError

🏭 InvalidTokenUnitError

🏭 BlockchainError

🏭 NotImplementedError

🏭 MicroBlockNotFoundInVirtualBlockchainAtHeightError

🏭 MicroBlockNotFoundError

🏭 MicroBlockNotFoundInBlockError

🏭 ActorAlreadyDefinedError

🏭 ChannelAlreadyDefinedError

🏭 ActorNotDefinedError

🏭 ChannelNotDefinedError

🏭 ProofVerificationFailedError

🏭 SectionError

🏭 SectionNotFoundError

🏭 AccountNotFoundForPublicKeyError

🏭 AccountNotFoundForAccountHashError

🏭 OrganizationNotFoundError

🏭 ApplicationNotFoundError

🏭 ApplicationLedgerNotFoundError

🏭 ValidatorNodeNotFoundError

🏭 AccountNotFoundForPublicKeyHashError

🏭 VirtualBlockchainNotFoundError

🏭 TypeManager

Static Methods

getType

MethodType
getType(value: any) => 0 or 1 or 2 or 3 or 4 or 5 or 6 or 12

isJsonType

MethodType
isJsonType(type: any) => number

🏭 TypeChecker

Methods

check

Tests whether this.value conforms to this.definition.

MethodType
check() => void

isString

MethodType
isString() => void

isNumber

MethodType
isNumber() => void

isBoolean

MethodType
isBoolean() => void

isInteger

MethodType
isInteger() => void

isUnsignedInteger

MethodType
isUnsignedInteger(nBits: any) => void

isBinary

MethodType
isBinary(size: any) => void

isHashString

MethodType
isHashString() => void

checkSize

MethodType
checkSize(actualSize: any, expectedSize: any) => void

Properties

basicType

PropertyType
basicTypeany

definition

PropertyType
definitionany

value

PropertyType
valueany

🏭 WriteStream

Methods

clear

MethodType
clear() => void

getByteStream

MethodType
getByteStream() => Uint8Array<any>

writeJsonValue

MethodType
writeJsonValue(type: any, value: any) => void

writeSchemaValue

MethodType
writeSchemaValue(type: number, value: any, size: number or undefined) => void

writeByte

MethodType
writeByte(n: number) => void

writeUnsigned

MethodType
writeUnsigned(n: number, nByte: number) => void

writeUint8

MethodType
writeUint8(n: number) => void

writeUint16

MethodType
writeUint16(n: number) => void

writeUint24

MethodType
writeUint24(n: number) => void

writeUint32

MethodType
writeUint32(n: number) => void

writeUint48

MethodType
writeUint48(n: number) => void

writeBinary

MethodType
writeBinary(arr: any, size?: number) => void

writeHashString

MethodType
writeHashString(str: string) => void

writeByteArray

MethodType
writeByteArray(arr: any) => void

writeString

MethodType
writeString(str: string, size?: number) => void

writeVarUint

MethodType
writeVarUint(n: number) => void

writeBoolean

MethodType
writeBoolean(n: boolean) => void

writeNumber

MethodType
writeNumber(n: number) => void

Properties

byteStream

PropertyType
byteStreamany

🏭 ReadStream

Methods

readJsonValue

MethodType
readJsonValue(type: any) => string or number or boolean or null

readSchemaValue

MethodType
readSchemaValue(type: any, size: any) => any

getPointer

MethodType
getPointer() => any

extractFrom

MethodType
extractFrom(ptr: any) => any

getLastField

MethodType
getLastField() => any

readByte

MethodType
readByte() => any

readUnsigned

MethodType
readUnsigned(nByte: any) => number

readUint8

MethodType
readUint8() => number

readUint16

MethodType
readUint16() => number

readUint24

MethodType
readUint24() => number

readUint32

MethodType
readUint32() => number

readUint48

MethodType
readUint48() => number

readBinary

MethodType
readBinary(size?: number) => any

readHashString

MethodType
readHashString() => string

readByteArray

MethodType
readByteArray(size: number) => any

readString

MethodType
readString(size?: number) => string

readVarUint

MethodType
readVarUint() => number

readBoolean

MethodType
readBoolean() => boolean

readNumber

MethodType
readNumber() => number

Properties

byteStream

PropertyType
byteStreamany

lastPointer

PropertyType
lastPointerany

pointer

PropertyType
pointerany

🏭 SchemaSerializer

Constructors

public: Constructor

Parameters:

  • schema

Methods

serialize

Serializes the given object.

MethodType
serialize(object: T) => Uint8Array<ArrayBufferLike>

serializeItem

Serializes an item.

MethodType
serializeItem(schemaItem: SchemaItem, value: any, fieldPath: any) => void

Properties

schema

PropertyType
schemaSchema

stream

PropertyType
streamany

🏭 SchemaUnserializer

Constructors

public: Constructor

Parameters:

  • schema: - Top-level schema

Methods

unserialize

Unserializes the given byte stream.

MethodType
unserialize(stream: Uint8Array<ArrayBufferLike>) => T

unserializeItem

Unserializes an item.

MethodType
unserializeItem(schemaItem: SchemaItem) => any

Properties

schema

PropertyType
schemaany

stream

PropertyType
streamany

🏭 Microblock

Methods

create

Creates a microblock at a given height. If the height is greater than 1, a 'previousHash' is expected.

MethodType
create(height: number, previousHash: Uint8Array<ArrayBufferLike> or null, expirationDay: number) => void

updateTimestamp

Updates the timestamp.

MethodType
updateTimestamp() => void

load

Loads a microblock from its header data and body data.

MethodType
load(headerData: any, bodyData: any) => void

getHeight

Retrieves the height of the header.

MethodType
getHeight() => number

getPreviousHash

Retrieves the hash value of the previous block in the blockchain.

MethodType
getPreviousHash() => Hash

getTimestamp

MethodType
getTimestamp() => number

getGas

MethodType
getGas() => number

setGas

MethodType
setGas(gas: number) => void

setHeight

MethodType
setHeight(number: number) => void

setGasPrice

MethodType
setGasPrice(gasPrice: number) => void

getGasPrice

MethodType
getGasPrice() => number

getFeesPayerAccount

MethodType
getFeesPayerAccount() => Uint8Array<ArrayBufferLike> or null

setTimestamp

MethodType
setTimestamp(timestamp: number) => void

setFeesPayerAccount

MethodType
setFeesPayerAccount(account: Uint8Array<ArrayBufferLike>) => void

addSection

Adds a section of a given type and defined by a given object.

MethodType
addSection(type: SectionType, object: any) => Section<any>

storeSection

Stores a section, including its serialized data, hash and index.

MethodType
storeSection(type: SectionType, object: any, data: any) => Section<any>

getSection

Returns the first section for which the given callback function returns true.

MethodType
getSection<T = any>(callback: (section: Section<any>) => boolean) => Section<T>

getSectionByType

Retrieves a section by its type.

MethodType
getSectionByType(type: number) => Section<any>

Parameters:

  • type: - The type of the section to find.

getNumberOfSections

Retrieves the total number of sections.

MethodType
getNumberOfSections() => number

getSections

Returns all sections for which the given callback function returns true.

MethodType
getSections<T = any>(callback: (section: Section<any>) => boolean) => Section<T>[]

getAllSections

Retrieves all sections without applying any filter criteria.

MethodType
getAllSections<T = any>() => Section<T>[]

createSignature

Creates a digital signature using the provided private key and optionally includes gas-related data.

MethodType
createSignature(privateKey: PrivateSignatureKey, includeGas: boolean) => Uint8Array<ArrayBufferLike>

Parameters:

  • privateKey: - The private key used to sign the data.
  • includeGas: - A flag indicating whether gas-related data should be included in the signature.

verifySignature

Verifies the provided cryptographic signature using the specified algorithm.

MethodType
verifySignature(publicKey: any, signature: any, includeGas: boolean, sectionCount: number) => any

Parameters:

  • publicKey: - The public key used to verify the signature.
  • signature: - The signature to be verified.
  • includeGas: - Indicates whether to include gas-related data in the signed payload.
  • sectionCount: - The number of sections to include in the signed data.

getSignedData

Generates the data to be signed:

  • the header with or without the gas data, and without the body hash
  • the list of section hashes
MethodType
getSignedData(includeGas: boolean, sectionCount: number, extraBytes: number) => Uint8Array<ArrayBuffer>

setGasData

Sets the gas data to either 0 or to their actual values.

MethodType
setGasData(includeGas: boolean, extraBytes?: number) => void

serialize

Serializes the microblock and returns an object with the microblock hash, the header data, the body hash and the body data.

MethodType
serialize() => { microblockHash: Uint8Array<ArrayBufferLike>; headerData: Uint8Array<ArrayBufferLike>; bodyHash: Uint8Array<ArrayBufferLike>; bodyData: Uint8Array<...>; }

computeGas

MethodType
computeGas(extraBytes?: number) => number

computeRetentionPeriod

MethodType
computeRetentionPeriod(mbTimestamp: number, expirationDay: number) => void

Properties

gasPrice

PropertyType
gasPricenumber

hash

PropertyType
hashany

header

PropertyType
headerMicroblockHeader

sections

PropertyType
sectionsSection<any>[]

type

PropertyType
typenumber

feesPayerAccount

PropertyType
feesPayerAccountUint8Array<ArrayBufferLike> or null

🏭 VirtualBlockchainStateWrapper

Methods

getHeight

MethodType
getHeight() => number

getVbId

MethodType
getVbId() => Hash

getLastMicroblockHash

MethodType
getLastMicroblockHash() => Hash

getType

MethodType
getType() => VirtualBlockchainType

isAccountVirtualBlockchain

MethodType
isAccountVirtualBlockchain() => boolean

isOrganizationVirtualBlockchain

MethodType
isOrganizationVirtualBlockchain() => boolean

isApplicationVirtualBlockchain

MethodType
isApplicationVirtualBlockchain() => boolean

isApplicationLedgerVirtualBlockchain

MethodType
isApplicationLedgerVirtualBlockchain() => boolean

isNodeVirtualBlockchain

MethodType
isNodeVirtualBlockchain() => boolean

🏭 CMTSToken

A class representing a specific amount of a token in a defined unit.

Static Methods

create

Creates an instance of TokenAmount with the given amount and unit. Throws an error if the provided unit is not of type TokenUnit.TOKEN.

MethodType
create(amount: number, unit?: TokenUnit) => CMTSToken

Parameters:

  • amount: - The numeric amount to be used for the TokenAmount instance.
  • unit: - The unit type for the token, defaults to TokenUnit.TOKEN.

createCMTS

MethodType
createCMTS(amount: number) => CMTSToken

createDeciToken

MethodType
createDeciToken(amount: number) => CMTSToken

createMicroToken

MethodType
createMicroToken(amount: number) => CMTSToken

createMillionToken

MethodType
createMillionToken(amount: number) => CMTSToken

createAtomic

MethodType
createAtomic(amount: number) => CMTSToken

zero

Creates an instance of CMTSToken having zero-value.

Example:

const zero = CMTSToken.zero();
MethodType
zero() => CMTSToken

oneCMTS

MethodType
oneCMTS() => CMTSToken

parse

Parses a string representing a token amount and returns a TokenAmount instance.

MethodType
parse(value: string) => CMTSToken

Parameters:

  • value: - The input string containing a numeric amount followed by a unit (e.g., "10.50 TOKEN").

Methods

getAmount

MethodType
getAmount(unit?: TokenUnit) => number

getAmountAsAtomic

Retrieves the amount as an atomic unit. Converts and returns the amount in the smallest unit of the token.

MethodType
getAmountAsAtomic() => number

getAmountAsCMTS

Retrieves the amount formatted as CMTS (specific token unit). Utilizes the value formatted in the designated token

MethodType
getAmountAsCMTS() => number

isPositive

Determines if the amount is positive or zero.

MethodType
isPositive() => boolean

isPositiveStrict

MethodType
isPositiveStrict() => boolean

isNegative

MethodType
isNegative() => boolean

isZero

MethodType
isZero() => boolean

equals

Compares the current TokenAmount instance with another TokenAmount instance for equality.

MethodType
equals(other: CMTSToken) => boolean

Parameters:

  • other: - The TokenAmount instance to compare with the current instance.

isGreaterThan

Compares the current TokenAmount with another TokenAmount to determine if it is greater.

MethodType
isGreaterThan(other: CMTSToken) => boolean

Parameters:

  • other: The TokenAmount to compare with.

isLessThan

Compares the current TokenAmount instance with another TokenAmount instance to determine if it is less than the specified instance.

MethodType
isLessThan(other: CMTSToken) => boolean

Parameters:

  • other: - The TokenAmount instance to compare against.

toString

Converts the object to a string representation combining the amount and its unit label. The returned string typically includes the numerical value and its corresponding unit.

MethodType
toString(unit?: TokenUnit) => string

🏭 AccountState

Static Methods

createFromDTO

MethodType
createFromDTO(dto: AccountStateDTO) => AccountState

Methods

isEmpty

MethodType
isEmpty() => boolean

getHeight

MethodType
getHeight() => number

getBalance

MethodType
getBalance() => CMTSToken

getLastHistoryHash

MethodType
getLastHistoryHash() => Hash

getLastPublicKeyDeclarationHeight

MethodType
getLastPublicKeyDeclarationHeight() => number

🏭 Transaction

Methods

getHeight

MethodType
getHeight() => number

getPreviousHistoryHash

MethodType
getPreviousHistoryHash() => Hash

getTimestamp

MethodType
getTimestamp() => number

transferredAt

MethodType
transferredAt() => Date

getLinkedAccount

Retrieves the linked account associated with the transaction.

MethodType
getLinkedAccount() => Hash

getAmount

MethodType
getAmount() => CMTSToken

getChainReference

MethodType
getChainReference() => Hash

isPositive

Determines if the transaction is for a positive (or zero) amount.

MethodType
isPositive() => boolean

isNegative

Determines if the transaction is for a negative amount.

MethodType
isNegative() => boolean

isEarnedFees

Determines whether the transaction is categorized as earned fees.

MethodType
isEarnedFees() => boolean

isEarnedBlockFees

MethodType
isEarnedBlockFees() => boolean

isEarnedTxFees

MethodType
isEarnedTxFees() => boolean

isPaidBlockFees

MethodType
isPaidBlockFees() => boolean

isPaidTxFees

MethodType
isPaidTxFees() => boolean

isReceivedIssuance

Determines whether the transaction is categorized as issuance receiving.

Note: This method is only applicable to the genesis account receiving the initial issuance.

MethodType
isReceivedIssuance() => boolean

isSentIssuance

MethodType
isSentIssuance() => boolean

isSale

Determines whether the transaction is categorized as a sale.

Note: A transaction categorized as a sale is only applicable to the genesis account sending tokens to an account.

MethodType
isSale() => boolean

isSentPayment

Determines whether the transaction is categorized as a sent payment.

Payments occur between two accounts (distinct from the genesis account).

MethodType
isSentPayment() => boolean

isPaidFees

MethodType
isPaidFees() => boolean

isPurchase

Determines whether the transaction is categorized as a purchase.

Note: A transaction categorized as a purchase is only applicable to an account receiving tokens from the genesis account.

MethodType
isPurchase() => boolean

isReceivedPayment

Determines whether the transaction is categorized as a received payment.

Payments occur between two accounts (distinct from the genesis account).

MethodType
isReceivedPayment() => boolean

🏭 AccountHistoryView

Methods

setTransactionAtHeight

MethodType
setTransactionAtHeight(height: number, transaction: AccountTransactionInterface) => void

containsTransactions

Determines whether there are any transactions available.

MethodType
containsTransactions() => boolean

getTransactionHeights

Retrieves the heights of all transactions currently stored.

MethodType
getTransactionHeights() => number[]

getAllTransactions

Retrieves all the transactions stored in the view.

MethodType
getAllTransactions() => Transaction[]

getNumberOfTransactions

Retrieves the total number of transactions.

MethodType
getNumberOfTransactions() => number

containsTransactionAtHeight

Checks if there is a transaction at the specified block height.

MethodType
containsTransactionAtHeight(height: number) => boolean

Parameters:

  • height: - The block height to check for a transaction.

getTransactionAtHeight

MethodType
getTransactionAtHeight(height: number) => Transaction

🏭 MicroBlockHeaderWrapper

Methods

getMagicString

MethodType
getMagicString() => string

getProtocolVersion

MethodType
getProtocolVersion() => number

getHeight

MethodType
getHeight() => number

getPreviousHash

MethodType
getPreviousHash() => Hash

getGas

MethodType
getGas() => CMTSToken

getGasPrice

MethodType
getGasPrice() => CMTSToken

getBodyHash

MethodType
getBodyHash() => Hash

🏭 MicroBlockInformation

Methods

getMicroBlockHeader

MethodType
getMicroBlockHeader() => MicroBlockHeaderWrapper

getVirtualBlockchainState

MethodType
getVirtualBlockchainState() => VirtualBlockchainStateWrapper

🏭 StructureChecker

Methods

isFirstBlock

MethodType
isFirstBlock() => boolean

expects

MethodType
expects(constraint: any, type: any) => void

group

MethodType
group(groupConstraint: any, list: any) => void

endsHere

MethodType
endsHere() => void

currentSection

MethodType
currentSection() => any

endOfList

MethodType
endOfList() => boolean

checkConstraint

MethodType
checkConstraint(constraint: any, count: any) => boolean or undefined

getTypeLabel

MethodType
getTypeLabel(type: any) => string

Properties

microblock

PropertyType
microblockany

pointer

PropertyType
pointerany

🏭 OrganizationVb

Methods

getDescriptionHeight

MethodType
getDescriptionHeight() => number

checkStructure

Structure check

MethodType
checkStructure(microblock: any) => void

🏭 Organization

Methods

setGasPrice

MethodType
setGasPrice(gasPrice: CMTSToken) => void

getName

MethodType
getName() => string

Properties

provider

PropertyType
providerany

signatureAlgorithmId

PropertyType
signatureAlgorithmIdSignatureAlgorithmId or undefined

vb

PropertyType
vbOrganizationVb

gasPrice

PropertyType
gasPriceCMTSToken

🏭 ApplicationVb

Methods

getDescriptionHeight

MethodType
getDescriptionHeight() => number

getInitialState

MethodType
getInitialState() => ApplicationVBState

checkStructure

Structure check

MethodType
checkStructure(microblock: any) => void

🏭 Application

Methods

setGasPrice

MethodType
setGasPrice(gasPrice: CMTSToken) => void

Properties

provider

PropertyType
providerany

signatureAlgorithmId

PropertyType
signatureAlgorithmIdany

vb

PropertyType
vbApplicationVb

gasPrice

PropertyType
gasPriceCMTSToken

🏭 MerkleTree

Methods

addLeaf

MethodType
addLeaf(hash: any) => void

setLeaf

MethodType
setLeaf(index: any, hash: any) => void

checkHash

MethodType
checkHash(hash: any) => void

finalize

MethodType
finalize(nLeaves: any) => void

getNumberOfLeaves

MethodType
getNumberOfLeaves() => any

getRootHash

MethodType
getRootHash() => any

getWitnesses

MethodType
getWitnesses(unknownPositions: any) => never[]

setWitnesses

MethodType
setWitnesses(witnesses: any) => void

buildTreeStructure

MethodType
buildTreeStructure() => void

getWitnessPositions

MethodType
getWitnessPositions(unknownPositionSet: any) => never[]

mergeHashes

MethodType
mergeHashes(depth: any, left: any, right: any) => Uint8Array<ArrayBufferLike>

Properties

leaves

PropertyType
leavesany

nLeaves

PropertyType
nLeavesany

tree

PropertyType
treeany

🏭 PepperMerklizer

Static Methods

generatePepper

MethodType
generatePepper() => Uint8Array<ArrayBufferLike>

Methods

addLeaf

MethodType
addLeaf(item: any, data: any) => void

generateTree

MethodType
generateTree() => { nLeaves: any; rootHash: string; pepper: string; }

addRawItem

MethodType
addRawItem(item: any, info: any) => void

addHashableItem

MethodType
addHashableItem(item: any, info: any) => void

addMaskableItem

MethodType
addMaskableItem(item: any, info: any) => void

getSalt

MethodType
getSalt() => any

Properties

leaves

PropertyType
leavesany

pepper

PropertyType
pepperany

saltCounter

PropertyType
saltCounterany

sha512

PropertyType
sha512any

🏭 SaltMerklizer

Methods

addLeaf

MethodType
addLeaf(item: any, data: any) => void

generateTree

MethodType
generateTree() => { nLeaves: any; rootHash: string; }

addRawItem

MethodType
addRawItem(item: any, info: any) => void

addHashableItem

MethodType
addHashableItem(item: any, info: any) => void

addMaskableItem

MethodType
addMaskableItem(item: any, info: any) => void

Properties

nLeaves

PropertyType
nLeavesany

witnesses

PropertyType
witnessesany

🏭 IntermediateRepresentation

Methods

addPublicChannel

MethodType
addPublicChannel(id: any) => void

addPrivateChannel

MethodType
addPrivateChannel(id: any) => void

buildFromJson

Initializes the IR object from a JSON-compatible object.

MethodType
buildFromJson(input: any) => void

exportToSectionFormat

Exports the IR object to the serialized section format used for on-chain storage.

MethodType
exportToSectionFormat() => never[]

exportChannelToSectionFormat

Exports a given channel to the serialized section format used for on-chain storage.

MethodType
exportChannelToSectionFormat(channelInfo: any) => Uint8Array<any>

importFromSectionFormat

Imports the IR object from the serialized section format.

MethodType
importFromSectionFormat(list: any) => void

importChannelFromSectionFormat

Imports a given channel from the serialized section format.

MethodType
importChannelFromSectionFormat(channelInfo: any, data: any) => void

exportToProof

Exports the IR object to a proof, as a JSON-compatible object.

MethodType
exportToProof() => any

importFromProof

Imports the IR object from a proof.

MethodType
importFromProof(proof: any) => never[]

Parameters:

  • proof: - The proof object generated by the exportToProof() method.

createBranch

Internal method to create a branch in the object tree, including a primitive type and all its parents. Only a minimal set of properties is included for each node: 'type', 'name'/'index', 'properties'/'entries'.

MethodType
createBranch(itemList: any) => { type: any; } or undefined

Parameters:

  • itemList: - An array containing the primitive item, preceded by all its parents.

getMerkleRootHash

MethodType
getMerkleRootHash(channelId: any) => any

getMerklizer

Internal method to create a merklizer for a given channel, using either the channel pepper or the salts.

MethodType
getMerklizer(channelId: any) => any

Parameters:

  • channel: - The identifier of the channel.

getIRObject

Returns the IR object.

MethodType
getIRObject() => any

dumpIRObject

Returns a formatted dump of the IR object, with uint8 arrays turned into truncated hexadecimal strings for readability.

MethodType
dumpIRObject() => string

setChannel

Associates a set of fields to a channel.

MethodType
setChannel(pathStringList: any, channelId: any) => void

Parameters:

  • pathStringList: - A string describing the set of fields.
  • channel: - The channel identifier.

setAsMaskable

Sets the 'maskable' attribute for a set of fields and define their visible and hidden parts using explicit positions, lengths and replacement strings.

MethodType
setAsMaskable(pathStringList: any, maskedParts: any) => void

Parameters:

  • pathStringList: - A string describing the set of fields.
  • maskedParts: - An array describing the masked parts.

setAsMaskableByRegex

Sets the 'maskable' attribute for a set of fields and define their visible and hidden parts using a regular expression and a substitution string.

MethodType
setAsMaskableByRegex(pathStringList: any, regex: any, substitution: any) => void

Parameters:

  • pathStringList: - A string describing the set of fields.
  • regex: - A regular expression whose capturing groups must cover the entire field value, e.g. /^(.)(.?)(@.)(.?)(..*)$/.
  • substitution: - The substitution string, which should include references to capturing groups and placeholders for hidden parts, e.g. "$1***$3***$5".

setAsHashable

Sets the 'hashable' attribute for a set of fields.

MethodType
setAsHashable(pathStringList: any) => void

Parameters:

  • pathStringList: - A string describing the set of fields.

setAsRedacted

Marks a set of fields as 'redacted'.

MethodType
setAsRedacted(pathStringList: any) => void

Parameters:

  • pathStringList: - A string describing the set of fields.

setAsMasked

Marks a set of fields as 'masked'.

MethodType
setAsMasked(pathStringList: any) => void

Parameters:

  • pathStringList: - A string describing the set of fields.

setAsHashed

Marks a set of fields as 'hashed'.

MethodType
setAsHashed(pathStringList: any) => void

Parameters:

  • pathStringList: - A string describing the set of fields.

processPath

Internal method to apply a callback function to each field included in a set of fields.

MethodType
processPath(pathStringList: any, callback: any) => void

Parameters:

  • pathStringList: - A string describing the set of fields.
  • callback: - The callback function, which will receive the field item as argument.

populateChannels

Internal method to populate the channel identifiers from the primitive fields to their parents. Also loads the sorted list of all channels in the array this.usedChannels.

MethodType
populateChannels() => void

buildDictionary

Internal method to build a dictionary of field names for a given channel.

MethodType
buildDictionary(channelId: any) => unknown[]

Parameters:

  • channel: - The channel identifier.

serializeFields

Internal method to serialize the primitive fields.

MethodType
serializeFields() => void

unserializeFields

MethodType
unserializeFields() => void

traverseIrObject

Internal method to traverse the IR object and calling optional callbacks on each node.

MethodType
traverseIrObject(options: any) => void

Parameters:

  • options: - An object containing the traversal options.

exportToJson

Exports the IR object back to the core JSON-compatible object it describes.

MethodType
exportToJson() => any

Properties

importedFromProof

PropertyType
importedFromProofboolean

channelDefinitions

PropertyType
channelDefinitionsany

irObject

PropertyType
irObjectany

object

PropertyType
objectany

usedChannels

PropertyType
usedChannelsany

🏭 ApplicationLedgerVb

Methods

getIntermediateRepresentationInstance

Helper methods

MethodType
getIntermediateRepresentationInstance() => IntermediateRepresentation

getChannelId

MethodType
getChannelId(name: string) => number

getChannel

MethodType
getChannel(name: string) => ApplicationLedgeChannel

getActorId

MethodType
getActorId(name: string) => number

getActor

MethodType
getActor(name: string) => ApplicationLedgerActor

checkStructure

Structure check

MethodType
checkStructure(microblock: any) => void

getApplicationId

Retrieves the application ID from the current state.

MethodType
getApplicationId() => Uint8Array<ArrayBufferLike>

getNumberOfChannels

Retrieves the total number of channels currently available.

MethodType
getNumberOfChannels() => number

getChannelById

Retrieves a channel object by its unique identifier.

MethodType
getChannelById(channelId: number) => ApplicationLedgeChannel

Parameters:

  • channelId: - The unique identifier of the channel

getNumberOfActors

Retrieves the total number of actors currently present in the state.

MethodType
getNumberOfActors() => number

🏭 SchemaValidator

Constructors

public: Constructor

Parameters:

  • schema: - Top-level schema

Methods

validate

Checks whether the given object matches the schema.

MethodType
validate(object: any) => void

Parameters:

  • object: - The object to be tested.

validateObject

Validates any sub-object of the full structure.

MethodType
validateObject(schemaDefinition: SchemaItem[], object: any, path?: string) => void

Parameters:

  • schemaDefinition: - The (sub)schema of the object.
  • object: - The object to be serialized.

validateItem

Validates an item.

MethodType
validateItem(schemaItem: SchemaItem, value: any, fieldPath: string) => void

Parameters:

  • schemaItem: - The definition of the item.
  • value: - The value of the item.

Properties

schema

PropertyType
schemaSchema

🏭 ApplicationLedger

Methods

getVirtualBlockchainId

MethodType
getVirtualBlockchainId() => Hash

getVirtualBlockchain

MethodType
getVirtualBlockchain() => ApplicationLedgerVb

actorIsSubscribed

MethodType
actorIsSubscribed(name: string) => boolean

setGasPrice

MethodType
setGasPrice(gasPrice: CMTSToken) => void

getMicroblockData

MethodType
getMicroblockData() => Uint8Array<ArrayBuffer>

getApplicationId

Retrieves the application ID.

MethodType
getApplicationId() => Hash

getHeight

MethodType
getHeight() => number

Properties

provider

PropertyType
providerany

signatureAlgorithmId

PropertyType
signatureAlgorithmIdany

vb

PropertyType
vbApplicationLedgerVb

gasPrice

PropertyType
gasPriceCMTSToken

🏭 ValidatorNodeVb

Methods

getDescriptionHeight

MethodType
getDescriptionHeight() => number

getRpcEndpointHeight

MethodType
getRpcEndpointHeight() => number

getNetworkIntegrationHeight

MethodType
getNetworkIntegrationHeight() => number

getInitialState

MethodType
getInitialState() => ValidatorNodeVBState

checkStructure

Structure check

MethodType
checkStructure(microblock: any) => void

🏭 ValidatorNode

Methods

setGasPrice

MethodType
setGasPrice(gasPrice: CMTSToken) => void

Properties

provider

PropertyType
providerany

signatureAlgorithmId

PropertyType
signatureAlgorithmIdany

vb

PropertyType
vbValidatorNodeVb

gasPrice

PropertyType
gasPriceCMTSToken

🏭 Optional

Static Methods

of

MethodType
of<T>(value: T or null) => Optional<T>

some

MethodType
some<T>(value: T) => Optional<T>

none

MethodType
none<T>() => Optional<T>

Methods

map

MethodType
map<U>(fn: (value: T) => U) => Optional<U>

unwrap

MethodType
unwrap() => T

unwrapOrThrow

MethodType
unwrapOrThrow(error: Error) => T and ({} or undefined)

unwrapOr

MethodType
unwrapOr(defaultValue: T) => T

isSome

MethodType
isSome() => boolean

isNone

MethodType
isNone() => boolean

🏭 MicroblockImporter

Methods

containsError

MethodType
containsError() => boolean

getError

MethodType
getError() => Error

getVirtualBlockchainObject

MethodType
getVirtualBlockchainObject<VB>() => VB

getMicroBlock

MethodType
getMicroBlock() => Microblock

Properties

bodyData

PropertyType
bodyDataany

_error

PropertyType
_errorOptional<Error>

hash

PropertyType
hashany

header

PropertyType
headerany

headerData

PropertyType
headerDataany

provider

PropertyType
providerProvider

vb

PropertyType
vbVirtualBlockchain<any>

object

PropertyType
objectany

🏭 ProofVerificationResult

Represents the result of a proof verification process, encapsulating the verified data and providing methods to check the validity of various elements of the proof.

Static Methods

createSuccessfulProofVerificationResult

MethodType
createSuccessfulProofVerificationResult(appLedger: ApplicationLedger, data: ImportedProof[]) => ProofVerificationResult

createFailedProofVerificationResult

MethodType
createFailedProofVerificationResult(appLedger: ApplicationLedger) => ProofVerificationResult

Methods

isVerified

Checks if the current state is verified.

MethodType
isVerified() => boolean

getInvolvedBlockHeights

Retrieves the heights of the involved blocks based on the imported proofs.

If there are imported proofs, the method returns an array of block heights extracted from the proofs. If there are no imported proofs, it returns an empty array.

MethodType
getInvolvedBlockHeights() => number[]

getApplicationLedgerId

Retrieves the ledger ID of the application as a hash.

MethodType
getApplicationLedgerId() => Hash

🏭 ChainInformationWrapper

Static Methods

createFromDTO

MethodType
createFromDTO(chainInformation: ChainInformationDTO) => ChainInformationWrapper

Methods

getHeight

MethodType
getHeight() => number

getLatestPublicationTime

MethodType
getLatestPublicationTime() => Date

🏭 VirtualBlockchainWrapper

Methods

getVirtualBlockchainState

MethodType
getVirtualBlockchainState() => VirtualBlockchainStateWrapper

getMicroBlockHashes

MethodType
getMicroBlockHashes() => Hash[]

🏭 MemoryProvider

Static Methods

getInstance

MethodType
getInstance() => MemoryProvider

Methods

clear

MethodType
clear() => void

Properties

microblockHeaderStore

PropertyType
microblockHeaderStoreany

microblockBodyStore

PropertyType
microblockBodyStoreany

microblockVbInformationStore

PropertyType
microblockVbInformationStoreany

virtualBlockchainStateStore

PropertyType
virtualBlockchainStateStoreany

🏭 MessageSerializer

Constructors

public: Constructor

Parameters:

  • collection: - Message collection

Methods

serialize

Serializes the given message.

MethodType
serialize(type: number, object: T) => Uint8Array<ArrayBuffer>

Parameters:

  • type: - Message type
  • object: - The message object to be serialized

Properties

collection

PropertyType
collectionany

🏭 MessageUnserializer

Constructors

public: Constructor

Parameters:

  • collection: - Message collection

Methods

unserialize

Unserializes the given message byte stream.

MethodType
unserialize(stream: Uint8Array<ArrayBufferLike>) => { type: number; object: T; }

Parameters:

  • stream: - The serialized byte stream

Properties

collection

PropertyType
collectionany

🏭 NetworkProvider

Properties

nodeUrl

PropertyType
nodeUrlany

🏭 KeyedProvider

Methods

isKeyed

MethodType
isKeyed() => this is KeyedProvider

getPrivateSignatureKey

MethodType
getPrivateSignatureKey() => PrivateSignatureKey

getPublicSignatureKey

MethodType
getPublicSignatureKey() => PublicSignatureKey

🏭 Provider

Represents a provider class that interacts with both internal and external providers for managing blockchain states and microblocks.

Methods

isKeyed

MethodType
isKeyed() => this is KeyedProvider

Properties

externalProvider

PropertyType
externalProviderNetworkProvider

internalProvider

PropertyType
internalProviderMemoryProvider

🏭 VirtualBlockchain

Methods

setExpirationDay

MethodType
setExpirationDay(day: number) => void

getHeight

MethodType
getHeight() => number

getId

MethodType
getId() => Uint8Array<ArrayBufferLike>

isVirtualBlockchainIdDefined

MethodType
isVirtualBlockchainIdDefined() => boolean

registerSectionCallback

Registers a callback for a given section type.

MethodType
registerSectionCallback(sectionType: any, callback: any) => void

getIdentifier

MethodType
getIdentifier() => Hash

createSignature

Creates a cryptographic signature for a microblock.

MethodType
createSignature(privateKey: PrivateSignatureKey, withGas?: boolean) => { signature: Uint8Array<ArrayBufferLike>; }

Parameters:

  • privateKey: - The private key used to generate the signature.
  • withGas: - Specifies whether the signature should include gas information.

setGasPrice

Set the gas price for the current microblock.

MethodType
setGasPrice(gasPrice: CMTSToken) => void

getMicroblockData

Returns the raw data of the current microblock.

MethodType
getMicroblockData() => Uint8Array<ArrayBuffer>

Properties

currentMicroblock

PropertyType
currentMicroblockMicroblock or null

height

PropertyType
heightnumber

identifier

PropertyType
identifierany

microblockHashes

PropertyType
microblockHashesany

provider

PropertyType
providerProvider

sectionCallbacks

PropertyType
sectionCallbacksany

state

PropertyType
stateCustomState or undefined

type

PropertyType
typenumber

expirationDay

PropertyType
expirationDaynumber

🏭 AccountVb

Methods

checkStructure

Structure check

MethodType
checkStructure(microblock: any) => void

getInitialState

MethodType
getInitialState() => AccountVBState

🏭 Account

Represents an Account that interacts with a provider for managing cryptographic operations and interacting with a virtual blockchain (vb) context. Provides methods for creating, loading, transferring, and publishing updates.

Methods

setGasPrice

MethodType
setGasPrice(gasPrice: CMTSToken) => void

getVirtualBlockchainId

MethodType
getVirtualBlockchainId() => Hash

Properties

vb

PropertyType
vbAccountVb

provider

PropertyType
providerProvider

gasPrice

PropertyType
gasPriceCMTSToken

🏭 Explorer

Static Methods

createFromProvider

MethodType
createFromProvider(provider: Provider) => Explorer

Properties

provider

PropertyType
providerProvider

🏭 Blockchain

Static Methods

createFromProvider

MethodType
createFromProvider(provider: Provider) => Blockchain

Methods

getExplorer

MethodType
getExplorer() => Explorer

getMicroblockImporter

MethodType
getMicroblockImporter(data: any) => MicroblockImporter

isKeyed

MethodType
isKeyed() => boolean

Properties

provider

PropertyType
providerProvider

🏭 CometBFTPublicKey

Static Methods

createFromEd25519PublicKey

MethodType
createFromEd25519PublicKey(publicKey: string) => CometBFTPublicKey

Methods

getType

MethodType
getType() => string

getPublicKey

MethodType
getPublicKey() => string

🏭 HCVPkeEncoder

Static Methods

createHexHCVPkeEncoder

MethodType
createHexHCVPkeEncoder() => HCVPkeEncoder

createBase64HCVPkeEncoder

MethodType
createBase64HCVPkeEncoder() => HCVPkeEncoder

Methods

decodePrivateDecryptionKey

MethodType
decodePrivateDecryptionKey(privateKey: string) => AbstractPrivateDecryptionKey

decodePublicEncryptionKey

MethodType
decodePublicEncryptionKey(publicKey: string) => AbstractPublicEncryptionKey

encodePrivateDecryptionKey

MethodType
encodePrivateDecryptionKey(privateKey: AbstractPrivateDecryptionKey) => string

encodePublicEncryptionKey

MethodType
encodePublicEncryptionKey(key: AbstractPublicEncryptionKey) => string

🏭 GenericSymmetricKeyEncoder

A class responsible for encoding and decoding symmetric encryption keys. It provides functionalities to serialize and deserialize symmetric encryption keys to and from a Uint8Array.

Methods

encodeAsUint8Array

Encodes a given symmetric encryption key as a Uint8Array.

MethodType
encodeAsUint8Array(key: SymmetricEncryptionKey) => Uint8Array<ArrayBufferLike>

Parameters:

  • key: - The symmetric encryption key to encode. It must provide methods to retrieve the encryption scheme ID and the raw secret key as a hexadecimal string.

decodeFromUint8Array

Decodes a Uint8Array into a SymmetricEncryptionKey object.

MethodType
decodeFromUint8Array(key: Uint8Array<ArrayBufferLike>) => SymmetricEncryptionKey

Parameters:

  • key: - The Uint8Array containing the encoded symmetric encryption key.

🏭 SignatureCacheEntry

Methods

getKey

MethodType
getKey() => string

🏭 SignatureCacheDisabled

🏭 SignatureCacheMonothread

🏭 Euros

Static Methods

create

MethodType
create(amount: number) => Euros

Methods

getAmount

MethodType
getAmount() => number

toString

MethodType
toString() => string

🏭 CurrencyConverterFactory

A factory class for creating currency converter instances.

Static Methods

defaultEurosToCMTSTokenConverter

MethodType
defaultEurosToCMTSTokenConverter() => CurrencyConverter<Euros, CMTSToken>

🏭 EurosToCMTSConverter

A converter class that facilitates the conversion between Euros and CMTS Tokens. Implements the CurrencyConverter interface to provide methods for converting from Euros to CMTS Tokens and vice versa.

It uses a static conversion rate TOKENS_FOR_ONE_EUROS to determine the equivalent amount of CMTS Tokens for a given amount of Euros and inversely the equivalent amount of Euros for a given amount of CMTS Tokens.

Methods:

  • convert(from: Euros): CMTSToken: Accepts an amount in Euros and converts it to CMTS Tokens.
  • invert(to: CMTSToken): Euros: Converts an amount in CMTS Tokens back to Euros.

This class ensures the consistency of conversions through the use of a fixed conversion rate.

Methods

convert

Converts an amount from one currency to another.

MethodType
convert(from: Euros) => CMTSToken

invert

Inverts the given currency exchange rate by converting from the target currency back to the original currency.

MethodType
invert(to: CMTSToken) => Euros

🏭 ProofBuilder

Static Methods

createProofBuilder

MethodType
createProofBuilder(virtualBlockchainId: Hash, appLedger: ApplicationLedger) => ProofBuilder

Methods

exportProofForEntireVirtualBlockchain

MethodType
exportProofForEntireVirtualBlockchain(proofAuthor: string) => Promise<Proof>

🏭 ValidatorNodeWrapper

Methods

getOrganizationId

Retrieves the id of the organization managing the validator node.

MethodType
getOrganizationId() => Hash

getVotingPower

Retrieves the voting power of the validator node

MethodType
getVotingPower() => number

getRpcEndpoint

Retrieves the RPC endpoint of the validator node

MethodType
getRpcEndpoint() => string

getCometPublicKeyType

Retrieves the Comet public key type of the validator node.

MethodType
getCometPublicKeyType() => string

getCometPublicKey

Retrieves the Comet public key of the validator node.

MethodType
getCometPublicKey() => string

getPublicKey

Retrieves the public key associated with the CometBFT instance.

MethodType
getPublicKey() => CometBFTPublicKey

🏭 BlockInformationWrapper

Methods

getBlockHeight

MethodType
getBlockHeight() => number

getBlockHash

MethodType
getBlockHash() => Hash

anchoredAt

MethodType
anchoredAt() => Date

getProposerNode

MethodType
getProposerNode() => Hash

🏭 BlockContentWrapper

Static Methods

createFromDTO

MethodType
createFromDTO(blockContentDTO: BlockContentDTO) => BlockContentWrapper

Methods

getContainedMicroBlockHashes

MethodType
getContainedMicroBlockHashes() => Hash[]

getContainedMicroBlockHeight

MethodType
getContainedMicroBlockHeight() => number[]

numberOfContainedMicroBlocks

MethodType
numberOfContainedMicroBlocks() => number

getMicroBlockAtHeight

MethodType
getMicroBlockAtHeight(height: number) => MicroBlockInBlockContentWrapper

getMicroBlocksByVirtualBlockchainId

MethodType
getMicroBlocksByVirtualBlockchainId(virtualBlockchainId: Hash) => MicroBlockInBlockContentWrapper[]

🏭 ABCINodeBlockchainReader

Static Methods

createFromNodeURL

Creates an instance of ABCINodeBlockchainReader from the provided node URL.

MethodType
createFromNodeURL(nodeUrl: string) => ABCINodeBlockchainReader

Parameters:

  • nodeUrl: - The URL of the node to connect to.

🏭 NullNetworkProvider

This is the dummy external provider for nodes.

🏭 ProviderFactory

Factory class for creating instances of the Provider class with various configurations.

Static Methods

createInMemoryProvider

Creates and returns an in-memory provider instance. This provider utilizes a memory storage backend without network provider.

MethodType
createInMemoryProvider() => Provider

createInMemoryProviderWithExternalProvider

Creates an in-memory provider that works in conjunction with an external network provider.

MethodType
createInMemoryProviderWithExternalProvider(nodeUrl: string) => Provider

createKeyedProviderExternalProvider

Creates a keyed provider using an external network provider. The provider contains a built-in in-memory provider to handle cache.

MethodType
createKeyedProviderExternalProvider(privateKey: PrivateSignatureKey, nodeUrl: string) => Provider

Parameters:

  • privateKey: - The private signature key used for signing or authentication.
  • nodeUrl: - The URL of the external network node provider.

🏭 ABCINodeBlockchainWriter

Static Methods

createWriter

MethodType
createWriter(reader: BlockchainReader, nodeUrl: string, privateKey: PrivateSignatureKey) => ABCINodeBlockchainWriter

🏭 PublicationExecutionContext

Methods

getGasPrice

MethodType
getGasPrice() => CMTSToken

getExpirationDay

MethodType
getExpirationDay() => number

withGasPrice

MethodType
withGasPrice(gasPrice: CMTSToken) => this

withExpirationOn

MethodType
withExpirationOn(year: number, month: number, day: number) => this

withExpirationIn

MethodType
withExpirationIn(days: number) => this

🏭 OrganizationPublicationExecutionContext

Represents the execution context specific to an organization's publication process. This class extends the base functionality provided by the PublicationExecutionContext to introduce organization-related context and processing behaviors.

The OrganizationPublicationExecutionContext class is designed to handle execution logic relating to publications scoped to an organization. It may include additional information, configurations, or methods tailored for handling publication requirements and behaviors within an organizational structure or context.

This class may interact with organizational data, apply rules, or influence the execution environment in a way that aligns with organizational publication processes.

Extends:

  • PublicationExecutionContext: This class extends the base functionality provided by the PublicationExecutionContext. It inherits all the core functionalities while allowing additional organization-specific modifications or extensions.

Methods

withExistingOrganizationId

Specifies that publication is being performed on an existing organization.

If the organization is not found, publication will fail.

MethodType
withExistingOrganizationId(organizationId: Hash) => OrganizationPublicationExecutionContext

withName

MethodType
withName(name: string) => OrganizationPublicationExecutionContext

withCity

MethodType
withCity(city: string) => OrganizationPublicationExecutionContext

withCountryCode

MethodType
withCountryCode(countryCode: string) => OrganizationPublicationExecutionContext

withWebsite

MethodType
withWebsite(website: string) => OrganizationPublicationExecutionContext

build

MethodType
build() => { existingOrganizationId: Optional<Hash>; name: string; city: string; countryCode: string; website: string; }

🏭 AccountPublicationExecutionContext

Represents the execution context tailored for account publication-related operations. Extends the functionality of PublicationExecutionContext.

This class is designed to provide specific mechanisms and configurations required during the account publication execution process.

It inherits common behaviors and properties from the PublicationExecutionContext class, while potentially adding additional context or logic specific to account publications.

Intended to encapsulate context details, including metadata and operational configurations, that are necessary for managing account-specific publication workflows.

Methods

getSellerAccount

MethodType
getSellerAccount() => Hash

getBuyerPublicKey

MethodType
getBuyerPublicKey() => PublicSignatureKey

getInitialBuyerAccountAmount

MethodType
getInitialBuyerAccountAmount() => CMTSToken

withSellerAccount

MethodType
withSellerAccount(sellerAccount: Hash) => AccountPublicationExecutionContext

withBuyerPublicKey

MethodType
withBuyerPublicKey(buyerPublicKey: PublicSignatureKey) => AccountPublicationExecutionContext

withInitialBuyerAccountAmount

MethodType
withInitialBuyerAccountAmount(initialBuyerAccountAmount: CMTSToken) => AccountPublicationExecutionContext

🏭 ValidatorNodePublicationExecutionContext

Methods

withCometPublicKeyType

MethodType
withCometPublicKeyType(cometPublicKeyType: string) => ValidatorNodePublicationExecutionContext

withCometPublicKey

MethodType
withCometPublicKey(cometPublicKey: string) => ValidatorNodePublicationExecutionContext

withOrganizationId

MethodType
withOrganizationId(organizationId: Hash) => this

withRpcEndpoint

MethodType
withRpcEndpoint(rpcEndpoint: string) => this

build

MethodType
build() => { organizationId: Optional<Hash>; validatorNodeId: Optional<Hash>; rpcEndpoint: string; cometPublicKeyType: string; cometPublicKey: string; }

🏭 ValidatorNodeNetworkIntegrationPublicationExecutionContext

Methods

withExistingValidatorNodeId

MethodType
withExistingValidatorNodeId(validatorNodeId: Hash) => ValidatorNodeNetworkIntegrationPublicationExecutionContext

withVotingPower

MethodType
withVotingPower(votingPower: number) => ValidatorNodeNetworkIntegrationPublicationExecutionContext

build

MethodType
build() => { validatorNodeId: Optional<Hash>; votingPower: number; }

🏭 ApplicationPublicationExecutionContext

Methods

withExistingApplicationId

MethodType
withExistingApplicationId(applicationId: Hash) => ApplicationPublicationExecutionContext

withOrganizationId

MethodType
withOrganizationId(organizationId: Hash) => ApplicationPublicationExecutionContext

withApplicationName

MethodType
withApplicationName(applicationName: string) => ApplicationPublicationExecutionContext

withWebsite

MethodType
withWebsite(website: string) => ApplicationPublicationExecutionContext

withApplicationDescription

MethodType
withApplicationDescription(applicationDescription: string) => ApplicationPublicationExecutionContext

build

MethodType
build() => { applicationId: Optional<Hash>; organizationId: Optional<Hash>; applicationName: string; applicationDescription: string; logoUrl: string; homepageUrl: string; }

🏭 ExpirationDate

Static Methods

endless

MethodType
endless() => ExpirationDate

of

MethodType
of(expirationDate: Date) => ExpirationDate

Methods

isEndless

MethodType
isEndless() => boolean

getExpirationDate

MethodType
getExpirationDate() => Date

🏭 RecordPublicationExecutionContext

Methods

withRecord

MethodType
withRecord(record: RecordDescription<T>) => RecordPublicationExecutionContext<T>

widthExpirationDate

Set the expiration date of the virtual blockchain.

Note: An expiration date can only be specified during the creation of the virtual blockchain.

MethodType
widthExpirationDate(expirationDate: ExpirationDate) => RecordPublicationExecutionContext<T>

getExpirationDate

MethodType
getExpirationDate() => ExpirationDate

build

MethodType
build() => RecordDescription<T>

🏭 AccountTransferPublicationExecutionContext

Methods

getBuyerAccount

MethodType
getBuyerAccount() => Hash

getAmount

MethodType
getAmount() => CMTSToken

getPublicReference

MethodType
getPublicReference() => string

getPrivateReference

MethodType
getPrivateReference() => string

withTransferToAccountHash

MethodType
withTransferToAccountHash(sellerPrivateKey: PrivateSignatureKey, buyerAccount: Hash) => AccountTransferPublicationExecutionContext

withTransferToPublicKey

MethodType
withTransferToPublicKey(sellerPrivateKey: PrivateSignatureKey, buyerPublicKey: PublicSignatureKey) => AccountTransferPublicationExecutionContext

withAmount

MethodType
withAmount(amount: CMTSToken) => AccountTransferPublicationExecutionContext

withPublicReference

MethodType
withPublicReference(publicReference: string) => AccountTransferPublicationExecutionContext

withPrivateReference

MethodType
withPrivateReference(privateReference: string) => AccountTransferPublicationExecutionContext

build

MethodType
build() => { buyerAccount: PublicSignatureKey or Hash; sellerPrivateKey: PrivateSignatureKey; amount: CMTSToken; publicReference: string; privateReference: string; }

🏭 OrganizationWrapper

Methods

getCity

MethodType
getCity() => string

getCountryCode

MethodType
getCountryCode() => string

getWebsite

MethodType
getWebsite() => string

getName

MethodType
getName() => string

getPublicKey

MethodType
getPublicKey() => PublicSignatureKey

🏭 ApplicationWrapper

Methods

getOrganizationId

Retrieves the id of the organization managing the application.

MethodType
getOrganizationId() => Hash

getWebsite

Retrieves the homepage URL of the application.

MethodType
getWebsite() => string

getName

Retrieves the name of the application.

MethodType
getName() => string

getDescription

Retrieves the description of the application.

MethodType
getDescription() => string

getLogoUrl

Retrieves the logo URL from the description property.

MethodType
getLogoUrl() => string

🏭 ApplicationLedgerWrapper

Methods

getId

MethodType
getId() => Hash

isActorSubscribed

MethodType
isActorSubscribed(actorName: string) => boolean

getApplicationId

MethodType
getApplicationId() => Hash

🏭 AccountWrapper

Methods

getId

MethodType
getId() => Hash

getPublicKey

MethodType
getPublicKey() => PublicSignatureKey

🏭 RPCNodeWebSocketClient

Static Methods

new

MethodType
new(webSocketURl: string) => RPCNodeWebSocketClient

Methods

addCallback

MethodType
addCallback(callback: RPCNodeWebSocketCallback) => void

🏭 NodeStatusWrapper

Static Methods

fromStatus

MethodType
fromStatus(status: { jsonrpc: "2.0"; id: number; result: { node_info: { id: string; protocol_version: { p2p: string; block: string; app: string; }; listen_addr: string; network: string; version: string; channels: string; moniker: string; other: { ...; }; }; sync_info: { ...; }; validator_info: { ...; }; }; }) => NodeStatusWra...

Methods

getChainId

MethodType
getChainId() => string

getNodeName

MethodType
getNodeName() => string

isCatchingUp

MethodType
isCatchingUp() => boolean

getPublicKey

MethodType
getPublicKey() => CometBFTPublicKey

getCometBFTVersion

MethodType
getCometBFTVersion() => string

isValidator

MethodType
isValidator() => boolean

getCometBFTNodePublicKey

MethodType
getCometBFTNodePublicKey() => string

getRpcAddress

MethodType
getRpcAddress() => string

getCometBFTNodePublicKeyType

MethodType
getCometBFTNodePublicKeyType() => string

🏭 MicroBlockWrapper

Static Methods

createFromMicroBlock

MethodType
createFromMicroBlock(info: MicroBlockInformation, mb: Microblock) => MicroBlockWrapper

Methods

getAllSections

MethodType
getAllSections() => Section<any>[]

getFeesPayerAccount

MethodType
getFeesPayerAccount() => Optional<Hash>

getPreviousHash

MethodType
getPreviousHash() => Hash

getNumberOfSections

MethodType
getNumberOfSections() => number

getGas

MethodType
getGas() => CMTSToken

getGasPrice

MethodType
getGasPrice() => CMTSToken

getTimestamp

MethodType
getTimestamp() => Date

getMicroBlockHash

MethodType
getMicroBlockHash() => Hash

getVirtualBlockchainId

MethodType
getVirtualBlockchainId() => Hash

getHeight

MethodType
getHeight() => number

🏭 BlockchainFacade

The BlockchainFacade class provides a high-level interface for interacting with a blockchain. It encapsulates several functionalities such as retrieving application and organization descriptions, managing accounts, and handling keys.

Implements the BlockchainFacadeInterface.

Static Methods

createFromNodeUrl

Creates an instance of BlockchainFacade using the provided node URL.

MethodType
createFromNodeUrl(nodeUrl: string) => BlockchainFacade

Parameters:

  • nodeUrl: - The URL of the blockchain node to connect to.

createWebSocketForNode

Creates and initializes a WebSocket client for a specified node URL.

MethodType
createWebSocketForNode(wsNodeUrl: string) => RPCNodeWebSocketClient

Parameters:

  • wsNodeUrl: - The WebSocket URL of the node to connect to.

createFromNodeUrlAndPrivateKey

Creates an instance of BlockchainFacade using the provided node URL and private signature key.

MethodType
createFromNodeUrlAndPrivateKey(nodeUrl: string, privateKey: PrivateSignatureKey) => BlockchainFacade

Parameters:

  • nodeUrl: - The URL of the blockchain node to connect to.
  • privateKey: - The private signature key for authentication and signing transactions.

Methods

getAccountBalance

MethodType
getAccountBalance(accountHash: Hash) => Promise<CMTSToken>

getAccountHistory

MethodType
getAccountHistory(accountHash: Hash) => Promise<AccountHistoryView>

getPublicKeyOfIssuer

Retrieves the public signature key of the issuer.

MethodType
getPublicKeyOfIssuer() => Promise<PublicSignatureKey>

🏭 ServerNetworkProvider

🏭 MessageManager

🏭 Wallet

The Wallet class is responsible for generating and managing cryptographic keys based on a provided wallet seed. It provides methods to retrieve private signature keys, decapsulation keys, and keys specific to virtual blockchains.

Static Methods

generateWallet

Generates a new Wallet instance using a randomly generated seed.

MethodType
generateWallet() => Wallet

fromSeed

MethodType
fromSeed(seed: Uint8Array<ArrayBufferLike>) => Wallet

Methods

getDecapsulationKey

Retrieves the decapsulation key for a given cryptographic scheme ID.

MethodType
getDecapsulationKey(schemeId: number) => DecapsulationKey

Parameters:

  • schemeId: - The identifier of the cryptographic scheme for which the decapsulation key is needed.

getAccountPrivateSignatureKey

MethodType
getAccountPrivateSignatureKey(schemeId: SignatureAlgorithmId, nonce: number) => PrivateSignatureKey

getActorPrivateSignatureKey

MethodType
getActorPrivateSignatureKey(schemeId: number, vbSeed: Uint8Array<ArrayBufferLike>, nonce: number) => PrivateSignatureKey

getVirtualBlockchainDecapsulationKey

Retrieves the virtual blockchain decapsulation key using the specified scheme ID and virtual blockchain seed.

MethodType
getVirtualBlockchainDecapsulationKey(schemeId: number, vbSeed: Uint8Array<ArrayBufferLike>) => DecapsulationKey

Parameters:

  • schemeId: - The identifier of the cryptographic scheme to be used for generating the key.
  • vbSeed: - The virtual blockchain seed

🏭 SectionWrapper

Static Methods

wrap

MethodType
wrap(section: Section<any>) => SectionWrapper

Methods

getSizeInBytes

MethodType
getSizeInBytes() => number

getSectionId

MethodType
getSectionId() => number

getSectionHash

MethodType
getSectionHash() => Hash

🔩 Enum

SectionType

PropertyTypeDescription
ACCOUNT_SIG_ALGORITHM0
ACCOUNT_PUBLIC_KEY1
ACCOUNT_TOKEN_ISSUANCE2
ACCOUNT_CREATION3
ACCOUNT_TRANSFER4
ACCOUNT_SIGNATURE5
ORG_SIG_ALGORITHM10
ORG_PUBLIC_KEY11
ORG_DESCRIPTION12
ORG_SERVER13
ORG_SIGNATURE14
APP_SIG_ALGORITHM20
APP_DECLARATION21
APP_DESCRIPTION22
APP_SIGNATURE23
APP_LEDGER_SIG_ALGORITHM30
APP_LEDGER_PKE_ALGORITHM31
APP_LEDGER_DECLARATION32
APP_LEDGER_ACTOR_CREATION33
APP_LEDGER_CHANNEL_CREATION34
APP_LEDGER_SHARED_SECRET35
APP_LEDGER_CHANNEL_INVITATION36
APP_LEDGER_ACTOR_SUBSCRIPTION37
APP_LEDGER_PUBLIC_CHANNEL_DATA38
APP_LEDGER_PRIVATE_CHANNEL_DATA39
APP_LEDGER_AUTHOR40
APP_LEDGER_ENDORSER41
APP_LEDGER_ENDORSER_SIGNATURE42
APP_LEDGER_AUTHOR_SIGNATURE43

SignatureAlgorithmId

An enumeration representing the identifiers for different signature algorithms. This enum is used to indicate the type of cryptographic signature algorithm being utilized.

Enum members:

  • SECP256K1: Indicates the SECP256K1 signature algorithm, typically associated with elliptic-curve cryptography.
  • ML_DSA_65: Represents the ML-DSA-65 signature algorithm.
PropertyTypeDescription
SECP256K10
ML_DSA_651

SymmetricEncryptionAlgorithmId

Enumeration representing identifiers for symmetric encryption algorithms.

This enum is used to specify the symmetric encryption algorithm to be utilized, enabling cryptographic operations such as encryption and decryption with specific algorithmic requirements. It currently supports the following algorithm:

  • AES-256-GCM: Advanced Encryption Standard with a 256-bit key in Galois/Counter Mode.

The identifiers in this enum can be utilized to indicate the intended algorithm within encryption workflows or cryptographic libraries requiring algorithm specification.

PropertyTypeDescription
AES_256_GCM``

KeyExchangeAlgorithmId

PropertyTypeDescription
ML_KEM``

CryptographicHashAlgorithmId

PropertyTypeDescription
SHA256``

PasswordBasedKeyDerivationFunctionAlgorithmId

PropertyTypeDescription
PBKDF2``

KeyDerivationFunctionAlgorithmId

PropertyTypeDescription
HKDF``

PublicKeyEncryptionAlgorithmId

PropertyTypeDescription
ML_KEM_768_AES_256_GCM``

CarmentisErrorCode

PropertyTypeDescription
CARMENTIS_ERROR0
NODE_ERROR1
NODE_NOT_AVAILABLE_DURING_SYNCHRONISATION_ERROR2
INTERNAL_ERROR500
TYPE_CHECKING_FAILURE_ERROR501
PROOF_VERIFICATION_FAILURE300
BLOCKCHAIN_ERROR100
ACCOUNT_NOT_FOUND``
ACCOUNT_ALREADY_EXISTS``
ACCOUNT_NOT_FOUND_FOR_PUBLIC_KEY``
ACCOUNT_NOT_FOUND_FOR_PUBLIC_KEY_HASH``
ACCOUNT_ALREADY_EXISTS_FOR_PUBLIC_KEY``
ACCOUNT_NOT_FOUND_FOR_ADDRESS``
ORGANIZATION_NOT_FOUND``
APPLICATION_NOT_FOUND``
APPLICATION_LEDGER_NOT_FOUND``
VALIDATOR_NODE_NOT_FOUND``
VIRTUAL_BLOCKCHAIN_NOT_FOUND``
VIRTUAL_BLOCKCHAIN_ALREADY_EXISTS``
ECONOMICS_ERROR200
INVALID_TOKEN_UNIT``

VirtualBlockchainType

PropertyTypeDescription
ACCOUNT_VIRTUAL_BLOCKCHAINVB_ACCOUNT
NODE_VIRTUAL_BLOCKCHAINVB_VALIDATOR_NODE
APPLICATION_VIRTUAL_BLOCKCHAINVB_APPLICATION
ORGANIZATION_VIRTUAL_BLOCKCHAINVB_ORGANIZATION
APP_LEDGER_VIRTUAL_BLOCKCHAINVB_APP_LEDGER

TokenUnit

Enum representing the units of a tokenized system.

TokenUnit defines multiple denominations of a token, where each denomination is represented by a numeric value that corresponds to the fractional relationship with the base unit.

Properties:

  • TOKEN: The base unit of the system. Equals 1.
  • CENTI_TOKEN: Represents one-hundredth (1/100) of the base unit. Equals 100.
  • MILLI_TOKEN: Represents one-thousandth (1/1000) of the base unit. Equals 1000.

This enum can be used for token denomination conversions and comparisons.

PropertyTypeDescription
TOKEN100_000
DECI_TOKEN10_000
CENTI_TOKEN1_000
MILLI_TOKEN100
MICRO_TOKEN10
ATOMIC1

TokenUnitLabel

Enum representing token unit labels.

This enum is used to define a label for tokens, where each key represents the name of the label and its associated value represents the specific token unit.

The TokenUnitLabel provides a standardized way to represent token-related labels in the application.

Enum Members:

  • TOKEN: Represents the token unit labeled as 'CMTS'.

Typically used in contexts where token structure or labeling standardization is required.

PropertyTypeDescription
TOKEN'CMTS'
DECI_TOKEN'dCMTS'
CENTI_TOKEN'cCMTS'
MILLI_TOKEN'mCMTS'
MICRO_TOKEN'μCMTS'
ATOMIC'aCMTS'

CometBFTErrorCode

PropertyTypeDescription
PARSE_ERROR-32700
INVALID_REQUEST-32600
METHOD_NOT_FOUND-32601
INVALID_PARAMS-32602
INTERNAL_ERROR-32603
ENDPOINT_CLOSED_WHILE_NODE_IS_CATCHING_UP-32603
TX_ALREADY_EXISTS-32003
TX_OUT_OF_GAS-32002
TX_CHECK_FAILED-32001
TX_DELIVER_FAILED-32000

🍹 Interfaces

SchemaItem

PropertyTypeDescription
namestring
typenumber
sizenumber or undefined
schemaSchema or undefined
definitionSchemaItem[] or undefined
optionalboolean or undefined
unspecifiedSchemaboolean or undefined

Schema

PropertyTypeDescription
labelstring
definitionSchemaItem[]

EncoderInterface

Interface representing a generic encoder capable of encoding and decoding data.

PropertyTypeDescription

SignatureScheme

Represents a cryptographic signature scheme with methods to retrieve identifying information and utilities for encoding public keys.

PropertyTypeDescription

PrivateSignatureKey

Represents a private signature key utilized in cryptographic operations.

This interface extends the SignatureScheme and provides functionality to generate a corresponding public key and to sign data.

PropertyTypeDescription

PublicSignatureKey

Represents a public signature key adhering to a specific signature scheme. This interface provides methods to verify digital signatures and fetch the raw public key.

PropertyTypeDescription

Returns:

  • Returns true if the signature is valid for the data, false otherwise. - The raw bytes of the public key.

SymmetricEncryptionKeyScheme

PropertyTypeDescription

SymmetricEncryptionKey

Represents a symmetric encryption key capable of performing encryption and decryption operations, as well as providing the associated encryption algorithm identifier and raw key.

PropertyTypeDescription

DecapsulationKey

PropertyTypeDescription

EncapsulationKey

PropertyTypeDescription

EncapsulationKeyEncoder

PropertyTypeDescription

CryptographicHash

PropertyTypeDescription

SignatureEncoderInterface

An interface for encoding and decoding cryptographic signature keys and signatures.

Provides methods to encode and decode public keys, private keys, and signatures into or from a specified format T.

PropertyTypeDescription

ImportedProof

PropertyTypeDescription
heightnumber
data{ recordData: RecordEntry[]; merkleData: MerkleProof[]; }

RecordEntry

PropertyTypeDescription
typenumber
namestring
propertiesProperty[]
channelsRecord<string, unknown>

Property

PropertyTypeDescription
typenumber
namestring
attributesnumber or undefined
channelIdnumber or undefined
leafIndexnumber or undefined
saltstring or undefined
valuestring or undefined
valueBinary{ [key: string]: number; } or undefined
entriesProperty[] or undefined
propertiesProperty[] or undefined
channelsRecord<string, unknown>
indexnumber or undefined

MerkleProof

PropertyTypeDescription
channelIdnumber
nLeavesnumber
witnessesstring

AccountVBState

PropertyTypeDescription
signatureAlgorithmIdnumber
publicKeyHeightnumber

ApplicationDescription

PropertyTypeDescription
namestring
logoUrlstring
homepageUrlstring
descriptionstring

ApplicationDeclaration

PropertyTypeDescription
organizationIdUint8Array<ArrayBufferLike>

OrganizationDescription

PropertyTypeDescription
namestring
citystring
countryCodestring
websitestring

ValidatorNodeDescription

PropertyTypeDescription
cometPublicKeyTypestring
cometPublicKeystring

ValidatorNodeRpcEndpoint

PropertyTypeDescription
rpcEndpointstring

ValidatorNodeNetworkIntegration

PropertyTypeDescription
votingPowernumber

ValidatorNodeDeclaration

PropertyTypeDescription
organizationIdUint8Array<ArrayBufferLike>

OrganizationVBState

PropertyTypeDescription
signatureAlgorithmIdnumber
publicKeyHeightnumber
descriptionHeightnumber

ValidatorNodeVBState

PropertyTypeDescription
signatureAlgorithmIdnumber
organizationIdUint8Array<ArrayBufferLike>
descriptionHeightnumber
rpcEndpointHeightnumber
networkIntegrationHeightnumber

ApplicationVBState

PropertyTypeDescription
signatureAlgorithmIdnumber
organizationIdUint8Array<ArrayBufferLike>
descriptionHeightnumber

ApplicationLedgeChannel

PropertyTypeDescription
namestring
isPrivateboolean
creatorIdnumber

ApplicationLedgerActor

PropertyTypeDescription
namestring
subscribedboolean
invitations{ channelId: number; height: number; }[]

ApplicationLedgerVBState

PropertyTypeDescription
signatureAlgorithmIdnumber
applicationIdUint8Array<ArrayBufferLike>
channelsApplicationLedgeChannel[]
actorsApplicationLedgerActor[]

GenesisSnapshotDTO

Describes the genesis snapshot which contains base64-encoded chunks.

PropertyTypeDescription
base64EncodedChunksstring[]

ChainInformationDTO

Provides information on the chain.

PropertyTypeDescription
heightnumber
lastBlockTimestampnumber
microblockCountnumber
objectCountsnumber[]

BlockInformationDTO

PropertyTypeDescription
hashUint8Array<ArrayBufferLike>
timestampnumber
proposerAddressUint8Array<ArrayBufferLike>
sizenumber
microblockCountnumber

BlockContentDTO

PropertyTypeDescription
microblocks{ hash: Uint8Array<ArrayBufferLike>; vbIdentifier: Uint8Array<ArrayBufferLike>; vbType: number; height: number; size: number; sectionCount: number; }[]

ValidatorNodeDTO

PropertyTypeDescription
validatorNodeHashUint8Array<ArrayBufferLike>

MicroblockHeader

PropertyTypeDescription
magicStringstring
protocolVersionnumber
heightnumber
previousHashUint8Array<ArrayBufferLike>
timestampnumber
gasnumber
gasPricenumber
bodyHashUint8Array<ArrayBufferLike>

MicroblockSection

PropertyTypeDescription
typenumber
dataUint8Array<ArrayBufferLike>

MicroblockBody

PropertyTypeDescription
bodyMicroblockSection[]

MicroblockInformationSchema

PropertyTypeDescription
virtualBlockchainIdUint8Array<ArrayBufferLike>
virtualBlockchainTypenumber
headerUint8Array<ArrayBufferLike>

MicroBlockBody

PropertyTypeDescription
hashUint8Array<ArrayBufferLike>
bodyUint8Array<ArrayBufferLike>

MicroBlockBodys

PropertyTypeDescription
listMicroBlockBody[]

VirtualBlockchainUpdateInterface

PropertyTypeDescription
existsboolean
changedboolean
stateDataUint8Array<ArrayBufferLike>
headersUint8Array<ArrayBufferLike>[]

VirtualBlockchainStateDTO

PropertyTypeDescription
typenumber
heightnumber
lastMicroblockHashUint8Array<ArrayBufferLike>
customStateCustomState

VirtualBlockchainStateInterface

PropertyTypeDescription
typenumber
heightnumber
expirationDaynumber
lastMicroblockHashUint8Array<ArrayBufferLike>
customStateCustomState

MicroBlockHeader

PropertyTypeDescription
magicStringstring
protocolVersionnumber
heightnumber
previousHashUint8Array<ArrayBufferLike>
timestampnumber
gasnumber
gasPricenumber
bodyHashUint8Array<ArrayBufferLike>

MsgVirtualBlockchainState

PropertyTypeDescription
stateDataUint8Array<ArrayBufferLike>

AccountStateDTO

PropertyTypeDescription
heightnumber
balancenumber
lastHistoryHashUint8Array<ArrayBufferLike>

AccountHash

PropertyTypeDescription
accountHashUint8Array<ArrayBufferLike>

AccountTransactionInterface

PropertyTypeDescription
heightnumber
previousHistoryHashUint8Array<ArrayBufferLike>
typenumber
timestampnumber
linkedAccountUint8Array<ArrayBufferLike>
amountnumber
chainReferenceUint8Array<ArrayBufferLike>

AccountHistoryInterface

PropertyTypeDescription
listAccountTransactionInterface[]

AccountTokenIssuance

PropertyTypeDescription
amountnumber

AccountCreation

PropertyTypeDescription
sellerAccountUint8Array<ArrayBufferLike>
amountnumber

AccountTransfer

PropertyTypeDescription
accountUint8Array<ArrayBufferLike>
amountnumber
publicReferencestring
privateReferencestring

ObjectList

PropertyTypeDescription
listUint8Array<ArrayBufferLike>[]

Proof

PropertyTypeDescription
info{ title: string; date: string; author: string; virtualBlockchainIdentifier: string; }
proofs{ height: number; data: any; }[]

Section

PropertyTypeDescription
typenumber
objectT
dataUint8Array<ArrayBufferLike>
hashUint8Array<ArrayBufferLike>
indexnumber

MicroBlockHeaderDto

PropertyTypeDescription
magicStringstring
protocolVersionnumber
heightnumber
previousHashUint8Array<ArrayBufferLike>
timestampnumber
gasnumber
gasPricenumber
bodyHashUint8Array<ArrayBufferLike>

Currency

PropertyTypeDescription

RecordActor

PropertyTypeDescription
namestring

RecordChannel

PropertyTypeDescription
namestring
publicboolean

RecordChannelAssignation

PropertyTypeDescription
fieldPathstring
channelNamestring

RecordActorAssignation

PropertyTypeDescription
actorNamestring
channelNamestring

RecordMaskedPart

PropertyTypeDescription
positionnumber
lengthnumber
replacementStringstring

RecordMaskableField

PropertyTypeDescription
fieldPathstring
maskedPartsRecordMaskedPart[]

RecordHashableField

PropertyTypeDescription
fieldPathstring

RecordDescription

PropertyTypeDescription
applicationIdstringLinks the record to an application.
virtualBlockchainIdstring or undefinedLinks the record to an existing transactional flow. When omitted, the record is put in a new virtual blockchain.
dataDataType
actorsRecordActor[] or undefined
channelsRecordChannel[] or undefined
channelAssignationsRecordChannelAssignation[] or undefined
actorAssignationsRecordActorAssignation[] or undefined
hashableFieldsRecordHashableField[] or undefined
maskableFieldsRecordMaskableField[] or undefined
authorstring
endorserstring or undefined

BlockchainReader

PropertyTypeDescription

PublicEncryptionKeyEncoderInterface

PropertyTypeDescription

PrivateDecryptionKeyEncoderInterface

PropertyTypeDescription

PkeEncoderInterface

PropertyTypeDescription

SignatureCacheInterface

PropertyTypeDescription

CurrencyConverter

Represents a generic interface for converting currency values from one type to another.

PropertyTypeDescription

BlockchainWriter

PropertyTypeDescription

🍸 Types

Height

Defines the height in a (virtual) blockchain.

Both the height of a block in the blockchain and a micro-block in a virtual blockchain is a strictly positive integer starting at 1 for the first block.

TypeType
HeightPositiveInt

RPCNodeStatusResponseType

TypeType
RPCNodeStatusResponseTypez.infer<typeof RPCNodeStatusResponseSchema>

OperatorAnchorRequest

TypeType
OperatorAnchorRequestOmit<RecordDescription, 'applicationId'> and { approvalMessage: string }

NewBlockEventType

TypeType
NewBlockEventTypez.infer<typeof NewBlockEventSchema>

RPCNodeWebSocketCallback

TypeType
RPCNodeWebSocketCallback{ onNewBlock?: (event: NewBlockEventType) => void }