carbon-js-sdk 0.3.47 → 0.3.49

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.
Files changed (78) hide show
  1. package/lib/clients/EvmIbcClient.d.ts +86 -0
  2. package/lib/clients/EvmIbcClient.js +90 -0
  3. package/lib/clients/TokenClient.js +5 -4
  4. package/lib/codec/ethermint/crypto/v1/ethsecp256k1/keys.d.ts +39 -0
  5. package/lib/codec/ethermint/crypto/v1/ethsecp256k1/keys.js +138 -0
  6. package/lib/codec/ethermint/evm/v1/evm.d.ts +239 -0
  7. package/lib/codec/ethermint/evm/v1/evm.js +1140 -0
  8. package/lib/codec/ethermint/evm/v1/genesis.d.ts +43 -0
  9. package/lib/codec/ethermint/evm/v1/genesis.js +153 -0
  10. package/lib/codec/ethermint/evm/v1/query.d.ts +424 -0
  11. package/lib/codec/ethermint/evm/v1/query.js +1637 -0
  12. package/lib/codec/ethermint/evm/v1/tx.d.ts +183 -0
  13. package/lib/codec/ethermint/evm/v1/tx.js +836 -0
  14. package/lib/codec/ethermint/feemarket/v1/feemarket.d.ts +41 -0
  15. package/lib/codec/ethermint/feemarket/v1/feemarket.js +149 -0
  16. package/lib/codec/ethermint/feemarket/v1/genesis.d.ts +26 -0
  17. package/lib/codec/ethermint/feemarket/v1/genesis.js +79 -0
  18. package/lib/codec/ethermint/feemarket/v1/query.d.ts +100 -0
  19. package/lib/codec/ethermint/feemarket/v1/query.js +276 -0
  20. package/lib/codec/ethermint/types/v1/account.d.ts +26 -0
  21. package/lib/codec/ethermint/types/v1/account.js +78 -0
  22. package/lib/codec/ethermint/types/v1/dynamic_fee.d.ts +20 -0
  23. package/lib/codec/ethermint/types/v1/dynamic_fee.js +60 -0
  24. package/lib/codec/ethermint/types/v1/indexer.d.ts +41 -0
  25. package/lib/codec/ethermint/types/v1/indexer.js +153 -0
  26. package/lib/codec/ethermint/types/v1/web3.d.ts +36 -0
  27. package/lib/codec/ethermint/types/v1/web3.js +124 -0
  28. package/lib/codec/evmbank/genesis.d.ts +32 -0
  29. package/lib/codec/evmbank/genesis.js +152 -0
  30. package/lib/codec/evmbank/query.d.ts +40 -0
  31. package/lib/codec/evmbank/query.js +116 -0
  32. package/lib/codec/{liquiditypool/legacy.d.ts → evmmerge/event.d.ts} +11 -9
  33. package/lib/codec/evmmerge/event.js +90 -0
  34. package/lib/codec/evmmerge/genesis.d.ts +48 -0
  35. package/lib/codec/evmmerge/genesis.js +216 -0
  36. package/lib/codec/evmmerge/offchain.d.ts +22 -0
  37. package/lib/codec/evmmerge/offchain.js +105 -0
  38. package/lib/codec/evmmerge/query.d.ts +43 -0
  39. package/lib/codec/evmmerge/query.js +117 -0
  40. package/lib/codec/evmmerge/tx.d.ts +45 -0
  41. package/lib/codec/evmmerge/tx.js +128 -0
  42. package/lib/codec/ibc/applications/fee/v1/ack.d.ts +24 -0
  43. package/lib/codec/ibc/applications/fee/v1/ack.js +125 -0
  44. package/lib/codec/ibc/applications/fee/v1/fee.d.ts +68 -0
  45. package/lib/codec/ibc/applications/fee/v1/fee.js +289 -0
  46. package/lib/codec/ibc/applications/fee/v1/genesis.d.ts +93 -0
  47. package/lib/codec/ibc/applications/fee/v1/genesis.js +390 -0
  48. package/lib/codec/ibc/applications/fee/v1/metadata.d.ts +25 -0
  49. package/lib/codec/ibc/applications/fee/v1/metadata.js +71 -0
  50. package/lib/codec/ibc/applications/fee/v1/query.d.ts +312 -0
  51. package/lib/codec/ibc/applications/fee/v1/query.js +1187 -0
  52. package/lib/codec/ibc/applications/fee/v1/tx.d.ts +171 -0
  53. package/lib/codec/ibc/applications/fee/v1/tx.js +524 -0
  54. package/lib/codec/ibc/applications/interchain_accounts/controller/v1/tx.d.ts +78 -0
  55. package/lib/codec/ibc/applications/interchain_accounts/controller/v1/tx.js +296 -0
  56. package/lib/codec/ibc/applications/interchain_accounts/genesis/v1/genesis.d.ts +80 -0
  57. package/lib/codec/ibc/applications/interchain_accounts/genesis/v1/genesis.js +439 -0
  58. package/lib/codec/index.d.ts +2 -0
  59. package/lib/codec/index.js +556 -551
  60. package/lib/constant/ibc.d.ts +7 -0
  61. package/lib/constant/ibc.js +84 -37
  62. package/lib/constant/network.js +1 -1
  63. package/lib/modules/index.d.ts +1 -0
  64. package/lib/modules/index.js +1 -0
  65. package/lib/provider/keplr/KeplrStore.js +3 -1
  66. package/lib/util/ethermint/evm-ibc.d.ts +97 -0
  67. package/lib/util/ethermint/evm-ibc.js +134 -0
  68. package/lib/util/ethermint/index.d.ts +3 -0
  69. package/lib/util/ethermint/index.js +12 -0
  70. package/lib/util/ethermint/keys.d.ts +39 -0
  71. package/lib/util/ethermint/keys.js +138 -0
  72. package/lib/util/ethermint/web3.d.ts +36 -0
  73. package/lib/util/ethermint/web3.js +124 -0
  74. package/lib/util/ibc.d.ts +2 -0
  75. package/lib/util/ibc.js +19 -6
  76. package/lib/util/tx.d.ts +1 -0
  77. package/package.json +1 -1
  78. package/lib/codec/liquiditypool/legacy.js +0 -64
