Class for interacting with the Midgard API.

Constructors

  • Constructor to create a MidgardApi instance.

    Parameters

    • network: Network = Network.Mainnet

      The network to connect to. Default is Mainnet.

    • Optional config: MidgardConfig

      Configuration options for the Midgard API.

    Returns MidgardApi

Properties

midgardClients: MidgardApi[]
network: Network

Methods

  • Get network health information.

    Returns Promise<Health>

    An object containing the health response of the Midgard API.

  • Perform reverse lookup to get MAYAName(s) associated with a given address.

    Parameters

    • address: string

      Address to perform reverse lookup for.

    Returns Promise<undefined | ReverseTHORNames>

    An array of MAYANames associated with the given address.

  • Get MAYAName details.

    Parameters

    • name: string

      MAYAName to get details for.

    Returns Promise<undefined | THORNameDetails>

    An object containing chains and their addresses associated with the given MAYAName.

  • Get member details based on a valid liquidity position.

    Parameters

    • member: string

      Member address to query for liquidity pool details.

    Returns Promise<MemberDetails>

    Object containing member details.

  • Get pool statistics for a particular asset.

    Parameters

    • asset: string

      Asset string to query its pool stats.

    Returns Promise<PoolStatsDetail>

    Pool statistics detail object.

  • Get details for a set of pools.

    Returns Promise<PoolDetail[]>

    An array containing details for a set of pools.

Generated using TypeDoc