@ponziland/account
Version:
Account management library for Starknet with wallet modal and connection state
21 lines (20 loc) • 943 B
TypeScript
import Controller from '@cartridge/controller';
import { type AccountConfig } from '../consts.js';
import type { AccountInterface, WalletAccount } from 'starknet';
import type { AccountProvider, StoredSession } from '../context/account.svelte.js';
export declare class SvelteController extends Controller implements AccountProvider {
_account?: WalletAccount;
_username?: string;
connect(): Promise<WalletAccount | undefined>;
setupSession(): Promise<any>;
loadSession(storage: StoredSession): Promise<any>;
getWalletAccount(): AccountInterface | undefined;
supportsSession(): boolean;
disconnect(): Promise<void>;
getAccount(): AccountInterface | undefined;
getUsername(): string | undefined;
}
export declare function connect(controller: SvelteController): Promise<void>;
export declare function setupController(config: AccountConfig & {
policies?: any;
}): Promise<SvelteController | undefined>;