2019-05-15 01:48:48 +03:00
|
|
|
/// <reference types="node" />
|
2019-11-23 15:38:13 +03:00
|
|
|
import { randomBytes, randomHexString, randomNumber } from "./random";
|
|
|
|
export { randomBytes, randomHexString, randomNumber };
|
2019-05-15 01:48:48 +03:00
|
|
|
export declare module TestCase {
|
|
|
|
type HDWalletNode = {
|
|
|
|
path: string;
|
|
|
|
address: string;
|
|
|
|
privateKey: string;
|
|
|
|
};
|
|
|
|
type HDWallet = {
|
|
|
|
name: string;
|
|
|
|
seed: string;
|
|
|
|
locale: string;
|
|
|
|
password?: string;
|
|
|
|
entropy: string;
|
|
|
|
mnemonic: string;
|
|
|
|
hdnodes: Array<HDWalletNode>;
|
|
|
|
};
|
2019-08-02 09:10:58 +03:00
|
|
|
type Nameprep = {
|
|
|
|
comment: string;
|
|
|
|
input: Array<number>;
|
|
|
|
output: Array<number>;
|
|
|
|
rc?: string;
|
|
|
|
flags?: string;
|
|
|
|
};
|
2019-08-23 00:12:51 +03:00
|
|
|
type Wallet = {
|
|
|
|
name: string;
|
|
|
|
type: "crowdsale" | "secret-storage";
|
|
|
|
hasAddress: boolean;
|
|
|
|
address: string;
|
|
|
|
privateKey: string;
|
|
|
|
mnemonic?: string;
|
|
|
|
password?: string;
|
|
|
|
json: string;
|
|
|
|
};
|
2019-05-15 01:48:48 +03:00
|
|
|
type Wordlist = {
|
|
|
|
locale: string;
|
|
|
|
content: string;
|
|
|
|
};
|
|
|
|
type Unit = {
|
|
|
|
name: string;
|
|
|
|
ether: string;
|
|
|
|
ether_format: string;
|
|
|
|
wei: string;
|
|
|
|
kwei?: string;
|
|
|
|
mwei?: string;
|
|
|
|
gwei?: string;
|
|
|
|
szabo?: string;
|
|
|
|
finney?: string;
|
|
|
|
satoshi?: string;
|
|
|
|
kwei_format?: string;
|
|
|
|
mwei_format?: string;
|
|
|
|
gwei_format?: string;
|
|
|
|
szabo_format?: string;
|
|
|
|
finney_format?: string;
|
|
|
|
satoshi_format?: string;
|
|
|
|
};
|
2020-01-11 12:18:28 +03:00
|
|
|
type SignedTransaction = {
|
|
|
|
name: string;
|
|
|
|
accountAddress: string;
|
|
|
|
privateKey: string;
|
|
|
|
signedTransaction: string;
|
|
|
|
unsignedTransaction: string;
|
|
|
|
signedTransactionChainId5: string;
|
|
|
|
unsignedTransactionChainId5: string;
|
|
|
|
nonce: number;
|
|
|
|
gasLimit: string;
|
|
|
|
gasPrice: string;
|
|
|
|
to: string;
|
|
|
|
value: string;
|
|
|
|
data: string;
|
|
|
|
};
|
2019-05-15 01:48:48 +03:00
|
|
|
}
|
|
|
|
export declare function saveTests(tag: string, data: any): void;
|
|
|
|
export declare function loadTests(tag: string): any;
|
|
|
|
export declare function loadData(filename: string): Buffer;
|