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: (() => Promise<OrchestrationAccount<CI>>);
    query: CI extends {
            icqEnabled: true;
        }
        ? ICQQueryFunction
        : CI["chainId"] extends `agoric${string}`
            ? QueryManyFn
            : never;
}

Type Parameters

Properties

getChainInfo: (() => Promise<CI>)
makeAccount: (() => Promise<OrchestrationAccount<CI>>)

Creates a new Orchestration Account on the current Chain.

Type declaration

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