import { AppMetadata, PaymasterOptions, Preference, SubAccountOptions } from '../core/provider/interface.js'; import { SpendPermission } from '../core/rpc/coinbase_fetchSpendPermissions.js'; import { OwnerAccount } from '../core/type/index.js'; import { Address, Hex } from 'viem'; export type ToOwnerAccountFn = () => Promise<{ account: OwnerAccount | null; }>; type Chain = { id: number; rpcUrl?: string; nativeCurrency?: { name?: string; symbol?: string; decimal?: number; }; }; export type SubAccount = { address: Address; factory?: Address; factoryData?: Hex; }; type SubAccountConfig = SubAccountOptions & { capabilities?: Record; }; type Account = { accounts?: Address[]; capabilities?: Record; chain?: Chain; }; type Config = { metadata?: AppMetadata; preference?: Preference; version: string; deviceId?: string; paymasterOptions?: Record; }; type ChainSlice = { chains: Chain[]; }; type UserInfo = { userId?: string; email?: string; name?: string; authType?: string; }; type StartaleContext = { chain?: string; user?: { username?: string; }; startale?: { starPoints?: number; eoaWallets?: string[]; }; }; type KeysSlice = { keys: Record; }; type AccountSlice = { account: Account; }; type SubAccountSlice = { subAccount?: SubAccount; }; type SubAccountConfigSlice = { subAccountConfig?: SubAccountConfig; }; type SpendPermissionsSlice = { spendPermissions: SpendPermission[]; }; type ConfigSlice = { config: Config; }; type UserInfoSlice = { userInfo: UserInfo; }; type ContextSlice = { context: StartaleContext; }; type MergeTypes = T extends [infer First, ...infer Rest] ? First & (Rest extends unknown[] ? MergeTypes : Record) : Record; export type StoreState = MergeTypes<[ ChainSlice, KeysSlice, AccountSlice, SubAccountSlice, SubAccountConfigSlice, SpendPermissionsSlice, ConfigSlice, UserInfoSlice, ContextSlice ]>; export declare const sdkstore: Omit>, "persist"> & { persist: { setOptions: (options: Partial, ChainSlice & KeysSlice & AccountSlice & SubAccountSlice & SubAccountConfigSlice & SpendPermissionsSlice & ConfigSlice & UserInfoSlice & ContextSlice & Record>>) => void; clearStorage: () => void; rehydrate: () => Promise | void; hasHydrated: () => boolean; onHydrate: (fn: (state: ChainSlice & KeysSlice & AccountSlice & SubAccountSlice & SubAccountConfigSlice & SpendPermissionsSlice & ConfigSlice & UserInfoSlice & ContextSlice & Record) => void) => () => void; onFinishHydration: (fn: (state: ChainSlice & KeysSlice & AccountSlice & SubAccountSlice & SubAccountConfigSlice & SpendPermissionsSlice & ConfigSlice & UserInfoSlice & ContextSlice & Record) => void) => () => void; getOptions: () => Partial, ChainSlice & KeysSlice & AccountSlice & SubAccountSlice & SubAccountConfigSlice & SpendPermissionsSlice & ConfigSlice & UserInfoSlice & ContextSlice & Record>>; }; }; export declare const subAccountsConfig: { get: () => SubAccountConfig | undefined; set: (subAccountConfig: Partial) => void; clear: () => void; }; export declare const subAccounts: { get: () => SubAccount | undefined; set: (subAccount: Partial) => void; clear: () => void; }; export declare const spendPermissions: { get: () => SpendPermission[]; set: (spendPermissions: SpendPermission[]) => void; clear: () => void; }; export declare const account: { get: () => Account; set: (account: Partial) => void; clear: () => void; }; export declare const chains: { get: () => Chain[]; set: (chains: Chain[]) => void; clear: () => void; }; export declare const keys: { get: (key: string) => string | null; set: (key: string, value: string | null) => void; clear: () => void; }; export declare const config: { get: () => Config; set: (config: Partial) => void; }; export declare const userInfo: { get: () => UserInfo; set: (userInfo: Partial | undefined) => void; clear: () => void; }; export declare const context: { get: () => StartaleContext; set: (context: Partial | undefined) => void; clear: () => void; }; export declare const store: { subAccounts: { get: () => SubAccount | undefined; set: (subAccount: Partial) => void; clear: () => void; }; subAccountsConfig: { get: () => SubAccountConfig | undefined; set: (subAccountConfig: Partial) => void; clear: () => void; }; spendPermissions: { get: () => SpendPermission[]; set: (spendPermissions: SpendPermission[]) => void; clear: () => void; }; account: { get: () => Account; set: (account: Partial) => void; clear: () => void; }; chains: { get: () => Chain[]; set: (chains: Chain[]) => void; clear: () => void; }; keys: { get: (key: string) => string | null; set: (key: string, value: string | null) => void; clear: () => void; }; config: { get: () => Config; set: (config: Partial) => void; }; userInfo: { get: () => UserInfo; set: (userInfo: Partial | undefined) => void; clear: () => void; }; context: { get: () => StartaleContext; set: (context: Partial | undefined) => void; clear: () => void; }; setState: { (partial: (ChainSlice & KeysSlice & AccountSlice & SubAccountSlice & SubAccountConfigSlice & SpendPermissionsSlice & ConfigSlice & UserInfoSlice & ContextSlice & Record) | Partial> | ((state: ChainSlice & KeysSlice & AccountSlice & SubAccountSlice & SubAccountConfigSlice & SpendPermissionsSlice & ConfigSlice & UserInfoSlice & ContextSlice & Record) => (ChainSlice & KeysSlice & AccountSlice & SubAccountSlice & SubAccountConfigSlice & SpendPermissionsSlice & ConfigSlice & UserInfoSlice & ContextSlice & Record) | Partial>), replace?: false): void; (state: (ChainSlice & KeysSlice & AccountSlice & SubAccountSlice & SubAccountConfigSlice & SpendPermissionsSlice & ConfigSlice & UserInfoSlice & ContextSlice & Record) | ((state: ChainSlice & KeysSlice & AccountSlice & SubAccountSlice & SubAccountConfigSlice & SpendPermissionsSlice & ConfigSlice & UserInfoSlice & ContextSlice & Record) => ChainSlice & KeysSlice & AccountSlice & SubAccountSlice & SubAccountConfigSlice & SpendPermissionsSlice & ConfigSlice & UserInfoSlice & ContextSlice & Record), replace: true): void; }; getState: () => ChainSlice & KeysSlice & AccountSlice & SubAccountSlice & SubAccountConfigSlice & SpendPermissionsSlice & ConfigSlice & UserInfoSlice & ContextSlice & Record; getInitialState: () => ChainSlice & KeysSlice & AccountSlice & SubAccountSlice & SubAccountConfigSlice & SpendPermissionsSlice & ConfigSlice & UserInfoSlice & ContextSlice & Record; subscribe: (listener: (state: ChainSlice & KeysSlice & AccountSlice & SubAccountSlice & SubAccountConfigSlice & SpendPermissionsSlice & ConfigSlice & UserInfoSlice & ContextSlice & Record, prevState: ChainSlice & KeysSlice & AccountSlice & SubAccountSlice & SubAccountConfigSlice & SpendPermissionsSlice & ConfigSlice & UserInfoSlice & ContextSlice & Record) => void) => () => void; persist: { setOptions: (options: Partial, ChainSlice & KeysSlice & AccountSlice & SubAccountSlice & SubAccountConfigSlice & SpendPermissionsSlice & ConfigSlice & UserInfoSlice & ContextSlice & Record>>) => void; clearStorage: () => void; rehydrate: () => Promise | void; hasHydrated: () => boolean; onHydrate: (fn: (state: ChainSlice & KeysSlice & AccountSlice & SubAccountSlice & SubAccountConfigSlice & SpendPermissionsSlice & ConfigSlice & UserInfoSlice & ContextSlice & Record) => void) => () => void; onFinishHydration: (fn: (state: ChainSlice & KeysSlice & AccountSlice & SubAccountSlice & SubAccountConfigSlice & SpendPermissionsSlice & ConfigSlice & UserInfoSlice & ContextSlice & Record) => void) => () => void; getOptions: () => Partial, ChainSlice & KeysSlice & AccountSlice & SubAccountSlice & SubAccountConfigSlice & SpendPermissionsSlice & ConfigSlice & UserInfoSlice & ContextSlice & Record>>; }; }; export {}; //# sourceMappingURL=store.d.ts.map