@tenprotocol/session-keys
Version:
Framework-agnostic session key management for TEN Protocol
31 lines (29 loc) • 841 B
text/typescript
interface EIP1193Provider {
request(args: {
method: string;
params?: any[];
}): Promise<any>;
on?(event: string, listener: (...args: any[]) => void): void;
removeListener?(event: string, listener: (...args: any[]) => void): void;
}
interface TransactionParams {
to: string;
data: string;
value?: string;
nonce?: number;
gasLimit?: number;
maxFeePerGas?: string;
maxPriorityFeePerGas?: string;
}
interface SessionKeyState {
sessionKey: string | null;
isActive: boolean;
balance: {
eth: number;
estimatedTransactions: number;
} | null;
isLoading: boolean;
error: Error | null;
}
type StateSubscriber = (state: SessionKeyState) => void;
export type { EIP1193Provider as E, SessionKeyState as S, TransactionParams as T, StateSubscriber as a };