Function pollForQueries

  • Poll for oracle queries

    Parameters

    • oracleId: `ok_${string}`

      Oracle public key

    • onQuery: ((query) => void)

      OnQuery callback

        • (query): void
        • Parameters

          • query: {
                fee: bigint;
                id: string;
                oracleId: string;
                query: string;
                response: string;
                responseTtl: { type: TTLType; value: string; };
                senderId: string;
                senderNonce: string;
                ttl: number;
            }
            • fee: bigint
            • id: string

              Base58Check encoded tagged value

            • oracleId: string

              Base58Check encoded tagged pubkey

            • query: string
            • response: string
            • responseTtl: { type: TTLType; value: string; }
            • senderId: string

              Base58Check encoded tagged pubkey

            • senderNonce: string
            • ttl: number

          Returns void

    • options: {
          interval?: number;
          onNode: Node;
      } & {
          _expectedMineRate?: number;
          _maxPollInterval?: number;
          _microBlockCycle?: number;
      }

      Options object

    Returns (() => void)

    Callback to stop polling function

      • (): void
      • Returns void

Generated using TypeDoc