@@ -0,0 +1,86 @@
1
+ import { Network } from "../constant";
2
+ import { StdSignDoc } from "@cosmjs/amino";
3
+ import { BlockchainUtils } from "../util";
4
+ declare type SupportedBlockchains = BlockchainUtils.Blockchain.Canto | BlockchainUtils.Blockchain.Evmos;
5
+ declare namespace EvmIbcClient {
6
+ interface TypedDomain {
7
+ name: string;
8
+ version: string;
9
+ chainId: number;
10
+ verifyingContract: string;
11
+ salt: string;
12
+ }
13
+ interface TypedDataV4 {
14
+ types: object;
15
+ primaryType: string;
16
+ message: StdSignDoc;
17
+ domain: TypedDomain;
18
+ }
19
+ const TYPED_DATA_REQUEST_METHOD = "eth_signTypedData_v4";
20
+ const DEFAULT_EIP712_TYPES: {
21
+ EIP712Domain: {
22
+ name: string;
23
+ type: string;
24
+ }[];
25
+ Tx: {
26
+ name: string;
27
+ type: string;
28
+ }[];
29
+ Fee: {
30
+ name: string;
31
+ type: string;
32
+ }[];
33
+ Coin: {
34
+ name: string;
35
+ type: string;
36
+ }[];
37
+ Msg: {
38
+ name: string;
39
+ type: string;
40
+ }[];
41
+ };
42
+ const getEvmChainId: (blockchain: SupportedBlockchains, network?: Network) => 7700 | 9001;
43
+ const getIbcTransferTypes: () => {
44
+ MsgValue: {
45
+ name: string;
46
+ type: string;
47
+ }[];
48
+ TypeToken: {
49
+ name: string;
50
+ type: string;
51
+ }[];
52
+ TypeTimeoutHeight: {
53
+ name: string;
54
+ type: string;
55
+ }[];
56
+ EIP712Domain: {
57
+ name: string;
58
+ type: string;
59
+ }[];
60
+ Tx: {
61
+ name: string;
62
+ type: string;
63
+ }[];
64
+ Fee: {
65
+ name: string;
66
+ type: string;
67
+ }[];
68
+ Coin: {
69
+ name: string;
70
+ type: string;
71
+ }[];
72
+ Msg: {
73
+ name: string;
74
+ type: string;
75
+ }[];
76
+ };
77
+ const getCosmosWeb3Domain: (blockchain: SupportedBlockchains) => {
78
+ name: string;
79
+ version: string;
80
+ chainId: number;
81
+ verifyingContract: string;
82
+ salt: string;
83
+ };
84
+ const getEIP712TypedData: (tx: StdSignDoc, blockchain: SupportedBlockchains, types?: object, domain?: EvmIbcClient.TypedDomain, primaryType?: string) => TypedDataV4;
85
+ }
86
+ export default EvmIbcClient;
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const constant_1 = require("../constant");
4
+ const util_1 = require("../util");
5
+ const _DEFAULT_EIP712_TYPES = {
6
+ EIP712Domain: [
7
+ { name: 'name', type: 'string' },
8
+ { name: 'version', type: 'string' },
9
+ { name: 'chainId', type: 'uint256' },
10
+ { name: 'verifyingContract', type: 'string' },
11
+ { name: 'salt', type: 'string' },
12
+ ],
13
+ Tx: [
14
+ { name: 'account_number', type: 'string' },
15
+ { name: 'chain_id', type: 'string' },
16
+ { name: 'fee', type: 'Fee' },
17
+ { name: 'memo', type: 'string' },
18
+ { name: 'msgs', type: 'Msg[]' },
19
+ { name: 'sequence', type: 'string' },
20
+ ],
21
+ Fee: [
22
+ { name: 'feePayer', type: 'string' },
23
+ { name: 'amount', type: 'Coin[]' },
24
+ { name: 'gas', type: 'string' },
25
+ ],
26
+ Coin: [
27
+ { name: 'denom', type: 'string' },
28
+ { name: 'amount', type: 'string' },
29
+ ],
30
+ Msg: [
31
+ { name: 'type', type: 'string' },
32
+ { name: 'value', type: 'MsgValue' },
33
+ ],
34
+ };
35
+ var EvmIbcClient;
36
+ (function (EvmIbcClient) {
37
+ EvmIbcClient.TYPED_DATA_REQUEST_METHOD = "eth_signTypedData_v4";
38
+ EvmIbcClient.DEFAULT_EIP712_TYPES = _DEFAULT_EIP712_TYPES;
39
+ EvmIbcClient.getEvmChainId = (blockchain, network = constant_1.Network.MainNet) => {
40
+ switch (network) {
41
+ case constant_1.Network.MainNet:
42
+ switch (blockchain) {
43
+ case util_1.BlockchainUtils.Blockchain.Canto:
44
+ return 7700;
45
+ case util_1.BlockchainUtils.Blockchain.Evmos:
46
+ return 9001;
47
+ default:
48
+ throw new Error("network not supported");
49
+ }
50
+ default:
51
+ throw new Error("network not supported");
52
+ }
53
+ };
54
+ EvmIbcClient.getIbcTransferTypes = () => {
55
+ return Object.assign(Object.assign({}, EvmIbcClient.DEFAULT_EIP712_TYPES), { MsgValue: [
56
+ { name: 'source_port', type: 'string' },
57
+ { name: 'source_channel', type: 'string' },
58
+ { name: 'token', type: 'TypeToken' },
59
+ { name: 'sender', type: 'string' },
60
+ { name: 'receiver', type: 'string' },
61
+ { name: 'timeout_height', type: 'TypeTimeoutHeight' },
62
+ { name: 'timeout_timestamp', type: 'uint64' },
63
+ ], TypeToken: [
64
+ { name: 'denom', type: 'string' },
65
+ { name: 'amount', type: 'string' },
66
+ ], TypeTimeoutHeight: [
67
+ { name: 'revision_number', type: 'uint64' },
68
+ { name: 'revision_height', type: 'uint64' },
69
+ ] });
70
+ };
71
+ EvmIbcClient.getCosmosWeb3Domain = (blockchain) => {
72
+ return {
73
+ name: "Cosmos Web3",
74
+ version: "1.0.0",
75
+ chainId: EvmIbcClient.getEvmChainId(blockchain),
76
+ verifyingContract: "cosmos",
77
+ salt: "0",
78
+ };
79
+ };
80
+ EvmIbcClient.getEIP712TypedData = (tx, blockchain, types = EvmIbcClient.getIbcTransferTypes(), domain = EvmIbcClient.getCosmosWeb3Domain(blockchain), primaryType = "Tx") => {
81
+ const typedData = {
82
+ types,
83
+ primaryType,
84
+ domain,
85
+ message: tx,
86
+ };
87
+ return typedData;
88
+ };
89
+ })(EvmIbcClient || (EvmIbcClient = {}));
90
+ exports.default = EvmIbcClient;
@@ -365,12 +365,12 @@ class TokenClient {
365
365
  }
