Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Network

Index

Constructors

constructor

  • new Network(lcdClientEndpoint: string): Network

Properties

Private _lcdClientEndpoint

_lcdClientEndpoint: string

Accessors

lcdClientEndpoint

  • get lcdClientEndpoint(): string

Methods

broadcast

  • broadcast(signedTxBytes: any, broadCastMode?: BroadcastMode): Promise<any>
  • Broadcast a valid signed Transaction to the blockchain through the LCD endpoint

    Parameters

    • signedTxBytes: any

      Signed Transaction bytes

    • broadCastMode: BroadcastMode = ...

      BroadcastMode, default BROADCAST_MODE_SYNC

    Returns Promise<any>

    call response, or false if it fails

getAccount

  • getAccount(address: string): Promise<false | BaseAccount>
  • Get basic account info from a given address

    Parameters

    • address: string

      a valid address

    Returns Promise<false | BaseAccount>

    CosmosBaseAccount object or false if fails

Private getLcd

  • getLcd(endpoint: string): Promise<any>
  • HTTP GET request to a LCD endpoint

    Parameters

    • endpoint: string

      lcd endpoint path (ex: cosmos/auth/v1beta1/accounts)

    Returns Promise<any>

    call response, or false if it fails

Private postLcd

  • postLcd(endpoint: string, body: Transaction, headers?: any): Promise<any>
  • HTTP POST request to a LCD endpoint

    Parameters

    • endpoint: string

      lcd endpoint path (ex: /txs)

    • body: Transaction

      body request object

    • headers: any = ...

      optional http headers

    Returns Promise<any>

    call response, or false if it fails

Generated using TypeDoc