@raoul-picconi/mojito-sdk
    Preparing search index...

    Class MintlayerAPIClient

    Client for interacting with the Mintlayer API Provides methods to interact with various endpoints of the Mintlayer blockchain including chain, block, transaction, address, pool, delegation, token, and order operations

    Index

    Constructors

    Methods

    • Fetches information about a specific address

      Parameters

      • address: string

        The address to query

      Returns Promise<AddressInfo>

      Promise resolving to the address information

    • Fetches delegation information for a specific address

      Parameters

      • address: string

        The address to query

      Returns Promise<DelegationInfo[]>

      Promise resolving to an array of delegation information

    • Fetches token authority information for a specific address

      Parameters

      • address: string

        The address to query

      Returns Promise<string[]>

      Promise resolving to an array of token authority IDs

    • Fetches detailed information about a specific block

      Parameters

      • id: string

        The block ID to query

      Returns Promise<BlockInfo>

      Promise resolving to the block information

    • Fetches the header information for a specific block

      Parameters

      • id: string

        The block ID to query

      Returns Promise<BlockHeader>

      Promise resolving to the block header information

    • Fetches the reward information for a specific block

      Parameters

      • id: string

        The block ID to query

      Returns Promise<TransactionOutput[]>

      Promise resolving to the block reward transaction outputs

    • Fetches the list of transaction IDs in a specific block

      Parameters

      • id: string

        The block ID to query

      Returns Promise<string[]>

      Promise resolving to an array of transaction IDs

    • Fetches the block ID at a specific height

      Parameters

      • height: string

        The block height to query

      Returns Promise<string>

      Promise resolving to the block ID at the specified height

    • Fetches the genesis block information

      Returns Promise<
          {
              block_id: string;
              genesis_message: string;
              timestamp: number;
              utxos: TransactionOutput[];
          },
      >

      Promise resolving to the genesis block data including block ID, message, timestamp, and UTXOs

    • Fetches the current chain tip information

      Returns Promise<{ block_height: number; block_id: string }>

      Promise resolving to the current block height and block ID

    • Fetches coin statistics including supply information

      Returns Promise<
          {
              burned: string;
              circulating_supply: string;
              preminted: string;
              staked: string;
          },
      >

      Promise resolving to coin statistics including circulating supply, preminted, burned, and staked amounts

    • Fetches information about a specific delegation

      Parameters

      • id: string

        The delegation ID to query

      Returns Promise<DelegationInfo>

      Promise resolving to the delegation information

    • Fetches the current fee rate

      Parameters

      • Optionalparams: { in_top_x_mb?: number }

        Optional parameters including in_top_x_mb for fee rate calculation

      Returns Promise<string>

      Promise resolving to the current fee rate

    • Fetches information about a specific NFT

      Parameters

      • id: string

        The NFT ID to query

      Returns Promise<NFTInfo>

      Promise resolving to the NFT information

    • Fetches information about a specific order

      Parameters

      • id: string

        The order ID to query

      Returns Promise<OrderDetails>

      Promise resolving to the order information

    • Fetches orders for a specific trading pair

      Parameters

      • pair: string

        The trading pair to query

      • Optionalparams: PaginationParams

        Optional pagination parameters

      Returns Promise<OrderDetails[]>

      Promise resolving to an array of order information for the specified pair

    • Fetches information about a specific pool

      Parameters

      • id: string

        The pool ID to query

      Returns Promise<PoolInfo>

      Promise resolving to the pool information

    • Fetches block statistics for a specific pool

      Parameters

      • id: string

        The pool ID to query

      • timeFilter: TimeFilter

        Time filter parameters for the statistics

      Returns Promise<{ block_count: number }>

      Promise resolving to the pool's block statistics

    • Fetches delegation information for a specific pool

      Parameters

      • id: string

        The pool ID to query

      Returns Promise<DelegationInfo[]>

      Promise resolving to an array of delegation information

    • Fetches a list of pools with optional pagination and sorting

      Parameters

      • Optionalparams: PaginationParams & { sort?: "by_height" | "by_pledge" }

        Optional parameters including pagination and sort options

      Returns Promise<PoolInfo[]>

      Promise resolving to an array of pool information

    • Fetches information about a specific token

      Parameters

      • id: string

        The token ID to query

      Returns Promise<TokenDetails>

      Promise resolving to the token information

    • Fetches a list of token IDs with optional pagination

      Parameters

      Returns Promise<string[]>

      Promise resolving to an array of token IDs

    • Fetches token IDs by their ticker symbol

      Parameters

      • ticker: string

        The ticker symbol to search for

      • Optionalparams: PaginationParams

        Optional pagination parameters

      Returns Promise<string[]>

      Promise resolving to an array of token IDs matching the ticker

    • Fetches statistics for a specific token

      Parameters

      • tokenId: string

        The token ID to query

      Returns Promise<
          {
              burned: string;
              circulating_supply: string;
              preminted: string;
              staked: string;
          },
      >

      Promise resolving to token statistics including circulating supply, preminted, burned, and staked amounts

    • Fetches detailed information about a specific transaction

      Parameters

      • id: string

        The transaction ID to query

      Returns Promise<TransactionDetail>

      Promise resolving to the transaction information

    • Fetches the Merkle path for a specific transaction

      Parameters

      • id: string

        The transaction ID to query

      Returns Promise<
          {
              block_id: string;
              merkle_path: string[];
              merkle_root: string;
              transaction_index: number;
          },
      >

      Promise resolving to the transaction's Merkle path information

    • Submits a new transaction to the network

      Parameters

      • transaction: string

        The transaction data to submit

      Returns Promise<{ tx_id: string }>

      Promise resolving to the transaction ID