@cygnus-wealth/wallet-integration-system
Version:
Multi-chain wallet integration system for CygnusWealth
41 lines • 1.71 kB
TypeScript
import { Chain, IntegrationSource } from '@cygnus-wealth/data-models';
import { MultiChainWalletManager, WalletConnection, WalletInstance, Account, WalletIntegrationConfig } from '../types';
export declare class WalletManager implements MultiChainWalletManager {
private wallets;
private activeWalletId;
private config?;
constructor(config?: WalletIntegrationConfig);
connectWallet(chain: Chain, source: IntegrationSource): Promise<WalletConnection>;
disconnectWallet(chain: Chain): Promise<void>;
getConnectedWallets(): WalletConnection[];
getAllWallets(): WalletInstance[];
getWallet(walletId: string): WalletInstance | undefined;
switchWallet(walletId: string): Promise<void>;
addWallet(name?: string): Promise<WalletInstance>;
removeWallet(walletId: string): Promise<void>;
getAllAccountsForChain(chain: Chain): Promise<Account[]>;
switchAccountForChain(chain: Chain, address: string): Promise<void>;
private createWalletIntegration;
disconnectAll(): Promise<void>;
isWalletConnected(chain: Chain): boolean;
getWalletAddress(chain: Chain): string | null;
/**
* Connects to all EVM chains available in the wallet.
* This uses the same address across all EVM chains.
*/
connectAllEVMChains(source?: IntegrationSource): Promise<{
connections: WalletConnection[];
}>;
/**
* Get all accounts across all connected chains and wallets
*/
getAllAccounts(): Promise<{
[walletId: string]: {
wallet: WalletInstance;
accountsByChain: {
[chain: string]: Account[];
};
};
}>;
}
//# sourceMappingURL=WalletManager.d.ts.map