UNPKG

@aeternity/aepp-sdk

Version:

SDK for the æternity blockchain

39 lines (38 loc) 1.49 kB
import { OperationOptions } from '@azure/core-client'; import { Node as NodeApi, NodeOptionalParams } from './apis/node/index.js'; import { ConsensusProtocolVersion } from './tx/builder/constants.js'; interface NodeInfo { url: string; nodeNetworkId: string; version: string; consensusProtocolVersion: ConsensusProtocolVersion; } /** * @category chain */ export default class Node extends NodeApi { #private; /** * @param url - Url for node API * @param options - Options * @param options.ignoreVersion - Print warning instead of throwing exception if node * or consensus protocol version is not supported, use with caution * @param options.retryCount - Amount of extra requests to do in case of failure * @param options.retryOverallDelay - Time in ms to wait between all retries */ constructor(url: string, { ignoreVersion, retryCount, retryOverallDelay, ...options }?: NodeOptionalParams & { ignoreVersion?: boolean; retryCount?: number; retryOverallDelay?: number; }); _getCachedStatus(options?: OperationOptions): ReturnType<NodeApi['getStatus']>; getStatus(...args: Parameters<NodeApi['getStatus']>): ReturnType<NodeApi['getStatus']>; _isHyperchain(): Promise<boolean>; /** * Returns network ID provided by node. * This method won't do extra requests on subsequent calls. */ getNetworkId(): Promise<string>; getNodeInfo(): Promise<NodeInfo>; } export {};