@pushchain/ui-kit
Version:
Push Chain is a true universal L1 that is 100% EVM compatible. It allows developers to deploy once and make their apps instantly compatible with users from all other L1s (Ethereum, Solana, etc) with zero on-chain code change.
20 lines (19 loc) • 922 B
TypeScript
import { ChainType, IWalletProvider, ITypedData } from '../../types/wallet.types';
export declare abstract class BaseWalletProvider implements IWalletProvider {
readonly name: string;
readonly icon: string;
readonly supportedChains: ChainType[];
constructor(name: string, icon: string, supportedChains: ChainType[]);
abstract connect(chainType?: ChainType): Promise<{
caipAddress: string;
}>;
abstract signMessage(message: Uint8Array): Promise<Uint8Array>;
abstract signAndSendTransaction(txn: Uint8Array): Promise<Uint8Array>;
abstract signTypedData(typedData: ITypedData): Promise<Uint8Array>;
abstract disconnect(): Promise<void>;
abstract getChainId(): Promise<unknown>;
protected formatAddress(rawAddress: string, chainType: ChainType, chainId: number): {
caipAddress: string;
};
protected validateChainType(chainType?: ChainType): ChainType;
}