@quirks/ssr
Version:
30 lines (29 loc) • 1.16 kB
TypeScript
import { AppState } from '../../store/src/index.ts';
import { StorageValue } from 'zustand/middleware';
import { CookieAttributes } from 'js-cookie';
export interface StateOptions {
name: string;
cookiesOptions: CookieAttributes;
}
export declare const defaultStateOptions: StateOptions;
export declare const getState: (rawState: string) => StorageValue<AppState>;
export declare const getConnect: (rawState: string) => {
status: import('../../store/src/index.ts').ConnectionState;
setupStatus: import('../../store/src/index.ts').SetupState;
connected: boolean;
connecting: boolean;
connectionError: Error | undefined;
disconnected: boolean;
rejected: boolean;
walletName: string | undefined;
};
export declare const getChains: (rawState: string) => {
accounts: import('../../store/src/index.ts').AddressWithChain[];
accountName: string | undefined;
getAddress: (chainId: string) => string | undefined;
getAddresses: (chainIds: string[]) => string[];
};
export declare const getChain: (rawState: string, chainName: string) => {
address: string | undefined;
accountName: string | undefined;
};