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
32 lines (31 loc) • 907 B
TypeScript
import type { Keystore } from './Keystore';
/** JSON shape of a V1 (legacy) keystore file. */
export interface LegacyKeystoreData {
version: 1;
crypto: {
cipher: string;
cipherparams: {
iv: string;
};
ciphertext: string;
kdf: 'pbkdf2';
kdfparams: {
c: number;
prf: string;
dklen: number;
salt: string;
};
mac: string;
};
}
/** Legacy (V1) keystore. */
export declare class LegacyKeystore implements Keystore {
private readonly keystoreData;
private _derivedKey;
constructor(keystoreData: LegacyKeystoreData);
checkPassword(password: string): Promise<boolean>;
private deriveKey;
decrypt(password: string): Promise<Uint8Array>;
/** Checks whether a parsed JSON object looks like a V1 keystore. */
static isKeystore(obj: object): boolean;
}