@sentio/sdk 1.14.4 → 1.15.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.
@@ -1218,12 +1218,15 @@ exports.ProcessTracesResponse = {
1218
1218
  },
1219
1219
  };
1220
1220
  function createBaseProcessTransactionsRequest() {
1221
- return { transactions: [] };
1221
+ return { chainId: "", transactions: [] };
1222
1222
  }
1223
1223
  exports.ProcessTransactionsRequest = {
1224
1224
  encode(message, writer = minimal_1.default.Writer.create()) {
1225
+ if (message.chainId !== "") {
1226
+ writer.uint32(10).string(message.chainId);
1227
+ }
1225
1228
  for (const v of message.transactions) {
1226
- exports.RawTransaction.encode(v, writer.uint32(10).fork()).ldelim();
1229
+ exports.RawTransaction.encode(v, writer.uint32(18).fork()).ldelim();
1227
1230
  }
1228
1231
  return writer;
1229
1232
  },
@@ -1235,6 +1238,9 @@ exports.ProcessTransactionsRequest = {
1235
1238
  const tag = reader.uint32();
1236
1239
  switch (tag >>> 3) {
1237
1240
  case 1:
1241
+ message.chainId = reader.string();
1242
+ break;
1243
+ case 2:
1238
1244
  message.transactions.push(exports.RawTransaction.decode(reader, reader.uint32()));
1239
1245
  break;
1240
1246
  default:
@@ -1246,6 +1252,7 @@ exports.ProcessTransactionsRequest = {
1246
1252
  },
1247
1253
  fromJSON(object) {
1248
1254
  return {
1255
+ chainId: isSet(object.chainId) ? String(object.chainId) : "",
1249
1256
  transactions: Array.isArray(object?.transactions)
1250
1257
  ? object.transactions.map((e) => exports.RawTransaction.fromJSON(e))
1251
1258
  : [],
@@ -1253,6 +1260,7 @@ exports.ProcessTransactionsRequest = {
1253
1260
  },
1254
1261
  toJSON(message) {
1255
1262
  const obj = {};
1263
+ message.chainId !== undefined && (obj.chainId = message.chainId);
1256
1264
  if (message.transactions) {
1257
1265
  obj.transactions = message.transactions.map((e) => e ? exports.RawTransaction.toJSON(e) : undefined);
1258
1266
  }
@@ -1263,6 +1271,7 @@ exports.ProcessTransactionsRequest = {
1263
1271
  },
1264
1272
  fromPartial(object) {
1265
1273
  const message = createBaseProcessTransactionsRequest();
1274
+ message.chainId = object.chainId ?? "";
1266
1275
  message.transactions =
1267
1276
  object.transactions?.map((e) => exports.RawTransaction.fromPartial(e)) || [];
1268
1277
  return message;
@@ -1726,18 +1735,22 @@ exports.RawTrace = {
1726
1735
  },
1727
1736
  };
1728
1737
  function createBaseRawTransaction() {
1729
- return { txHash: "", raw: new Uint8Array(), programAccountId: "" };
1738
+ return {
1739
+ raw: new Uint8Array(),
1740
+ programAccountId: undefined,
1741
+ slot: undefined,
1742
+ };
1730
1743
  }
1731
1744
  exports.RawTransaction = {
1732
1745
  encode(message, writer = minimal_1.default.Writer.create()) {
1733
- if (message.txHash !== "") {
1734
- writer.uint32(10).string(message.txHash);
1735
- }
1736
1746
  if (message.raw.length !== 0) {
1737
- writer.uint32(18).bytes(message.raw);
1747
+ writer.uint32(10).bytes(message.raw);
1738
1748
  }
1739
- if (message.programAccountId !== "") {
1740
- writer.uint32(26).string(message.programAccountId);
1749
+ if (message.programAccountId !== undefined) {
1750
+ writer.uint32(18).string(message.programAccountId);
1751
+ }
1752
+ if (message.slot !== undefined) {
1753
+ writer.uint32(24).uint64(message.slot);
1741
1754
  }
1742
1755
  return writer;
1743
1756
  },
@@ -1749,13 +1762,13 @@ exports.RawTransaction = {
1749
1762
  const tag = reader.uint32();
1750
1763
  switch (tag >>> 3) {
1751
1764
  case 1:
1752
- message.txHash = reader.string();
1765
+ message.raw = reader.bytes();
1753
1766
  break;
1754
1767
  case 2:
1755
- message.raw = reader.bytes();
1768
+ message.programAccountId = reader.string();
1756
1769
  break;
1757
1770
  case 3:
1758
- message.programAccountId = reader.string();
1771
+ message.slot = reader.uint64();
1759
1772
  break;
1760
1773
  default:
1761
1774
  reader.skipType(tag & 7);
@@ -1766,27 +1779,31 @@ exports.RawTransaction = {
1766
1779
  },
1767
1780
  fromJSON(object) {
1768
1781
  return {
1769
- txHash: isSet(object.txHash) ? String(object.txHash) : "",
1770
1782
  raw: isSet(object.raw) ? bytesFromBase64(object.raw) : new Uint8Array(),
1771
1783
  programAccountId: isSet(object.programAccountId)
1772
1784
  ? String(object.programAccountId)
1773
- : "",
1785
+ : undefined,
1786
+ slot: isSet(object.slot) ? long_1.default.fromValue(object.slot) : undefined,
1774
1787
  };
1775
1788
  },
1776
1789
  toJSON(message) {
1777
1790
  const obj = {};
1778
- message.txHash !== undefined && (obj.txHash = message.txHash);
1779
1791
  message.raw !== undefined &&
1780
1792
  (obj.raw = base64FromBytes(message.raw !== undefined ? message.raw : new Uint8Array()));
1781
1793
  message.programAccountId !== undefined &&
1782
1794
  (obj.programAccountId = message.programAccountId);
1795
+ message.slot !== undefined &&
1796
+ (obj.slot = (message.slot || undefined).toString());
1783
1797
  return obj;
1784
1798
  },
1785
1799
  fromPartial(object) {
1786
1800
  const message = createBaseRawTransaction();
1787
- message.txHash = object.txHash ?? "";
1788
1801
  message.raw = object.raw ?? new Uint8Array();
1789
- message.programAccountId = object.programAccountId ?? "";
1802
+ message.programAccountId = object.programAccountId ?? undefined;
1803
+ message.slot =
1804
+ object.slot !== undefined && object.slot !== null
1805
+ ? long_1.default.fromValue(object.slot)
1806
+ : undefined;
1790
1807
  return message;
1791
1808
  },
1792
1809
  };