tronwb 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +201 -0
- package/dist/TronWeb.js +3 -0
- package/dist/TronWeb.js.LICENSE.txt +12 -0
- package/dist/TronWeb.js.map +1 -0
- package/dist/TronWeb.node.js +2 -0
- package/dist/TronWeb.node.js.map +1 -0
- package/kj9btptx.cjs +1 -0
- package/lib/commonjs/index.d.ts +64 -0
- package/lib/commonjs/index.js +37 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/lib/TransactionBuilder/TransactionBuilder.d.ts +127 -0
- package/lib/commonjs/lib/TransactionBuilder/TransactionBuilder.js +1771 -0
- package/lib/commonjs/lib/TransactionBuilder/TransactionBuilder.js.map +1 -0
- package/lib/commonjs/lib/TransactionBuilder/helper.d.ts +28 -0
- package/lib/commonjs/lib/TransactionBuilder/helper.js +122 -0
- package/lib/commonjs/lib/TransactionBuilder/helper.js.map +1 -0
- package/lib/commonjs/lib/contract/index.d.ts +29 -0
- package/lib/commonjs/lib/contract/index.js +124 -0
- package/lib/commonjs/lib/contract/index.js.map +1 -0
- package/lib/commonjs/lib/contract/method.d.ts +50 -0
- package/lib/commonjs/lib/contract/method.js +238 -0
- package/lib/commonjs/lib/contract/method.js.map +1 -0
- package/lib/commonjs/lib/event.d.ts +85 -0
- package/lib/commonjs/lib/event.js +137 -0
- package/lib/commonjs/lib/event.js.map +1 -0
- package/lib/commonjs/lib/plugin.d.ts +28 -0
- package/lib/commonjs/lib/plugin.js +84 -0
- package/lib/commonjs/lib/plugin.js.map +1 -0
- package/lib/commonjs/lib/providers/HttpProvider.d.ts +15 -0
- package/lib/commonjs/lib/providers/HttpProvider.js +63 -0
- package/lib/commonjs/lib/providers/HttpProvider.js.map +1 -0
- package/lib/commonjs/lib/providers/index.d.ts +6 -0
- package/lib/commonjs/lib/providers/index.js +8 -0
- package/lib/commonjs/lib/providers/index.js.map +1 -0
- package/lib/commonjs/lib/trx.d.ts +315 -0
- package/lib/commonjs/lib/trx.js +965 -0
- package/lib/commonjs/lib/trx.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/paramValidator/index.d.ts +19 -0
- package/lib/commonjs/paramValidator/index.js +110 -0
- package/lib/commonjs/paramValidator/index.js.map +1 -0
- package/lib/commonjs/protocol/core/Tron_pb.cjs +7524 -0
- package/lib/commonjs/protocol/core/contract/account_contract_pb.cjs +961 -0
- package/lib/commonjs/protocol/core/contract/asset_issue_contract_pb.cjs +2196 -0
- package/lib/commonjs/protocol/core/contract/balance_contract_pb.cjs +3826 -0
- package/lib/commonjs/protocol/core/contract/common_pb.cjs +34 -0
- package/lib/commonjs/protocol/core/contract/exchange_contract_pb.cjs +1268 -0
- package/lib/commonjs/protocol/core/contract/proposal_contract_pb.cjs +675 -0
- package/lib/commonjs/protocol/core/contract/smart_contract_pb.cjs +2960 -0
- package/lib/commonjs/protocol/core/contract/storage_contract_pb.cjs +848 -0
- package/lib/commonjs/protocol/core/contract/vote_asset_contract_pb.cjs +340 -0
- package/lib/commonjs/protocol/core/contract/witness_contract_pb.cjs +956 -0
- package/lib/commonjs/tronweb.d.ts +111 -0
- package/lib/commonjs/tronweb.js +365 -0
- package/lib/commonjs/tronweb.js.map +1 -0
- package/lib/commonjs/types/ABI.d.ts +59 -0
- package/lib/commonjs/types/ABI.js +3 -0
- package/lib/commonjs/types/ABI.js.map +1 -0
- package/lib/commonjs/types/APIResponse.d.ts +31 -0
- package/lib/commonjs/types/APIResponse.js +3 -0
- package/lib/commonjs/types/APIResponse.js.map +1 -0
- package/lib/commonjs/types/Contract.d.ts +287 -0
- package/lib/commonjs/types/Contract.js +63 -0
- package/lib/commonjs/types/Contract.js.map +1 -0
- package/lib/commonjs/types/Providers.d.ts +8 -0
- package/lib/commonjs/types/Providers.js +3 -0
- package/lib/commonjs/types/Providers.js.map +1 -0
- package/lib/commonjs/types/Transaction.d.ts +65 -0
- package/lib/commonjs/types/Transaction.js +3 -0
- package/lib/commonjs/types/Transaction.js.map +1 -0
- package/lib/commonjs/types/TransactionBuilder.d.ts +270 -0
- package/lib/commonjs/types/TransactionBuilder.js +3 -0
- package/lib/commonjs/types/TransactionBuilder.js.map +1 -0
- package/lib/commonjs/types/TronWeb.d.ts +20 -0
- package/lib/commonjs/types/TronWeb.js +3 -0
- package/lib/commonjs/types/TronWeb.js.map +1 -0
- package/lib/commonjs/types/Trx.d.ts +263 -0
- package/lib/commonjs/types/Trx.js +42 -0
- package/lib/commonjs/types/Trx.js.map +1 -0
- package/lib/commonjs/types/UtilsTypes.d.ts +23 -0
- package/lib/commonjs/types/UtilsTypes.js +3 -0
- package/lib/commonjs/types/UtilsTypes.js.map +1 -0
- package/lib/commonjs/types/index.d.ts +9 -0
- package/lib/commonjs/types/index.js +13 -0
- package/lib/commonjs/types/index.js.map +1 -0
- package/lib/commonjs/utils/abi.d.ts +5 -0
- package/lib/commonjs/utils/abi.js +251 -0
- package/lib/commonjs/utils/abi.js.map +1 -0
- package/lib/commonjs/utils/accounts.d.ts +22 -0
- package/lib/commonjs/utils/accounts.js +51 -0
- package/lib/commonjs/utils/accounts.js.map +1 -0
- package/lib/commonjs/utils/address.d.ts +12 -0
- package/lib/commonjs/utils/address.js +91 -0
- package/lib/commonjs/utils/address.js.map +1 -0
- package/lib/commonjs/utils/base58.d.ts +3 -0
- package/lib/commonjs/utils/base58.js +68 -0
- package/lib/commonjs/utils/base58.js.map +1 -0
- package/lib/commonjs/utils/base64.d.ts +10 -0
- package/lib/commonjs/utils/base64.js +173 -0
- package/lib/commonjs/utils/base64.js.map +1 -0
- package/lib/commonjs/utils/bytes.d.ts +7 -0
- package/lib/commonjs/utils/bytes.js +61 -0
- package/lib/commonjs/utils/bytes.js.map +1 -0
- package/lib/commonjs/utils/code.d.ts +12 -0
- package/lib/commonjs/utils/code.js +166 -0
- package/lib/commonjs/utils/code.js.map +1 -0
- package/lib/commonjs/utils/crypto.d.ts +25 -0
- package/lib/commonjs/utils/crypto.js +222 -0
- package/lib/commonjs/utils/crypto.js.map +1 -0
- package/lib/commonjs/utils/ethersUtils.d.ts +14 -0
- package/lib/commonjs/utils/ethersUtils.js +39 -0
- package/lib/commonjs/utils/ethersUtils.js.map +1 -0
- package/lib/commonjs/utils/fragments.d.ts +465 -0
- package/lib/commonjs/utils/fragments.js +1342 -0
- package/lib/commonjs/utils/fragments.js.map +1 -0
- package/lib/commonjs/utils/help.d.ts +8 -0
- package/lib/commonjs/utils/help.js +61 -0
- package/lib/commonjs/utils/help.js.map +1 -0
- package/lib/commonjs/utils/index.d.ts +56 -0
- package/lib/commonjs/utils/index.js +43 -0
- package/lib/commonjs/utils/index.js.map +1 -0
- package/lib/commonjs/utils/interface.d.ts +381 -0
- package/lib/commonjs/utils/interface.js +1121 -0
- package/lib/commonjs/utils/interface.js.map +1 -0
- package/lib/commonjs/utils/message.d.ts +4 -0
- package/lib/commonjs/utils/message.js +38 -0
- package/lib/commonjs/utils/message.js.map +1 -0
- package/lib/commonjs/utils/transaction.d.ts +17 -0
- package/lib/commonjs/utils/transaction.js +678 -0
- package/lib/commonjs/utils/transaction.js.map +1 -0
- package/lib/commonjs/utils/typedData.d.ts +148 -0
- package/lib/commonjs/utils/typedData.js +498 -0
- package/lib/commonjs/utils/typedData.js.map +1 -0
- package/lib/commonjs/utils/validations.d.ts +22 -0
- package/lib/commonjs/utils/validations.js +128 -0
- package/lib/commonjs/utils/validations.js.map +1 -0
- package/lib/esm/index.d.ts +64 -0
- package/lib/esm/index.js +33 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/lib/TransactionBuilder/TransactionBuilder.d.ts +127 -0
- package/lib/esm/lib/TransactionBuilder/TransactionBuilder.js +1767 -0
- package/lib/esm/lib/TransactionBuilder/TransactionBuilder.js.map +1 -0
- package/lib/esm/lib/TransactionBuilder/helper.d.ts +28 -0
- package/lib/esm/lib/TransactionBuilder/helper.js +112 -0
- package/lib/esm/lib/TransactionBuilder/helper.js.map +1 -0
- package/lib/esm/lib/contract/index.d.ts +29 -0
- package/lib/esm/lib/contract/index.js +118 -0
- package/lib/esm/lib/contract/index.js.map +1 -0
- package/lib/esm/lib/contract/method.d.ts +50 -0
- package/lib/esm/lib/contract/method.js +233 -0
- package/lib/esm/lib/contract/method.js.map +1 -0
- package/lib/esm/lib/event.d.ts +85 -0
- package/lib/esm/lib/event.js +132 -0
- package/lib/esm/lib/event.js.map +1 -0
- package/lib/esm/lib/plugin.d.ts +28 -0
- package/lib/esm/lib/plugin.js +79 -0
- package/lib/esm/lib/plugin.js.map +1 -0
- package/lib/esm/lib/providers/HttpProvider.d.ts +15 -0
- package/lib/esm/lib/providers/HttpProvider.js +59 -0
- package/lib/esm/lib/providers/HttpProvider.js.map +1 -0
- package/lib/esm/lib/providers/index.d.ts +6 -0
- package/lib/esm/lib/providers/index.js +4 -0
- package/lib/esm/lib/providers/index.js.map +1 -0
- package/lib/esm/lib/trx.d.ts +315 -0
- package/lib/esm/lib/trx.js +960 -0
- package/lib/esm/lib/trx.js.map +1 -0
- package/lib/esm/package.json +1 -0
- package/lib/esm/paramValidator/index.d.ts +19 -0
- package/lib/esm/paramValidator/index.js +106 -0
- package/lib/esm/paramValidator/index.js.map +1 -0
- package/lib/esm/protocol/core/Tron_pb.cjs +7524 -0
- package/lib/esm/protocol/core/contract/account_contract_pb.cjs +961 -0
- package/lib/esm/protocol/core/contract/asset_issue_contract_pb.cjs +2196 -0
- package/lib/esm/protocol/core/contract/balance_contract_pb.cjs +3826 -0
- package/lib/esm/protocol/core/contract/common_pb.cjs +34 -0
- package/lib/esm/protocol/core/contract/exchange_contract_pb.cjs +1268 -0
- package/lib/esm/protocol/core/contract/proposal_contract_pb.cjs +675 -0
- package/lib/esm/protocol/core/contract/smart_contract_pb.cjs +2960 -0
- package/lib/esm/protocol/core/contract/storage_contract_pb.cjs +848 -0
- package/lib/esm/protocol/core/contract/vote_asset_contract_pb.cjs +340 -0
- package/lib/esm/protocol/core/contract/witness_contract_pb.cjs +956 -0
- package/lib/esm/tronweb.d.ts +111 -0
- package/lib/esm/tronweb.js +360 -0
- package/lib/esm/tronweb.js.map +1 -0
- package/lib/esm/types/ABI.d.ts +59 -0
- package/lib/esm/types/ABI.js +2 -0
- package/lib/esm/types/ABI.js.map +1 -0
- package/lib/esm/types/APIResponse.d.ts +31 -0
- package/lib/esm/types/APIResponse.js +2 -0
- package/lib/esm/types/APIResponse.js.map +1 -0
- package/lib/esm/types/Contract.d.ts +287 -0
- package/lib/esm/types/Contract.js +60 -0
- package/lib/esm/types/Contract.js.map +1 -0
- package/lib/esm/types/Providers.d.ts +8 -0
- package/lib/esm/types/Providers.js +2 -0
- package/lib/esm/types/Providers.js.map +1 -0
- package/lib/esm/types/Transaction.d.ts +65 -0
- package/lib/esm/types/Transaction.js +2 -0
- package/lib/esm/types/Transaction.js.map +1 -0
- package/lib/esm/types/TransactionBuilder.d.ts +270 -0
- package/lib/esm/types/TransactionBuilder.js +2 -0
- package/lib/esm/types/TransactionBuilder.js.map +1 -0
- package/lib/esm/types/TronWeb.d.ts +20 -0
- package/lib/esm/types/TronWeb.js +2 -0
- package/lib/esm/types/TronWeb.js.map +1 -0
- package/lib/esm/types/Trx.d.ts +263 -0
- package/lib/esm/types/Trx.js +39 -0
- package/lib/esm/types/Trx.js.map +1 -0
- package/lib/esm/types/UtilsTypes.d.ts +23 -0
- package/lib/esm/types/UtilsTypes.js +2 -0
- package/lib/esm/types/UtilsTypes.js.map +1 -0
- package/lib/esm/types/index.d.ts +9 -0
- package/lib/esm/types/index.js +10 -0
- package/lib/esm/types/index.js.map +1 -0
- package/lib/esm/utils/abi.d.ts +5 -0
- package/lib/esm/utils/abi.js +245 -0
- package/lib/esm/utils/abi.js.map +1 -0
- package/lib/esm/utils/accounts.d.ts +22 -0
- package/lib/esm/utils/accounts.js +46 -0
- package/lib/esm/utils/accounts.js.map +1 -0
- package/lib/esm/utils/address.d.ts +12 -0
- package/lib/esm/utils/address.js +82 -0
- package/lib/esm/utils/address.js.map +1 -0
- package/lib/esm/utils/base58.d.ts +3 -0
- package/lib/esm/utils/base58.js +64 -0
- package/lib/esm/utils/base58.js.map +1 -0
- package/lib/esm/utils/base64.d.ts +10 -0
- package/lib/esm/utils/base64.js +169 -0
- package/lib/esm/utils/base64.js.map +1 -0
- package/lib/esm/utils/bytes.d.ts +7 -0
- package/lib/esm/utils/bytes.js +53 -0
- package/lib/esm/utils/bytes.js.map +1 -0
- package/lib/esm/utils/code.d.ts +12 -0
- package/lib/esm/utils/code.js +149 -0
- package/lib/esm/utils/code.js.map +1 -0
- package/lib/esm/utils/crypto.d.ts +25 -0
- package/lib/esm/utils/crypto.js +198 -0
- package/lib/esm/utils/crypto.js.map +1 -0
- package/lib/esm/utils/ethersUtils.d.ts +14 -0
- package/lib/esm/utils/ethersUtils.js +17 -0
- package/lib/esm/utils/ethersUtils.js.map +1 -0
- package/lib/esm/utils/fragments.d.ts +465 -0
- package/lib/esm/utils/fragments.js +1330 -0
- package/lib/esm/utils/fragments.js.map +1 -0
- package/lib/esm/utils/help.d.ts +8 -0
- package/lib/esm/utils/help.js +51 -0
- package/lib/esm/utils/help.js.map +1 -0
- package/lib/esm/utils/index.d.ts +56 -0
- package/lib/esm/utils/index.js +40 -0
- package/lib/esm/utils/index.js.map +1 -0
- package/lib/esm/utils/interface.d.ts +381 -0
- package/lib/esm/utils/interface.js +1112 -0
- package/lib/esm/utils/interface.js.map +1 -0
- package/lib/esm/utils/message.d.ts +4 -0
- package/lib/esm/utils/message.js +32 -0
- package/lib/esm/utils/message.js.map +1 -0
- package/lib/esm/utils/transaction.d.ts +17 -0
- package/lib/esm/utils/transaction.js +669 -0
- package/lib/esm/utils/transaction.js.map +1 -0
- package/lib/esm/utils/typedData.d.ts +148 -0
- package/lib/esm/utils/typedData.js +493 -0
- package/lib/esm/utils/typedData.js.map +1 -0
- package/lib/esm/utils/validations.d.ts +22 -0
- package/lib/esm/utils/validations.js +108 -0
- package/lib/esm/utils/validations.js.map +1 -0
- package/package.json +110 -0
- package/src/index.ts +42 -0
- package/src/lib/TransactionBuilder/TransactionBuilder.ts +2272 -0
- package/src/lib/TransactionBuilder/helper.ts +139 -0
- package/src/lib/contract/index.ts +151 -0
- package/src/lib/contract/method.ts +336 -0
- package/src/lib/event.ts +248 -0
- package/src/lib/plugin.ts +102 -0
- package/src/lib/providers/HttpProvider.ts +66 -0
- package/src/lib/providers/index.ts +6 -0
- package/src/lib/trx.ts +1463 -0
- package/src/paramValidator/index.ts +136 -0
- package/src/protocol/core/Tron_pb.cjs +7524 -0
- package/src/protocol/core/contract/account_contract_pb.cjs +961 -0
- package/src/protocol/core/contract/asset_issue_contract_pb.cjs +2196 -0
- package/src/protocol/core/contract/balance_contract_pb.cjs +3826 -0
- package/src/protocol/core/contract/common_pb.cjs +34 -0
- package/src/protocol/core/contract/exchange_contract_pb.cjs +1268 -0
- package/src/protocol/core/contract/proposal_contract_pb.cjs +675 -0
- package/src/protocol/core/contract/smart_contract_pb.cjs +2960 -0
- package/src/protocol/core/contract/storage_contract_pb.cjs +848 -0
- package/src/protocol/core/contract/vote_asset_contract_pb.cjs +340 -0
- package/src/protocol/core/contract/witness_contract_pb.cjs +956 -0
- package/src/tronweb.ts +437 -0
- package/src/types/ABI.ts +82 -0
- package/src/types/APIResponse.ts +34 -0
- package/src/types/Contract.ts +352 -0
- package/src/types/Providers.ts +7 -0
- package/src/types/Transaction.ts +70 -0
- package/src/types/TransactionBuilder.ts +281 -0
- package/src/types/TronWeb.ts +23 -0
- package/src/types/Trx.ts +285 -0
- package/src/types/UtilsTypes.ts +25 -0
- package/src/types/index.ts +9 -0
- package/src/types/interface.d.ts +1 -0
- package/src/utils/abi.ts +257 -0
- package/src/utils/accounts.ts +60 -0
- package/src/utils/address.ts +89 -0
- package/src/utils/base58.ts +78 -0
- package/src/utils/base64.ts +200 -0
- package/src/utils/bytes.ts +68 -0
- package/src/utils/code.ts +172 -0
- package/src/utils/crypto.ts +264 -0
- package/src/utils/ethersUtils.ts +60 -0
- package/src/utils/fragments.ts +1738 -0
- package/src/utils/help.ts +59 -0
- package/src/utils/index.ts +42 -0
- package/src/utils/interface.ts +1362 -0
- package/src/utils/message.ts +38 -0
- package/src/utils/transaction.ts +991 -0
- package/src/utils/typedData.ts +688 -0
- package/src/utils/validations.ts +130 -0
@@ -0,0 +1,111 @@
|
|
1
|
+
import { HttpProvider } from './lib/providers/index.js';
|
2
|
+
import type { Providers } from './lib/providers/index.js';
|
3
|
+
import utils from './utils/index.js';
|
4
|
+
import { BigNumber } from 'bignumber.js';
|
5
|
+
import EventEmitter from 'eventemitter3';
|
6
|
+
import { TransactionBuilder } from './lib/TransactionBuilder/TransactionBuilder.js';
|
7
|
+
import { Trx } from './lib/trx.js';
|
8
|
+
import { Contract } from './lib/contract/index.js';
|
9
|
+
import { Plugin } from './lib/plugin.js';
|
10
|
+
import { Event } from './lib/event.js';
|
11
|
+
import { DefaultAddress, NodeProvider, TronWebOptions, IBigNumber } from './types/TronWeb.js';
|
12
|
+
import { ContractAbiInterface } from './types/ABI.js';
|
13
|
+
import { Address } from './types/Trx.js';
|
14
|
+
export declare class TronWeb extends EventEmitter {
|
15
|
+
providers: Providers;
|
16
|
+
BigNumber: typeof BigNumber;
|
17
|
+
transactionBuilder: TransactionBuilder;
|
18
|
+
trx: Trx;
|
19
|
+
plugin: Plugin;
|
20
|
+
event: Event;
|
21
|
+
version: typeof TronWeb.version;
|
22
|
+
static version: string;
|
23
|
+
utils: typeof utils;
|
24
|
+
defaultBlock: number | false | 'earliest' | 'latest';
|
25
|
+
defaultPrivateKey: string | false;
|
26
|
+
defaultAddress: DefaultAddress;
|
27
|
+
fullnodeVersion: string;
|
28
|
+
feeLimit: number;
|
29
|
+
fullNode: HttpProvider;
|
30
|
+
solidityNode: HttpProvider;
|
31
|
+
eventServer?: HttpProvider;
|
32
|
+
constructor(options: TronWebOptions);
|
33
|
+
constructor(fullNode: NodeProvider, solidityNode: NodeProvider, eventServer?: NodeProvider, privateKey?: string);
|
34
|
+
constructor(fullNode: NodeProvider, solidityNode: NodeProvider, eventServer: NodeProvider, privateKey?: string);
|
35
|
+
getFullnodeVersion(): Promise<void>;
|
36
|
+
setDefaultBlock(blockID?: false | 'latest' | 'earliest' | number): number | false | "earliest" | "latest";
|
37
|
+
setPrivateKey(privateKey: string): void;
|
38
|
+
setAddress(address: string): void;
|
39
|
+
fullnodeSatisfies(version: string): boolean;
|
40
|
+
isValidProvider(provider: unknown): boolean;
|
41
|
+
setFullNode(fullNode: HttpProvider | string): void;
|
42
|
+
setSolidityNode(solidityNode: HttpProvider | string): void;
|
43
|
+
setEventServer(eventServer: NodeProvider, healthcheck?: string): void;
|
44
|
+
setHeader(headers?: {}): void;
|
45
|
+
setFullNodeHeader(headers?: {}): void;
|
46
|
+
setEventHeader(headers?: {}): void;
|
47
|
+
currentProviders(): {
|
48
|
+
fullNode: HttpProvider;
|
49
|
+
solidityNode: HttpProvider;
|
50
|
+
eventServer: HttpProvider | undefined;
|
51
|
+
};
|
52
|
+
currentProvider(): {
|
53
|
+
fullNode: HttpProvider;
|
54
|
+
solidityNode: HttpProvider;
|
55
|
+
eventServer: HttpProvider | undefined;
|
56
|
+
};
|
57
|
+
getEventResult(...params: Parameters<Event['getEventsByContractAddress']>): ReturnType<Event['getEventsByContractAddress']>;
|
58
|
+
getEventByTransactionID(...params: Parameters<Event['getEventsByTransactionID']>): ReturnType<Event['getEventsByTransactionID']>;
|
59
|
+
contract(abi?: ContractAbiInterface, address?: Address): Contract;
|
60
|
+
address: typeof TronWeb.address;
|
61
|
+
static get address(): {
|
62
|
+
fromHex(address: string): string;
|
63
|
+
toHex(address: string): string;
|
64
|
+
toChecksumAddress(address: string): string;
|
65
|
+
isChecksumAddress(address: string): boolean;
|
66
|
+
fromPrivateKey(privateKey: string, strict?: boolean): string | false;
|
67
|
+
};
|
68
|
+
sha3: typeof TronWeb.sha3;
|
69
|
+
static sha3(string: string, prefix?: boolean): string;
|
70
|
+
toHex: typeof TronWeb.toHex;
|
71
|
+
static toHex(val: string | number | boolean | Record<string | number | symbol, unknown> | unknown[] | IBigNumber): string;
|
72
|
+
toUtf8: typeof TronWeb.toUtf8;
|
73
|
+
static toUtf8(hex: string): string;
|
74
|
+
fromUtf8: typeof TronWeb.fromUtf8;
|
75
|
+
static fromUtf8(string: string): string;
|
76
|
+
toAscii: typeof TronWeb.toAscii;
|
77
|
+
static toAscii(hex: string): string;
|
78
|
+
fromAscii: typeof TronWeb.fromAscii;
|
79
|
+
static fromAscii(string: string, padding?: number): string;
|
80
|
+
toDecimal: typeof TronWeb.toDecimal;
|
81
|
+
static toDecimal(value: string | number | IBigNumber): number;
|
82
|
+
fromDecimal: typeof TronWeb.fromDecimal;
|
83
|
+
static fromDecimal(value: number | IBigNumber): string;
|
84
|
+
fromSun: typeof TronWeb.fromSun;
|
85
|
+
static fromSun(sun: number): string | IBigNumber;
|
86
|
+
toSun: typeof TronWeb.toSun;
|
87
|
+
static toSun(trx: number): string | IBigNumber;
|
88
|
+
toBigNumber: typeof TronWeb.toBigNumber;
|
89
|
+
static toBigNumber(amount?: string | number | IBigNumber): IBigNumber;
|
90
|
+
isAddress: typeof TronWeb.isAddress;
|
91
|
+
static isAddress(address?: unknown): boolean;
|
92
|
+
createAccount: typeof TronWeb.createAccount;
|
93
|
+
static createAccount(): Promise<{
|
94
|
+
privateKey: string;
|
95
|
+
publicKey: string;
|
96
|
+
address: {
|
97
|
+
base58: string;
|
98
|
+
hex: string;
|
99
|
+
};
|
100
|
+
}>;
|
101
|
+
createRandom: typeof TronWeb.createRandom;
|
102
|
+
static createRandom(...params: Parameters<(typeof utils)['accounts']['generateRandom']>): ReturnType<(typeof utils)['accounts']['generateRandom']>;
|
103
|
+
fromMnemonic: typeof TronWeb.fromMnemonic;
|
104
|
+
static fromMnemonic(...params: Parameters<(typeof utils)['accounts']['generateAccountWithMnemonic']>): ReturnType<(typeof utils)['accounts']['generateAccountWithMnemonic']>;
|
105
|
+
isConnected(): Promise<{
|
106
|
+
fullNode: boolean | 0;
|
107
|
+
solidityNode: boolean | 0;
|
108
|
+
eventServer: boolean | 0 | undefined;
|
109
|
+
}>;
|
110
|
+
}
|
111
|
+
export default TronWeb;
|
@@ -0,0 +1,360 @@
|
|
1
|
+
import { providers } from './lib/providers/index.js';
|
2
|
+
import utils from './utils/index.js';
|
3
|
+
import { BigNumber } from 'bignumber.js';
|
4
|
+
import EventEmitter from 'eventemitter3';
|
5
|
+
import semver from 'semver';
|
6
|
+
import { TransactionBuilder } from './lib/TransactionBuilder/TransactionBuilder.js';
|
7
|
+
import { Trx } from './lib/trx.js';
|
8
|
+
import { Contract } from './lib/contract/index.js';
|
9
|
+
import { Plugin } from './lib/plugin.js';
|
10
|
+
import { Event } from './lib/event.js';
|
11
|
+
import { keccak256 } from './utils/ethersUtils.js';
|
12
|
+
import { fromHex, fromPrivateKey, isAddress, toHex, toChecksumAddress, isChecksumAddress } from './utils/address.js';
|
13
|
+
import { isString } from './utils/validations.js';
|
14
|
+
const DEFAULT_VERSION = '4.7.1';
|
15
|
+
const FEE_LIMIT = 150000000;
|
16
|
+
const version = '6.0.0';
|
17
|
+
function isValidOptions(options) {
|
18
|
+
return (!!options &&
|
19
|
+
typeof options === 'object' &&
|
20
|
+
(!!options.fullNode || !!options.fullHost));
|
21
|
+
}
|
22
|
+
export class TronWeb extends EventEmitter {
|
23
|
+
providers;
|
24
|
+
BigNumber;
|
25
|
+
transactionBuilder;
|
26
|
+
trx;
|
27
|
+
plugin;
|
28
|
+
event;
|
29
|
+
version;
|
30
|
+
static version = version;
|
31
|
+
utils;
|
32
|
+
defaultBlock;
|
33
|
+
defaultPrivateKey;
|
34
|
+
defaultAddress;
|
35
|
+
fullnodeVersion;
|
36
|
+
feeLimit;
|
37
|
+
fullNode;
|
38
|
+
solidityNode;
|
39
|
+
eventServer;
|
40
|
+
constructor(options, solidityNode = '', eventServer, privateKey = '') {
|
41
|
+
super();
|
42
|
+
let fullNode;
|
43
|
+
let headers = false;
|
44
|
+
let eventHeaders = false;
|
45
|
+
if (isValidOptions(options)) {
|
46
|
+
fullNode = options.fullNode || options.fullHost;
|
47
|
+
solidityNode = (options.solidityNode || options.fullHost);
|
48
|
+
eventServer = (options.eventServer || options.fullHost);
|
49
|
+
headers = options.headers || false;
|
50
|
+
eventHeaders = options.eventHeaders || headers;
|
51
|
+
privateKey = options.privateKey;
|
52
|
+
}
|
53
|
+
else {
|
54
|
+
fullNode = options;
|
55
|
+
}
|
56
|
+
if (utils.isString(fullNode))
|
57
|
+
fullNode = new providers.HttpProvider(fullNode);
|
58
|
+
if (utils.isString(solidityNode))
|
59
|
+
solidityNode = new providers.HttpProvider(solidityNode);
|
60
|
+
if (utils.isString(eventServer))
|
61
|
+
eventServer = new providers.HttpProvider(eventServer);
|
62
|
+
this.event = new Event(this);
|
63
|
+
this.transactionBuilder = new TransactionBuilder(this);
|
64
|
+
this.trx = new Trx(this);
|
65
|
+
this.plugin = new Plugin(this, {
|
66
|
+
disablePlugins: isValidOptions(options) ? options.disablePlugins : false,
|
67
|
+
});
|
68
|
+
this.utils = utils;
|
69
|
+
this.setFullNode(fullNode);
|
70
|
+
this.setSolidityNode(solidityNode);
|
71
|
+
this.setEventServer(eventServer);
|
72
|
+
this.providers = providers;
|
73
|
+
this.BigNumber = BigNumber;
|
74
|
+
this.defaultBlock = false;
|
75
|
+
this.defaultPrivateKey = false;
|
76
|
+
this.defaultAddress = {
|
77
|
+
hex: false,
|
78
|
+
base58: false,
|
79
|
+
};
|
80
|
+
this.version = TronWeb.version;
|
81
|
+
this.sha3 = TronWeb.sha3;
|
82
|
+
this.fromUtf8 = TronWeb.fromUtf8;
|
83
|
+
this.address = TronWeb.address;
|
84
|
+
this.toAscii = TronWeb.toAscii;
|
85
|
+
this.toUtf8 = TronWeb.toUtf8;
|
86
|
+
this.isAddress = TronWeb.isAddress;
|
87
|
+
this.fromAscii = TronWeb.fromAscii;
|
88
|
+
this.toHex = TronWeb.toHex;
|
89
|
+
this.toBigNumber = TronWeb.toBigNumber;
|
90
|
+
this.toDecimal = TronWeb.toDecimal;
|
91
|
+
this.fromDecimal = TronWeb.fromDecimal;
|
92
|
+
this.toSun = TronWeb.toSun;
|
93
|
+
this.fromSun = TronWeb.fromSun;
|
94
|
+
this.createAccount = TronWeb.createAccount;
|
95
|
+
this.createRandom = TronWeb.createRandom;
|
96
|
+
this.fromMnemonic = TronWeb.fromMnemonic;
|
97
|
+
if (privateKey)
|
98
|
+
this.setPrivateKey(privateKey);
|
99
|
+
this.fullnodeVersion = DEFAULT_VERSION;
|
100
|
+
this.feeLimit = FEE_LIMIT;
|
101
|
+
if (headers) {
|
102
|
+
this.setFullNodeHeader(headers);
|
103
|
+
}
|
104
|
+
if (eventHeaders) {
|
105
|
+
this.setEventHeader(eventHeaders);
|
106
|
+
}
|
107
|
+
}
|
108
|
+
async getFullnodeVersion() {
|
109
|
+
try {
|
110
|
+
const nodeInfo = await this.trx.getNodeInfo();
|
111
|
+
this.fullnodeVersion = nodeInfo.configNodeInfo.codeVersion;
|
112
|
+
if (this.fullnodeVersion.split('.').length === 2) {
|
113
|
+
this.fullnodeVersion += '.0';
|
114
|
+
}
|
115
|
+
}
|
116
|
+
catch (err) {
|
117
|
+
this.fullnodeVersion = DEFAULT_VERSION;
|
118
|
+
}
|
119
|
+
}
|
120
|
+
setDefaultBlock(blockID = false) {
|
121
|
+
if ([false, 'latest', 'earliest', 0].includes(blockID)) {
|
122
|
+
return (this.defaultBlock = blockID);
|
123
|
+
}
|
124
|
+
if (!utils.isInteger(blockID) || !blockID)
|
125
|
+
throw new Error('Invalid block ID provided');
|
126
|
+
return (this.defaultBlock = Math.abs(blockID));
|
127
|
+
}
|
128
|
+
setPrivateKey(privateKey) {
|
129
|
+
try {
|
130
|
+
this.setAddress(TronWeb.address.fromPrivateKey(privateKey));
|
131
|
+
}
|
132
|
+
catch {
|
133
|
+
throw new Error('Invalid private key provided');
|
134
|
+
}
|
135
|
+
this.defaultPrivateKey = privateKey;
|
136
|
+
this.emit('privateKeyChanged', privateKey);
|
137
|
+
}
|
138
|
+
setAddress(address) {
|
139
|
+
if (!TronWeb.isAddress(address))
|
140
|
+
throw new Error('Invalid address provided');
|
141
|
+
const hex = TronWeb.address.toHex(address);
|
142
|
+
const base58 = TronWeb.address.fromHex(address);
|
143
|
+
if (this.defaultPrivateKey && TronWeb.address.fromPrivateKey(this.defaultPrivateKey) !== base58)
|
144
|
+
this.defaultPrivateKey = false;
|
145
|
+
this.defaultAddress = {
|
146
|
+
hex,
|
147
|
+
base58,
|
148
|
+
};
|
149
|
+
this.emit('addressChanged', { hex, base58 });
|
150
|
+
}
|
151
|
+
fullnodeSatisfies(version) {
|
152
|
+
return semver.satisfies(this.fullnodeVersion, version);
|
153
|
+
}
|
154
|
+
isValidProvider(provider) {
|
155
|
+
return Object.values(providers).some((knownProvider) => provider instanceof knownProvider);
|
156
|
+
}
|
157
|
+
setFullNode(fullNode) {
|
158
|
+
if (isString(fullNode))
|
159
|
+
fullNode = new providers.HttpProvider(fullNode);
|
160
|
+
if (!this.isValidProvider(fullNode))
|
161
|
+
throw new Error('Invalid full node provided');
|
162
|
+
this.fullNode = fullNode;
|
163
|
+
this.fullNode.setStatusPage('wallet/getnowblock');
|
164
|
+
}
|
165
|
+
setSolidityNode(solidityNode) {
|
166
|
+
if (utils.isString(solidityNode))
|
167
|
+
solidityNode = new providers.HttpProvider(solidityNode);
|
168
|
+
if (!this.isValidProvider(solidityNode))
|
169
|
+
throw new Error('Invalid solidity node provided');
|
170
|
+
this.solidityNode = solidityNode;
|
171
|
+
this.solidityNode.setStatusPage('walletsolidity/getnowblock');
|
172
|
+
}
|
173
|
+
setEventServer(eventServer, healthcheck) {
|
174
|
+
this.event.setServer(eventServer, healthcheck);
|
175
|
+
}
|
176
|
+
setHeader(headers = {}) {
|
177
|
+
const fullNode = new providers.HttpProvider(this.fullNode.host, 30000, '', '', headers);
|
178
|
+
const solidityNode = new providers.HttpProvider(this.solidityNode.host, 30000, '', '', headers);
|
179
|
+
const eventServer = new providers.HttpProvider(this.eventServer.host, 30000, '', '', headers);
|
180
|
+
this.setFullNode(fullNode);
|
181
|
+
this.setSolidityNode(solidityNode);
|
182
|
+
this.setEventServer(eventServer);
|
183
|
+
}
|
184
|
+
setFullNodeHeader(headers = {}) {
|
185
|
+
const fullNode = new providers.HttpProvider(this.fullNode.host, 30000, '', '', headers);
|
186
|
+
const solidityNode = new providers.HttpProvider(this.solidityNode.host, 30000, '', '', headers);
|
187
|
+
this.setFullNode(fullNode);
|
188
|
+
this.setSolidityNode(solidityNode);
|
189
|
+
}
|
190
|
+
setEventHeader(headers = {}) {
|
191
|
+
const eventServer = new providers.HttpProvider(this.eventServer.host, 30000, '', '', headers);
|
192
|
+
this.setEventServer(eventServer);
|
193
|
+
}
|
194
|
+
currentProviders() {
|
195
|
+
return {
|
196
|
+
fullNode: this.fullNode,
|
197
|
+
solidityNode: this.solidityNode,
|
198
|
+
eventServer: this.eventServer,
|
199
|
+
};
|
200
|
+
}
|
201
|
+
currentProvider() {
|
202
|
+
return this.currentProviders();
|
203
|
+
}
|
204
|
+
getEventResult(...params) {
|
205
|
+
return this.event.getEventsByContractAddress(...params);
|
206
|
+
}
|
207
|
+
getEventByTransactionID(...params) {
|
208
|
+
return this.event.getEventsByTransactionID(...params);
|
209
|
+
}
|
210
|
+
contract(abi = [], address) {
|
211
|
+
return new Contract(this, abi, address);
|
212
|
+
}
|
213
|
+
address;
|
214
|
+
static get address() {
|
215
|
+
return {
|
216
|
+
fromHex(address) {
|
217
|
+
return fromHex(address);
|
218
|
+
},
|
219
|
+
toHex(address) {
|
220
|
+
return toHex(address);
|
221
|
+
},
|
222
|
+
toChecksumAddress(address) {
|
223
|
+
return toChecksumAddress(address);
|
224
|
+
},
|
225
|
+
isChecksumAddress(address) {
|
226
|
+
return isChecksumAddress(address);
|
227
|
+
},
|
228
|
+
fromPrivateKey(privateKey, strict = false) {
|
229
|
+
return fromPrivateKey(privateKey, strict);
|
230
|
+
},
|
231
|
+
};
|
232
|
+
}
|
233
|
+
sha3;
|
234
|
+
static sha3(string, prefix = true) {
|
235
|
+
return (prefix ? '0x' : '') + keccak256(Buffer.from(string, 'utf-8')).toString().substring(2);
|
236
|
+
}
|
237
|
+
toHex;
|
238
|
+
static toHex(val) {
|
239
|
+
if (utils.isBoolean(val))
|
240
|
+
return TronWeb.fromDecimal(+val);
|
241
|
+
if (utils.isBigNumber(val))
|
242
|
+
return TronWeb.fromDecimal(val);
|
243
|
+
if (typeof val === 'object')
|
244
|
+
return TronWeb.fromUtf8(JSON.stringify(val));
|
245
|
+
if (utils.isString(val)) {
|
246
|
+
if (/^(-|)0x/.test(val))
|
247
|
+
return val;
|
248
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
249
|
+
// @ts-ignore
|
250
|
+
if (!isFinite(val) || /^\s*$/.test(val))
|
251
|
+
return TronWeb.fromUtf8(val);
|
252
|
+
}
|
253
|
+
const result = TronWeb.fromDecimal(val);
|
254
|
+
if (result === '0xNaN') {
|
255
|
+
throw new Error('The passed value is not convertible to a hex string');
|
256
|
+
}
|
257
|
+
else {
|
258
|
+
return result;
|
259
|
+
}
|
260
|
+
}
|
261
|
+
toUtf8;
|
262
|
+
static toUtf8(hex) {
|
263
|
+
if (utils.isHex(hex)) {
|
264
|
+
hex = hex.replace(/^0x/, '');
|
265
|
+
return Buffer.from(hex, 'hex').toString('utf8');
|
266
|
+
}
|
267
|
+
else {
|
268
|
+
throw new Error('The passed value is not a valid hex string');
|
269
|
+
}
|
270
|
+
}
|
271
|
+
fromUtf8;
|
272
|
+
static fromUtf8(string) {
|
273
|
+
if (!utils.isString(string)) {
|
274
|
+
throw new Error('The passed value is not a valid utf-8 string');
|
275
|
+
}
|
276
|
+
return '0x' + Buffer.from(string, 'utf8').toString('hex');
|
277
|
+
}
|
278
|
+
toAscii;
|
279
|
+
static toAscii(hex) {
|
280
|
+
if (utils.isHex(hex)) {
|
281
|
+
let str = '';
|
282
|
+
let i = 0;
|
283
|
+
const l = hex.length;
|
284
|
+
if (hex.substring(0, 2) === '0x') {
|
285
|
+
i = 2;
|
286
|
+
}
|
287
|
+
for (; i < l; i += 2) {
|
288
|
+
const code = parseInt(hex.substr(i, 2), 16);
|
289
|
+
str += String.fromCharCode(code);
|
290
|
+
}
|
291
|
+
return str;
|
292
|
+
}
|
293
|
+
else {
|
294
|
+
throw new Error('The passed value is not a valid hex string');
|
295
|
+
}
|
296
|
+
}
|
297
|
+
fromAscii;
|
298
|
+
static fromAscii(string, padding) {
|
299
|
+
if (!utils.isString(string)) {
|
300
|
+
throw new Error('The passed value is not a valid utf-8 string');
|
301
|
+
}
|
302
|
+
return '0x' + Buffer.from(string, 'ascii').toString('hex').padEnd(padding, '0');
|
303
|
+
}
|
304
|
+
toDecimal;
|
305
|
+
static toDecimal(value) {
|
306
|
+
return TronWeb.toBigNumber(value).toNumber();
|
307
|
+
}
|
308
|
+
fromDecimal;
|
309
|
+
static fromDecimal(value) {
|
310
|
+
const number = TronWeb.toBigNumber(value);
|
311
|
+
const result = number.toString(16);
|
312
|
+
return number.isLessThan(0) ? '-0x' + result.substr(1) : '0x' + result;
|
313
|
+
}
|
314
|
+
fromSun;
|
315
|
+
static fromSun(sun) {
|
316
|
+
const trx = TronWeb.toBigNumber(sun).div(1_000_000);
|
317
|
+
return utils.isBigNumber(sun) ? trx : trx.toString(10);
|
318
|
+
}
|
319
|
+
toSun;
|
320
|
+
static toSun(trx) {
|
321
|
+
const sun = TronWeb.toBigNumber(trx).times(1_000_000);
|
322
|
+
return utils.isBigNumber(trx) ? sun : sun.toString(10);
|
323
|
+
}
|
324
|
+
toBigNumber;
|
325
|
+
static toBigNumber(amount = 0) {
|
326
|
+
if (utils.isBigNumber(amount))
|
327
|
+
return amount;
|
328
|
+
if (utils.isString(amount) && /^(-|)0x/.test(amount))
|
329
|
+
return new BigNumber(amount.replace('0x', ''), 16);
|
330
|
+
return new BigNumber(amount.toString(10), 10);
|
331
|
+
}
|
332
|
+
isAddress;
|
333
|
+
static isAddress(address = '') {
|
334
|
+
return isAddress(address);
|
335
|
+
}
|
336
|
+
createAccount;
|
337
|
+
static async createAccount() {
|
338
|
+
const account = utils.accounts.generateAccount();
|
339
|
+
return account;
|
340
|
+
}
|
341
|
+
createRandom;
|
342
|
+
static createRandom(...params) {
|
343
|
+
const account = utils.accounts.generateRandom(...params);
|
344
|
+
return account;
|
345
|
+
}
|
346
|
+
fromMnemonic;
|
347
|
+
static fromMnemonic(...params) {
|
348
|
+
const account = utils.accounts.generateAccountWithMnemonic(...params);
|
349
|
+
return account;
|
350
|
+
}
|
351
|
+
async isConnected() {
|
352
|
+
return {
|
353
|
+
fullNode: await this.fullNode.isConnected(),
|
354
|
+
solidityNode: await this.solidityNode.isConnected(),
|
355
|
+
eventServer: this.eventServer && (await this.eventServer.isConnected()),
|
356
|
+
};
|
357
|
+
}
|
358
|
+
}
|
359
|
+
export default TronWeb;
|
360
|
+
//# sourceMappingURL=tronweb.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"tronweb.js","sourceRoot":"","sources":["../../src/tronweb.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAEnE,OAAO,KAAK,MAAM,kBAAkB,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAA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EAAE;YACnD,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC;SAC1E,CAAC;IACN,CAAC;;AAEL,eAAe,OAAO,CAAC"}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
export type AbiParamsCommon = {
|
2
|
+
readonly name: string;
|
3
|
+
readonly type: string;
|
4
|
+
readonly baseType?: string;
|
5
|
+
readonly indexed?: boolean;
|
6
|
+
readonly components?: ReadonlyArray<AbiParamsCommon>;
|
7
|
+
readonly arrayLength?: number;
|
8
|
+
readonly arrayChildren?: ReadonlyArray<AbiParamsCommon>;
|
9
|
+
readonly internalType?: string;
|
10
|
+
};
|
11
|
+
export type StateMutabilityTypes = string | 'nonpayable' | 'payable' | 'pure' | 'view';
|
12
|
+
export type FragmentTypes = string | 'constructor' | 'event' | 'function' | 'fallback' | 'receive';
|
13
|
+
export type AbiInputsType = ReadonlyArray<AbiParamsCommon> | Record<any, any> | [];
|
14
|
+
export type AbiOutputsType = AbiInputsType;
|
15
|
+
export type ConstructorFragment = {
|
16
|
+
readonly type: string | 'constructor';
|
17
|
+
readonly stateMutability: StateMutabilityTypes & (string | 'nonpayable' | 'payable');
|
18
|
+
readonly inputs?: ReadonlyArray<AbiParamsCommon>;
|
19
|
+
};
|
20
|
+
export type FunctionFragment = {
|
21
|
+
readonly name: string;
|
22
|
+
readonly type: string | 'function';
|
23
|
+
readonly stateMutability?: StateMutabilityTypes;
|
24
|
+
readonly inputs?: ReadonlyArray<AbiParamsCommon>;
|
25
|
+
readonly outputs?: ReadonlyArray<AbiParamsCommon>;
|
26
|
+
readonly constant?: boolean;
|
27
|
+
readonly payable?: boolean;
|
28
|
+
};
|
29
|
+
export type FallbackFragment = {
|
30
|
+
readonly name: never;
|
31
|
+
readonly type: string | 'fallback';
|
32
|
+
readonly stateMutability: StateMutabilityTypes;
|
33
|
+
readonly inputs: never;
|
34
|
+
readonly outputs: never;
|
35
|
+
readonly constant?: boolean;
|
36
|
+
readonly payable?: boolean;
|
37
|
+
};
|
38
|
+
export type ReceiveFragment = {
|
39
|
+
readonly name: never;
|
40
|
+
readonly type: string | 'receive';
|
41
|
+
readonly stateMutability: StateMutabilityTypes;
|
42
|
+
readonly inputs: never;
|
43
|
+
readonly outputs: never;
|
44
|
+
readonly constant?: boolean;
|
45
|
+
readonly payable?: boolean;
|
46
|
+
};
|
47
|
+
export type EventFragment = {
|
48
|
+
readonly name: string;
|
49
|
+
readonly type: string | 'event';
|
50
|
+
readonly inputs?: ReadonlyArray<AbiParamsCommon>;
|
51
|
+
readonly anonymous?: boolean;
|
52
|
+
};
|
53
|
+
export type ErrorFragment = {
|
54
|
+
readonly name: string;
|
55
|
+
readonly type: string | 'error';
|
56
|
+
readonly inputs?: ReadonlyArray<AbiParamsCommon>;
|
57
|
+
};
|
58
|
+
export type AbiFragment = ConstructorFragment | FunctionFragment | EventFragment | ErrorFragment | FallbackFragment | ReceiveFragment;
|
59
|
+
export type ContractAbiInterface = ReadonlyArray<AbiFragment>;
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ABI.js","sourceRoot":"","sources":["../../../src/types/ABI.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { Permission } from './Contract.js';
|
2
|
+
import { Transaction, TransactionWrapper } from './Transaction.js';
|
3
|
+
export interface BlockHeaderRawData {
|
4
|
+
number: number;
|
5
|
+
txTrieRoot: string;
|
6
|
+
witness_address: string;
|
7
|
+
parentHash: string;
|
8
|
+
version: number;
|
9
|
+
timestamp: number;
|
10
|
+
}
|
11
|
+
export interface BlockHeader {
|
12
|
+
raw_data: BlockHeaderRawData;
|
13
|
+
witness_signature: string;
|
14
|
+
}
|
15
|
+
export interface BlockWithoutDetail {
|
16
|
+
blockID: string;
|
17
|
+
block_header: BlockHeader;
|
18
|
+
}
|
19
|
+
export interface Block {
|
20
|
+
blockID: string;
|
21
|
+
/** If a block has 0 transaction, this prop will be undefined */
|
22
|
+
transactions?: Transaction[];
|
23
|
+
block_header: BlockHeader;
|
24
|
+
}
|
25
|
+
export interface GetSignWeightResponse {
|
26
|
+
permission: Permission;
|
27
|
+
result: {
|
28
|
+
code: string;
|
29
|
+
};
|
30
|
+
transaction: TransactionWrapper;
|
31
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"APIResponse.js","sourceRoot":"","sources":["../../../src/types/APIResponse.ts"],"names":[],"mappings":""}
|