Index

Connection Type aliases

InteractionType

InteractionType: "LongRunning" | "OneTime"

Describe how the interaction context behaves. A LongRunning context does not close the underlying connection after a request, it has to be done manually. A OneTime context however will close the connection afterwards.

Mirror

Mirror: object

A value set when sending the request, to be mirrored by the server in the corresponding response.

Type declaration

  • [k: string]: unknown

WebSocketCloseHandler

WebSocketCloseHandler: function

Type declaration

    • (code: CloseEvent["code"], reason: CloseEvent["reason"]): void
    • Parameters

      • code: CloseEvent["code"]
      • reason: CloseEvent["reason"]

      Returns void

WebSocketErrorHandler

WebSocketErrorHandler: function

Type declaration

    • (error: Error): void
    • Parameters

      • error: Error

      Returns void

Helper Variables

Const CONSTANT_OUTPUT_SERIALIZATION_OVERHEAD

CONSTANT_OUTPUT_SERIALIZATION_OVERHEAD: "160" = 160

Approximation of the memory overhead that comes from the associated input and entry in the ledger map data-structure. Roughly 20 words of memory times 8 bytes each.

Constructor Functions

createChainSynchronizationClient

createConnectionObject

Const createInteractionContext

createLedgerStateQueryClient

Const createMempoolMonitoringClient

Const createTransactionSubmissionClient

Connection Functions

Const getServerHealth

Helper Functions

isBlockBFT

  • isBlockBFT(block: Block): block

isBlockEBB

  • isBlockEBB(block: Block): block

isBlockPraos

  • isBlockPraos(block: Block): block

Const utxoSize

  • Calculate the size of an output, as seen by the ledger, without actually serializing it. This size is used when calculating for the minimum lovelace value that needs to be set on an output to be considered valid by the ledger.

    This calculation account for the size of the output with minimum value itself; thus, one can get the minimum value to set by simply calculating:

    const minLovelaceValue = utxoSize(output) * coinsPerUtxoByte
    

    where coinsPerUtxoByte is the corresponding protocol parameter from the Babbage era.

    Parameters

    Returns number