carbon-js-sdk 0.4.21 → 0.4.22

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 (113) hide show
  1. package/lib/clients/CarbonQueryClient.js +2 -2
  2. package/lib/clients/ETHClient.js +15 -15
  3. package/lib/clients/EvmIbcClient.d.ts +86 -0
  4. package/lib/clients/EvmIbcClient.js +90 -0
  5. package/lib/clients/HydrogenClient.js +1 -1
  6. package/lib/clients/NEOClient.js +7 -7
  7. package/lib/clients/TokenClient.js +4 -4
  8. package/lib/clients/ZILClient.js +17 -17
  9. package/lib/codec/broker/incoming_pool_swap.d.ts +23 -0
  10. package/lib/codec/broker/incoming_pool_swap.js +136 -0
  11. package/lib/codec/cosmos/gov/v1/query.js +2 -2
  12. package/lib/codec/cosmos/gov/v1/tx.js +2 -2
  13. package/lib/codec/cosmos/gov/v1beta1/query.js +2 -2
  14. package/lib/codec/cosmos/gov/v1beta1/tx.js +2 -2
  15. package/lib/codec/cosmos/group/v1/events.js +2 -2
  16. package/lib/codec/cosmos/group/v1/tx.js +4 -4
  17. package/lib/codec/cosmos/tx/v1beta1/tx.js +4 -4
  18. package/lib/constant/generic.js +1 -1
  19. package/lib/modules/cdp.js +43 -43
  20. package/lib/modules/cosmwasm.js +1 -1
  21. package/lib/modules/gov.js +12 -12
  22. package/lib/modules/liquiditypool.js +1 -1
  23. package/lib/provider/account/EthLedgerAccount/EthLedgerAccount.js +1 -1
  24. package/lib/provider/account/NeoLedgerAccount/N3Ledger/ErrorCode.js +1 -1
  25. package/lib/provider/account/NeoLedgerAccount/N3Ledger/main.js +8 -8
  26. package/lib/provider/account/NeoLedgerAccount/NeoLedgerAccount.js +3 -3
  27. package/lib/provider/account/NeoLedgerAccount/NeonLedger.js +1 -1
  28. package/lib/provider/amino/types/admin.js +27 -27
  29. package/lib/provider/amino/types/bank.js +1 -1
  30. package/lib/provider/amino/types/broker.js +1 -1
  31. package/lib/provider/amino/types/cdp.js +25 -25
  32. package/lib/provider/amino/types/coin.js +4 -4
  33. package/lib/provider/amino/types/gov.js +4 -4
  34. package/lib/provider/amino/types/ibc.js +1 -1
  35. package/lib/provider/amino/types/leverage.js +1 -1
  36. package/lib/provider/amino/types/liquidityPool.js +7 -7
  37. package/lib/provider/amino/types/market.js +2 -2
  38. package/lib/provider/amino/types/oracle.js +1 -1
  39. package/lib/provider/amino/types/order.js +4 -4
  40. package/lib/provider/amino/types/position.js +1 -1
  41. package/lib/provider/amino/types/profile.js +1 -1
  42. package/lib/provider/amino/types/staking.js +4 -4
  43. package/lib/provider/amino/types/subaccount.js +3 -3
  44. package/lib/provider/amino/utils.js +11 -11
  45. package/lib/provider/ledger/ledger.js +2 -2
  46. package/lib/provider/metamask/MetaMask.js +1 -1
  47. package/lib/provider/o3/O3Wallet.js +2 -2
  48. package/lib/util/address.js +13 -13
  49. package/lib/util/api.js +4 -4
  50. package/lib/util/ethermint/evm-ibc.d.ts +97 -0
  51. package/lib/util/ethermint/evm-ibc.js +134 -0
  52. package/lib/util/ethermint/index.d.ts +3 -0
  53. package/lib/util/ethermint/index.js +12 -0
  54. package/lib/util/ethermint/keys.d.ts +39 -0
  55. package/lib/util/ethermint/keys.js +138 -0
  56. package/lib/util/ethermint/web3.d.ts +36 -0
  57. package/lib/util/ethermint/web3.js +124 -0
  58. package/lib/util/fetch.js +1 -1
  59. package/lib/util/generic.js +3 -3
  60. package/lib/util/number.js +5 -5
  61. package/lib/wallet/CarbonSigner.js +2 -2
  62. package/lib/wallet/CarbonSigningClient.js +8 -8
  63. package/lib/wallet/CarbonWallet.js +6 -6
  64. package/lib/websocket/connector.js +3 -3
  65. package/package.json +1 -1
  66. package/lib/codec/ethermint/crypto/v1/ethsecp256k1/export.d.ts +0 -1
  67. package/lib/codec/ethermint/crypto/v1/ethsecp256k1/export.js +0 -6
  68. package/lib/codec/ethermint/evm/v1/export.d.ts +0 -5
  69. package/lib/codec/ethermint/evm/v1/export.js +0 -53
  70. package/lib/codec/ethermint/feemarket/v1/export.d.ts +0 -4
  71. package/lib/codec/ethermint/feemarket/v1/export.js +0 -18
  72. package/lib/codec/ethermint/types/v1/export.d.ts +0 -4
  73. package/lib/codec/ethermint/types/v1/export.js +0 -11
  74. package/lib/codec/ethermint-models.d.ts +0 -4
  75. package/lib/codec/ethermint-models.js +0 -26
  76. package/lib/codec/market/fee.d.ts +0 -123
  77. package/lib/codec/market/fee.js +0 -334
  78. package/lib/codec/perpsliquidity/event.d.ts +0 -102
  79. package/lib/codec/perpsliquidity/event.js +0 -581
  80. package/lib/codec/perpsliquidity/genesis.d.ts +0 -35
  81. package/lib/codec/perpsliquidity/genesis.js +0 -162
  82. package/lib/codec/perpsliquidity/params.d.ts +0 -24
  83. package/lib/codec/perpsliquidity/params.js +0 -103
  84. package/lib/codec/perpsliquidity/pool.d.ts +0 -137
  85. package/lib/codec/perpsliquidity/pool.js +0 -747
  86. package/lib/codec/perpsliquidity/query.d.ts +0 -167
  87. package/lib/codec/perpsliquidity/query.js +0 -719
  88. package/lib/codec/perpsliquidity/tx.d.ts +0 -199
  89. package/lib/codec/perpsliquidity/tx.js +0 -940
  90. package/lib/constant/eip712.d.ts +0 -46
  91. package/lib/constant/eip712.js +0 -106
  92. package/lib/modules/evm.d.ts +0 -46
  93. package/lib/modules/evm.js +0 -127
  94. package/lib/modules/evmmerge.d.ts +0 -12
  95. package/lib/modules/evmmerge.js +0 -35
  96. package/lib/modules/feemarket.d.ts +0 -20
  97. package/lib/modules/feemarket.js +0 -45
  98. package/lib/modules/vault.d.ts +0 -44
  99. package/lib/modules/vault.js +0 -95
  100. package/lib/provider/amino/types/evm.d.ts +0 -4
  101. package/lib/provider/amino/types/evm.js +0 -40
  102. package/lib/provider/amino/types/evmmerge.d.ts +0 -4
  103. package/lib/provider/amino/types/evmmerge.js +0 -34
  104. package/lib/provider/amino/types/feemarket.d.ts +0 -4
  105. package/lib/provider/amino/types/feemarket.js +0 -34
  106. package/lib/provider/metamask/legacy-accounts.d.ts +0 -6
  107. package/lib/provider/metamask/legacy-accounts.js +0 -44
  108. package/lib/util/eip712.d.ts +0 -10
  109. package/lib/util/eip712.js +0 -195
  110. package/lib/util/ethermint.d.ts +0 -8
  111. package/lib/util/ethermint.js +0 -68
  112. package/lib/util/legacyEIP712.d.ts +0 -20
  113. package/lib/util/legacyEIP712.js +0 -98
