Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "src/blockchainApiConnection/BlockchainApiConnection"

Blockchain Api Connection enables the building and accessing of your Substrate Blockchain connection. In which it keeps one connection open and allows to reuse the connection for all Blockchain related tasks.

Other modules can access the Blockchain as such: const blockchain = await connect().

Index

Functions

buildConnection

  • buildConnection(__namedParameters?: { host: string; pgabiModName: string; types: {} }): Promise<Blockchain>

clearCache

  • clearCache(): void

connect

  • connect(__namedParameters?: { host: string; pgabiModName: string; types: {} }): Promise<Blockchain>
  • Connect to a node or return an already established connection.

    Parameters

    • Default value __namedParameters: { host: string; pgabiModName: string; types: {} } = DEFAULT_PARAMS
      • host: string
      • pgabiModName: string
      • types: {}

    Returns Promise<Blockchain>

    A Blockchain API instance on which we can query data or submit transactions.

disconnect

  • disconnect(host?: string): Promise<void>

getCached

  • getCached(__namedParameters?: { host: string; pgabiModName: string; types: {} }): Promise<Blockchain>
  • Connect to a node or return an already established connection.

    Parameters

    • Default value __namedParameters: { host: string; pgabiModName: string; types: {} } = DEFAULT_PARAMS
      • host: string
      • pgabiModName: string
      • types: {}

    Returns Promise<Blockchain>

    A Blockchain API instance on which we can query data or submit transactions.

Generated using TypeDoc