An object for access the core functions of a remote chain.

Note that "remote" can mean the local chain; it's just that accounts are treated as remote/arms length for consistency.

interface Chain<CI> {
    getChainInfo: (() => Promise<CI>);
    makeAccount: (() => CI extends {
            chainId: string;
        }
        ? Promise<OrchestrationAccount<CI<CI>>>
        : never);
    query: CI extends {
            icqEnabled: true;
        }
        ? ICQQueryFunction
        : CI extends {
                chainId: string;
            }
            ? CI<CI>["chainId"] extends `agoric${string}`
                ? QueryManyFn
                : never
            : never;
}

Type Parameters

Properties

getChainInfo: (() => Promise<CI>)
makeAccount: (() => CI extends {
        chainId: string;
    }
    ? Promise<OrchestrationAccount<CI<CI>>>
    : never)

Creates a new Orchestration Account on the current Chain.

Type declaration

    • (): CI extends {
              chainId: string;
          }
          ? Promise<OrchestrationAccount<CI<CI>>>
          : never
    • Returns CI extends {
              chainId: string;
          }
          ? Promise<OrchestrationAccount<CI<CI>>>
          : never

      an object that controls the account

query: CI extends {
        icqEnabled: true;
    }
    ? ICQQueryFunction
    : CI extends {
            chainId: string;
        }
        ? CI<CI>["chainId"] extends `agoric${string}`
            ? QueryManyFn
            : never
        : never