UNPKG

@roochnetwork/rooch-sdk-kit

Version:
11 lines (10 loc) 568 B
import type { RoochClientOptions } from '@roochnetwork/rooch-sdk'; export type NetworkConfig<T extends object = object> = RoochClientOptions & { variables?: T; }; export declare function createNetworkConfig<const T extends Record<string, Config>, Config extends NetworkConfig<Variables> = T[keyof T], Variables extends object = NonNullable<Config['variables']>>(networkConfig: T): { networkConfig: T; useNetworkConfig: () => Config; useNetworkVariables: () => Variables; useNetworkVariable: <K extends keyof Variables>(name: K) => Variables[K]; };