UNPKG

chaingate

Version:

Multi-chain cryptocurrency SDK for TypeScript — unified API for Bitcoin, Ethereum, Litecoin, Dogecoin, Bitcoin Cash, Polygon, Arbitrum, and any EVM-compatible chain. Create wallets, query balances, send transactions, and manage tokens and NFTs across UTXO

35 lines (34 loc) 980 B
import type { Keystore } from './Keystore'; /** JSON shape of a V3 (Web3) keystore file. */ export interface Web3KeystoreData { crypto: { cipher: string; ciphertext: string; cipherparams: { iv: string; }; kdf: 'scrypt' | 'pbkdf2'; kdfparams: { dklen: number; n?: number; p?: number; r?: number; salt: string; c?: number; prf?: string; }; mac: string; }; version: 3; } /** Web3 (V3) keystore. */ export declare class Web3Keystore implements Keystore { private readonly keystoreData; constructor(keystoreData: Web3KeystoreData); checkPassword(password: string): Promise<boolean>; decrypt(password: string): Promise<Uint8Array>; private deriveKey; private verifyMac; /** Checks whether a parsed JSON object looks like a V3 keystore. */ static isKeystore(obj: object): boolean; }