Used only by vat-orchestration and tests mocking it

  • Parameters

    • zone: Zone
    • vowTools: {
          allVows: ((maybeVows: unknown[]) => Vow<any[]>);
          asPromise: AsPromiseFunction;
          asVow: (<T>(fn: ((...args: any[]) => Awaited<T> | Vow<Awaited<T>> | PromiseVow<T>)) => Vow<Awaited<T>>);
          makeVowKit: (<T>() => VowKit<T>);
          retriable: (<F>(fnZone: Zone, name: string, fn: F) => F extends ((...args: Args) => Promise<R>)
              ? ((...args: Args) => Vow<R>)
              : never);
          watch: (<T, TResult1, TResult2, C>(specimenP: EVow<T>, watcher?: Watcher<T, TResult1, TResult2, C>, ...watcherArgs: C) => Vow<Narrowest>);
          when: (<T, TResult1, TResult2>(specimenP: T, onFulfilled?: ((value: EUnwrap<T>) => TResult1 | PromiseLike<TResult1>), onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>)) => Promise<TResult1 | TResult2>);
      }
      • allVows: ((maybeVows: unknown[]) => Vow<any[]>)
          • (maybeVows): Vow<any[]>
          • Vow-tolerant implementation of Promise.all.

            Parameters

            • maybeVows: unknown[]

            Returns Vow<any[]>

      • asPromise: AsPromiseFunction
      • asVow: (<T>(fn: ((...args: any[]) => Awaited<T> | Vow<Awaited<T>> | PromiseVow<T>)) => Vow<Awaited<T>>)
          • <T>(fn): Vow<Awaited<T>>
          • Helper function that coerces the result of a function to a Vow. Helpful for scenarios like a synchronously thrown error.

            Type Parameters

            • T extends unknown

            Parameters

            • fn: ((...args: any[]) => Awaited<T> | Vow<Awaited<T>> | PromiseVow<T>)
                • (...args): Awaited<T> | Vow<Awaited<T>> | PromiseVow<T>
                • Parameters

                  • Rest...args: any[]

                  Returns Awaited<T> | Vow<Awaited<T>> | PromiseVow<T>

            Returns Vow<Awaited<T>>

      • makeVowKit: (<T>() => VowKit<T>)
          • <T>(): VowKit<T>
          • Type Parameters

            • T

            Returns VowKit<T>

      • retriable: (<F>(fnZone: Zone, name: string, fn: F) => F extends ((...args: Args) => Promise<R>)
            ? ((...args: Args) => Vow<R>)
            : never)
          • <F>(fnZone, name, fn): F extends ((...args: Args) => Promise<R>)
                ? ((...args: Args) => Vow<R>)
                : never
          • TODO FIXME make this real Create a function that retries the given function if the underlying functions rejects due to upgrade disconnection.

            Type Parameters

            • F extends ((...args: any[]) => Promise<any>)

            Parameters

            • fnZone: Zone

              the zone for the named function

            • name: string
            • fn: F

            Returns F extends ((...args: Args) => Promise<R>)
                ? ((...args: Args) => Vow<R>)
                : never

      • watch: (<T, TResult1, TResult2, C>(specimenP: EVow<T>, watcher?: Watcher<T, TResult1, TResult2, C>, ...watcherArgs: C) => Vow<Narrowest>)
          • <T, TResult1, TResult2, C>(specimenP, watcher?, ...watcherArgs): Vow<Narrowest>
          • Type Parameters

            • T = any
            • TResult1 = T
            • TResult2 = never
            • C extends any[] = any[]

              watcher args

            Parameters

            Returns Vow<Narrowest>

      • when: (<T, TResult1, TResult2>(specimenP: T, onFulfilled?: ((value: EUnwrap<T>) => TResult1 | PromiseLike<TResult1>), onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>)) => Promise<TResult1 | TResult2>)

    Returns ((...args: [powers: Partial<OrchestrationPowers>]) => Guarded<{
        makeAccount(chainId: string, hostConnectionId: `connection-${number}`, controllerConnectionId: `connection-${number}`, opts?: ICAChannelAddressOpts): Vow<IcaAccount>;
        provideICQConnection(controllerConnectionId: `connection-${number}`, version?: string): Guarded<{
            getLocalAddress(): `/ibc-port/${string}`;
            getRemoteAddress(): `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`;
            query(msgs: JsonSafe<RequestQuery>[]): Vow<JsonSafe<ResponseQuery>[]>;
        }> | Vow<Guarded<{
            getLocalAddress(): `/ibc-port/${string}`;
            getRemoteAddress(): `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`;
            query(msgs: JsonSafe<RequestQuery>[]): Vow<JsonSafe<ResponseQuery>[]>;
        }>>;
    }>)

      • (...args): Guarded<{
            makeAccount(chainId: string, hostConnectionId: `connection-${number}`, controllerConnectionId: `connection-${number}`, opts?: ICAChannelAddressOpts): Vow<IcaAccount>;
            provideICQConnection(controllerConnectionId: `connection-${number}`, version?: string): Guarded<{
                getLocalAddress(): `/ibc-port/${string}`;
                getRemoteAddress(): `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`;
                query(msgs: JsonSafe<RequestQuery>[]): Vow<JsonSafe<ResponseQuery>[]>;
            }> | Vow<Guarded<{
                getLocalAddress(): `/ibc-port/${string}`;
                getRemoteAddress(): `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`;
                query(msgs: JsonSafe<RequestQuery>[]): Vow<JsonSafe<ResponseQuery>[]>;
            }>>;
        }>
      • Parameters

        Returns Guarded<{
            makeAccount(chainId: string, hostConnectionId: `connection-${number}`, controllerConnectionId: `connection-${number}`, opts?: ICAChannelAddressOpts): Vow<IcaAccount>;
            provideICQConnection(controllerConnectionId: `connection-${number}`, version?: string): Guarded<{
                getLocalAddress(): `/ibc-port/${string}`;
                getRemoteAddress(): `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`;
                query(msgs: JsonSafe<RequestQuery>[]): Vow<JsonSafe<ResponseQuery>[]>;
            }> | Vow<Guarded<{
                getLocalAddress(): `/ibc-port/${string}`;
                getRemoteAddress(): `/${string}ibc-port/${string}/ordered/${string}` | `/${string}ibc-port/${string}/unordered/${string}`;
                query(msgs: JsonSafe<RequestQuery>[]): Vow<JsonSafe<ResponseQuery>[]>;
            }>>;
        }>