366
366
  getCarbonIbcTokens() {
367
367
  const swthTokens = ibc_1.swthIbcWhitelist.map((chainId) => {
368
- var _a, _b;
368
+ var _a, _b, _c;
369
369
  const blockchain = util_1.IBCUtils.BlockchainMap[chainId];
370
370
  const carbonBlockchain = util_1.IBCUtils.ChainIdBlockchainMap[blockchain !== null && blockchain !== void 0 ? blockchain : ""];
371
371
  const blockchainNum = (_a = util_1.BlockchainUtils.CHAIN_IDS[carbonBlockchain !== null && carbonBlockchain !== void 0 ? carbonBlockchain : ""]) !== null && _a !== void 0 ? _a : 0;
372
- const swthChannel = ibc_1.swthChannels[chainId];
373
- const assetDenom = util_1.IBCUtils.makeIBCMinimalDenom((_b = swthChannel.dstChannel) !== null && _b !== void 0 ? _b : "channel-0", KeplrAccount_1.default.SWTH_CURRENCY.coinMinimalDenom);
372
+ const swthChannel = (_b = ibc_1.swthChannels[chainId]) === null || _b === void 0 ? void 0 : _b.ibc;
373
+ const assetDenom = util_1.IBCUtils.makeIBCMinimalDenom((_c = swthChannel === null || swthChannel === void 0 ? void 0 : swthChannel.dstChannel) !== null && _c !== void 0 ? _c : "channel-0", KeplrAccount_1.default.SWTH_CURRENCY.coinMinimalDenom);
374
374
  return {
375
375
  id: assetDenom,
376
376
  creator: "",
@@ -509,8 +509,9 @@ class TokenClient {
509
509
  setCommonAssetConfig() {
510
510
  // whitelisted ibc tokens
511
511
  ibc_1.ibcWhitelist.forEach((chainId) => {
512
+ var _a;
512
513
  const currencies = util_1.IBCUtils.EmbedChainInfos[chainId].currencies;
513
- const channelObj = ibc_1.swthChannels[chainId];
514
+ const channelObj = (_a = ibc_1.swthChannels[chainId]) === null || _a === void 0 ? void 0 : _a.ibc;
514
515
  currencies.forEach((asset) => {
515
516
  var _a, _b;
516
517
  const channel = asset.coinMinimalDenom !== "swth" ? (_a = channelObj === null || channelObj === void 0 ? void 0 : channelObj.sourceChannel) !== null && _a !== void 0 ? _a : "channel-0" : (_b = channelObj === null || channelObj === void 0 ? void 0 : channelObj.dstChannel) !== null && _b !== void 0 ? _b : "channel-0";
@@ -0,0 +1,39 @@
1
+ import Long from "long";
2
+ import _m0 from "protobufjs/minimal";
3
+ export declare const protobufPackage = "ethermint.crypto.v1.ethsecp256k1";
4
+ /**
5
+ * PubKey defines a type alias for an ecdsa.PublicKey that implements
6
+ * Tendermint's PubKey interface. It represents the 33-byte compressed public
7
+ * key format.
8
+ */
9
+ export interface PubKey {
10
+ /** key is the public key in byte form */
11
+ key: Uint8Array;
12
+ }
13
+ /**
14
+ * PrivKey defines a type alias for an ecdsa.PrivateKey that implements
15
+ * Tendermint's PrivateKey interface.
16
+ */
17
+ export interface PrivKey {
18
+ /** key is the private key in byte form */
19
+ key: Uint8Array;
20
+ }
21
+ export declare const PubKey: {
22
+ encode(message: PubKey, writer?: _m0.Writer): _m0.Writer;
23
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): PubKey;
24
+ fromJSON(object: any): PubKey;
25
+ toJSON(message: PubKey): unknown;
26
+ fromPartial(object: DeepPartial<PubKey>): PubKey;
27
+ };
28
+ export declare const PrivKey: {
29
+ encode(message: PrivKey, writer?: _m0.Writer): _m0.Writer;
30
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): PrivKey;
31
+ fromJSON(object: any): PrivKey;
32
+ toJSON(message: PrivKey): unknown;
33
+ fromPartial(object: DeepPartial<PrivKey>): PrivKey;
34
+ };
35
+ declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
36
+ export declare type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
37
+ [K in keyof T]?: DeepPartial<T[K]>;
38
+ } : Partial<T>;
39
+ export {};
@@ -0,0 +1,138 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.PrivKey = exports.PubKey = exports.protobufPackage = void 0;
7
+ /* eslint-disable */
8
+ const long_1 = __importDefault(require("long"));
9
+ const minimal_1 = __importDefault(require("protobufjs/minimal"));
10
+ exports.protobufPackage = "ethermint.crypto.v1.ethsecp256k1";
11
+ const basePubKey = {};
12
+ exports.PubKey = {
13
+ encode(message, writer = minimal_1.default.Writer.create()) {
14
+ if (message.key.length !== 0) {
15
+ writer.uint32(10).bytes(message.key);
16
+ }
17
+ return writer;
18
+ },
19
+ decode(input, length) {
20
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
21
+ let end = length === undefined ? reader.len : reader.pos + length;
22
+ const message = Object.assign({}, basePubKey);
23
+ message.key = new Uint8Array();
24
+ while (reader.pos < end) {
25
+ const tag = reader.uint32();
26
+ switch (tag >>> 3) {
27
+ case 1:
28
+ message.key = reader.bytes();
29
+ break;
30
+ default:
31
+ reader.skipType(tag & 7);
32
+ break;
33
+ }
34
+ }
35
+ return message;
36
+ },
37
+ fromJSON(object) {
38
+ const message = Object.assign({}, basePubKey);
39
+ message.key =
40
+ object.key !== undefined && object.key !== null
41
+ ? bytesFromBase64(object.key)
42
+ : new Uint8Array();
43
+ return message;
44
+ },
45
+ toJSON(message) {
46
+ const obj = {};
47
+ message.key !== undefined &&
48
+ (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
49
+ return obj;
50
+ },
51
+ fromPartial(object) {
52
+ var _a;
53
+ const message = Object.assign({}, basePubKey);
54
+ message.key = (_a = object.key) !== null && _a !== void 0 ? _a : new Uint8Array();
55
+ return message;
56
+ },
57
+ };
58
+ const basePrivKey = {};
59
+ exports.PrivKey = {
60
+ encode(message, writer = minimal_1.default.Writer.create()) {
61
+ if (message.key.length !== 0) {
62
+ writer.uint32(10).bytes(message.key);
63
+ }
64
+ return writer;
65
+ },
66
+ decode(input, length) {
67
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
68
+ let end = length === undefined ? reader.len : reader.pos + length;
69
+ const message = Object.assign({}, basePrivKey);
70
+ message.key = new Uint8Array();
71
+ while (reader.pos < end) {
72
+ const tag = reader.uint32();
73
+ switch (tag >>> 3) {
74
+ case 1:
75
+ message.key = reader.bytes();
76
+ break;
77
+ default:
78
+ reader.skipType(tag & 7);
79
+ break;
80
+ }
81
+ }
82
+ return message;
83
+ },
84
+ fromJSON(object) {
85
+ const message = Object.assign({}, basePrivKey);
86
+ message.key =
87
+ object.key !== undefined && object.key !== null
88
+ ? bytesFromBase64(object.key)
89
+ : new Uint8Array();
90
+ return message;
91
+ },
92
+ toJSON(message) {
93
+ const obj = {};
94
+ message.key !== undefined &&
95
+ (obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
96
+ return obj;
97
+ },
98
+ fromPartial(object) {
99
+ var _a;
100
+ const message = Object.assign({}, basePrivKey);
101
+ message.key = (_a = object.key) !== null && _a !== void 0 ? _a : new Uint8Array();
102
+ return message;
103
+ },
104
+ };
105
+ var globalThis = (() => {
106
+ if (typeof globalThis !== "undefined")
107
+ return globalThis;
108
+ if (typeof self !== "undefined")
109
+ return self;
110
+ if (typeof window !== "undefined")
111
+ return window;
112
+ if (typeof global !== "undefined")
113
+ return global;
114
+ throw "Unable to locate global object";
115
+ })();
116
+ const atob = globalThis.atob ||
117
+ ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary"));
118
+ function bytesFromBase64(b64) {
119
+ const bin = atob(b64);
120
+ const arr = new Uint8Array(bin.length);
121
+ for (let i = 0; i < bin.length; ++i) {
122
+ arr[i] = bin.charCodeAt(i);
123
+ }
124
+ return arr;
125
+ }
126
+ const btoa = globalThis.btoa ||
127
+ ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64"));
128
+ function base64FromBytes(arr) {
129
+ const bin = [];
130
+ for (const byte of arr) {
131
+ bin.push(String.fromCharCode(byte));
132
+ }
133
+ return btoa(bin.join(""));
134
+ }
135
+ if (minimal_1.default.util.Long !== long_1.default) {
136
+ minimal_1.default.util.Long = long_1.default;
137
+ minimal_1.default.configure();
138
+ }
@@ -0,0 +1,239 @@
1
+ import Long from "long";
2
+ import _m0 from "protobufjs/minimal";
3
+ export declare const protobufPackage = "ethermint.evm.v1";
4
+ /** Params defines the EVM module parameters */
5
+ export interface Params {
6
+ /**
7
+ * evm_denom represents the token denomination used to run the EVM state
8
+ * transitions.
9
+ */
10
+ evmDenom: string;
11
+ /** enable_create toggles state transitions that use the vm.Create function */
12
+ enableCreate: boolean;
13
+ /** enable_call toggles state transitions that use the vm.Call function */
14
+ enableCall: boolean;
15
+ /** extra_eips defines the additional EIPs for the vm.Config */
16
+ extraEips: Long[];
17
+ /** chain_config defines the EVM chain configuration parameters */
18
+ chainConfig?: ChainConfig;
19
+ /**
20
+ * allow_unprotected_txs defines if replay-protected (i.e non EIP155
21
+ * signed) transactions can be executed on the state machine.
22
+ */
23
+ allowUnprotectedTxs: boolean;
24
+ }
25
+ /**
26
+ * ChainConfig defines the Ethereum ChainConfig parameters using *sdk.Int values
27
+ * instead of *big.Int.
28
+ */
29
+ export interface ChainConfig {
30
+ /** homestead_block switch (nil no fork, 0 = already homestead) */
31
+ homesteadBlock: string;
32
+ /** dao_fork_block corresponds to TheDAO hard-fork switch block (nil no fork) */
33
+ daoForkBlock: string;
34
+ /** dao_fork_support defines whether the nodes supports or opposes the DAO hard-fork */
35
+ daoForkSupport: boolean;
36
+ /**
37
+ * eip150_block: EIP150 implements the Gas price changes
38
+ * (https://github.com/ethereum/EIPs/issues/150) EIP150 HF block (nil no fork)
39
+ */
40
+ eip150Block: string;
41
+ /** eip150_hash: EIP150 HF hash (needed for header only clients as only gas pricing changed) */
42
+ eip150Hash: string;
43
+ /** eip155_block: EIP155Block HF block */
44
+ eip155Block: string;
45
+ /** eip158_block: EIP158 HF block */
46
+ eip158Block: string;
47
+ /** byzantium_block: Byzantium switch block (nil no fork, 0 = already on byzantium) */
48
+ byzantiumBlock: string;
49
+ /** constantinople_block: Constantinople switch block (nil no fork, 0 = already activated) */
50
+ constantinopleBlock: string;
51
+ /** petersburg_block: Petersburg switch block (nil same as Constantinople) */
52
+ petersburgBlock: string;
53
+ /** istanbul_block: Istanbul switch block (nil no fork, 0 = already on istanbul) */
54
+ istanbulBlock: string;
55
+ /** muir_glacier_block: Eip-2384 (bomb delay) switch block (nil no fork, 0 = already activated) */
56
+ muirGlacierBlock: string;
57
+ /** berlin_block: Berlin switch block (nil = no fork, 0 = already on berlin) */
58
+ berlinBlock: string;
59
+ /** london_block: London switch block (nil = no fork, 0 = already on london) */
60
+ londonBlock: string;
61
+ /** arrow_glacier_block: Eip-4345 (bomb delay) switch block (nil = no fork, 0 = already activated) */
62
+ arrowGlacierBlock: string;
63
+ /** gray_glacier_block: EIP-5133 (bomb delay) switch block (nil = no fork, 0 = already activated) */
64
+ grayGlacierBlock: string;
65
+ /** merge_netsplit_block: Virtual fork after The Merge to use as a network splitter */
66
+ mergeNetsplitBlock: string;
67
+ /** shanghai_block switch block (nil = no fork, 0 = already on shanghai) */
68
+ shanghaiBlock: string;
69
+ /** cancun_block switch block (nil = no fork, 0 = already on cancun) */
70
+ cancunBlock: string;
71
+ }
72
+ /** State represents a single Storage key value pair item. */
73
+ export interface State {
74
+ /** key is the stored key */
75
+ key: string;
76
+ /** value is the stored value for the given key */
77
+ value: string;
78
+ }
79
+ /**
80
+ * TransactionLogs define the logs generated from a transaction execution
81
+ * with a given hash. It it used for import/export data as transactions are not
82
+ * persisted on blockchain state after an upgrade.
83
+ */
84
+ export interface TransactionLogs {
85
+ /** hash of the transaction */
86
+ hash: string;
87
+ /** logs is an array of Logs for the given transaction hash */
88
+ logs: Log[];
89
+ }
90
+ /**
91
+ * Log represents an protobuf compatible Ethereum Log that defines a contract
92
+ * log event. These events are generated by the LOG opcode and stored/indexed by
93
+ * the node.
94
+ *
95
+ * NOTE: address, topics and data are consensus fields. The rest of the fields
96
+ * are derived, i.e. filled in by the nodes, but not secured by consensus.
97
+ */
98
+ export interface Log {
99
+ /** address of the contract that generated the event */
100
+ address: string;
101
+ /** topics is a list of topics provided by the contract. */
102
+ topics: string[];
103
+ /** data which is supplied by the contract, usually ABI-encoded */
104
+ data: Uint8Array;
105
+ /** block_number of the block in which the transaction was included */
106
+ blockNumber: Long;
107
+ /** tx_hash is the transaction hash */
108
+ txHash: string;
109
+ /** tx_index of the transaction in the block */
110
+ txIndex: Long;
111
+ /** block_hash of the block in which the transaction was included */
112
+ blockHash: string;
113
+ /** index of the log in the block */
114
+ index: Long;
115
+ /**
116
+ * removed is true if this log was reverted due to a chain
117
+ * reorganisation. You must pay attention to this field if you receive logs
118
+ * through a filter query.
119
+ */
120
+ removed: boolean;
121
+ }
122
+ /** TxResult stores results of Tx execution. */
123
+ export interface TxResult {
124
+ /**
125
+ * contract_address contains the ethereum address of the created contract (if
126
+ * any). If the state transition is an evm.Call, the contract address will be
127
+ * empty.
128
+ */
129
+ contractAddress: string;
130
+ /** bloom represents the bloom filter bytes */
131
+ bloom: Uint8Array;
132
+ /**
133
+ * tx_logs contains the transaction hash and the proto-compatible ethereum
134
+ * logs.
135
+ */
136
+ txLogs?: TransactionLogs;
137
+ /** ret defines the bytes from the execution. */
138
+ ret: Uint8Array;
139
+ /** reverted flag is set to true when the call has been reverted */
140
+ reverted: boolean;
141
+ /** gas_used notes the amount of gas consumed while execution */
142
+ gasUsed: Long;
143
+ }
144
+ /** AccessTuple is the element type of an access list. */
145
+ export interface AccessTuple {
146
+ /** address is a hex formatted ethereum address */
147
+ address: string;
148
+ /** storage_keys are hex formatted hashes of the storage keys */
149
+ storageKeys: string[];
150
+ }
151
+ /** TraceConfig holds extra parameters to trace functions. */
152
+ export interface TraceConfig {
153
+ /** tracer is a custom javascript tracer */
154
+ tracer: string;
155
+ /**
156
+ * timeout overrides the default timeout of 5 seconds for JavaScript-based tracing
157
+ * calls
158
+ */
159
+ timeout: string;
160
+ /** reexec defines the number of blocks the tracer is willing to go back */
161
+ reexec: Long;
162
+ /** disable_stack switches stack capture */
163
+ disableStack: boolean;
164
+ /** disable_storage switches storage capture */
165
+ disableStorage: boolean;
166
+ /** debug can be used to print output during capture end */
167
+ debug: boolean;
168
+ /** limit defines the maximum length of output, but zero means unlimited */
169
+ limit: number;
170
+ /** overrides can be used to execute a trace using future fork rules */
171
+ overrides?: ChainConfig;
172
+ /** enable_memory switches memory capture */
173
+ enableMemory: boolean;
174
+ /** enable_return_data switches the capture of return data */
175
+ enableReturnData: boolean;
176
+ /** tracer_json_config configures the tracer using a JSON string */
177
+ tracerJsonConfig: string;
178
+ }
179
+ export declare const Params: {
180
+ encode(message: Params, writer?: _m0.Writer): _m0.Writer;
181
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): Params;
182
+ fromJSON(object: any): Params;
183
+ toJSON(message: Params): unknown;
184
+ fromPartial(object: DeepPartial<Params>): Params;
185
+ };
186
+ export declare const ChainConfig: {
187
+ encode(message: ChainConfig, writer?: _m0.Writer): _m0.Writer;
188
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): ChainConfig;
189
+ fromJSON(object: any): ChainConfig;
190
+ toJSON(message: ChainConfig): unknown;
191
+ fromPartial(object: DeepPartial<ChainConfig>): ChainConfig;
192
+ };
193
+ export declare const State: {
194
+ encode(message: State, writer?: _m0.Writer): _m0.Writer;
195
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): State;
196
+ fromJSON(object: any): State;
197
+ toJSON(message: State): unknown;
198
+ fromPartial(object: DeepPartial<State>): State;
199
+ };
200
+ export declare const TransactionLogs: {
201
+ encode(message: TransactionLogs, writer?: _m0.Writer): _m0.Writer;
202
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): TransactionLogs;
203
+ fromJSON(object: any): TransactionLogs;
204
+ toJSON(message: TransactionLogs): unknown;
205
+ fromPartial(object: DeepPartial<TransactionLogs>): TransactionLogs;
206
+ };
207
+ export declare const Log: {
208
+ encode(message: Log, writer?: _m0.Writer): _m0.Writer;
209
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): Log;
210
+ fromJSON(object: any): Log;
211
+ toJSON(message: Log): unknown;
212
+ fromPartial(object: DeepPartial<Log>): Log;
213
+ };
214
+ export declare const TxResult: {
215
+ encode(message: TxResult, writer?: _m0.Writer): _m0.Writer;
216
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): TxResult;
217
+ fromJSON(object: any): TxResult;
218
+ toJSON(message: TxResult): unknown;
219
+ fromPartial(object: DeepPartial<TxResult>): TxResult;
220
+ };
221
+ export declare const AccessTuple: {
222
+ encode(message: AccessTuple, writer?: _m0.Writer): _m0.Writer;
223
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): AccessTuple;
224
+ fromJSON(object: any): AccessTuple;
225
+ toJSON(message: AccessTuple): unknown;
226
+ fromPartial(object: DeepPartial<AccessTuple>): AccessTuple;
227
+ };
228
+ export declare const TraceConfig: {
229
+ encode(message: TraceConfig, writer?: _m0.Writer): _m0.Writer;
230
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): TraceConfig;
231
+ fromJSON(object: any): TraceConfig;
232
+ toJSON(message: TraceConfig): unknown;
233
+ fromPartial(object: DeepPartial<TraceConfig>): TraceConfig;
234
+ };
235
+ declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
236
+ export declare type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
237
+ [K in keyof T]?: DeepPartial<T[K]>;
238
+ } : Partial<T>;
239
+ export {};