@tmawallet/sdk
Version:
TMA Wallet SDK
51 lines (50 loc) • 1.7 kB
TypeScript
import { WalletBundleController } from '../client/WalletBundleController';
import { TMAWalletClient } from '../TMAWallet.Client';
export declare abstract class TMAWAlletAbstractWallet {
readonly client: TMAWalletClient;
readonly type: string;
protected walletBundleController: WalletBundleController;
protected lastReportedWalletAddress: string | null;
protected _walletAddress: string | null;
constructor(client: TMAWalletClient, type: string);
protected abstract getAddressFromPrivateKey(privateKey: Uint8Array): Promise<string>;
_init(): Promise<void>;
private _initWallet;
private _checkStateChanged;
get state(): {
readonly registered: false;
readonly walletAddress: null;
} | {
readonly registered: true;
readonly walletAddress: string | null;
};
get walletAddress(): string | null;
init(): Promise<{
readonly registered: false;
readonly walletAddress: null;
} | {
readonly registered: true;
readonly walletAddress: string | null;
}>;
authenticate(): Promise<{
readonly registered: false;
readonly walletAddress: null;
} | {
readonly registered: true;
readonly walletAddress: string | null;
}>;
initWallet(): Promise<{
readonly registered: false;
readonly walletAddress: null;
} | {
readonly registered: true;
readonly walletAddress: string | null;
}>;
clearLocalWalletAddress(): Promise<{
readonly registered: false;
readonly walletAddress: null;
} | {
readonly registered: true;
readonly walletAddress: string | null;
}>;
}