Hierarchy (View Summary)

Constructors

  • Parameters

    • url: string

      Url for node API

    • options: NodeOptionalParams & {
          ignoreVersion?: boolean;
          retryCount?: number;
          retryOverallDelay?: number;
      } = {}

      Options

      • OptionalignoreVersion?: boolean

        Print warning instead of throwing exception if node or consensus protocol version is not supported, use with caution

      • OptionalretryCount?: number

        Amount of extra requests to do in case of failure

      • OptionalretryOverallDelay?: number

        Time in ms to wait between all retries

    Returns Node

Properties

$host: string

Methods

  • Parameters

    • Optionaloptions: OperationOptions

    Returns Promise<Status>

  • Returns Promise<boolean>

  • Returns network ID provided by node. This method won't do extra requests on subsequent calls.

    Returns Promise<string>

  • Get this node's local policy settings. These are not consensus rules: they are operator configuration, they may differ between nodes, and an operator can change them at runtime. min_miner_gas_price is a decimal string; the other values are JSON numbers, or strings when int-as-string=true.

    Parameters

    Returns Promise<NodeSettings>

  • Get the pinning transaction for the current epoch. Returns both the individual parameters as well as the parent chain type (aeternity, btc etc.), network id and a packaged 80 byte readymade payload for that chain type.

    Parameters

    Returns Promise<PinningTx>

  • Get the consensus protocol parameters needed to build valid transactions. Covers the protocol effective at the current top block and any later protocol whose fork height has not been reached yet; a community fork under signalling is reported only once it has activated, since until then it may still fail to. See /node-settings for this node's local policy. Aettos amounts (minimum_gas_price, name_claim_fees, name_claim_locked_fee) are always decimal strings, never JSON numbers: the largest name fee is about 2^69 and would lose precision in an IEEE-754 client. Gas, key block heights, counts and version numbers are JSON numbers; pass int-as-string=true to receive those as strings too.

    Parameters

    Returns Promise<ProtocolParameters>

  • Dry-run unsigned transactions on top of a given block. Supports all TXs except GAMetaTx, PayingForTx and OffchainTx. Gas defaults to 1000000 when not set on a call request; total gas per request is capped by a node-configured limit. FATE contract-storage reads are metered at a size-proportional gas cost, so reported gas is an estimate of the on-chain cost, not an exact figure. Reported gas is never below what the same call costs on chain at the currently activated protocol, because each repriced storage register read is floored at that charge.

    Parameters

    Returns Promise<DryRunResults>