1 | import { Bytes, Transaction } from 'web3-types';
|
2 | import Eth from 'web3-eth';
|
3 | import { decodeLog, decodeParameter, decodeParameters, encodeFunctionCall, encodeFunctionSignature, encodeParameter, encodeParameters } from 'web3-eth-abi';
|
4 | import { encrypt, hashMessage, recover, recoverTransaction, sign, signTransaction, Wallet, Web3Account } from 'web3-eth-accounts';
|
5 | import { Contract } from 'web3-eth-contract';
|
6 | import { ENS } from 'web3-eth-ens';
|
7 | import { Net } from 'web3-net';
|
8 | import { Iban } from 'web3-eth-iban';
|
9 | import { Personal } from 'web3-eth-personal';
|
10 | export type { Web3Account, Wallet } from 'web3-eth-accounts';
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 | export interface Web3EthInterface extends Eth {
|
17 | |
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 | Contract: typeof Contract;
|
28 | Iban: typeof Iban;
|
29 | net: Net;
|
30 | ens: ENS;
|
31 | abi: {
|
32 | encodeEventSignature: typeof encodeFunctionSignature;
|
33 | encodeFunctionCall: typeof encodeFunctionCall;
|
34 | encodeFunctionSignature: typeof encodeFunctionSignature;
|
35 | encodeParameter: typeof encodeParameter;
|
36 | encodeParameters: typeof encodeParameters;
|
37 | decodeParameter: typeof decodeParameter;
|
38 | decodeParameters: typeof decodeParameters;
|
39 | decodeLog: typeof decodeLog;
|
40 | };
|
41 | accounts: {
|
42 | create: () => Web3Account;
|
43 | privateKeyToAccount: (privateKey: Uint8Array | string) => Web3Account;
|
44 | signTransaction: (transaction: Transaction, privateKey: Bytes) => ReturnType<typeof signTransaction>;
|
45 | recoverTransaction: typeof recoverTransaction;
|
46 | hashMessage: typeof hashMessage;
|
47 | sign: typeof sign;
|
48 | recover: typeof recover;
|
49 | encrypt: typeof encrypt;
|
50 | decrypt: (keystore: string, password: string, options?: Record<string, unknown>) => Promise<Web3Account>;
|
51 | wallet: Wallet;
|
52 | privateKeyToAddress: (privateKey: Bytes) => string;
|
53 | privateKeyToPublicKey: (privateKey: Bytes, isCompressed: boolean) => string;
|
54 | parseAndValidatePrivateKey: (data: Bytes, ignoreLength?: boolean) => Uint8Array;
|
55 | };
|
56 | personal: Personal;
|
57 | }
|