UNPKG

@dfinity/sns

Version:

A library for interfacing with a Service Nervous System (SNS) project.

22 lines (21 loc) 979 B
import type { Agent } from "@dfinity/agent"; import { type QueryParams } from "@dfinity/utils"; import type { _SERVICE as SnsRootService } from "../candid/sns_root"; import { SnsWrapper } from "./sns.wrapper"; import type { SnsCanisterOptions } from "./types/canister.options"; /** * Options to discover and initialize all canisters of a Sns. */ export interface InitSnsCanistersOptions extends QueryParams { /** An agent that can be used to override the default agent. Useful to target another environment that mainnet. */ agent?: Agent; /** The options that will be used to instantiate the actors of the root canister of the particular Sns. */ rootOptions: Omit<SnsCanisterOptions<SnsRootService>, "agent">; } export interface InitSnsWrapper { (options: InitSnsCanistersOptions): Promise<SnsWrapper>; } /** * Lookup for the canister ids of a Sns and initialize the wrapper to access its features. */ export declare const initSnsWrapper: InitSnsWrapper;