iya-sts
    Preparing search index...

    Variable spend

    spend: (
        kind: string,
        value: unknown,
        lifetimeS?: unknown,
        usedCode?: string,
    ) => Promise<any> = ...

    Type Declaration

      • (
            kind: string,
            value: unknown,
            lifetimeS?: unknown,
            usedCode?: string,
        ): Promise<any>
      • Claims a value once across the cluster before acting on it (gnap.<kind> scope), for the value's lifetime plus a skew.

        Never rejects.

        Parameters

        • kind: string

          what the value is

        • value: unknown

          the value

        • OptionallifetimeS: unknown

          its lifetime, in seconds; unbounded values get a day

        • OptionalusedCode: string

          the error code of a value already spent

        Returns Promise<any>

        { ok: true, handle }, or { ok: false, reason, errorCode } with reason used or store