Hierarchy (view full)

Constructors

Properties

address: `ok_${string}`

Oracle public key

options: {
    onAccount: AccountBase;
    onNode: Node;
} & OracleClientPostQueryOptions & {
    interval?: number;
} & Partial<{
    _expectedMineRate?: number;
    _microBlockCycle?: number;
    onNode: Node;
}>

Options object

Methods

  • Poll for oracle response to query

    Parameters

    • queryId: `oq_${string}`

      Oracle Query id

    • options: {
          interval?: number;
      } & Partial<{
          _expectedMineRate?: number;
          _microBlockCycle?: number;
          onNode: Node;
      }> = {}

      Options object

    Returns Promise<string>

    Oracle response

  • Post query to oracle and wait for response

    Parameters

    • query: string

      Query to oracle

    • options: OracleClientPostQueryOptions & {
          interval?: number;
      } & Partial<{
          _expectedMineRate?: number;
          _microBlockCycle?: number;
          onNode: Node;
      }> = {}

      Options object

    Returns Promise<string>

    Oracle response