@sentio/sdk-bundle 3.0.2-rc.1 → 3.1.0-rc.1

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 (61) hide show
  1. package/lib/aptos/builtin/0x1.js +3 -3
  2. package/lib/aptos/builtin/0x3.js +4 -4
  3. package/lib/aptos/builtin/0x4.js +4 -4
  4. package/lib/aptos/builtin/index.js +5 -5
  5. package/lib/aptos/ext/index.js +3 -3
  6. package/lib/aptos/index.js +3 -3
  7. package/lib/{chunk-BDG3W2CO.js → chunk-2AUGKQV3.js} +5 -5
  8. package/lib/{chunk-NUA6DILU.js → chunk-3KVZZTCO.js} +3 -3
  9. package/lib/{chunk-SLVFW23T.js → chunk-3NZVJHKD.js} +4 -4
  10. package/lib/{chunk-BMGEJSNV.js → chunk-4ZDQTABD.js} +3 -3
  11. package/lib/{chunk-ETBCTN57.js → chunk-CHXSRL4K.js} +4 -4
  12. package/lib/{chunk-LHS6OVBA.js → chunk-GQMSTSID.js} +3 -3
  13. package/lib/{chunk-EZKN3N7Z.js → chunk-JZEYT3F2.js} +2 -2
  14. package/lib/{chunk-3PQ6VBGA.js → chunk-K5D4DEBD.js} +3 -3
  15. package/lib/{chunk-BXNIQCM2.js → chunk-LJ5TVBZM.js} +2 -2
  16. package/lib/{chunk-Y57JXJR7.js → chunk-LK5MZSEL.js} +2 -2
  17. package/lib/{chunk-AI5Z7I25.js → chunk-MCIQWRW6.js} +2 -2
  18. package/lib/{chunk-MM5WZX35.js → chunk-S6KKBMOL.js} +3 -3
  19. package/lib/{chunk-DXFRU5MW.js → chunk-SNJRCV7C.js} +2 -2
  20. package/lib/{chunk-ZDTKIAUT.js → chunk-VMGCYU46.js} +5 -5
  21. package/lib/{chunk-KPLDSVW7.js → chunk-Y2FX22WS.js} +136 -65
  22. package/lib/{chunk-KPLDSVW7.js.map → chunk-Y2FX22WS.js.map} +1 -1
  23. package/lib/{chunk-Y5YULLBA.js → chunk-ZY5R3PQ7.js} +2 -2
  24. package/lib/eth/abi-decoder/decode-worker.js +1 -1
  25. package/lib/eth/builtin/eacaggregatorproxy.js +2 -2
  26. package/lib/eth/builtin/erc1155.js +3 -3
  27. package/lib/eth/builtin/erc20.js +2 -2
  28. package/lib/eth/builtin/erc721.js +2 -2
  29. package/lib/eth/builtin/index.js +4 -4
  30. package/lib/eth/builtin/weth9.js +3 -3
  31. package/lib/eth/index.js +4 -2
  32. package/lib/iota/builtin/0x1.js +6 -6
  33. package/lib/iota/builtin/0x2.js +7 -7
  34. package/lib/iota/builtin/0x3.js +8 -8
  35. package/lib/iota/builtin/index.js +8 -8
  36. package/lib/iota/ext/index.js +3 -3
  37. package/lib/iota/index.js +5 -5
  38. package/lib/sui/builtin/0x1.js +6 -6
  39. package/lib/sui/builtin/0x2.js +7 -7
  40. package/lib/sui/builtin/0x3.js +8 -8
  41. package/lib/sui/builtin/index.js +8 -8
  42. package/lib/sui/ext/index.js +3 -3
  43. package/lib/sui/index.js +5 -5
  44. package/lib/testing/index.js +6 -6
  45. package/lib/utils/index.js +2 -2
  46. package/package.json +2 -2
  47. /package/lib/{chunk-BDG3W2CO.js.map → chunk-2AUGKQV3.js.map} +0 -0
  48. /package/lib/{chunk-NUA6DILU.js.map → chunk-3KVZZTCO.js.map} +0 -0
  49. /package/lib/{chunk-SLVFW23T.js.map → chunk-3NZVJHKD.js.map} +0 -0
  50. /package/lib/{chunk-BMGEJSNV.js.map → chunk-4ZDQTABD.js.map} +0 -0
  51. /package/lib/{chunk-ETBCTN57.js.map → chunk-CHXSRL4K.js.map} +0 -0
  52. /package/lib/{chunk-LHS6OVBA.js.map → chunk-GQMSTSID.js.map} +0 -0
  53. /package/lib/{chunk-EZKN3N7Z.js.map → chunk-JZEYT3F2.js.map} +0 -0
  54. /package/lib/{chunk-3PQ6VBGA.js.map → chunk-K5D4DEBD.js.map} +0 -0
  55. /package/lib/{chunk-BXNIQCM2.js.map → chunk-LJ5TVBZM.js.map} +0 -0
  56. /package/lib/{chunk-Y57JXJR7.js.map → chunk-LK5MZSEL.js.map} +0 -0
  57. /package/lib/{chunk-AI5Z7I25.js.map → chunk-MCIQWRW6.js.map} +0 -0
  58. /package/lib/{chunk-MM5WZX35.js.map → chunk-S6KKBMOL.js.map} +0 -0
  59. /package/lib/{chunk-DXFRU5MW.js.map → chunk-SNJRCV7C.js.map} +0 -0
  60. /package/lib/{chunk-ZDTKIAUT.js.map → chunk-VMGCYU46.js.map} +0 -0
  61. /package/lib/{chunk-Y5YULLBA.js.map → chunk-ZY5R3PQ7.js.map} +0 -0
