Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace polling

Index

References

Re-exports defaultStrategy

Type Aliases

PollStrategy: ((canisterId: Principal, requestId: RequestId, status: RequestStatusResponseStatus) => Promise<void>)

Type declaration

PollStrategyFactory: (() => PollStrategy)

Type declaration

Functions

  • pollForResponse(agent: Agent, canisterId: Principal, requestId: RequestId, strategy: PollStrategy, request?: any, blsVerify?: VerifyFunc): Promise<ArrayBuffer>
  • Polls the IC to check the status of the given request then returns the response bytes once the request has been processed.

    Parameters

    • agent: Agent

      The agent to use to poll read_state.

    • canisterId: Principal

      The effective canister ID.

    • requestId: RequestId

      The Request ID to poll status for.

    • strategy: PollStrategy

      A polling strategy.

    • Optional request: any

      Request for the readState call.

    • Optional blsVerify: VerifyFunc

    Returns Promise<ArrayBuffer>

Generated using TypeDoc