@@ -87,7 +87,7 @@ class CarbonSigningClient extends stargate_1.StargateClient {
87
87
  */
88
88
  sign(signerAddress, messages, fee, memo, signerData) {
89
89
  return __awaiter(this, void 0, void 0, function* () {
90
- return proto_signing_1.isOfflineDirectSigner(this.signer)
90
+ return (0, proto_signing_1.isOfflineDirectSigner)(this.signer)
91
91
  ? this.signDirect(signerAddress, messages, fee, memo, signerData)
92
92
  : this.signAmino(signerAddress, messages, fee, memo, signerData);
93
93
  });
@@ -99,7 +99,7 @@ class CarbonSigningClient extends stargate_1.StargateClient {
99
99
  if (!accountFromSigner) {
100
100
  throw new Error("Failed to retrieve account from signer");
101
101
  }
102
- const pubkey = proto_signing_1.encodePubkey(amino_1.encodeSecp256k1Pubkey(accountFromSigner.pubkey));
102
+ const pubkey = (0, proto_signing_1.encodePubkey)((0, amino_1.encodeSecp256k1Pubkey)(accountFromSigner.pubkey));
103
103
  const txBodyEncodeObject = {
104
104
  typeUrl: "/cosmos.tx.v1beta1.TxBody",
105
105
  value: Object.assign({ messages: messages, memo: memo }, (timeoutHeight && {
@@ -108,13 +108,13 @@ class CarbonSigningClient extends stargate_1.StargateClient {
108
108
  };
109
109
  const txBodyBytes = this.registry.encode(txBodyEncodeObject);
110
110
  const gasLimit = math_1.Int53.fromString(fee.gas).toNumber();
111
- const authInfoBytes = proto_signing_1.makeAuthInfoBytes([{ pubkey, sequence }], fee.amount, gasLimit);
112
- const signDoc = proto_signing_1.makeSignDoc(txBodyBytes, authInfoBytes, chainId, accountNumber);
111
+ const authInfoBytes = (0, proto_signing_1.makeAuthInfoBytes)([{ pubkey, sequence }], fee.amount, gasLimit);
112
+ const signDoc = (0, proto_signing_1.makeSignDoc)(txBodyBytes, authInfoBytes, chainId, accountNumber);
113
113
  const { signature, signed } = yield signer.signDirect(signerAddress, signDoc);
114
114
  return tx_1.TxRaw.fromPartial({
115
115
  bodyBytes: signed.bodyBytes,
116
116
  authInfoBytes: signed.authInfoBytes,
117
- signatures: [encoding_1.fromBase64(signature.signature)],
117
+ signatures: [(0, encoding_1.fromBase64)(signature.signature)],
118
118
  });
119
119
  });
120
120
  }
@@ -125,7 +125,7 @@ class CarbonSigningClient extends stargate_1.StargateClient {
125
125
  if (!accountFromSigner) {
126
126
  throw new Error("Failed to retrieve account from signer");
127
127
  }
128
- const pubkey = proto_signing_1.encodePubkey(amino_1.encodeSecp256k1Pubkey(accountFromSigner.pubkey));
128
+ const pubkey = (0, proto_signing_1.encodePubkey)((0, amino_1.encodeSecp256k1Pubkey)(accountFromSigner.pubkey));
129
129
  const signMode = SignMode.SIGN_MODE_LEGACY_AMINO_JSON;
130
130
  const msgs = messages.map((msg) => this.aminoTypes.toAmino(msg));
131
131
  const signDoc = makeSignDocAmino(msgs, fee, chainId, memo, accountNumber, sequence, timeoutHeight !== null && timeoutHeight !== void 0 ? timeoutHeight : 0);
@@ -140,11 +140,11 @@ class CarbonSigningClient extends stargate_1.StargateClient {
140
140
  const signedTxBodyBytes = this.registry.encode(signedTxBodyEncodeObject);
141
141
  const signedGasLimit = math_1.Int53.fromString(signed.fee.gas).toNumber();
142
142
  const signedSequence = math_1.Int53.fromString(signed.sequence).toNumber();
143
- const signedAuthInfoBytes = proto_signing_1.makeAuthInfoBytes([{ pubkey, sequence: signedSequence }], signed.fee.amount, signedGasLimit, signMode);
143
+ const signedAuthInfoBytes = (0, proto_signing_1.makeAuthInfoBytes)([{ pubkey, sequence: signedSequence }], signed.fee.amount, signedGasLimit, signMode);
144
144
  return tx_1.TxRaw.fromPartial({
145
145
  bodyBytes: signedTxBodyBytes,
146
146
  authInfoBytes: signedAuthInfoBytes,
147
- signatures: [encoding_1.fromBase64(signature.signature)],
147
+ signatures: [(0, encoding_1.fromBase64)(signature.signature)],
148
148
  });
149
149
  });
150
150
  }
@@ -150,7 +150,7 @@ class CarbonWallet {
150
150
  const signerData = Object.assign({ accountNumber: this.accountInfo.accountNumber, chainId: this.getChainId(), sequence }, explicitSignerData);
151
151
  const fee = (_a = opts === null || opts === void 0 ? void 0 : opts.fee) !== null && _a !== void 0 ? _a : this.estimateTxFee(messages, feeDenom);
152
152
  const txRaw = yield signingClient.sign(signerAddress, messages, fee, memo, signerData);
153
- signature = amino_1.encodeSecp256k1Signature(account.pubkey, txRaw.signatures[0]);
153
+ signature = (0, amino_1.encodeSecp256k1Signature)(account.pubkey, txRaw.signatures[0]);
154
154
  return txRaw;
155
155
  }
156
156
  finally {
@@ -168,7 +168,7 @@ class CarbonWallet {
168
168
  const tx = CarbonWallet.TxRaw.encode(txRaw).finish();
169
169
  const carbonClient = this.getSigningClient();
170
170
  const response = yield carbonClient.broadcastTx(tx, timeoutMs, pollIntervalMs);
171
- if (stargate_1.isDeliverTxFailure(response)) {
171
+ if ((0, stargate_1.isDeliverTxFailure)(response)) {
172
172
  // tx failed
173
173
  throw new tx_1.CarbonTxError(`[${response.code}] ${response.rawLog}`, response);
174
174
  }
@@ -207,9 +207,9 @@ class CarbonWallet {
207
207
  try {
208
208
  if (!this.accountInfo || this.sequenceInvalidated)
209
209
  yield this.reloadAccountSequence();
210
- const heightResponse = yield fetch_1.fetch(`${this.networkConfig.tmRpcUrl}/blockchain?cache=${new Date().getTime()}`);
210
+ const heightResponse = yield (0, fetch_1.fetch)(`${this.networkConfig.tmRpcUrl}/blockchain?cache=${new Date().getTime()}`);
211
211
  const heightRes = yield heightResponse.json();
212
- const height = number_1.bnOrZero((_a = heightRes.result) === null || _a === void 0 ? void 0 : _a.last_height);
212
+ const height = (0, number_1.bnOrZero)((_a = heightRes.result) === null || _a === void 0 ? void 0 : _a.last_height);
213
213
  const timeoutHeight = height.isZero() ? undefined : height.toNumber() + this.defaultTimeoutBlocks;
214
214
  const sequence = this.accountInfo.sequence;
215
215
  this.accountInfo = Object.assign(Object.assign({}, this.accountInfo), { sequence: sequence + 1 });
@@ -343,12 +343,12 @@ class CarbonWallet {
343
343
  const queryClient = this.getQueryClient();
344
344
  const { msgGasCosts } = yield queryClient.fee.MsgGasCostAll({});
345
345
  this.txGasCosts = msgGasCosts.reduce((result, item) => {
346
- result[item.msgType] = number_1.bnOrZero(item.gasCost);
346
+ result[item.msgType] = (0, number_1.bnOrZero)(item.gasCost);
347
347
  return result;
348
348
  }, {});
349
349
  const { minGasPrices } = yield queryClient.fee.MinGasPriceAll({});
350
350
  this.txGasPrices = minGasPrices.reduce((result, item) => {
351
- result[item.denom] = number_1.bnOrZero(item.gasPrice).shiftedBy(-18); // sdk.Dec shifting
351
+ result[item.denom] = (0, number_1.bnOrZero)(item.gasPrice).shiftedBy(-18); // sdk.Dec shifting
352
352
  return result;
353
353
  }, {});
354
354
  if (!this.txGasPrices[this.defaultFeeDenom]) {
@@ -171,7 +171,7 @@ class WSConnector {
171
171
  params = [params]; // eslint-disable-line no-param-reassign
172
172
  }
173
173
  for (const param of params) {
174
- const channelId = channel_1.generateChannelId(param);
174
+ const channelId = (0, channel_1.generateChannelId)(param);
175
175
  const shouldSubscribe = this.channelHandlers[channelId] === undefined;
176
176
  this.channelHandlers[channelId] = handler;
177
177
  if (shouldSubscribe) {
@@ -193,7 +193,7 @@ class WSConnector {
193
193
  }
194
194
  const channelIds = [];
195
195
  for (const param of params) {
196
- const channelId = channel_1.generateChannelId(param);
196
+ const channelId = (0, channel_1.generateChannelId)(param);
197
197
  const shouldUnsubscribe = this.channelHandlers[channelId] !== undefined;
198
198
  delete this.channelHandlers[channelId];
199
199
  if (shouldUnsubscribe) {
@@ -281,7 +281,7 @@ class WSConnector {
281
281
  if (!channelHandler) {
282
282
  this.debugLog(`handler not found for channel: ${message.channel}`);
283
283
  try {
284
- const params = channel_1.parseChannelId(message.channel);
284
+ const params = (0, channel_1.parseChannelId)(message.channel);
285
285
  this.unsubscribe({ channel: params.channel });
286
286
  }
287
287
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-js-sdk",
3
- "version": "0.4.21",
3
+ "version": "0.4.22",
4
4
  "description": "TypeScript SDK for Carbon blockchain",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -1 +0,0 @@
1
- export { PubKey, PrivKey } from "./keys";
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PrivKey = exports.PubKey = void 0;
4
- var keys_1 = require("./keys");
5
- Object.defineProperty(exports, "PubKey", { enumerable: true, get: function () { return keys_1.PubKey; } });
6
- Object.defineProperty(exports, "PrivKey", { enumerable: true, get: function () { return keys_1.PrivKey; } });
@@ -1,5 +0,0 @@
1
- export { EventEthereumTx, EventTxLog, EventMessage, EventBlockBloom } from "./events";
2
- export { Params, ChainConfig, State, TransactionLogs, Log, TxResult, AccessTuple, TraceConfig } from "./evm";
3
- export { GenesisAccount } from "./genesis";
4
- export { QueryAccountRequest, QueryAccountResponse, QueryCosmosAccountRequest, QueryCosmosAccountResponse, QueryValidatorAccountRequest, QueryValidatorAccountResponse, QueryBalanceRequest, QueryBalanceResponse, QueryStorageRequest, QueryStorageResponse, QueryCodeRequest, QueryCodeResponse, QueryTxLogsRequest, QueryTxLogsResponse, QueryParamsRequest, QueryParamsResponse, EthCallRequest, EstimateGasResponse, QueryTraceTxRequest, QueryTraceTxResponse, QueryTraceBlockRequest, QueryTraceBlockResponse, QueryBaseFeeRequest, QueryBaseFeeResponse } from "./query";
5
- export { MsgEthereumTx, LegacyTx, AccessListTx, DynamicFeeTx, ExtensionOptionsEthereumTx, MsgEthereumTxResponse, MsgUpdateParams, MsgUpdateParamsResponse } from "./tx";
@@ -1,53 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MsgUpdateParamsResponse = exports.MsgUpdateParams = exports.MsgEthereumTxResponse = exports.ExtensionOptionsEthereumTx = exports.DynamicFeeTx = exports.AccessListTx = exports.LegacyTx = exports.MsgEthereumTx = exports.QueryBaseFeeResponse = exports.QueryBaseFeeRequest = exports.QueryTraceBlockResponse = exports.QueryTraceBlockRequest = exports.QueryTraceTxResponse = exports.QueryTraceTxRequest = exports.EstimateGasResponse = exports.EthCallRequest = exports.QueryParamsResponse = exports.QueryParamsRequest = exports.QueryTxLogsResponse = exports.QueryTxLogsRequest = exports.QueryCodeResponse = exports.QueryCodeRequest = exports.QueryStorageResponse = exports.QueryStorageRequest = exports.QueryBalanceResponse = exports.QueryBalanceRequest = exports.QueryValidatorAccountResponse = exports.QueryValidatorAccountRequest = exports.QueryCosmosAccountResponse = exports.QueryCosmosAccountRequest = exports.QueryAccountResponse = exports.QueryAccountRequest = exports.GenesisAccount = exports.TraceConfig = exports.AccessTuple = exports.TxResult = exports.Log = exports.TransactionLogs = exports.State = exports.ChainConfig = exports.Params = exports.EventBlockBloom = exports.EventMessage = exports.EventTxLog = exports.EventEthereumTx = void 0;
4
- var events_1 = require("./events");
5
- Object.defineProperty(exports, "EventEthereumTx", { enumerable: true, get: function () { return events_1.EventEthereumTx; } });
6
- Object.defineProperty(exports, "EventTxLog", { enumerable: true, get: function () { return events_1.EventTxLog; } });
7
- Object.defineProperty(exports, "EventMessage", { enumerable: true, get: function () { return events_1.EventMessage; } });
8
- Object.defineProperty(exports, "EventBlockBloom", { enumerable: true, get: function () { return events_1.EventBlockBloom; } });
9
- var evm_1 = require("./evm");
10
- Object.defineProperty(exports, "Params", { enumerable: true, get: function () { return evm_1.Params; } });
11
- Object.defineProperty(exports, "ChainConfig", { enumerable: true, get: function () { return evm_1.ChainConfig; } });
12
- Object.defineProperty(exports, "State", { enumerable: true, get: function () { return evm_1.State; } });
13
- Object.defineProperty(exports, "TransactionLogs", { enumerable: true, get: function () { return evm_1.TransactionLogs; } });
14
- Object.defineProperty(exports, "Log", { enumerable: true, get: function () { return evm_1.Log; } });
15
- Object.defineProperty(exports, "TxResult", { enumerable: true, get: function () { return evm_1.TxResult; } });
16
- Object.defineProperty(exports, "AccessTuple", { enumerable: true, get: function () { return evm_1.AccessTuple; } });
17
- Object.defineProperty(exports, "TraceConfig", { enumerable: true, get: function () { return evm_1.TraceConfig; } });
18
- var genesis_1 = require("./genesis");
19
- Object.defineProperty(exports, "GenesisAccount", { enumerable: true, get: function () { return genesis_1.GenesisAccount; } });
20
- var query_1 = require("./query");
21
- Object.defineProperty(exports, "QueryAccountRequest", { enumerable: true, get: function () { return query_1.QueryAccountRequest; } });
22
- Object.defineProperty(exports, "QueryAccountResponse", { enumerable: true, get: function () { return query_1.QueryAccountResponse; } });
23
- Object.defineProperty(exports, "QueryCosmosAccountRequest", { enumerable: true, get: function () { return query_1.QueryCosmosAccountRequest; } });
24
- Object.defineProperty(exports, "QueryCosmosAccountResponse", { enumerable: true, get: function () { return query_1.QueryCosmosAccountResponse; } });
25
- Object.defineProperty(exports, "QueryValidatorAccountRequest", { enumerable: true, get: function () { return query_1.QueryValidatorAccountRequest; } });
26
- Object.defineProperty(exports, "QueryValidatorAccountResponse", { enumerable: true, get: function () { return query_1.QueryValidatorAccountResponse; } });
27
- Object.defineProperty(exports, "QueryBalanceRequest", { enumerable: true, get: function () { return query_1.QueryBalanceRequest; } });
28
- Object.defineProperty(exports, "QueryBalanceResponse", { enumerable: true, get: function () { return query_1.QueryBalanceResponse; } });
29
- Object.defineProperty(exports, "QueryStorageRequest", { enumerable: true, get: function () { return query_1.QueryStorageRequest; } });
30
- Object.defineProperty(exports, "QueryStorageResponse", { enumerable: true, get: function () { return query_1.QueryStorageResponse; } });
31
- Object.defineProperty(exports, "QueryCodeRequest", { enumerable: true, get: function () { return query_1.QueryCodeRequest; } });
32
- Object.defineProperty(exports, "QueryCodeResponse", { enumerable: true, get: function () { return query_1.QueryCodeResponse; } });
33
- Object.defineProperty(exports, "QueryTxLogsRequest", { enumerable: true, get: function () { return query_1.QueryTxLogsRequest; } });
34
- Object.defineProperty(exports, "QueryTxLogsResponse", { enumerable: true, get: function () { return query_1.QueryTxLogsResponse; } });
35
- Object.defineProperty(exports, "QueryParamsRequest", { enumerable: true, get: function () { return query_1.QueryParamsRequest; } });
36
- Object.defineProperty(exports, "QueryParamsResponse", { enumerable: true, get: function () { return query_1.QueryParamsResponse; } });
37
- Object.defineProperty(exports, "EthCallRequest", { enumerable: true, get: function () { return query_1.EthCallRequest; } });
38
- Object.defineProperty(exports, "EstimateGasResponse", { enumerable: true, get: function () { return query_1.EstimateGasResponse; } });
39
- Object.defineProperty(exports, "QueryTraceTxRequest", { enumerable: true, get: function () { return query_1.QueryTraceTxRequest; } });
40
- Object.defineProperty(exports, "QueryTraceTxResponse", { enumerable: true, get: function () { return query_1.QueryTraceTxResponse; } });
41
- Object.defineProperty(exports, "QueryTraceBlockRequest", { enumerable: true, get: function () { return query_1.QueryTraceBlockRequest; } });
42
- Object.defineProperty(exports, "QueryTraceBlockResponse", { enumerable: true, get: function () { return query_1.QueryTraceBlockResponse; } });
43
- Object.defineProperty(exports, "QueryBaseFeeRequest", { enumerable: true, get: function () { return query_1.QueryBaseFeeRequest; } });
44
- Object.defineProperty(exports, "QueryBaseFeeResponse", { enumerable: true, get: function () { return query_1.QueryBaseFeeResponse; } });
45
- var tx_1 = require("./tx");
46
- Object.defineProperty(exports, "MsgEthereumTx", { enumerable: true, get: function () { return tx_1.MsgEthereumTx; } });
47
- Object.defineProperty(exports, "LegacyTx", { enumerable: true, get: function () { return tx_1.LegacyTx; } });
48
- Object.defineProperty(exports, "AccessListTx", { enumerable: true, get: function () { return tx_1.AccessListTx; } });
49
- Object.defineProperty(exports, "DynamicFeeTx", { enumerable: true, get: function () { return tx_1.DynamicFeeTx; } });
50
- Object.defineProperty(exports, "ExtensionOptionsEthereumTx", { enumerable: true, get: function () { return tx_1.ExtensionOptionsEthereumTx; } });
51
- Object.defineProperty(exports, "MsgEthereumTxResponse", { enumerable: true, get: function () { return tx_1.MsgEthereumTxResponse; } });
52
- Object.defineProperty(exports, "MsgUpdateParams", { enumerable: true, get: function () { return tx_1.MsgUpdateParams; } });
53
- Object.defineProperty(exports, "MsgUpdateParamsResponse", { enumerable: true, get: function () { return tx_1.MsgUpdateParamsResponse; } });
@@ -1,4 +0,0 @@
1
- export { EventFeeMarket, EventBlockGas } from "./events";
2
- export { Params } from "./feemarket";
3
- export { QueryParamsRequest, QueryParamsResponse, QueryBaseFeeRequest, QueryBaseFeeResponse, QueryBlockGasRequest, QueryBlockGasResponse } from "./query";
4
- export { MsgUpdateParams, MsgUpdateParamsResponse } from "./tx";
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MsgUpdateParamsResponse = exports.MsgUpdateParams = exports.QueryBlockGasResponse = exports.QueryBlockGasRequest = exports.QueryBaseFeeResponse = exports.QueryBaseFeeRequest = exports.QueryParamsResponse = exports.QueryParamsRequest = exports.Params = exports.EventBlockGas = exports.EventFeeMarket = void 0;
4
- var events_1 = require("./events");
5
- Object.defineProperty(exports, "EventFeeMarket", { enumerable: true, get: function () { return events_1.EventFeeMarket; } });
6
- Object.defineProperty(exports, "EventBlockGas", { enumerable: true, get: function () { return events_1.EventBlockGas; } });
7
- var feemarket_1 = require("./feemarket");
8
- Object.defineProperty(exports, "Params", { enumerable: true, get: function () { return feemarket_1.Params; } });
9
- var query_1 = require("./query");
10
- Object.defineProperty(exports, "QueryParamsRequest", { enumerable: true, get: function () { return query_1.QueryParamsRequest; } });
11
- Object.defineProperty(exports, "QueryParamsResponse", { enumerable: true, get: function () { return query_1.QueryParamsResponse; } });
12
- Object.defineProperty(exports, "QueryBaseFeeRequest", { enumerable: true, get: function () { return query_1.QueryBaseFeeRequest; } });
13
- Object.defineProperty(exports, "QueryBaseFeeResponse", { enumerable: true, get: function () { return query_1.QueryBaseFeeResponse; } });
14
- Object.defineProperty(exports, "QueryBlockGasRequest", { enumerable: true, get: function () { return query_1.QueryBlockGasRequest; } });
15
- Object.defineProperty(exports, "QueryBlockGasResponse", { enumerable: true, get: function () { return query_1.QueryBlockGasResponse; } });
16
- var tx_1 = require("./tx");
17
- Object.defineProperty(exports, "MsgUpdateParams", { enumerable: true, get: function () { return tx_1.MsgUpdateParams; } });
18
- Object.defineProperty(exports, "MsgUpdateParamsResponse", { enumerable: true, get: function () { return tx_1.MsgUpdateParamsResponse; } });
@@ -1,4 +0,0 @@
1
- export { EthAccount } from "./account";
2
- export { ExtensionOptionDynamicFeeTx } from "./dynamic_fee";
3
- export { TxResult } from "./indexer";
4
- export { ExtensionOptionsWeb3Tx } from "./web3";
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ExtensionOptionsWeb3Tx = exports.TxResult = exports.ExtensionOptionDynamicFeeTx = exports.EthAccount = void 0;
4
- var account_1 = require("./account");
5
- Object.defineProperty(exports, "EthAccount", { enumerable: true, get: function () { return account_1.EthAccount; } });
6
- var dynamic_fee_1 = require("./dynamic_fee");
7
- Object.defineProperty(exports, "ExtensionOptionDynamicFeeTx", { enumerable: true, get: function () { return dynamic_fee_1.ExtensionOptionDynamicFeeTx; } });
8
- var indexer_1 = require("./indexer");
9
- Object.defineProperty(exports, "TxResult", { enumerable: true, get: function () { return indexer_1.TxResult; } });
10
- var web3_1 = require("./web3");
11
- Object.defineProperty(exports, "ExtensionOptionsWeb3Tx", { enumerable: true, get: function () { return web3_1.ExtensionOptionsWeb3Tx; } });
@@ -1,4 +0,0 @@
1
- export * as Crypto from "./ethermint/crypto/v1/ethsecp256k1/export";
2
- export * as Evm from "./ethermint/evm/v1/export";
3
- export * as Feemarket from "./ethermint/feemarket/v1/export";
4
- export * as Types from "./ethermint/types/v1/export";
@@ -1,26 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
- Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.Types = exports.Feemarket = exports.Evm = exports.Crypto = void 0;
23
- exports.Crypto = __importStar(require("./ethermint/crypto/v1/ethsecp256k1/export"));
24
- exports.Evm = __importStar(require("./ethermint/evm/v1/export"));
25
- exports.Feemarket = __importStar(require("./ethermint/feemarket/v1/export"));
26
- exports.Types = __importStar(require("./ethermint/types/v1/export"));
@@ -1,123 +0,0 @@
1
- import Long from "long";
2
- import _m0 from "protobufjs/minimal";
3
- export declare const protobufPackage = "Switcheo.carbon.market";
4
- /**
5
- * A fee structure has multiple fee tiers are sorted by `required_stake`
6
- * and a single fee category. When a trade is executed, the fee tier with
7
- * the greatest required stake which is fulfilled by the user is used.
8
- *
9
- * There must always be at least one fee tier for the `spot` and `futures`
10
- * `market_type` fee category that has 0 `required_stake` and no `whitelisted_address` so
11
- * that it can act as the base fee for that market type.
12
- */
13
- export interface FeeStructure {
14
- feeCategory?: FeeCategory;
15
- feeTiers: FeeTier[];
16
- }
17
- /**
18
- * The category for a given fee tier, identified by the
19
- * market being traded via `market_type` or `market_id`, and
20
- * optionally a `whitelisted_address`.
21
- */
22
- export interface FeeCategory {
23
- /**
24
- * Either `spot` or `futures` or nil. If nil, then
25
- * a market_id must be provided.
26
- */
27
- marketType: string;
28
- /**
29
- * Can be used to override the `market_type` based fee to give
30
- * specific markets a certain fee discount.
31
- * Note that if there is already a fee tier for the user's stake that
32
- * results in a lower fee for a given trade, that fee structure will be used instead.
33
- */
34
- marketId: string;
35
- /**
36
- * Optional parameter that can be used to give certain addresses
37
- * additional fee tier(s) for the given `market_type` or `market_id`.
38
- * Can only be used to reduce fees, not increase them. Can be used with module accounts.
39
- */
40
- whitelistedAddress: string;
41
- }
42
- /** A fee tier represents the trading fee for a user that meets the required stake. */
43
- export interface FeeTier {
44
- /** The required stake for a user for the fee tier to apply. */
45
- requiredStake: string;
46
- /** The taker and maker fee that applies when a trade is executed. */
47
- tradingFees?: TradingFees;
48
- }
49
- /**
50
- * The fees applied for each trade.
51
- *
52
- * Note that for greater `required_stake`, either the `taker_fee`
53
- * or `maker_fee` must be reduced.
54
- * Neither `taker_fee` nor `maker_fee` can be greater for
55
- * a greater `required_stake`.
56
- */
57
- export interface TradingFees {
58
- /**
59
- * The fee applied when the order is executed in the smame
60
- * block greater as when it is triggered.
61
- * Cannot be negative.
62
- */
63
- takerFee: string;
64
- /**
65
- * The fee or rebate (when negative) applied when the order is executed
66
- * in a block greater than when it is triggered.
67
- */
68
- makerFee: string;
69
- }
70
- /**
71
- * Allows non stake coins to count as part of the
72
- * `required_stake` in a fee tier.
73
- *
74
- * For each stake equivalance, the amount of coins for
75
- * the specificed denom in the user's available balance
76
- * at the time of the trade will be divided by the `ratio`
77
- * and added to his actual stake amount when checking
78
- * for fee tier feecategories.
79
- */
80
- export interface StakeEquivalence {
81
- denom: string;
82
- ratio: string;
83
- }
84
- export declare const FeeStructure: {
85
- encode(message: FeeStructure, writer?: _m0.Writer): _m0.Writer;
86
- decode(input: _m0.Reader | Uint8Array, length?: number | undefined): FeeStructure;
87
- fromJSON(object: any): FeeStructure;
88
- toJSON(message: FeeStructure): unknown;
89
- fromPartial(object: DeepPartial<FeeStructure>): FeeStructure;
90
- };
91
- export declare const FeeCategory: {
92
- encode(message: FeeCategory, writer?: _m0.Writer): _m0.Writer;
93
- decode(input: _m0.Reader | Uint8Array, length?: number | undefined): FeeCategory;
94
- fromJSON(object: any): FeeCategory;
95
- toJSON(message: FeeCategory): unknown;
96
- fromPartial(object: DeepPartial<FeeCategory>): FeeCategory;
97
- };
98
- export declare const FeeTier: {
99
- encode(message: FeeTier, writer?: _m0.Writer): _m0.Writer;
100
- decode(input: _m0.Reader | Uint8Array, length?: number | undefined): FeeTier;
101
- fromJSON(object: any): FeeTier;
102
- toJSON(message: FeeTier): unknown;
103
- fromPartial(object: DeepPartial<FeeTier>): FeeTier;
104
- };
105
- export declare const TradingFees: {
106
- encode(message: TradingFees, writer?: _m0.Writer): _m0.Writer;
107
- decode(input: _m0.Reader | Uint8Array, length?: number | undefined): TradingFees;
108
- fromJSON(object: any): TradingFees;
109
- toJSON(message: TradingFees): unknown;
110
- fromPartial(object: DeepPartial<TradingFees>): TradingFees;
111
- };
112
- export declare const StakeEquivalence: {
113
- encode(message: StakeEquivalence, writer?: _m0.Writer): _m0.Writer;
114
- decode(input: _m0.Reader | Uint8Array, length?: number | undefined): StakeEquivalence;
115
- fromJSON(object: any): StakeEquivalence;
116
- toJSON(message: StakeEquivalence): unknown;
117
- fromPartial(object: DeepPartial<StakeEquivalence>): StakeEquivalence;
118
- };
119
- declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
120
- 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 {} ? {
121
- [K in keyof T]?: DeepPartial<T[K]>;
122
- } : Partial<T>;
123
- export {};