Function getCachedProtocolParameters

  • Requests protocol parameters from node, the result is cached per node instance.

    Falls back to defaultProtocolParameters for a node that doesn't provide the endpoints, can't be reached, or answers something this SDK release can't read. Rejects only when node reports parameters that would price a transaction far above the SDK release — see ProtocolParametersOption for the way out of that.

    The cache is keyed by the Node object, so code that constructs a Node per request (a serverless handler, an edge worker) requests the parameters again for each one. Keep one Node instance per endpoint to get the benefit of the cache.

    Parameters

    • nodeOrProxy: Node

      Node to request the parameters from

    Returns Promise<ProtocolParameters>