UNPKG

chaingate

Version:

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

55 lines (54 loc) 2.6 kB
import { PhraseLanguage } from './Wallet/implementations/PhraseWallet/PhraseLanguage'; import { PhraseNumOfWords } from './Wallet/implementations/PhraseWallet/PhraseNumOfWords'; import { PhraseWallet } from './Wallet'; import { SeedWallet } from './Wallet'; import { PrivateKeyWallet } from './Wallet/implementations/PrivateKeyWallet/PrivateKeyWallet'; import { Encrypt } from './Wallet/entities/WalletEncryption/WalletEncryption'; import { ChainGateContext } from './Currencies/CurrencyUtils/ChainGateContext'; export { PhraseLanguage, PhraseNumOfWords }; export declare function createChainGateContext(apiKey: string): ChainGateContext; export declare function create({ apiKey, phraseLanguage, phraseNumOfWords, encrypt, warnAboutUnencrypted, }?: { apiKey?: string; phraseLanguage?: PhraseLanguage; phraseNumOfWords?: PhraseNumOfWords; encrypt?: Encrypt; warnAboutUnencrypted?: boolean; }): Promise<{ phrase: string; wallet: PhraseWallet; }>; export declare function fromPhrase({ apiKey, phrase, encrypt, warnAboutUnencrypted, }: { apiKey?: string; phrase: string; encrypt?: Encrypt; warnAboutUnencrypted?: boolean; }): Promise<PhraseWallet>; export declare function checkPhrase(phrase: string): Promise<boolean>; export declare function fromSeed({ apiKey, seed, encrypt, warnAboutUnencrypted, }: { apiKey?: string; seed: string | Uint8Array; encrypt?: Encrypt; warnAboutUnencrypted?: boolean; }): Promise<SeedWallet>; export declare function checkSeed(seed: string | Uint8Array): Promise<boolean>; export declare function fromPrivateKey({ apiKey, privateKey, encrypt, warnAboutUnencrypted, }: { apiKey?: string; privateKey: string | Uint8Array; encrypt?: Encrypt; warnAboutUnencrypted?: boolean; }): Promise<PrivateKeyWallet>; export declare function checkPrivateKey(privateKey: string | Uint8Array): Promise<boolean>; export declare function fromKeystore({ apiKey, keystore, password, encrypt, warnAboutUnencrypted, }: { apiKey?: string; keystore: string; password: string; encrypt?: Encrypt; warnAboutUnencrypted?: boolean; }): Promise<PhraseWallet | SeedWallet | PrivateKeyWallet>; export declare function checkKeystore(keystore: string): Promise<boolean>; export declare function deserialize({ apiKey, serialized, askForPassword, }: { apiKey?: string; serialized: string; askForPassword: (attempts: number, reject: () => void) => Promise<string>; }): Promise<SeedWallet | PhraseWallet | PrivateKeyWallet>; export declare function checkSerialized(serialized: string): Promise<boolean>;