Interface IPublicApiClient

Represents a PublicApiClient object.

See

  • getNodeStatus - Get the node status.
  • getAddresses - Get addresses.
  • getBlocks - Get blocks.
  • getEndorsements - Get endorsements.
  • getOperations - Get operations.
  • getCliques - Get cliques.
  • getStakers - Get stakers.
  • getDatastoreEntries - Get datastore entries.
  • getBlockcliqueBlockBySlot - Get blockclique block by slot.
  • getGraphInterval - Get graph interval.
interface IPublicApiClient {
    clientConfig: IClientConfig;
    compactBytesForOperation(data, opTypeId, expirePeriod): Buffer;
    getAddresses(addresses): Promise<IAddressInfo[]>;
    getBlockcliqueBlockBySlot(slot): Promise<IBlockcliqueBlockBySlot>;
    getBlocks(blockIds): Promise<IBlockInfo[]>;
    getCliques(): Promise<IClique[]>;
    getDatastoreEntries(getDatastoreEntries): Promise<IDatastoreEntry[]>;
    getEndorsements(endorsementIds): Promise<IEndorsement[]>;
    getGraphInterval(graphInterval): Promise<IGraphInterval[]>;
    getMinimalFees(): Promise<bigint>;
    getNodeStatus(): Promise<INodeStatus>;
    getOperations(operationIds): Promise<IOperationData[]>;
    getPrivateProviders(): IProvider[];
    getPublicProviders(): IProvider[];
    getStakers(): Promise<IStakingAddresses[]>;
    sendJsonRPCRequest<T>(resource, params): Promise<T>;
    setProviders(providers): void;
}

Hierarchy

  • BaseClient
    • IPublicApiClient

Implemented by

Properties

clientConfig: IClientConfig

Methods

  • Compacts bytes payload per operation.

    Parameters

    • data: DataType

      The operation data.

    • opTypeId: OperationTypeId

      The operation type id.

    • expirePeriod: number

      The expire period.

    Returns Buffer

    The compacted bytes payload.

  • Sends a post JSON rpc request to the node.

    Type Parameters

    • T

    Parameters

    • resource: JSON_RPC_REQUEST_METHOD

      The rpc method to call.

    • params: object

      The parameters to pass to the rpc method.

    Returns Promise<T>

    A promise that resolves as the result of the rpc method.

    Throws

    An error if the rpc method returns an error.

  • Set new providers as IProvider.

    Parameters

    • providers: IProvider[]

      The new providers to set as an array of IProvider.

    Returns void

    Throws

    Will throw an error if no public providers are included in the given array of providers.

    Throws

    Will throw an error if no private providers are included in the given array of providers.

Generated using TypeDoc