salt: string;// Random salt for the kdf. Size must match the requirements of the KDF (key derivation function). Random number generated via crypto.getRandomBytes if nothing is supplied.
}
interfaceIScryptKdfParamsextendsIKdfParams{
n: number;// Iteration count. Defaults to 262144.
r: number;// Block size for the underlying hash. Defaults to 8.
p: number;// Parallelization factor. Defaults to 1.
}
interfaceIPbkdf2KdfParamsextendsIKdfParams{
prf:'hmac-sha256';
c: number;
}
interfaceIV1Wallet{
Version: 1;
Crypto:{
KeyHeader:{
Kdf:'scrypt';
KdfParams:{
N: number;
R: number;
P: number;
DkLen: number;
};
};
MAC: string;
CipherText: string;
Salt: string;
IV: string;
};
}
interfaceIV3Wallet{
version: 3;
id: string;
address: string;
Crypto:{
ciphertext: string;
cipherParams:{
iv: string;
};
cipher: string|'aes-128-ctr';
kdf:'scrypt'|'pbkdf2';
kfdparams: IScryptKdfParams|IPbkdf2KdfParams;
mac: string;
};
}
interfaceIEtherWalletLocked{
private:string;
encrypted: true;
address: string;
locked: true;
}
interfaceIEtherWalletUnlocked{
private:string;
locked: false;
encrypted: false;
address: string;
}
interfaceIV3Options{
salt?: Buffer;// Random salt for the kdf. Size must match the requirements of the KDF (key derivation function). Random number generated via crypto.getRandomBytes if nothing is supplied.
iv?: Buffer;// Initialization vector for the cipher. Size must match the requirements of the cipher. Random number generated via crypto.getRandomBytes if nothing is supplied.
kdf?: string;// The key derivation function, see below.
dklen?: number;// Derived key length. For certain cipher settings, this must match the block sizes of those.
uuid?: Buffer;// UUID. One is randomly generated.
cipher?: string|'aes-128-ctr'|'aes-128-cbc';// The cipher to use. Names must match those of supported by OpenSSL, e.g. aes-128-ctr or aes-128-cbc.
/* pbkdf2 */
c?: number;// Number of iterations. Defaults to 262144.
/* scrypt */
n?: number;// Iteration count. Defaults to 262144.
r?: number;// Block size for the underlying hash. Defaults to 8.
p?: number;// Parallelization factor. Defaults to 1.
}
classIPublicKeyOnlyWallet{
_pubKey: string;
/**
*@descriptionreturnthepublickey
*/
getPublicKey():Buffer;//only returns uncompressed Ethereum-style public keys.