@@ -7921,39 +7921,27 @@ function fixEmptyKey(result) {
7921
7921
  }
7922
7922
  __name(fixEmptyKey, "fixEmptyKey");
7923
7923
  function formatTransactionReceipt(value) {
7924
- return new TransactionReceipt2(value);
7924
+ return new FormattedTransactionReceipt(value);
7925
7925
  }
7926
7926
  __name(formatTransactionReceipt, "formatTransactionReceipt");
7927
- var TransactionReceipt2 = class {
7927
+ var FormattedTransactionReceipt = class {
7928
7928
  constructor(data) {
7929
7929
  this.data = data;
7930
7930
  }
7931
7931
  static {
7932
- __name(this, "TransactionReceipt");
7933
- }
7934
- toChecksumAddress(originData, converted) {
7935
- if (converted) {
7936
- return converted;
7937
- }
7938
- if (originData === null) {
7939
- return null;
7940
- }
7941
- return getAddress(originData);
7932
+ __name(this, "FormattedTransactionReceipt");
7942
7933
  }
7943
7934
  _to;
7944
7935
  get to() {
7945
- this._to = this.toChecksumAddress(this.data.to, this._to);
7946
- return this._to;
7936
+ return this._to !== void 0 ? this._to : this._to = allowNull(getAddress)(this._to);
7947
7937
  }
7948
7938
  _from;
7949
7939
  get from() {
7950
- this._from = this.toChecksumAddress(this.data.from, this._from);
7951
- return this._from;
7940
+ return this._from ?? (this._from = getAddress(this.data.from));
7952
7941
  }
7953
7942
  _contractAddress;
7954
7943
  get contractAddress() {
7955
- this._contractAddress = this.toChecksumAddress(this.data.contractAddress, this._contractAddress);
7956
- return this._contractAddress;
7944
+ return this._contractAddress !== void 0 ? this._contractAddress : this._contractAddress = allowNull(getAddress)(this.data.contractAddress);
7957
7945
  }
7958
7946
  get hash() {
7959
7947
  return this.data.transactionHash;
@@ -7972,67 +7960,35 @@ var TransactionReceipt2 = class {
7972
7960
  }
7973
7961
  _logs;
7974
7962
  get logs() {
7975
- if (this._logs) {
7976
- return this._logs;
7977
- }
7978
- this._logs = arrayOf(formatLog)(this.data.logs);
7979
- return this._logs;
7963
+ return this._logs ?? (this._logs = arrayOf(formatLog)(this.data.logs));
7980
7964
  }
7981
7965
  _gasUsed;
7982
7966
  get gasUsed() {
7983
- if (this._gasUsed != null) {
7984
- return this._gasUsed;
7985
- }
7986
- this._gasUsed = getBigInt(this.data.gasUsed);
7987
- return this._gasUsed;
7967
+ return this._gasUsed ?? (this._gasUsed = getBigInt(this.data.gasUsed));
7988
7968
  }
7989
7969
  _blobGasUsed;
7990
7970
  get blobGasUsed() {
7991
- if (this._blobGasUsed !== void 0) {
7992
- return this._blobGasUsed;
7993
- }
7994
- this._blobGasUsed = getBigInt(this.data.blobGasUsed);
7995
- return this._blobGasUsed;
7971
+ return this._blobGasUsed !== void 0 ? this._blobGasUsed : this._blobGasUsed = allowNull(getBigInt)(this.data.blobGasUsed);
7996
7972
  }
7997
7973
  _cumulativeGasUsed;
7998
7974
  get cumulativeGasUsed() {
7999
- if (this._cumulativeGasUsed != null) {
8000
- return this._cumulativeGasUsed;
8001
- }
8002
- this._cumulativeGasUsed = getBigInt(this.data.cumulativeGasUsed);
8003
- return this._cumulativeGasUsed;
7975
+ return this._cumulativeGasUsed ?? (this._cumulativeGasUsed = getBigInt(this.data.cumulativeGasUsed));
8004
7976
  }
8005
7977
  _gasPrice;
8006
7978
  get gasPrice() {
8007
- if (this._gasPrice !== void 0) {
8008
- return this._gasPrice;
8009
- }
8010
- this._gasPrice = getBigInt(this.data.gasPrice);
8011
- return this._gasPrice;
7979
+ return this._gasPrice !== void 0 ? this._gasPrice : this._gasPrice = allowNull(getBigInt)(this.data.gasPrice);
8012
7980
  }
8013
7981
  _blobGasPrice;
8014
7982
  get blobGasPrice() {
8015
- if (this._blobGasPrice !== void 0) {
8016
- return this._blobGasPrice;
8017
- }
8018
- this._blobGasPrice = getBigInt(this.data.blobGasPrice);
8019
- return this._blobGasPrice;
7983
+ return this._blobGasPrice !== void 0 ? this._blobGasPrice : this._blobGasPrice = allowNull(getBigInt)(this.data.blobGasPrice);
8020
7984
  }
8021
7985
  _effectiveGasPrice;
8022
7986
  get effectiveGasPrice() {
8023
- if (this._effectiveGasPrice !== void 0) {
8024
- return this._effectiveGasPrice;
8025
- }
8026
- this._effectiveGasPrice = getBigInt(this.data.effectiveGasPrice);
8027
- return this._effectiveGasPrice;
7987
+ return this._effectiveGasPrice !== void 0 ? this._effectiveGasPrice : this._effectiveGasPrice = allowNull(getBigInt)(this.data.effectiveGasPrice);
8028
7988
  }
8029
7989
  _l1Fee;
8030
7990
  get l1Fee() {
8031
- if (this._l1Fee !== void 0) {
8032
- return this._l1Fee;
8033
- }
8034
- this._l1Fee = getBigInt(this.data.l1Fee);
8035
- return this._l1Fee;
7991
+ return this._l1Fee !== void 0 ? this._l1Fee : this._l1Fee = allowNull(getBigInt)(this.data.l1Fee);
8036
7992
  }
8037
7993
  get type() {
8038
7994
  return this.data.type;
@@ -8065,11 +8021,7 @@ var FormattedLog = class {
8065
8021
  }
8066
8022
  _address;
8067
8023
  get address() {
8068
- if (this._address) {
8069
- return this._address;
8070
- }
8071
- this._address = getAddress(this.raw.address);
8072
- return this._address;
8024
+ return this._address ?? (this._address = getAddress(this.raw.address));
8073
8025
  }
8074
8026
  get topics() {
8075
8027
  return this.raw.topics;
@@ -8117,7 +8069,7 @@ function formatEthData(data) {
8117
8069
  data.transaction.r = "0x88ff6cf0fefd94db46111149ae4bfc179e9b94721fffd821d38d16464b3f71d0";
8118
8070
  data.transaction.s = "0x45e0aff800961cfce805daef7016b9b675c137a6a41a548f7b60a3484c06a33a";
8119
8071
  }
8120
- transaction = formatTransactionResponse(data.transaction);
8072
+ transaction = formatTransactionResponse2(data.transaction);
8121
8073
  }
8122
8074
  const transactionReceipt = data.transactionReceipt ? formatTransactionReceipt(data.transactionReceipt) : void 0;
8123
8075
  const result = {
@@ -8135,6 +8087,124 @@ function formatEthData(data) {
8135
8087
  }
8136
8088
  }
8137
8089
  __name(formatEthData, "formatEthData");
8090
+ var FormattedTransactionResponse = class {
8091
+ constructor(raw) {
8092
+ this.raw = raw;
8093
+ }
8094
+ static {
8095
+ __name(this, "FormattedTransactionResponse");
8096
+ }
8097
+ get blockNumber() {
8098
+ return this.raw.blockNumber;
8099
+ }
8100
+ _blockHash;
8101
+ get blockHash() {
8102
+ if (this._blockHash !== void 0) {
8103
+ return this._blockHash;
8104
+ }
8105
+ if (this.raw.blockHash && getBigInt(this.raw.blockHash) === 0n) {
8106
+ this._blockHash = null;
8107
+ } else {
8108
+ this._blockHash = this.raw.blockHash;
8109
+ }
8110
+ return this._blockHash;
8111
+ }
8112
+ get hash() {
8113
+ return this.raw.hash;
8114
+ }
8115
+ get index() {
8116
+ return this.raw.transactionIndex;
8117
+ }
8118
+ get type() {
8119
+ if (this.raw.type === "0x" || this.raw.type == null) {
8120
+ return 0;
8121
+ }
8122
+ return this.raw.type;
8123
+ }
8124
+ _to;
8125
+ get to() {
8126
+ if (this._to != null) {
8127
+ return this._to;
8128
+ }
8129
+ if (this.raw.to && getBigInt(this.raw.to) === 0n) {
8130
+ return this._to = "0x0000000000000000000000000000000000000000";
8131
+ }
8132
+ return this._to = allowNull(getAddress)(this.raw.to);
8133
+ }
8134
+ _from;
8135
+ get from() {
8136
+ return this._from ?? (this._from = getAddress(this.raw.from));
8137
+ }
8138
+ get nonce() {
8139
+ return this.raw.nonce;
8140
+ }
8141
+ _gasLimit;
8142
+ get gasLimit() {
8143
+ return this._gasLimit ?? (this._gasLimit = getBigInt(this.raw.gasLimit ?? this.raw.gas));
8144
+ }
8145
+ get gas() {
8146
+ return this.gasLimit;
8147
+ }
8148
+ _gasPrice;
8149
+ get gasPrice() {
8150
+ return this._gasPrice ?? (this._gasPrice = getBigInt(this.raw.gasPrice));
8151
+ }
8152
+ _maxPriorityFeePerGas;
8153
+ get maxPriorityFeePerGas() {
8154
+ return this._maxPriorityFeePerGas !== void 0 ? this._maxPriorityFeePerGas : this._maxPriorityFeePerGas = allowNull(getBigInt)(this.raw.maxPriorityFeePerGas);
8155
+ }
8156
+ _maxFeePerGas;
8157
+ get maxFeePerGas() {
8158
+ return this._maxFeePerGas !== void 0 ? this._maxFeePerGas : this._maxFeePerGas = allowNull(getBigInt)(this.raw.maxFeePerGas);
8159
+ }
8160
+ _maxFeePerBlobGas;
8161
+ get maxFeePerBlobGas() {
8162
+ return this._maxFeePerBlobGas !== void 0 ? this._maxFeePerBlobGas : this._maxFeePerBlobGas = allowNull(getBigInt)(this.raw.maxFeePerBlobGas);
8163
+ }
8164
+ get data() {
8165
+ return this.raw.data ?? this.raw.input;
8166
+ }
8167
+ _value;
8168
+ get value() {
8169
+ return this._value ?? (this._value = getBigInt(this.raw.value));
8170
+ }
8171
+ _chainId;
8172
+ get chainId() {
8173
+ if (this._chainId != null) {
8174
+ return this._chainId;
8175
+ }
8176
+ this._chainId = allowNull(getBigInt)(this.raw.chainId);
8177
+ if (this._chainId == null && this.signature) {
8178
+ const legacyChainId = this.signature.legacyChainId;
8179
+ if (legacyChainId != null) {
8180
+ this._chainId = legacyChainId;
8181
+ }
8182
+ }
8183
+ return this._chainId ?? 0n;
8184
+ }
8185
+ _signature;
8186
+ get signature() {
8187
+ if (this._signature) {
8188
+ return this._signature;
8189
+ }
8190
+ if (this.raw.signature) {
8191
+ this._signature = Signature.from(this.raw.signature);
8192
+ } else {
8193
+ this._signature = Signature.from(this.raw);
8194
+ }
8195
+ return this._signature;
8196
+ }
8197
+ get accessList() {
8198
+ return this.raw.accessList ? accessListify(this.raw.accessList) : null;
8199
+ }
8200
+ get blobVersionedHashes() {
8201
+ return this.raw.blobVersionedHashes ?? null;
8202
+ }
8203
+ };
8204
+ function formatTransactionResponse2(value) {
8205
+ return new FormattedTransactionResponse(value);
8206
+ }
8207
+ __name(formatTransactionResponse2, "formatTransactionResponse");
8138
8208
  function formatRichBlock(block) {
8139
8209
  block = { ...block, ...formatBlock(block) };
8140
8210
  if (block.transactionReceipts) {
@@ -8264,6 +8334,7 @@ export {
8264
8334
  FormattedLog,
8265
8335
  TypedEvent,
8266
8336
  formatEthData,
8337
+ formatTransactionResponse2 as formatTransactionResponse,
8267
8338
  formatRichBlock,
8268
8339
  isNullAddress,
8269
8340
  validateAndNormalizeAddress,
@@ -8281,4 +8352,4 @@ export {
8281
8352
  @noble/hashes/esm/utils.js:
8282
8353
  (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
8283
8354
  */
8284
- //# sourceMappingURL=chunk-KPLDSVW7.js.map
8355
+ //# sourceMappingURL=chunk-Y2FX22WS.js.map