Options
All
  • Public
  • Public/Protected
  • All
Menu

Module helpers

Common functions that don't quite fit anywhere else

Index

Variables

HR: number = ...
MIN: number = ...
NETWORK_ID_MAINNET: "ae_mainnet" = "ae_mainnet"
NETWORK_ID_TESTNET: "ae_uat" = "ae_uat"
SEC: number = ...
TIMEOUT_DEF_ADDRESS: number = ...
TIMEOUT_DEF_CONNECT: number = ...
TIMEOUT_DEF_DETECT: number = ...
TIMEOUT_DEF_SIGN: number = ...

Functions

  • block_until_lambda_returns_true(fun: () => boolean, timeout_ms: number, timeout_message: string): Promise<void>
  • Run the provided lambda every 10 milliseconds

    Returns a Promise that does not resolve until the provided lambda evaluates to a truthy value

    Parameters

    • fun: () => boolean
        • (): boolean
        • Returns boolean

    • timeout_ms: number
    • timeout_message: string

    Returns Promise<void>

  • eicifebulrt(condition: boolean, error_message: string, fun: () => boolean, timeout_ms: number, timeout_message: string): Promise<void>
  • eicifebulrt is Welsh for "error if condition is false else block until lambda returns true"

    Parameters

    • condition: boolean
    • error_message: string
    • fun: () => boolean
        • (): boolean
        • Returns boolean

    • timeout_ms: number
    • timeout_message: string

    Returns Promise<void>

  • error_if_condition_is_false_else_block_until_lambda_returns_true(condition: boolean, error_message: string, fun: () => boolean, timeout_ms: number, timeout_message: string): Promise<void>
  • What it says

    Parameters

    • condition: boolean
    • error_message: string
    • fun: () => boolean
        • (): boolean
        • Returns boolean

    • timeout_ms: number
    • timeout_message: string

    Returns Promise<void>

  • pf(x: any): string
  • pf = pretty format

    Parameters

    • x: any

    Returns string

  • post(msg: any): void
  • Primitve to send a message into the browser's message queue

    Parameters

    • msg: any

    Returns void

  • sleep(ms: number): Promise<void>
  • Stupid hack that implements timer:sleep/1

    Parameters

    • ms: number

    Returns Promise<void>

  • snoop_console(): void
  • Adds snooper_console as an event listener

    Returns void

  • snoop_html(): void
  • Adds snooper_html as an event listener

    Returns void

  • uf(x: any): string
  • uf = ugly format

    Parameters

    • x: any

    Returns string

Generated using TypeDoc