quantumcoin 6.14.2 → 6.14.5
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/CHANGELOG.md +442 -442
- package/FUNDING.json +10 -10
- package/LICENSE.md +21 -21
- package/README.md +132 -142
- package/SECURITY.md +34 -34
- package/dist/README.md +22 -22
- package/dist/quantumcoin.js +1127 -1324
- package/dist/quantumcoin.js.map +1 -1
- package/dist/quantumcoin.min.js +1 -1
- package/dist/quantumcoin.umd.js +1128 -1327
- package/dist/quantumcoin.umd.js.map +1 -1
- package/dist/quantumcoin.umd.min.js +1 -1
- package/dist/wordlists-extra.js +1 -1
- package/dist/wordlists-extra.js.map +1 -1
- package/dist/wordlists-extra.min.js +1 -1
- package/lib.commonjs/README.md +16 -16
- package/lib.commonjs/_version.js +1 -1
- package/lib.commonjs/crypto/signature.d.ts +3 -76
- package/lib.commonjs/crypto/signature.d.ts.map +1 -1
- package/lib.commonjs/crypto/signature.js +15 -199
- package/lib.commonjs/crypto/signature.js.map +1 -1
- package/lib.commonjs/crypto/signing-key.d.ts +1 -1
- package/lib.commonjs/crypto/signing-key.d.ts.map +1 -1
- package/lib.commonjs/crypto/signing-key.js +19 -10
- package/lib.commonjs/crypto/signing-key.js.map +1 -1
- package/lib.commonjs/package.json +12 -12
- package/lib.commonjs/providers/provider-jsonrpc.d.ts +0 -1
- package/lib.commonjs/providers/provider-jsonrpc.d.ts.map +1 -1
- package/lib.commonjs/providers/provider-jsonrpc.js +0 -1
- package/lib.commonjs/providers/provider-jsonrpc.js.map +1 -1
- package/lib.commonjs/quantumcoin.d.ts +2 -0
- package/lib.commonjs/quantumcoin.d.ts.map +1 -1
- package/lib.commonjs/quantumcoin.js +11 -5
- package/lib.commonjs/quantumcoin.js.map +1 -1
- package/lib.commonjs/transaction/address.d.ts.map +1 -1
- package/lib.commonjs/transaction/address.js +8 -3
- package/lib.commonjs/transaction/address.js.map +1 -1
- package/lib.commonjs/transaction/transaction.d.ts.map +1 -1
- package/lib.commonjs/transaction/transaction.js +7 -40
- package/lib.commonjs/transaction/transaction.js.map +1 -1
- package/lib.commonjs/wallet/json-keystore.d.ts.map +1 -1
- package/lib.commonjs/wallet/json-keystore.js +7 -7
- package/lib.commonjs/wallet/json-keystore.js.map +1 -1
- package/lib.commonjs/wallet/wallet.d.ts.map +1 -1
- package/lib.commonjs/wallet/wallet.js +2 -2
- package/lib.commonjs/wallet/wallet.js.map +1 -1
- package/lib.esm/README.md +16 -16
- package/lib.esm/_version.js +1 -1
- package/lib.esm/crypto/signature.d.ts +3 -76
- package/lib.esm/crypto/signature.d.ts.map +1 -1
- package/lib.esm/crypto/signature.js +16 -202
- package/lib.esm/crypto/signature.js.map +1 -1
- package/lib.esm/crypto/signing-key.d.ts +1 -1
- package/lib.esm/crypto/signing-key.d.ts.map +1 -1
- package/lib.esm/crypto/signing-key.js +20 -9
- package/lib.esm/crypto/signing-key.js.map +1 -1
- package/lib.esm/package.json +12 -12
- package/lib.esm/providers/provider-jsonrpc.d.ts +0 -1
- package/lib.esm/providers/provider-jsonrpc.d.ts.map +1 -1
- package/lib.esm/providers/provider-jsonrpc.js +0 -1
- package/lib.esm/providers/provider-jsonrpc.js.map +1 -1
- package/lib.esm/quantumcoin.d.ts +2 -0
- package/lib.esm/quantumcoin.d.ts.map +1 -1
- package/lib.esm/quantumcoin.js +6 -0
- package/lib.esm/quantumcoin.js.map +1 -1
- package/lib.esm/transaction/address.d.ts.map +1 -1
- package/lib.esm/transaction/address.js +8 -2
- package/lib.esm/transaction/address.js.map +1 -1
- package/lib.esm/transaction/transaction.d.ts.map +1 -1
- package/lib.esm/transaction/transaction.js +7 -40
- package/lib.esm/transaction/transaction.js.map +1 -1
- package/lib.esm/wallet/json-keystore.d.ts.map +1 -1
- package/lib.esm/wallet/json-keystore.js +11 -5
- package/lib.esm/wallet/json-keystore.js.map +1 -1
- package/lib.esm/wallet/wallet.d.ts.map +1 -1
- package/lib.esm/wallet/wallet.js +3 -1
- package/lib.esm/wallet/wallet.js.map +1 -1
- package/package.json +6 -5
- package/rollup.config.mjs +50 -50
- package/src.ts/_version.ts +1 -1
- package/src.ts/abi/abi-coder.ts +237 -237
- package/src.ts/abi/bytes32.ts +45 -45
- package/src.ts/abi/coders/abstract-coder.ts +541 -541
- package/src.ts/abi/coders/address.ts +36 -36
- package/src.ts/abi/coders/anonymous.ts +29 -29
- package/src.ts/abi/coders/array.ts +199 -199
- package/src.ts/abi/coders/boolean.ts +27 -27
- package/src.ts/abi/coders/bytes.ts +43 -43
- package/src.ts/abi/coders/fixed-bytes.ts +37 -37
- package/src.ts/abi/coders/null.ts +28 -28
- package/src.ts/abi/coders/number.ts +63 -63
- package/src.ts/abi/coders/string.ts +29 -29
- package/src.ts/abi/coders/tuple.ts +69 -69
- package/src.ts/abi/fragments.ts +1617 -1617
- package/src.ts/abi/index.ts +41 -41
- package/src.ts/abi/interface.ts +1271 -1271
- package/src.ts/abi/typed.ts +796 -796
- package/src.ts/address/address.ts +148 -148
- package/src.ts/address/checks.ts +123 -123
- package/src.ts/address/contract-address.ts +80 -80
- package/src.ts/address/index.ts +57 -57
- package/src.ts/constants/addresses.ts +8 -8
- package/src.ts/constants/hashes.ts +7 -7
- package/src.ts/constants/index.ts +16 -16
- package/src.ts/constants/numbers.ts +35 -35
- package/src.ts/constants/strings.ts +16 -16
- package/src.ts/contract/contract.ts +1120 -1120
- package/src.ts/contract/factory.ts +143 -143
- package/src.ts/contract/index.ts +31 -31
- package/src.ts/contract/types.ts +236 -236
- package/src.ts/contract/wrappers.ts +225 -225
- package/src.ts/crypto/crypto-browser.ts +64 -64
- package/src.ts/crypto/crypto.ts +4 -4
- package/src.ts/crypto/hmac.ts +51 -51
- package/src.ts/crypto/index.ts +59 -59
- package/src.ts/crypto/keccak.ts +54 -54
- package/src.ts/crypto/pbkdf2.ts +55 -55
- package/src.ts/crypto/random.ts +36 -36
- package/src.ts/crypto/ripemd160.ts +43 -43
- package/src.ts/crypto/scrypt.ts +114 -114
- package/src.ts/crypto/sha2.ts +78 -78
- package/src.ts/crypto/signature.ts +145 -349
- package/src.ts/crypto/signing-key.ts +126 -118
- package/src.ts/hash/authorization.ts +38 -38
- package/src.ts/hash/id.ts +17 -17
- package/src.ts/hash/index.ts +18 -18
- package/src.ts/hash/message.ts +51 -51
- package/src.ts/hash/namehash.ts +101 -101
- package/src.ts/hash/solidity.ts +117 -117
- package/src.ts/hash/typed-data.ts +658 -658
- package/src.ts/index.ts +12 -12
- package/src.ts/providers/abstract-provider.ts +1761 -1761
- package/src.ts/providers/abstract-signer.ts +314 -314
- package/src.ts/providers/community.ts +49 -49
- package/src.ts/providers/contracts.ts +42 -42
- package/src.ts/providers/default-provider.ts +96 -96
- package/src.ts/providers/ens-resolver.ts +606 -606
- package/src.ts/providers/format.ts +320 -320
- package/src.ts/providers/formatting.ts +418 -418
- package/src.ts/providers/index.ts +125 -125
- package/src.ts/providers/network.ts +327 -327
- package/src.ts/providers/pagination.ts +8 -8
- package/src.ts/providers/plugin-fallback.ts +35 -35
- package/src.ts/providers/plugins-network.ts +281 -281
- package/src.ts/providers/provider-browser.ts +334 -334
- package/src.ts/providers/provider-fallback.ts +801 -801
- package/src.ts/providers/provider-ipcsocket-browser.ts +3 -3
- package/src.ts/providers/provider-ipcsocket.ts +81 -81
- package/src.ts/providers/provider-jsonrpc.ts +1334 -1335
- package/src.ts/providers/provider-socket.ts +352 -352
- package/src.ts/providers/provider-websocket.ts +103 -103
- package/src.ts/providers/provider.ts +2136 -2136
- package/src.ts/providers/signer-noncemanager.ts +98 -98
- package/src.ts/providers/signer.ts +166 -166
- package/src.ts/providers/subscriber-connection.ts +74 -74
- package/src.ts/providers/subscriber-filterid.ts +199 -199
- package/src.ts/providers/subscriber-polling.ts +321 -321
- package/src.ts/providers/ws-browser.ts +11 -11
- package/src.ts/providers/ws.ts +3 -3
- package/src.ts/quantumcoin.ts +219 -211
- package/src.ts/thirdparty.d.ts +16 -16
- package/src.ts/transaction/accesslist.ts +43 -43
- package/src.ts/transaction/address.ts +35 -31
- package/src.ts/transaction/authorization.ts +14 -14
- package/src.ts/transaction/index.ts +51 -51
- package/src.ts/transaction/transaction.ts +1349 -1379
- package/src.ts/utils/base58.ts +73 -73
- package/src.ts/utils/base64-browser.ts +25 -25
- package/src.ts/utils/base64.ts +56 -56
- package/src.ts/utils/data.ts +199 -199
- package/src.ts/utils/errors.ts +793 -793
- package/src.ts/utils/events.ts +105 -105
- package/src.ts/utils/fetch.ts +970 -970
- package/src.ts/utils/fixednumber.ts +643 -643
- package/src.ts/utils/geturl-browser.ts +81 -81
- package/src.ts/utils/geturl.ts +134 -134
- package/src.ts/utils/index.ts +95 -95
- package/src.ts/utils/maths.ts +240 -240
- package/src.ts/utils/properties.ts +60 -60
- package/src.ts/utils/rlp-decode.ts +104 -104
- package/src.ts/utils/rlp-encode.ts +64 -64
- package/src.ts/utils/rlp.ts +20 -20
- package/src.ts/utils/units.ts +91 -91
- package/src.ts/utils/utf8.ts +325 -325
- package/src.ts/utils/uuid.ts +36 -36
- package/src.ts/wallet/base-wallet.ts +160 -160
- package/src.ts/wallet/index.ts +32 -32
- package/src.ts/wallet/json-keystore.ts +108 -106
- package/src.ts/wallet/utils.ts +147 -147
- package/src.ts/wallet/wallet.ts +138 -139
- package/src.ts/wordlists/bit-reader.ts +35 -35
- package/src.ts/wordlists/decode-owl.ts +58 -58
- package/src.ts/wordlists/decode-owla.ts +33 -33
- package/src.ts/wordlists/generation/encode-latin.ts +370 -370
- package/src.ts/wordlists/index.ts +26 -26
- package/src.ts/wordlists/lang-cz.ts +33 -33
- package/src.ts/wordlists/lang-en.ts +33 -33
- package/src.ts/wordlists/lang-es.ts +35 -35
- package/src.ts/wordlists/lang-fr.ts +34 -34
- package/src.ts/wordlists/lang-it.ts +33 -33
- package/src.ts/wordlists/lang-ja.ts +181 -181
- package/src.ts/wordlists/lang-ko.ts +104 -104
- package/src.ts/wordlists/lang-pt.ts +34 -34
- package/src.ts/wordlists/lang-zh.ts +112 -112
- package/src.ts/wordlists/wordlist-owl.ts +77 -77
- package/src.ts/wordlists/wordlist-owla.ts +41 -41
- package/src.ts/wordlists/wordlist.ts +59 -59
- package/src.ts/wordlists/wordlists-browser.ts +8 -8
- package/src.ts/wordlists/wordlists-extra.ts +9 -9
- package/src.ts/wordlists/wordlists.ts +38 -38
- package/dist/quantumcoin.min.js'.gz' +0 -0
- package/dist/quantumcoin.umd.min.js'.gz' +0 -0
- package/dist/wordlists-extra.min.js'.gz' +0 -0
- package/lib.commonjs/providers/provider-alchemy.d.ts +0 -50
- package/lib.commonjs/providers/provider-alchemy.d.ts.map +0 -1
- package/lib.commonjs/providers/provider-alchemy.js +0 -151
- package/lib.commonjs/providers/provider-alchemy.js.map +0 -1
- package/lib.commonjs/providers/provider-ankr.d.ts +0 -61
- package/lib.commonjs/providers/provider-ankr.d.ts.map +0 -1
- package/lib.commonjs/providers/provider-ankr.js +0 -137
- package/lib.commonjs/providers/provider-ankr.js.map +0 -1
- package/lib.commonjs/providers/provider-blockscout.d.ts +0 -59
- package/lib.commonjs/providers/provider-blockscout.d.ts.map +0 -1
- package/lib.commonjs/providers/provider-blockscout.js +0 -145
- package/lib.commonjs/providers/provider-blockscout.js.map +0 -1
- package/lib.commonjs/providers/provider-chainstack.d.ts +0 -46
- package/lib.commonjs/providers/provider-chainstack.d.ts.map +0 -1
- package/lib.commonjs/providers/provider-chainstack.js +0 -102
- package/lib.commonjs/providers/provider-chainstack.js.map +0 -1
- package/lib.commonjs/providers/provider-cloudflare.d.ts +0 -14
- package/lib.commonjs/providers/provider-cloudflare.d.ts.map +0 -1
- package/lib.commonjs/providers/provider-cloudflare.js +0 -26
- package/lib.commonjs/providers/provider-cloudflare.js.map +0 -1
- package/lib.commonjs/providers/provider-etherscan.d.ts +0 -147
- package/lib.commonjs/providers/provider-etherscan.d.ts.map +0 -1
- package/lib.commonjs/providers/provider-etherscan.js +0 -587
- package/lib.commonjs/providers/provider-etherscan.js.map +0 -1
- package/lib.commonjs/providers/provider-infura.d.ts +0 -101
- package/lib.commonjs/providers/provider-infura.d.ts.map +0 -1
- package/lib.commonjs/providers/provider-infura.js +0 -206
- package/lib.commonjs/providers/provider-infura.js.map +0 -1
- package/lib.commonjs/providers/provider-pocket.d.ts +0 -54
- package/lib.commonjs/providers/provider-pocket.d.ts.map +0 -1
- package/lib.commonjs/providers/provider-pocket.js +0 -109
- package/lib.commonjs/providers/provider-pocket.js.map +0 -1
- package/lib.commonjs/providers/provider-quicknode.d.ts +0 -59
- package/lib.commonjs/providers/provider-quicknode.d.ts.map +0 -1
- package/lib.commonjs/providers/provider-quicknode.js +0 -163
- package/lib.commonjs/providers/provider-quicknode.js.map +0 -1
- package/lib.commonjs/wallet/hdwallet.d.ts +0 -248
- package/lib.commonjs/wallet/hdwallet.d.ts.map +0 -1
- package/lib.commonjs/wallet/hdwallet.js +0 -505
- package/lib.commonjs/wallet/hdwallet.js.map +0 -1
- package/lib.commonjs/wallet/json-crowdsale.d.ts +0 -27
- package/lib.commonjs/wallet/json-crowdsale.d.ts.map +0 -1
- package/lib.commonjs/wallet/json-crowdsale.js +0 -60
- package/lib.commonjs/wallet/json-crowdsale.js.map +0 -1
- package/lib.commonjs/wallet/mnemonic.d.ts +0 -65
- package/lib.commonjs/wallet/mnemonic.d.ts.map +0 -1
- package/lib.commonjs/wallet/mnemonic.js +0 -169
- package/lib.commonjs/wallet/mnemonic.js.map +0 -1
- package/lib.commonjs/wallet/seedwallet.d.ts +0 -4
- package/lib.commonjs/wallet/seedwallet.d.ts.map +0 -1
- package/lib.commonjs/wallet/seedwallet.js +0 -8
- package/lib.commonjs/wallet/seedwallet.js.map +0 -1
- package/lib.esm/providers/provider-alchemy.d.ts +0 -50
- package/lib.esm/providers/provider-alchemy.d.ts.map +0 -1
- package/lib.esm/providers/provider-alchemy.js +0 -147
- package/lib.esm/providers/provider-alchemy.js.map +0 -1
- package/lib.esm/providers/provider-ankr.d.ts +0 -61
- package/lib.esm/providers/provider-ankr.d.ts.map +0 -1
- package/lib.esm/providers/provider-ankr.js +0 -133
- package/lib.esm/providers/provider-ankr.js.map +0 -1
- package/lib.esm/providers/provider-blockscout.d.ts +0 -59
- package/lib.esm/providers/provider-blockscout.d.ts.map +0 -1
- package/lib.esm/providers/provider-blockscout.js +0 -141
- package/lib.esm/providers/provider-blockscout.js.map +0 -1
- package/lib.esm/providers/provider-chainstack.d.ts +0 -46
- package/lib.esm/providers/provider-chainstack.d.ts.map +0 -1
- package/lib.esm/providers/provider-chainstack.js +0 -98
- package/lib.esm/providers/provider-chainstack.js.map +0 -1
- package/lib.esm/providers/provider-cloudflare.d.ts +0 -14
- package/lib.esm/providers/provider-cloudflare.d.ts.map +0 -1
- package/lib.esm/providers/provider-cloudflare.js +0 -22
- package/lib.esm/providers/provider-cloudflare.js.map +0 -1
- package/lib.esm/providers/provider-etherscan.d.ts +0 -147
- package/lib.esm/providers/provider-etherscan.d.ts.map +0 -1
- package/lib.esm/providers/provider-etherscan.js +0 -584
- package/lib.esm/providers/provider-etherscan.js.map +0 -1
- package/lib.esm/providers/provider-infura.d.ts +0 -101
- package/lib.esm/providers/provider-infura.d.ts.map +0 -1
- package/lib.esm/providers/provider-infura.js +0 -201
- package/lib.esm/providers/provider-infura.js.map +0 -1
- package/lib.esm/providers/provider-pocket.d.ts +0 -54
- package/lib.esm/providers/provider-pocket.d.ts.map +0 -1
- package/lib.esm/providers/provider-pocket.js +0 -105
- package/lib.esm/providers/provider-pocket.js.map +0 -1
- package/lib.esm/providers/provider-quicknode.d.ts +0 -59
- package/lib.esm/providers/provider-quicknode.d.ts.map +0 -1
- package/lib.esm/providers/provider-quicknode.js +0 -159
- package/lib.esm/providers/provider-quicknode.js.map +0 -1
- package/lib.esm/wallet/hdwallet.d.ts +0 -248
- package/lib.esm/wallet/hdwallet.d.ts.map +0 -1
- package/lib.esm/wallet/hdwallet.js +0 -498
- package/lib.esm/wallet/hdwallet.js.map +0 -1
- package/lib.esm/wallet/json-crowdsale.d.ts +0 -27
- package/lib.esm/wallet/json-crowdsale.d.ts.map +0 -1
- package/lib.esm/wallet/json-crowdsale.js +0 -55
- package/lib.esm/wallet/json-crowdsale.js.map +0 -1
- package/lib.esm/wallet/mnemonic.d.ts +0 -65
- package/lib.esm/wallet/mnemonic.d.ts.map +0 -1
- package/lib.esm/wallet/mnemonic.js +0 -165
- package/lib.esm/wallet/mnemonic.js.map +0 -1
- package/lib.esm/wallet/seedwallet.d.ts +0 -4
- package/lib.esm/wallet/seedwallet.d.ts.map +0 -1
- package/lib.esm/wallet/seedwallet.js +0 -4
- package/lib.esm/wallet/seedwallet.js.map +0 -1
|
@@ -1,418 +1,418 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* About provider formatting?
|
|
3
|
-
*
|
|
4
|
-
* @_section: api/providers/formatting:Formatting [provider-formatting]
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import type { Signature } from "../crypto/index.js";
|
|
8
|
-
import type { Authorization, AccessList } from "../transaction/index.js";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
//////////////////////
|
|
12
|
-
// Block
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* a **BlockParams** encodes the minimal required properties for a
|
|
16
|
-
* formatted block.
|
|
17
|
-
*/
|
|
18
|
-
export interface BlockParams {
|
|
19
|
-
/**
|
|
20
|
-
* The block hash.
|
|
21
|
-
*/
|
|
22
|
-
hash?: null | string;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* The block number.
|
|
26
|
-
*/
|
|
27
|
-
number: number;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* The timestamp for this block, which is the number of seconds
|
|
31
|
-
* since epoch that this block was included.
|
|
32
|
-
*/
|
|
33
|
-
timestamp: number;
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* The hash of the previous block in the blockchain. The genesis block
|
|
37
|
-
* has the parentHash of the [[ZeroHash]].
|
|
38
|
-
*/
|
|
39
|
-
parentHash: string;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* The hash tree root of the parent beacon block for the given
|
|
43
|
-
* execution block. See [[link-eip-4788]].
|
|
44
|
-
*/
|
|
45
|
-
parentBeaconBlockRoot?: null | string;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* A random sequence provided during the mining process for
|
|
49
|
-
* proof-of-work networks.
|
|
50
|
-
*/
|
|
51
|
-
nonce: string;
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* For proof-of-work networks, the difficulty target is used to
|
|
55
|
-
* adjust the difficulty in mining to ensure an expected block rate.
|
|
56
|
-
*/
|
|
57
|
-
difficulty: bigint;
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* The maximum amount of gas a block can consume.
|
|
61
|
-
*/
|
|
62
|
-
gasLimit: bigint;
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* The amount of gas a block consumed.
|
|
66
|
-
*/
|
|
67
|
-
gasUsed: bigint;
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* The total amount of BLOb gas consumed by transactions within
|
|
71
|
-
* the block. See [[link-eip4844].
|
|
72
|
-
*/
|
|
73
|
-
blobGasUsed?: null | bigint;
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* The running total of BLOb gas consumed in excess of the target
|
|
77
|
-
* prior to the block. See [[link-eip-4844]].
|
|
78
|
-
*/
|
|
79
|
-
excessBlobGas?: null | bigint;
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* The miner (or author) of a block.
|
|
83
|
-
*/
|
|
84
|
-
miner: string;
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* The latest RANDAO mix of the post beacon state of
|
|
88
|
-
* the previous block.
|
|
89
|
-
*/
|
|
90
|
-
prevRandao?: null | string;
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Additional data the miner choose to include.
|
|
94
|
-
*/
|
|
95
|
-
extraData: string;
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* The protocol-defined base fee per gas in an [[link-eip-1559]]
|
|
99
|
-
* block.
|
|
100
|
-
*/
|
|
101
|
-
baseFeePerGas: null | bigint;
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* The root hash for the global state after applying changes
|
|
105
|
-
* in this block.
|
|
106
|
-
*/
|
|
107
|
-
stateRoot?: null | string;
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* The hash of the transaction receipts trie.
|
|
111
|
-
*/
|
|
112
|
-
receiptsRoot?: null | string;
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* The list of transactions in the block.
|
|
116
|
-
*/
|
|
117
|
-
transactions: ReadonlyArray<string | TransactionResponseParams>;
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
//////////////////////
|
|
122
|
-
// Log
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* a **LogParams** encodes the minimal required properties for a
|
|
126
|
-
* formatted log.
|
|
127
|
-
*/
|
|
128
|
-
export interface LogParams {
|
|
129
|
-
/**
|
|
130
|
-
* The transaction hash for the transaxction the log occurred in.
|
|
131
|
-
*/
|
|
132
|
-
transactionHash: string;
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* The block hash of the block that included the transaction for this
|
|
136
|
-
* log.
|
|
137
|
-
*/
|
|
138
|
-
blockHash: string;
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* The block number of the block that included the transaction for this
|
|
142
|
-
* log.
|
|
143
|
-
*/
|
|
144
|
-
blockNumber: number;
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* Whether this log was removed due to the transaction it was included
|
|
148
|
-
* in being removed dur to an orphaned block.
|
|
149
|
-
*/
|
|
150
|
-
removed: boolean;
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* The address of the contract that emitted this log.
|
|
154
|
-
*/
|
|
155
|
-
address: string;
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* The data emitted with this log.
|
|
159
|
-
*/
|
|
160
|
-
data: string;
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* The topics emitted with this log.
|
|
164
|
-
*/
|
|
165
|
-
topics: ReadonlyArray<string>;
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* The index of this log.
|
|
169
|
-
*/
|
|
170
|
-
index: number;
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* The transaction index of this log.
|
|
174
|
-
*/
|
|
175
|
-
transactionIndex: number;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
//////////////////////
|
|
180
|
-
// Transaction Receipt
|
|
181
|
-
|
|
182
|
-
/**
|
|
183
|
-
* a **TransactionReceiptParams** encodes the minimal required properties
|
|
184
|
-
* for a formatted transaction receipt.
|
|
185
|
-
*/
|
|
186
|
-
export interface TransactionReceiptParams {
|
|
187
|
-
/**
|
|
188
|
-
* The target of the transaction. If null, the transaction was trying
|
|
189
|
-
* to deploy a transaction with the ``data`` as the initi=code.
|
|
190
|
-
*/
|
|
191
|
-
to: null | string;
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* The sender of the transaction.
|
|
195
|
-
*/
|
|
196
|
-
from: string;
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* If the transaction was directly deploying a contract, the [[to]]
|
|
200
|
-
* will be null, the ``data`` will be initcode and if successful, this
|
|
201
|
-
* will be the address of the contract deployed.
|
|
202
|
-
*/
|
|
203
|
-
contractAddress: null | string;
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* The transaction hash.
|
|
207
|
-
*/
|
|
208
|
-
hash: string;
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* The transaction index.
|
|
212
|
-
*/
|
|
213
|
-
index: number;
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
* The block hash of the block that included this transaction.
|
|
217
|
-
*/
|
|
218
|
-
blockHash: string;
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* The block number of the block that included this transaction.
|
|
222
|
-
*/
|
|
223
|
-
blockNumber: number;
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* The bloom filter for the logs emitted during execution of this
|
|
227
|
-
* transaction.
|
|
228
|
-
*/
|
|
229
|
-
logsBloom: string;
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* The logs emitted during the execution of this transaction.
|
|
233
|
-
*/
|
|
234
|
-
logs: ReadonlyArray<LogParams>;
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
* The amount of gas consumed executing this transaciton.
|
|
238
|
-
*/
|
|
239
|
-
gasUsed: bigint;
|
|
240
|
-
|
|
241
|
-
/**
|
|
242
|
-
* The amount of BLOb gas used. See [[link-eip-4844]].
|
|
243
|
-
*/
|
|
244
|
-
blobGasUsed?: null | bigint;
|
|
245
|
-
|
|
246
|
-
/**
|
|
247
|
-
* The total amount of gas consumed during the entire block up to
|
|
248
|
-
* and including this transaction.
|
|
249
|
-
*/
|
|
250
|
-
cumulativeGasUsed: bigint;
|
|
251
|
-
|
|
252
|
-
/**
|
|
253
|
-
* The actual gas price per gas charged for this transaction.
|
|
254
|
-
*/
|
|
255
|
-
gasPrice?: null | bigint;
|
|
256
|
-
|
|
257
|
-
/**
|
|
258
|
-
* The actual BLOb gas price that was charged. See [[link-eip-4844]].
|
|
259
|
-
*/
|
|
260
|
-
blobGasPrice?: null | bigint;
|
|
261
|
-
|
|
262
|
-
/**
|
|
263
|
-
* The actual gas price per gas charged for this transaction.
|
|
264
|
-
*/
|
|
265
|
-
effectiveGasPrice?: null | bigint;
|
|
266
|
-
|
|
267
|
-
/**
|
|
268
|
-
* The [[link-eip-2718]] envelope type.
|
|
269
|
-
*/
|
|
270
|
-
type: number;
|
|
271
|
-
//byzantium: boolean;
|
|
272
|
-
|
|
273
|
-
/**
|
|
274
|
-
* The status of the transaction execution. If ``1`` then the
|
|
275
|
-
* the transaction returned success, if ``0`` then the transaction
|
|
276
|
-
* was reverted. For pre-byzantium blocks, this is usually null, but
|
|
277
|
-
* some nodes may have backfilled this data.
|
|
278
|
-
*/
|
|
279
|
-
status: null | number;
|
|
280
|
-
|
|
281
|
-
/**
|
|
282
|
-
* The root of this transaction in a pre-bazatium block. In
|
|
283
|
-
* post-byzantium blocks this is null.
|
|
284
|
-
*/
|
|
285
|
-
root: null | string;
|
|
286
|
-
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
/*
|
|
290
|
-
export interface LegacyTransactionReceipt {
|
|
291
|
-
byzantium: false;
|
|
292
|
-
status: null;
|
|
293
|
-
root: string;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
export interface ByzantiumTransactionReceipt {
|
|
297
|
-
byzantium: true;
|
|
298
|
-
status: number;
|
|
299
|
-
root: null;
|
|
300
|
-
}
|
|
301
|
-
*/
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
//////////////////////
|
|
306
|
-
// Transaction Response
|
|
307
|
-
|
|
308
|
-
/**
|
|
309
|
-
* a **TransactionResponseParams** encodes the minimal required properties
|
|
310
|
-
* for a formatted transaction response.
|
|
311
|
-
*/
|
|
312
|
-
export interface TransactionResponseParams {
|
|
313
|
-
/**
|
|
314
|
-
* The block number of the block that included this transaction.
|
|
315
|
-
*/
|
|
316
|
-
blockNumber: null | number;
|
|
317
|
-
|
|
318
|
-
/**
|
|
319
|
-
* The block hash of the block that included this transaction.
|
|
320
|
-
*/
|
|
321
|
-
blockHash: null | string;
|
|
322
|
-
|
|
323
|
-
/**
|
|
324
|
-
* The transaction hash.
|
|
325
|
-
*/
|
|
326
|
-
hash: string;
|
|
327
|
-
|
|
328
|
-
/**
|
|
329
|
-
* The transaction index.
|
|
330
|
-
*/
|
|
331
|
-
index: number;
|
|
332
|
-
|
|
333
|
-
/**
|
|
334
|
-
* The [[link-eip-2718]] transaction type.
|
|
335
|
-
*/
|
|
336
|
-
type: number;
|
|
337
|
-
|
|
338
|
-
/**
|
|
339
|
-
* The target of the transaction. If ``null``, the ``data`` is initcode
|
|
340
|
-
* and this transaction is a deployment transaction.
|
|
341
|
-
*/
|
|
342
|
-
to: null | string;
|
|
343
|
-
|
|
344
|
-
/**
|
|
345
|
-
* The sender of the transaction.
|
|
346
|
-
*/
|
|
347
|
-
from: string;
|
|
348
|
-
|
|
349
|
-
/**
|
|
350
|
-
* The nonce of the transaction, used for replay protection.
|
|
351
|
-
*/
|
|
352
|
-
nonce: number;
|
|
353
|
-
|
|
354
|
-
/**
|
|
355
|
-
* The maximum amount of gas this transaction is authorized to consume.
|
|
356
|
-
*/
|
|
357
|
-
gasLimit: bigint;
|
|
358
|
-
|
|
359
|
-
/**
|
|
360
|
-
* For legacy transactions, this is the gas price per gas to pay.
|
|
361
|
-
*/
|
|
362
|
-
gasPrice: bigint;
|
|
363
|
-
|
|
364
|
-
/**
|
|
365
|
-
* For [[link-eip-1559]] transactions, this is the maximum priority
|
|
366
|
-
* fee to allow a producer to claim.
|
|
367
|
-
*/
|
|
368
|
-
maxPriorityFeePerGas: null | bigint;
|
|
369
|
-
|
|
370
|
-
/**
|
|
371
|
-
* For [[link-eip-1559]] transactions, this is the maximum fee that
|
|
372
|
-
* will be paid.
|
|
373
|
-
*/
|
|
374
|
-
maxFeePerGas: null | bigint;
|
|
375
|
-
|
|
376
|
-
/**
|
|
377
|
-
* For [[link-eip-4844]] transactions, this is the maximum fee that
|
|
378
|
-
* will be paid per BLOb.
|
|
379
|
-
*/
|
|
380
|
-
maxFeePerBlobGas?: null | bigint;
|
|
381
|
-
|
|
382
|
-
/**
|
|
383
|
-
* The transaction data.
|
|
384
|
-
*/
|
|
385
|
-
data: string;
|
|
386
|
-
|
|
387
|
-
/**
|
|
388
|
-
* The transaction value (in wei).
|
|
389
|
-
*/
|
|
390
|
-
value: bigint;
|
|
391
|
-
|
|
392
|
-
/**
|
|
393
|
-
* The chain ID this transaction is valid on.
|
|
394
|
-
*/
|
|
395
|
-
chainId: bigint;
|
|
396
|
-
|
|
397
|
-
/**
|
|
398
|
-
* The signature of the transaction.
|
|
399
|
-
*/
|
|
400
|
-
signature: Signature;
|
|
401
|
-
|
|
402
|
-
/**
|
|
403
|
-
* The transaction access list.
|
|
404
|
-
*/
|
|
405
|
-
accessList: null | AccessList;
|
|
406
|
-
|
|
407
|
-
/**
|
|
408
|
-
* The [[link-eip-4844]] BLOb versioned hashes.
|
|
409
|
-
*/
|
|
410
|
-
blobVersionedHashes?: null | Array<string>; // @TODO: drop the "?"? (v7)
|
|
411
|
-
|
|
412
|
-
/**
|
|
413
|
-
* The [[link-eip-7702]] authorizations (if any).
|
|
414
|
-
*/
|
|
415
|
-
authorizationList: null | Array<Authorization>;
|
|
416
|
-
};
|
|
417
|
-
|
|
418
|
-
|
|
1
|
+
/**
|
|
2
|
+
* About provider formatting?
|
|
3
|
+
*
|
|
4
|
+
* @_section: api/providers/formatting:Formatting [provider-formatting]
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import type { Signature } from "../crypto/index.js";
|
|
8
|
+
import type { Authorization, AccessList } from "../transaction/index.js";
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
//////////////////////
|
|
12
|
+
// Block
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* a **BlockParams** encodes the minimal required properties for a
|
|
16
|
+
* formatted block.
|
|
17
|
+
*/
|
|
18
|
+
export interface BlockParams {
|
|
19
|
+
/**
|
|
20
|
+
* The block hash.
|
|
21
|
+
*/
|
|
22
|
+
hash?: null | string;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The block number.
|
|
26
|
+
*/
|
|
27
|
+
number: number;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The timestamp for this block, which is the number of seconds
|
|
31
|
+
* since epoch that this block was included.
|
|
32
|
+
*/
|
|
33
|
+
timestamp: number;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The hash of the previous block in the blockchain. The genesis block
|
|
37
|
+
* has the parentHash of the [[ZeroHash]].
|
|
38
|
+
*/
|
|
39
|
+
parentHash: string;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The hash tree root of the parent beacon block for the given
|
|
43
|
+
* execution block. See [[link-eip-4788]].
|
|
44
|
+
*/
|
|
45
|
+
parentBeaconBlockRoot?: null | string;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* A random sequence provided during the mining process for
|
|
49
|
+
* proof-of-work networks.
|
|
50
|
+
*/
|
|
51
|
+
nonce: string;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* For proof-of-work networks, the difficulty target is used to
|
|
55
|
+
* adjust the difficulty in mining to ensure an expected block rate.
|
|
56
|
+
*/
|
|
57
|
+
difficulty: bigint;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* The maximum amount of gas a block can consume.
|
|
61
|
+
*/
|
|
62
|
+
gasLimit: bigint;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* The amount of gas a block consumed.
|
|
66
|
+
*/
|
|
67
|
+
gasUsed: bigint;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* The total amount of BLOb gas consumed by transactions within
|
|
71
|
+
* the block. See [[link-eip4844].
|
|
72
|
+
*/
|
|
73
|
+
blobGasUsed?: null | bigint;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* The running total of BLOb gas consumed in excess of the target
|
|
77
|
+
* prior to the block. See [[link-eip-4844]].
|
|
78
|
+
*/
|
|
79
|
+
excessBlobGas?: null | bigint;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* The miner (or author) of a block.
|
|
83
|
+
*/
|
|
84
|
+
miner: string;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The latest RANDAO mix of the post beacon state of
|
|
88
|
+
* the previous block.
|
|
89
|
+
*/
|
|
90
|
+
prevRandao?: null | string;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Additional data the miner choose to include.
|
|
94
|
+
*/
|
|
95
|
+
extraData: string;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* The protocol-defined base fee per gas in an [[link-eip-1559]]
|
|
99
|
+
* block.
|
|
100
|
+
*/
|
|
101
|
+
baseFeePerGas: null | bigint;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* The root hash for the global state after applying changes
|
|
105
|
+
* in this block.
|
|
106
|
+
*/
|
|
107
|
+
stateRoot?: null | string;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* The hash of the transaction receipts trie.
|
|
111
|
+
*/
|
|
112
|
+
receiptsRoot?: null | string;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* The list of transactions in the block.
|
|
116
|
+
*/
|
|
117
|
+
transactions: ReadonlyArray<string | TransactionResponseParams>;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
//////////////////////
|
|
122
|
+
// Log
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* a **LogParams** encodes the minimal required properties for a
|
|
126
|
+
* formatted log.
|
|
127
|
+
*/
|
|
128
|
+
export interface LogParams {
|
|
129
|
+
/**
|
|
130
|
+
* The transaction hash for the transaxction the log occurred in.
|
|
131
|
+
*/
|
|
132
|
+
transactionHash: string;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* The block hash of the block that included the transaction for this
|
|
136
|
+
* log.
|
|
137
|
+
*/
|
|
138
|
+
blockHash: string;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* The block number of the block that included the transaction for this
|
|
142
|
+
* log.
|
|
143
|
+
*/
|
|
144
|
+
blockNumber: number;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Whether this log was removed due to the transaction it was included
|
|
148
|
+
* in being removed dur to an orphaned block.
|
|
149
|
+
*/
|
|
150
|
+
removed: boolean;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* The address of the contract that emitted this log.
|
|
154
|
+
*/
|
|
155
|
+
address: string;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* The data emitted with this log.
|
|
159
|
+
*/
|
|
160
|
+
data: string;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* The topics emitted with this log.
|
|
164
|
+
*/
|
|
165
|
+
topics: ReadonlyArray<string>;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* The index of this log.
|
|
169
|
+
*/
|
|
170
|
+
index: number;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* The transaction index of this log.
|
|
174
|
+
*/
|
|
175
|
+
transactionIndex: number;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
//////////////////////
|
|
180
|
+
// Transaction Receipt
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* a **TransactionReceiptParams** encodes the minimal required properties
|
|
184
|
+
* for a formatted transaction receipt.
|
|
185
|
+
*/
|
|
186
|
+
export interface TransactionReceiptParams {
|
|
187
|
+
/**
|
|
188
|
+
* The target of the transaction. If null, the transaction was trying
|
|
189
|
+
* to deploy a transaction with the ``data`` as the initi=code.
|
|
190
|
+
*/
|
|
191
|
+
to: null | string;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* The sender of the transaction.
|
|
195
|
+
*/
|
|
196
|
+
from: string;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* If the transaction was directly deploying a contract, the [[to]]
|
|
200
|
+
* will be null, the ``data`` will be initcode and if successful, this
|
|
201
|
+
* will be the address of the contract deployed.
|
|
202
|
+
*/
|
|
203
|
+
contractAddress: null | string;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* The transaction hash.
|
|
207
|
+
*/
|
|
208
|
+
hash: string;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* The transaction index.
|
|
212
|
+
*/
|
|
213
|
+
index: number;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* The block hash of the block that included this transaction.
|
|
217
|
+
*/
|
|
218
|
+
blockHash: string;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* The block number of the block that included this transaction.
|
|
222
|
+
*/
|
|
223
|
+
blockNumber: number;
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* The bloom filter for the logs emitted during execution of this
|
|
227
|
+
* transaction.
|
|
228
|
+
*/
|
|
229
|
+
logsBloom: string;
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* The logs emitted during the execution of this transaction.
|
|
233
|
+
*/
|
|
234
|
+
logs: ReadonlyArray<LogParams>;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* The amount of gas consumed executing this transaciton.
|
|
238
|
+
*/
|
|
239
|
+
gasUsed: bigint;
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* The amount of BLOb gas used. See [[link-eip-4844]].
|
|
243
|
+
*/
|
|
244
|
+
blobGasUsed?: null | bigint;
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* The total amount of gas consumed during the entire block up to
|
|
248
|
+
* and including this transaction.
|
|
249
|
+
*/
|
|
250
|
+
cumulativeGasUsed: bigint;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* The actual gas price per gas charged for this transaction.
|
|
254
|
+
*/
|
|
255
|
+
gasPrice?: null | bigint;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* The actual BLOb gas price that was charged. See [[link-eip-4844]].
|
|
259
|
+
*/
|
|
260
|
+
blobGasPrice?: null | bigint;
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* The actual gas price per gas charged for this transaction.
|
|
264
|
+
*/
|
|
265
|
+
effectiveGasPrice?: null | bigint;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* The [[link-eip-2718]] envelope type.
|
|
269
|
+
*/
|
|
270
|
+
type: number;
|
|
271
|
+
//byzantium: boolean;
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* The status of the transaction execution. If ``1`` then the
|
|
275
|
+
* the transaction returned success, if ``0`` then the transaction
|
|
276
|
+
* was reverted. For pre-byzantium blocks, this is usually null, but
|
|
277
|
+
* some nodes may have backfilled this data.
|
|
278
|
+
*/
|
|
279
|
+
status: null | number;
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* The root of this transaction in a pre-bazatium block. In
|
|
283
|
+
* post-byzantium blocks this is null.
|
|
284
|
+
*/
|
|
285
|
+
root: null | string;
|
|
286
|
+
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/*
|
|
290
|
+
export interface LegacyTransactionReceipt {
|
|
291
|
+
byzantium: false;
|
|
292
|
+
status: null;
|
|
293
|
+
root: string;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
export interface ByzantiumTransactionReceipt {
|
|
297
|
+
byzantium: true;
|
|
298
|
+
status: number;
|
|
299
|
+
root: null;
|
|
300
|
+
}
|
|
301
|
+
*/
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
//////////////////////
|
|
306
|
+
// Transaction Response
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* a **TransactionResponseParams** encodes the minimal required properties
|
|
310
|
+
* for a formatted transaction response.
|
|
311
|
+
*/
|
|
312
|
+
export interface TransactionResponseParams {
|
|
313
|
+
/**
|
|
314
|
+
* The block number of the block that included this transaction.
|
|
315
|
+
*/
|
|
316
|
+
blockNumber: null | number;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* The block hash of the block that included this transaction.
|
|
320
|
+
*/
|
|
321
|
+
blockHash: null | string;
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* The transaction hash.
|
|
325
|
+
*/
|
|
326
|
+
hash: string;
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* The transaction index.
|
|
330
|
+
*/
|
|
331
|
+
index: number;
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* The [[link-eip-2718]] transaction type.
|
|
335
|
+
*/
|
|
336
|
+
type: number;
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* The target of the transaction. If ``null``, the ``data`` is initcode
|
|
340
|
+
* and this transaction is a deployment transaction.
|
|
341
|
+
*/
|
|
342
|
+
to: null | string;
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* The sender of the transaction.
|
|
346
|
+
*/
|
|
347
|
+
from: string;
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* The nonce of the transaction, used for replay protection.
|
|
351
|
+
*/
|
|
352
|
+
nonce: number;
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* The maximum amount of gas this transaction is authorized to consume.
|
|
356
|
+
*/
|
|
357
|
+
gasLimit: bigint;
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* For legacy transactions, this is the gas price per gas to pay.
|
|
361
|
+
*/
|
|
362
|
+
gasPrice: bigint;
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* For [[link-eip-1559]] transactions, this is the maximum priority
|
|
366
|
+
* fee to allow a producer to claim.
|
|
367
|
+
*/
|
|
368
|
+
maxPriorityFeePerGas: null | bigint;
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* For [[link-eip-1559]] transactions, this is the maximum fee that
|
|
372
|
+
* will be paid.
|
|
373
|
+
*/
|
|
374
|
+
maxFeePerGas: null | bigint;
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* For [[link-eip-4844]] transactions, this is the maximum fee that
|
|
378
|
+
* will be paid per BLOb.
|
|
379
|
+
*/
|
|
380
|
+
maxFeePerBlobGas?: null | bigint;
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* The transaction data.
|
|
384
|
+
*/
|
|
385
|
+
data: string;
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* The transaction value (in wei).
|
|
389
|
+
*/
|
|
390
|
+
value: bigint;
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* The chain ID this transaction is valid on.
|
|
394
|
+
*/
|
|
395
|
+
chainId: bigint;
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* The signature of the transaction.
|
|
399
|
+
*/
|
|
400
|
+
signature: Signature;
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* The transaction access list.
|
|
404
|
+
*/
|
|
405
|
+
accessList: null | AccessList;
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* The [[link-eip-4844]] BLOb versioned hashes.
|
|
409
|
+
*/
|
|
410
|
+
blobVersionedHashes?: null | Array<string>; // @TODO: drop the "?"? (v7)
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* The [[link-eip-7702]] authorizations (if any).
|
|
414
|
+
*/
|
|
415
|
+
authorizationList: null | Array<Authorization>;
|
|
416
|
+
};
|
|
417
|
+
|
|
418
|
+
|