UNPKG

chaingate

Version:

A complete TypeScript library for connecting to and making transactions on different blockchains

31 lines (30 loc) 1.35 kB
import React from 'react'; import * as iw from '../InitializeWallet'; import { PrivateKeyWallet } from '../Wallet'; import { PhraseWallet } from '../Wallet'; import { SeedWallet } from '../Wallet'; type Wallet = PrivateKeyWallet | PhraseWallet | SeedWallet; export declare const WalletContext: React.FC<{ children: React.ReactNode; }>; export declare function useWallet(): { wallet: Wallet; initializeWallet: { create(args: Parameters<typeof iw.create>[0]): Promise<{ phrase: string; wallet: PhraseWallet; }>; fromPrivateKey(args: Parameters<typeof iw.fromPrivateKey>[0]): Promise<PrivateKeyWallet>; fromSeed(args: Parameters<typeof iw.fromSeed>[0]): Promise<SeedWallet>; fromPhrase(args: Parameters<typeof iw.fromPhrase>[0]): Promise<PhraseWallet>; fromKeystore(args: Parameters<typeof iw.fromKeystore>[0]): Promise<SeedWallet | PhraseWallet | PrivateKeyWallet>; deserialize(args: Parameters<typeof iw.deserialize>[0]): Promise<SeedWallet | PhraseWallet | PrivateKeyWallet>; checkPhrase: typeof iw.checkPhrase; checkSeed: typeof iw.checkSeed; checkPrivateKey: typeof iw.checkPrivateKey; checkKeystore: typeof iw.checkKeystore; checkSerialized: typeof iw.checkSerialized; }; closeWallet: () => void; }; export {};