@orbitflare/sdk 0.2.0 → 0.3.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 (68) hide show
  1. package/README.md +120 -0
  2. package/dist/config.d.ts +0 -1
  3. package/dist/config.d.ts.map +1 -1
  4. package/dist/config.js +1 -9
  5. package/dist/config.js.map +1 -1
  6. package/dist/filters.d.ts +38 -0
  7. package/dist/filters.d.ts.map +1 -0
  8. package/dist/filters.js +42 -0
  9. package/dist/filters.js.map +1 -0
  10. package/dist/grpc.d.ts +91 -2
  11. package/dist/grpc.d.ts.map +1 -1
  12. package/dist/grpc.js +302 -4
  13. package/dist/grpc.js.map +1 -1
  14. package/dist/index.d.ts +1 -0
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +1 -0
  17. package/dist/index.js.map +1 -1
  18. package/dist/jetstream/filters.d.ts +16 -0
  19. package/dist/jetstream/filters.d.ts.map +1 -0
  20. package/dist/jetstream/filters.js +42 -0
  21. package/dist/jetstream/filters.js.map +1 -0
  22. package/dist/{jetstream.d.ts → jetstream/index.d.ts} +12 -6
  23. package/dist/jetstream/index.d.ts.map +1 -0
  24. package/dist/{jetstream.js → jetstream/index.js} +40 -10
  25. package/dist/jetstream/index.js.map +1 -0
  26. package/dist/jetstream/v2.d.ts +108 -0
  27. package/dist/jetstream/v2.d.ts.map +1 -0
  28. package/dist/jetstream/v2.js +575 -0
  29. package/dist/jetstream/v2.js.map +1 -0
  30. package/dist/logger.d.ts +23 -0
  31. package/dist/logger.d.ts.map +1 -0
  32. package/dist/logger.js +88 -0
  33. package/dist/logger.js.map +1 -0
  34. package/dist/proto/geyser.d.ts +41 -41
  35. package/dist/proto/geyser.d.ts.map +1 -1
  36. package/dist/proto/geyser.js +397 -287
  37. package/dist/proto/geyser.js.map +1 -1
  38. package/dist/proto/google/protobuf/timestamp.d.ts +2 -2
  39. package/dist/proto/google/protobuf/timestamp.d.ts.map +1 -1
  40. package/dist/proto/google/protobuf/timestamp.js +10 -17
  41. package/dist/proto/google/protobuf/timestamp.js.map +1 -1
  42. package/dist/proto/jetstream.d.ts +33 -30
  43. package/dist/proto/jetstream.d.ts.map +1 -1
  44. package/dist/proto/jetstream.js +234 -175
  45. package/dist/proto/jetstream.js.map +1 -1
  46. package/dist/proto/jetstream_v2.d.ts +309 -0
  47. package/dist/proto/jetstream_v2.d.ts.map +1 -0
  48. package/dist/proto/jetstream_v2.js +2203 -0
  49. package/dist/proto/jetstream_v2.js.map +1 -0
  50. package/dist/proto/solana-storage.d.ts +22 -12
  51. package/dist/proto/solana-storage.d.ts.map +1 -1
  52. package/dist/proto/solana-storage.js +273 -87
  53. package/dist/proto/solana-storage.js.map +1 -1
  54. package/dist/proto.d.ts +1 -0
  55. package/dist/proto.d.ts.map +1 -1
  56. package/dist/proto.js +1 -0
  57. package/dist/proto.js.map +1 -1
  58. package/dist/rpc.d.ts +7 -0
  59. package/dist/rpc.d.ts.map +1 -1
  60. package/dist/rpc.js +20 -4
  61. package/dist/rpc.js.map +1 -1
  62. package/dist/ws.d.ts +7 -0
  63. package/dist/ws.d.ts.map +1 -1
  64. package/dist/ws.js +29 -4
  65. package/dist/ws.js.map +1 -1
  66. package/package.json +18 -6
  67. package/dist/jetstream.d.ts.map +0 -1
  68. package/dist/jetstream.js.map +0 -1
@@ -155,6 +155,9 @@ export const SubscribeRequest = {
155
155
  SubscribeRequestPing.encode(message.ping, writer.uint32(74).fork()).join();
156
156
  }
157
157
  if (message.fromSlot !== undefined) {
158
+ if (BigInt.asUintN(64, message.fromSlot) !== message.fromSlot) {
159
+ throw new globalThis.Error("value provided for field message.fromSlot of type uint64 too large");
160
+ }
158
161
  writer.uint32(88).uint64(message.fromSlot);
159
162
  }
160
163
  return writer;
@@ -261,7 +264,7 @@ export const SubscribeRequest = {
261
264
  if (tag !== 88) {
262
265
  break;
263
266
  }
264
- message.fromSlot = longToNumber(reader.uint64());
267
+ message.fromSlot = reader.uint64();
265
268
  continue;
266
269
  }
267
270
  }
@@ -334,9 +337,9 @@ export const SubscribeRequest = {
334
337
  : [],
335
338
  ping: isSet(object.ping) ? SubscribeRequestPing.fromJSON(object.ping) : undefined,
336
339
  fromSlot: isSet(object.fromSlot)
337
- ? globalThis.Number(object.fromSlot)
340
+ ? BigInt(object.fromSlot)
338
341
  : isSet(object.from_slot)
339
- ? globalThis.Number(object.from_slot)
342
+ ? BigInt(object.from_slot)
340
343
  : undefined,
341
344
  };
342
345
  },
@@ -415,7 +418,7 @@ export const SubscribeRequest = {
415
418
  obj.ping = SubscribeRequestPing.toJSON(message.ping);
416
419
  }
417
420
  if (message.fromSlot !== undefined) {
418
- obj.fromSlot = Math.round(message.fromSlot);
421
+ obj.fromSlot = message.fromSlot.toString();
419
422
  }
420
423
  return obj;
421
424
  },
@@ -1085,6 +1088,9 @@ export const SubscribeRequestFilterAccountsFilter = {
1085
1088
  SubscribeRequestFilterAccountsFilterMemcmp.encode(message.memcmp, writer.uint32(10).fork()).join();
1086
1089
  }
1087
1090
  if (message.datasize !== undefined) {
1091
+ if (BigInt.asUintN(64, message.datasize) !== message.datasize) {
1092
+ throw new globalThis.Error("value provided for field message.datasize of type uint64 too large");
1093
+ }
1088
1094
  writer.uint32(16).uint64(message.datasize);
1089
1095
  }
1090
1096
  if (message.tokenAccountState !== undefined) {
@@ -1113,7 +1119,7 @@ export const SubscribeRequestFilterAccountsFilter = {
1113
1119
  if (tag !== 16) {
1114
1120
  break;
1115
1121
  }
1116
- message.datasize = longToNumber(reader.uint64());
1122
+ message.datasize = reader.uint64();
1117
1123
  continue;
1118
1124
  }
1119
1125
  case 3: {
@@ -1141,7 +1147,7 @@ export const SubscribeRequestFilterAccountsFilter = {
1141
1147
  fromJSON(object) {
1142
1148
  return {
1143
1149
  memcmp: isSet(object.memcmp) ? SubscribeRequestFilterAccountsFilterMemcmp.fromJSON(object.memcmp) : undefined,
1144
- datasize: isSet(object.datasize) ? globalThis.Number(object.datasize) : undefined,
1150
+ datasize: isSet(object.datasize) ? BigInt(object.datasize) : undefined,
1145
1151
  tokenAccountState: isSet(object.tokenAccountState)
1146
1152
  ? globalThis.Boolean(object.tokenAccountState)
1147
1153
  : isSet(object.token_account_state)
@@ -1158,7 +1164,7 @@ export const SubscribeRequestFilterAccountsFilter = {
1158
1164
  obj.memcmp = SubscribeRequestFilterAccountsFilterMemcmp.toJSON(message.memcmp);
1159
1165
  }
1160
1166
  if (message.datasize !== undefined) {
1161
- obj.datasize = Math.round(message.datasize);
1167
+ obj.datasize = message.datasize.toString();
1162
1168
  }
1163
1169
  if (message.tokenAccountState !== undefined) {
1164
1170
  obj.tokenAccountState = message.tokenAccountState;
@@ -1185,11 +1191,14 @@ export const SubscribeRequestFilterAccountsFilter = {
1185
1191
  },
1186
1192
  };
1187
1193
  function createBaseSubscribeRequestFilterAccountsFilterMemcmp() {
1188
- return { offset: 0, bytes: undefined, base58: undefined, base64: undefined };
1194
+ return { offset: 0n, bytes: undefined, base58: undefined, base64: undefined };
1189
1195
  }
1190
1196
  export const SubscribeRequestFilterAccountsFilterMemcmp = {
1191
1197
  encode(message, writer = new BinaryWriter()) {
1192
- if (message.offset !== 0) {
1198
+ if (message.offset !== 0n) {
1199
+ if (BigInt.asUintN(64, message.offset) !== message.offset) {
1200
+ throw new globalThis.Error("value provided for field message.offset of type uint64 too large");
1201
+ }
1193
1202
  writer.uint32(8).uint64(message.offset);
1194
1203
  }
1195
1204
  if (message.bytes !== undefined) {
@@ -1214,7 +1223,7 @@ export const SubscribeRequestFilterAccountsFilterMemcmp = {
1214
1223
  if (tag !== 8) {
1215
1224
  break;
1216
1225
  }
1217
- message.offset = longToNumber(reader.uint64());
1226
+ message.offset = reader.uint64();
1218
1227
  continue;
1219
1228
  }
1220
1229
  case 2: {
@@ -1248,7 +1257,7 @@ export const SubscribeRequestFilterAccountsFilterMemcmp = {
1248
1257
  },
1249
1258
  fromJSON(object) {
1250
1259
  return {
1251
- offset: isSet(object.offset) ? globalThis.Number(object.offset) : 0,
1260
+ offset: isSet(object.offset) ? BigInt(object.offset) : 0n,
1252
1261
  bytes: isSet(object.bytes) ? bytesFromBase64(object.bytes) : undefined,
1253
1262
  base58: isSet(object.base58) ? globalThis.String(object.base58) : undefined,
1254
1263
  base64: isSet(object.base64) ? globalThis.String(object.base64) : undefined,
@@ -1256,8 +1265,8 @@ export const SubscribeRequestFilterAccountsFilterMemcmp = {
1256
1265
  },
1257
1266
  toJSON(message) {
1258
1267
  const obj = {};
1259
- if (message.offset !== 0) {
1260
- obj.offset = Math.round(message.offset);
1268
+ if (message.offset !== 0n) {
1269
+ obj.offset = message.offset.toString();
1261
1270
  }
1262
1271
  if (message.bytes !== undefined) {
1263
1272
  obj.bytes = base64FromBytes(message.bytes);
@@ -1275,7 +1284,7 @@ export const SubscribeRequestFilterAccountsFilterMemcmp = {
1275
1284
  },
1276
1285
  fromPartial(object) {
1277
1286
  const message = createBaseSubscribeRequestFilterAccountsFilterMemcmp();
1278
- message.offset = object.offset ?? 0;
1287
+ message.offset = object.offset ?? 0n;
1279
1288
  message.bytes = object.bytes ?? undefined;
1280
1289
  message.base58 = object.base58 ?? undefined;
1281
1290
  message.base64 = object.base64 ?? undefined;
@@ -1288,15 +1297,27 @@ function createBaseSubscribeRequestFilterAccountsFilterLamports() {
1288
1297
  export const SubscribeRequestFilterAccountsFilterLamports = {
1289
1298
  encode(message, writer = new BinaryWriter()) {
1290
1299
  if (message.eq !== undefined) {
1300
+ if (BigInt.asUintN(64, message.eq) !== message.eq) {
1301
+ throw new globalThis.Error("value provided for field message.eq of type uint64 too large");
1302
+ }
1291
1303
  writer.uint32(8).uint64(message.eq);
1292
1304
  }
1293
1305
  if (message.ne !== undefined) {
1306
+ if (BigInt.asUintN(64, message.ne) !== message.ne) {
1307
+ throw new globalThis.Error("value provided for field message.ne of type uint64 too large");
1308
+ }
1294
1309
  writer.uint32(16).uint64(message.ne);
1295
1310
  }
1296
1311
  if (message.lt !== undefined) {
1312
+ if (BigInt.asUintN(64, message.lt) !== message.lt) {
1313
+ throw new globalThis.Error("value provided for field message.lt of type uint64 too large");
1314
+ }
1297
1315
  writer.uint32(24).uint64(message.lt);
1298
1316
  }
1299
1317
  if (message.gt !== undefined) {
1318
+ if (BigInt.asUintN(64, message.gt) !== message.gt) {
1319
+ throw new globalThis.Error("value provided for field message.gt of type uint64 too large");
1320
+ }
1300
1321
  writer.uint32(32).uint64(message.gt);
1301
1322
  }
1302
1323
  return writer;
@@ -1312,28 +1333,28 @@ export const SubscribeRequestFilterAccountsFilterLamports = {
1312
1333
  if (tag !== 8) {
1313
1334
  break;
1314
1335
  }
1315
- message.eq = longToNumber(reader.uint64());
1336
+ message.eq = reader.uint64();
1316
1337
  continue;
1317
1338
  }
1318
1339
  case 2: {
1319
1340
  if (tag !== 16) {
1320
1341
  break;
1321
1342
  }
1322
- message.ne = longToNumber(reader.uint64());
1343
+ message.ne = reader.uint64();
1323
1344
  continue;
1324
1345
  }
1325
1346
  case 3: {
1326
1347
  if (tag !== 24) {
1327
1348
  break;
1328
1349
  }
1329
- message.lt = longToNumber(reader.uint64());
1350
+ message.lt = reader.uint64();
1330
1351
  continue;
1331
1352
  }
1332
1353
  case 4: {
1333
1354
  if (tag !== 32) {
1334
1355
  break;
1335
1356
  }
1336
- message.gt = longToNumber(reader.uint64());
1357
+ message.gt = reader.uint64();
1337
1358
  continue;
1338
1359
  }
1339
1360
  }
@@ -1346,25 +1367,25 @@ export const SubscribeRequestFilterAccountsFilterLamports = {
1346
1367
  },
1347
1368
  fromJSON(object) {
1348
1369
  return {
1349
- eq: isSet(object.eq) ? globalThis.Number(object.eq) : undefined,
1350
- ne: isSet(object.ne) ? globalThis.Number(object.ne) : undefined,
1351
- lt: isSet(object.lt) ? globalThis.Number(object.lt) : undefined,
1352
- gt: isSet(object.gt) ? globalThis.Number(object.gt) : undefined,
1370
+ eq: isSet(object.eq) ? BigInt(object.eq) : undefined,
1371
+ ne: isSet(object.ne) ? BigInt(object.ne) : undefined,
1372
+ lt: isSet(object.lt) ? BigInt(object.lt) : undefined,
1373
+ gt: isSet(object.gt) ? BigInt(object.gt) : undefined,
1353
1374
  };
1354
1375
  },
1355
1376
  toJSON(message) {
1356
1377
  const obj = {};
1357
1378
  if (message.eq !== undefined) {
1358
- obj.eq = Math.round(message.eq);
1379
+ obj.eq = message.eq.toString();
1359
1380
  }
1360
1381
  if (message.ne !== undefined) {
1361
- obj.ne = Math.round(message.ne);
1382
+ obj.ne = message.ne.toString();
1362
1383
  }
1363
1384
  if (message.lt !== undefined) {
1364
- obj.lt = Math.round(message.lt);
1385
+ obj.lt = message.lt.toString();
1365
1386
  }
1366
1387
  if (message.gt !== undefined) {
1367
- obj.gt = Math.round(message.gt);
1388
+ obj.gt = message.gt.toString();
1368
1389
  }
1369
1390
  return obj;
1370
1391
  },
@@ -1902,14 +1923,20 @@ export const SubscribeRequestFilterDeshredTransactions = {
1902
1923
  },
1903
1924
  };
1904
1925
  function createBaseSubscribeRequestAccountsDataSlice() {
1905
- return { offset: 0, length: 0 };
1926
+ return { offset: 0n, length: 0n };
1906
1927
  }
1907
1928
  export const SubscribeRequestAccountsDataSlice = {
1908
1929
  encode(message, writer = new BinaryWriter()) {
1909
- if (message.offset !== 0) {
1930
+ if (message.offset !== 0n) {
1931
+ if (BigInt.asUintN(64, message.offset) !== message.offset) {
1932
+ throw new globalThis.Error("value provided for field message.offset of type uint64 too large");
1933
+ }
1910
1934
  writer.uint32(8).uint64(message.offset);
1911
1935
  }
1912
- if (message.length !== 0) {
1936
+ if (message.length !== 0n) {
1937
+ if (BigInt.asUintN(64, message.length) !== message.length) {
1938
+ throw new globalThis.Error("value provided for field message.length of type uint64 too large");
1939
+ }
1913
1940
  writer.uint32(16).uint64(message.length);
1914
1941
  }
1915
1942
  return writer;
@@ -1925,14 +1952,14 @@ export const SubscribeRequestAccountsDataSlice = {
1925
1952
  if (tag !== 8) {
1926
1953
  break;
1927
1954
  }
1928
- message.offset = longToNumber(reader.uint64());
1955
+ message.offset = reader.uint64();
1929
1956
  continue;
1930
1957
  }
1931
1958
  case 2: {
1932
1959
  if (tag !== 16) {
1933
1960
  break;
1934
1961
  }
1935
- message.length = longToNumber(reader.uint64());
1962
+ message.length = reader.uint64();
1936
1963
  continue;
1937
1964
  }
1938
1965
  }
@@ -1945,17 +1972,17 @@ export const SubscribeRequestAccountsDataSlice = {
1945
1972
  },
1946
1973
  fromJSON(object) {
1947
1974
  return {
1948
- offset: isSet(object.offset) ? globalThis.Number(object.offset) : 0,
1949
- length: isSet(object.length) ? globalThis.Number(object.length) : 0,
1975
+ offset: isSet(object.offset) ? BigInt(object.offset) : 0n,
1976
+ length: isSet(object.length) ? BigInt(object.length) : 0n,
1950
1977
  };
1951
1978
  },
1952
1979
  toJSON(message) {
1953
1980
  const obj = {};
1954
- if (message.offset !== 0) {
1955
- obj.offset = Math.round(message.offset);
1981
+ if (message.offset !== 0n) {
1982
+ obj.offset = message.offset.toString();
1956
1983
  }
1957
- if (message.length !== 0) {
1958
- obj.length = Math.round(message.length);
1984
+ if (message.length !== 0n) {
1985
+ obj.length = message.length.toString();
1959
1986
  }
1960
1987
  return obj;
1961
1988
  },
@@ -1964,8 +1991,8 @@ export const SubscribeRequestAccountsDataSlice = {
1964
1991
  },
1965
1992
  fromPartial(object) {
1966
1993
  const message = createBaseSubscribeRequestAccountsDataSlice();
1967
- message.offset = object.offset ?? 0;
1968
- message.length = object.length ?? 0;
1994
+ message.offset = object.offset ?? 0n;
1995
+ message.length = object.length ?? 0n;
1969
1996
  return message;
1970
1997
  },
1971
1998
  };
@@ -2432,14 +2459,17 @@ export const SubscribeUpdate = {
2432
2459
  },
2433
2460
  };
2434
2461
  function createBaseSubscribeUpdateAccount() {
2435
- return { account: undefined, slot: 0, isStartup: false };
2462
+ return { account: undefined, slot: 0n, isStartup: false };
2436
2463
  }
2437
2464
  export const SubscribeUpdateAccount = {
2438
2465
  encode(message, writer = new BinaryWriter()) {
2439
2466
  if (message.account !== undefined) {
2440
2467
  SubscribeUpdateAccountInfo.encode(message.account, writer.uint32(10).fork()).join();
2441
2468
  }
2442
- if (message.slot !== 0) {
2469
+ if (message.slot !== 0n) {
2470
+ if (BigInt.asUintN(64, message.slot) !== message.slot) {
2471
+ throw new globalThis.Error("value provided for field message.slot of type uint64 too large");
2472
+ }
2443
2473
  writer.uint32(16).uint64(message.slot);
2444
2474
  }
2445
2475
  if (message.isStartup !== false) {
@@ -2465,7 +2495,7 @@ export const SubscribeUpdateAccount = {
2465
2495
  if (tag !== 16) {
2466
2496
  break;
2467
2497
  }
2468
- message.slot = longToNumber(reader.uint64());
2498
+ message.slot = reader.uint64();
2469
2499
  continue;
2470
2500
  }
2471
2501
  case 3: {
@@ -2486,7 +2516,7 @@ export const SubscribeUpdateAccount = {
2486
2516
  fromJSON(object) {
2487
2517
  return {
2488
2518
  account: isSet(object.account) ? SubscribeUpdateAccountInfo.fromJSON(object.account) : undefined,
2489
- slot: isSet(object.slot) ? globalThis.Number(object.slot) : 0,
2519
+ slot: isSet(object.slot) ? BigInt(object.slot) : 0n,
2490
2520
  isStartup: isSet(object.isStartup)
2491
2521
  ? globalThis.Boolean(object.isStartup)
2492
2522
  : isSet(object.is_startup)
@@ -2499,8 +2529,8 @@ export const SubscribeUpdateAccount = {
2499
2529
  if (message.account !== undefined) {
2500
2530
  obj.account = SubscribeUpdateAccountInfo.toJSON(message.account);
2501
2531
  }
2502
- if (message.slot !== 0) {
2503
- obj.slot = Math.round(message.slot);
2532
+ if (message.slot !== 0n) {
2533
+ obj.slot = message.slot.toString();
2504
2534
  }
2505
2535
  if (message.isStartup !== false) {
2506
2536
  obj.isStartup = message.isStartup;
@@ -2515,7 +2545,7 @@ export const SubscribeUpdateAccount = {
2515
2545
  message.account = (object.account !== undefined && object.account !== null)
2516
2546
  ? SubscribeUpdateAccountInfo.fromPartial(object.account)
2517
2547
  : undefined;
2518
- message.slot = object.slot ?? 0;
2548
+ message.slot = object.slot ?? 0n;
2519
2549
  message.isStartup = object.isStartup ?? false;
2520
2550
  return message;
2521
2551
  },
@@ -2523,12 +2553,12 @@ export const SubscribeUpdateAccount = {
2523
2553
  function createBaseSubscribeUpdateAccountInfo() {
2524
2554
  return {
2525
2555
  pubkey: new Uint8Array(0),
2526
- lamports: 0,
2556
+ lamports: 0n,
2527
2557
  owner: new Uint8Array(0),
2528
2558
  executable: false,
2529
- rentEpoch: 0,
2559
+ rentEpoch: 0n,
2530
2560
  data: new Uint8Array(0),
2531
- writeVersion: 0,
2561
+ writeVersion: 0n,
2532
2562
  txnSignature: undefined,
2533
2563
  };
2534
2564
  }
@@ -2537,7 +2567,10 @@ export const SubscribeUpdateAccountInfo = {
2537
2567
  if (message.pubkey.length !== 0) {
2538
2568
  writer.uint32(10).bytes(message.pubkey);
2539
2569
  }
2540
- if (message.lamports !== 0) {
2570
+ if (message.lamports !== 0n) {
2571
+ if (BigInt.asUintN(64, message.lamports) !== message.lamports) {
2572
+ throw new globalThis.Error("value provided for field message.lamports of type uint64 too large");
2573
+ }
2541
2574
  writer.uint32(16).uint64(message.lamports);
2542
2575
  }
2543
2576
  if (message.owner.length !== 0) {
@@ -2546,13 +2579,19 @@ export const SubscribeUpdateAccountInfo = {
2546
2579
  if (message.executable !== false) {
2547
2580
  writer.uint32(32).bool(message.executable);
2548
2581
  }
2549
- if (message.rentEpoch !== 0) {
2582
+ if (message.rentEpoch !== 0n) {
2583
+ if (BigInt.asUintN(64, message.rentEpoch) !== message.rentEpoch) {
2584
+ throw new globalThis.Error("value provided for field message.rentEpoch of type uint64 too large");
2585
+ }
2550
2586
  writer.uint32(40).uint64(message.rentEpoch);
2551
2587
  }
2552
2588
  if (message.data.length !== 0) {
2553
2589
  writer.uint32(50).bytes(message.data);
2554
2590
  }
2555
- if (message.writeVersion !== 0) {
2591
+ if (message.writeVersion !== 0n) {
2592
+ if (BigInt.asUintN(64, message.writeVersion) !== message.writeVersion) {
2593
+ throw new globalThis.Error("value provided for field message.writeVersion of type uint64 too large");
2594
+ }
2556
2595
  writer.uint32(56).uint64(message.writeVersion);
2557
2596
  }
2558
2597
  if (message.txnSignature !== undefined) {
@@ -2578,7 +2617,7 @@ export const SubscribeUpdateAccountInfo = {
2578
2617
  if (tag !== 16) {
2579
2618
  break;
2580
2619
  }
2581
- message.lamports = longToNumber(reader.uint64());
2620
+ message.lamports = reader.uint64();
2582
2621
  continue;
2583
2622
  }
2584
2623
  case 3: {
@@ -2599,7 +2638,7 @@ export const SubscribeUpdateAccountInfo = {
2599
2638
  if (tag !== 40) {
2600
2639
  break;
2601
2640
  }
2602
- message.rentEpoch = longToNumber(reader.uint64());
2641
+ message.rentEpoch = reader.uint64();
2603
2642
  continue;
2604
2643
  }
2605
2644
  case 6: {
@@ -2613,7 +2652,7 @@ export const SubscribeUpdateAccountInfo = {
2613
2652
  if (tag !== 56) {
2614
2653
  break;
2615
2654
  }
2616
- message.writeVersion = longToNumber(reader.uint64());
2655
+ message.writeVersion = reader.uint64();
2617
2656
  continue;
2618
2657
  }
2619
2658
  case 8: {
@@ -2634,20 +2673,20 @@ export const SubscribeUpdateAccountInfo = {
2634
2673
  fromJSON(object) {
2635
2674
  return {
2636
2675
  pubkey: isSet(object.pubkey) ? bytesFromBase64(object.pubkey) : new Uint8Array(0),
2637
- lamports: isSet(object.lamports) ? globalThis.Number(object.lamports) : 0,
2676
+ lamports: isSet(object.lamports) ? BigInt(object.lamports) : 0n,
2638
2677
  owner: isSet(object.owner) ? bytesFromBase64(object.owner) : new Uint8Array(0),
2639
2678
  executable: isSet(object.executable) ? globalThis.Boolean(object.executable) : false,
2640
2679
  rentEpoch: isSet(object.rentEpoch)
2641
- ? globalThis.Number(object.rentEpoch)
2680
+ ? BigInt(object.rentEpoch)
2642
2681
  : isSet(object.rent_epoch)
2643
- ? globalThis.Number(object.rent_epoch)
2644
- : 0,
2682
+ ? BigInt(object.rent_epoch)
2683
+ : 0n,
2645
2684
  data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0),
2646
2685
  writeVersion: isSet(object.writeVersion)
2647
- ? globalThis.Number(object.writeVersion)
2686
+ ? BigInt(object.writeVersion)
2648
2687
  : isSet(object.write_version)
2649
- ? globalThis.Number(object.write_version)
2650
- : 0,
2688
+ ? BigInt(object.write_version)
2689
+ : 0n,
2651
2690
  txnSignature: isSet(object.txnSignature)
2652
2691
  ? bytesFromBase64(object.txnSignature)
2653
2692
  : isSet(object.txn_signature)
@@ -2660,8 +2699,8 @@ export const SubscribeUpdateAccountInfo = {
2660
2699
  if (message.pubkey.length !== 0) {
2661
2700
  obj.pubkey = base64FromBytes(message.pubkey);
2662
2701
  }
2663
- if (message.lamports !== 0) {
2664
- obj.lamports = Math.round(message.lamports);
2702
+ if (message.lamports !== 0n) {
2703
+ obj.lamports = message.lamports.toString();
2665
2704
  }
2666
2705
  if (message.owner.length !== 0) {
2667
2706
  obj.owner = base64FromBytes(message.owner);
@@ -2669,14 +2708,14 @@ export const SubscribeUpdateAccountInfo = {
2669
2708
  if (message.executable !== false) {
2670
2709
  obj.executable = message.executable;
2671
2710
  }
2672
- if (message.rentEpoch !== 0) {
2673
- obj.rentEpoch = Math.round(message.rentEpoch);
2711
+ if (message.rentEpoch !== 0n) {
2712
+ obj.rentEpoch = message.rentEpoch.toString();
2674
2713
  }
2675
2714
  if (message.data.length !== 0) {
2676
2715
  obj.data = base64FromBytes(message.data);
2677
2716
  }
2678
- if (message.writeVersion !== 0) {
2679
- obj.writeVersion = Math.round(message.writeVersion);
2717
+ if (message.writeVersion !== 0n) {
2718
+ obj.writeVersion = message.writeVersion.toString();
2680
2719
  }
2681
2720
  if (message.txnSignature !== undefined) {
2682
2721
  obj.txnSignature = base64FromBytes(message.txnSignature);
@@ -2689,25 +2728,31 @@ export const SubscribeUpdateAccountInfo = {
2689
2728
  fromPartial(object) {
2690
2729
  const message = createBaseSubscribeUpdateAccountInfo();
2691
2730
  message.pubkey = object.pubkey ?? new Uint8Array(0);
2692
- message.lamports = object.lamports ?? 0;
2731
+ message.lamports = object.lamports ?? 0n;
2693
2732
  message.owner = object.owner ?? new Uint8Array(0);
2694
2733
  message.executable = object.executable ?? false;
2695
- message.rentEpoch = object.rentEpoch ?? 0;
2734
+ message.rentEpoch = object.rentEpoch ?? 0n;
2696
2735
  message.data = object.data ?? new Uint8Array(0);
2697
- message.writeVersion = object.writeVersion ?? 0;
2736
+ message.writeVersion = object.writeVersion ?? 0n;
2698
2737
  message.txnSignature = object.txnSignature ?? undefined;
2699
2738
  return message;
2700
2739
  },
2701
2740
  };
2702
2741
  function createBaseSubscribeUpdateSlot() {
2703
- return { slot: 0, parent: undefined, status: 0, deadError: undefined };
2742
+ return { slot: 0n, parent: undefined, status: 0, deadError: undefined };
2704
2743
  }
2705
2744
  export const SubscribeUpdateSlot = {
2706
2745
  encode(message, writer = new BinaryWriter()) {
2707
- if (message.slot !== 0) {
2746
+ if (message.slot !== 0n) {
2747
+ if (BigInt.asUintN(64, message.slot) !== message.slot) {
2748
+ throw new globalThis.Error("value provided for field message.slot of type uint64 too large");
2749
+ }
2708
2750
  writer.uint32(8).uint64(message.slot);
2709
2751
  }
2710
2752
  if (message.parent !== undefined) {
2753
+ if (BigInt.asUintN(64, message.parent) !== message.parent) {
2754
+ throw new globalThis.Error("value provided for field message.parent of type uint64 too large");
2755
+ }
2711
2756
  writer.uint32(16).uint64(message.parent);
2712
2757
  }
2713
2758
  if (message.status !== 0) {
@@ -2729,14 +2774,14 @@ export const SubscribeUpdateSlot = {
2729
2774
  if (tag !== 8) {
2730
2775
  break;
2731
2776
  }
2732
- message.slot = longToNumber(reader.uint64());
2777
+ message.slot = reader.uint64();
2733
2778
  continue;
2734
2779
  }
2735
2780
  case 2: {
2736
2781
  if (tag !== 16) {
2737
2782
  break;
2738
2783
  }
2739
- message.parent = longToNumber(reader.uint64());
2784
+ message.parent = reader.uint64();
2740
2785
  continue;
2741
2786
  }
2742
2787
  case 3: {
@@ -2763,8 +2808,8 @@ export const SubscribeUpdateSlot = {
2763
2808
  },
2764
2809
  fromJSON(object) {
2765
2810
  return {
2766
- slot: isSet(object.slot) ? globalThis.Number(object.slot) : 0,
2767
- parent: isSet(object.parent) ? globalThis.Number(object.parent) : undefined,
2811
+ slot: isSet(object.slot) ? BigInt(object.slot) : 0n,
2812
+ parent: isSet(object.parent) ? BigInt(object.parent) : undefined,
2768
2813
  status: isSet(object.status) ? slotStatusFromJSON(object.status) : 0,
2769
2814
  deadError: isSet(object.deadError)
2770
2815
  ? globalThis.String(object.deadError)
@@ -2775,11 +2820,11 @@ export const SubscribeUpdateSlot = {
2775
2820
  },
2776
2821
  toJSON(message) {
2777
2822
  const obj = {};
2778
- if (message.slot !== 0) {
2779
- obj.slot = Math.round(message.slot);
2823
+ if (message.slot !== 0n) {
2824
+ obj.slot = message.slot.toString();
2780
2825
  }
2781
2826
  if (message.parent !== undefined) {
2782
- obj.parent = Math.round(message.parent);
2827
+ obj.parent = message.parent.toString();
2783
2828
  }
2784
2829
  if (message.status !== 0) {
2785
2830
  obj.status = slotStatusToJSON(message.status);
@@ -2794,7 +2839,7 @@ export const SubscribeUpdateSlot = {
2794
2839
  },
2795
2840
  fromPartial(object) {
2796
2841
  const message = createBaseSubscribeUpdateSlot();
2797
- message.slot = object.slot ?? 0;
2842
+ message.slot = object.slot ?? 0n;
2798
2843
  message.parent = object.parent ?? undefined;
2799
2844
  message.status = object.status ?? 0;
2800
2845
  message.deadError = object.deadError ?? undefined;
@@ -2802,14 +2847,17 @@ export const SubscribeUpdateSlot = {
2802
2847
  },
2803
2848
  };
2804
2849
  function createBaseSubscribeUpdateTransaction() {
2805
- return { transaction: undefined, slot: 0 };
2850
+ return { transaction: undefined, slot: 0n };
2806
2851
  }
2807
2852
  export const SubscribeUpdateTransaction = {
2808
2853
  encode(message, writer = new BinaryWriter()) {
2809
2854
  if (message.transaction !== undefined) {
2810
2855
  SubscribeUpdateTransactionInfo.encode(message.transaction, writer.uint32(10).fork()).join();
2811
2856
  }
2812
- if (message.slot !== 0) {
2857
+ if (message.slot !== 0n) {
2858
+ if (BigInt.asUintN(64, message.slot) !== message.slot) {
2859
+ throw new globalThis.Error("value provided for field message.slot of type uint64 too large");
2860
+ }
2813
2861
  writer.uint32(16).uint64(message.slot);
2814
2862
  }
2815
2863
  return writer;
@@ -2832,7 +2880,7 @@ export const SubscribeUpdateTransaction = {
2832
2880
  if (tag !== 16) {
2833
2881
  break;
2834
2882
  }
2835
- message.slot = longToNumber(reader.uint64());
2883
+ message.slot = reader.uint64();
2836
2884
  continue;
2837
2885
  }
2838
2886
  }
@@ -2846,7 +2894,7 @@ export const SubscribeUpdateTransaction = {
2846
2894
  fromJSON(object) {
2847
2895
  return {
2848
2896
  transaction: isSet(object.transaction) ? SubscribeUpdateTransactionInfo.fromJSON(object.transaction) : undefined,
2849
- slot: isSet(object.slot) ? globalThis.Number(object.slot) : 0,
2897
+ slot: isSet(object.slot) ? BigInt(object.slot) : 0n,
2850
2898
  };
2851
2899
  },
2852
2900
  toJSON(message) {
@@ -2854,8 +2902,8 @@ export const SubscribeUpdateTransaction = {
2854
2902
  if (message.transaction !== undefined) {
2855
2903
  obj.transaction = SubscribeUpdateTransactionInfo.toJSON(message.transaction);
2856
2904
  }
2857
- if (message.slot !== 0) {
2858
- obj.slot = Math.round(message.slot);
2905
+ if (message.slot !== 0n) {
2906
+ obj.slot = message.slot.toString();
2859
2907
  }
2860
2908
  return obj;
2861
2909
  },
@@ -2867,12 +2915,12 @@ export const SubscribeUpdateTransaction = {
2867
2915
  message.transaction = (object.transaction !== undefined && object.transaction !== null)
2868
2916
  ? SubscribeUpdateTransactionInfo.fromPartial(object.transaction)
2869
2917
  : undefined;
2870
- message.slot = object.slot ?? 0;
2918
+ message.slot = object.slot ?? 0n;
2871
2919
  return message;
2872
2920
  },
2873
2921
  };
2874
2922
  function createBaseSubscribeUpdateTransactionInfo() {
2875
- return { signature: new Uint8Array(0), isVote: false, transaction: undefined, meta: undefined, index: 0 };
2923
+ return { signature: new Uint8Array(0), isVote: false, transaction: undefined, meta: undefined, index: 0n };
2876
2924
  }
2877
2925
  export const SubscribeUpdateTransactionInfo = {
2878
2926
  encode(message, writer = new BinaryWriter()) {
@@ -2888,7 +2936,10 @@ export const SubscribeUpdateTransactionInfo = {
2888
2936
  if (message.meta !== undefined) {
2889
2937
  TransactionStatusMeta.encode(message.meta, writer.uint32(34).fork()).join();
2890
2938
  }
2891
- if (message.index !== 0) {
2939
+ if (message.index !== 0n) {
2940
+ if (BigInt.asUintN(64, message.index) !== message.index) {
2941
+ throw new globalThis.Error("value provided for field message.index of type uint64 too large");
2942
+ }
2892
2943
  writer.uint32(40).uint64(message.index);
2893
2944
  }
2894
2945
  return writer;
@@ -2932,7 +2983,7 @@ export const SubscribeUpdateTransactionInfo = {
2932
2983
  if (tag !== 40) {
2933
2984
  break;
2934
2985
  }
2935
- message.index = longToNumber(reader.uint64());
2986
+ message.index = reader.uint64();
2936
2987
  continue;
2937
2988
  }
2938
2989
  }
@@ -2953,7 +3004,7 @@ export const SubscribeUpdateTransactionInfo = {
2953
3004
  : false,
2954
3005
  transaction: isSet(object.transaction) ? Transaction.fromJSON(object.transaction) : undefined,
2955
3006
  meta: isSet(object.meta) ? TransactionStatusMeta.fromJSON(object.meta) : undefined,
2956
- index: isSet(object.index) ? globalThis.Number(object.index) : 0,
3007
+ index: isSet(object.index) ? BigInt(object.index) : 0n,
2957
3008
  };
2958
3009
  },
2959
3010
  toJSON(message) {
@@ -2970,8 +3021,8 @@ export const SubscribeUpdateTransactionInfo = {
2970
3021
  if (message.meta !== undefined) {
2971
3022
  obj.meta = TransactionStatusMeta.toJSON(message.meta);
2972
3023
  }
2973
- if (message.index !== 0) {
2974
- obj.index = Math.round(message.index);
3024
+ if (message.index !== 0n) {
3025
+ obj.index = message.index.toString();
2975
3026
  }
2976
3027
  return obj;
2977
3028
  },
@@ -2988,16 +3039,19 @@ export const SubscribeUpdateTransactionInfo = {
2988
3039
  message.meta = (object.meta !== undefined && object.meta !== null)
2989
3040
  ? TransactionStatusMeta.fromPartial(object.meta)
2990
3041
  : undefined;
2991
- message.index = object.index ?? 0;
3042
+ message.index = object.index ?? 0n;
2992
3043
  return message;
2993
3044
  },
2994
3045
  };
2995
3046
  function createBaseSubscribeUpdateTransactionStatus() {
2996
- return { slot: 0, signature: new Uint8Array(0), isVote: false, index: 0, err: undefined };
3047
+ return { slot: 0n, signature: new Uint8Array(0), isVote: false, index: 0n, err: undefined };
2997
3048
  }
2998
3049
  export const SubscribeUpdateTransactionStatus = {
2999
3050
  encode(message, writer = new BinaryWriter()) {
3000
- if (message.slot !== 0) {
3051
+ if (message.slot !== 0n) {
3052
+ if (BigInt.asUintN(64, message.slot) !== message.slot) {
3053
+ throw new globalThis.Error("value provided for field message.slot of type uint64 too large");
3054
+ }
3001
3055
  writer.uint32(8).uint64(message.slot);
3002
3056
  }
3003
3057
  if (message.signature.length !== 0) {
@@ -3006,7 +3060,10 @@ export const SubscribeUpdateTransactionStatus = {
3006
3060
  if (message.isVote !== false) {
3007
3061
  writer.uint32(24).bool(message.isVote);
3008
3062
  }
3009
- if (message.index !== 0) {
3063
+ if (message.index !== 0n) {
3064
+ if (BigInt.asUintN(64, message.index) !== message.index) {
3065
+ throw new globalThis.Error("value provided for field message.index of type uint64 too large");
3066
+ }
3010
3067
  writer.uint32(32).uint64(message.index);
3011
3068
  }
3012
3069
  if (message.err !== undefined) {
@@ -3025,7 +3082,7 @@ export const SubscribeUpdateTransactionStatus = {
3025
3082
  if (tag !== 8) {
3026
3083
  break;
3027
3084
  }
3028
- message.slot = longToNumber(reader.uint64());
3085
+ message.slot = reader.uint64();
3029
3086
  continue;
3030
3087
  }
3031
3088
  case 2: {
@@ -3046,7 +3103,7 @@ export const SubscribeUpdateTransactionStatus = {
3046
3103
  if (tag !== 32) {
3047
3104
  break;
3048
3105
  }
3049
- message.index = longToNumber(reader.uint64());
3106
+ message.index = reader.uint64();
3050
3107
  continue;
3051
3108
  }
3052
3109
  case 5: {
@@ -3066,21 +3123,21 @@ export const SubscribeUpdateTransactionStatus = {
3066
3123
  },
3067
3124
  fromJSON(object) {
3068
3125
  return {
3069
- slot: isSet(object.slot) ? globalThis.Number(object.slot) : 0,
3126
+ slot: isSet(object.slot) ? BigInt(object.slot) : 0n,
3070
3127
  signature: isSet(object.signature) ? bytesFromBase64(object.signature) : new Uint8Array(0),
3071
3128
  isVote: isSet(object.isVote)
3072
3129
  ? globalThis.Boolean(object.isVote)
3073
3130
  : isSet(object.is_vote)
3074
3131
  ? globalThis.Boolean(object.is_vote)
3075
3132
  : false,
3076
- index: isSet(object.index) ? globalThis.Number(object.index) : 0,
3133
+ index: isSet(object.index) ? BigInt(object.index) : 0n,
3077
3134
  err: isSet(object.err) ? TransactionError.fromJSON(object.err) : undefined,
3078
3135
  };
3079
3136
  },
3080
3137
  toJSON(message) {
3081
3138
  const obj = {};
3082
- if (message.slot !== 0) {
3083
- obj.slot = Math.round(message.slot);
3139
+ if (message.slot !== 0n) {
3140
+ obj.slot = message.slot.toString();
3084
3141
  }
3085
3142
  if (message.signature.length !== 0) {
3086
3143
  obj.signature = base64FromBytes(message.signature);
@@ -3088,8 +3145,8 @@ export const SubscribeUpdateTransactionStatus = {
3088
3145
  if (message.isVote !== false) {
3089
3146
  obj.isVote = message.isVote;
3090
3147
  }
3091
- if (message.index !== 0) {
3092
- obj.index = Math.round(message.index);
3148
+ if (message.index !== 0n) {
3149
+ obj.index = message.index.toString();
3093
3150
  }
3094
3151
  if (message.err !== undefined) {
3095
3152
  obj.err = TransactionError.toJSON(message.err);
@@ -3101,10 +3158,10 @@ export const SubscribeUpdateTransactionStatus = {
3101
3158
  },
3102
3159
  fromPartial(object) {
3103
3160
  const message = createBaseSubscribeUpdateTransactionStatus();
3104
- message.slot = object.slot ?? 0;
3161
+ message.slot = object.slot ?? 0n;
3105
3162
  message.signature = object.signature ?? new Uint8Array(0);
3106
3163
  message.isVote = object.isVote ?? false;
3107
- message.index = object.index ?? 0;
3164
+ message.index = object.index ?? 0n;
3108
3165
  message.err = (object.err !== undefined && object.err !== null)
3109
3166
  ? TransactionError.fromPartial(object.err)
3110
3167
  : undefined;
@@ -3113,24 +3170,27 @@ export const SubscribeUpdateTransactionStatus = {
3113
3170
  };
3114
3171
  function createBaseSubscribeUpdateBlock() {
3115
3172
  return {
3116
- slot: 0,
3173
+ slot: 0n,
3117
3174
  blockhash: "",
3118
3175
  rewards: undefined,
3119
3176
  blockTime: undefined,
3120
3177
  blockHeight: undefined,
3121
- parentSlot: 0,
3178
+ parentSlot: 0n,
3122
3179
  parentBlockhash: "",
3123
- executedTransactionCount: 0,
3180
+ executedTransactionCount: 0n,
3124
3181
  transactions: [],
3125
- updatedAccountCount: 0,
3182
+ updatedAccountCount: 0n,
3126
3183
  accounts: [],
3127
- entriesCount: 0,
3184
+ entriesCount: 0n,
3128
3185
  entries: [],
3129
3186
  };
3130
3187
  }
3131
3188
  export const SubscribeUpdateBlock = {
3132
3189
  encode(message, writer = new BinaryWriter()) {
3133
- if (message.slot !== 0) {
3190
+ if (message.slot !== 0n) {
3191
+ if (BigInt.asUintN(64, message.slot) !== message.slot) {
3192
+ throw new globalThis.Error("value provided for field message.slot of type uint64 too large");
3193
+ }
3134
3194
  writer.uint32(8).uint64(message.slot);
3135
3195
  }
3136
3196
  if (message.blockhash !== "") {
@@ -3145,25 +3205,37 @@ export const SubscribeUpdateBlock = {
3145
3205
  if (message.blockHeight !== undefined) {
3146
3206
  BlockHeight.encode(message.blockHeight, writer.uint32(42).fork()).join();
3147
3207
  }
3148
- if (message.parentSlot !== 0) {
3208
+ if (message.parentSlot !== 0n) {
3209
+ if (BigInt.asUintN(64, message.parentSlot) !== message.parentSlot) {
3210
+ throw new globalThis.Error("value provided for field message.parentSlot of type uint64 too large");
3211
+ }
3149
3212
  writer.uint32(56).uint64(message.parentSlot);
3150
3213
  }
3151
3214
  if (message.parentBlockhash !== "") {
3152
3215
  writer.uint32(66).string(message.parentBlockhash);
3153
3216
  }
3154
- if (message.executedTransactionCount !== 0) {
3217
+ if (message.executedTransactionCount !== 0n) {
3218
+ if (BigInt.asUintN(64, message.executedTransactionCount) !== message.executedTransactionCount) {
3219
+ throw new globalThis.Error("value provided for field message.executedTransactionCount of type uint64 too large");
3220
+ }
3155
3221
  writer.uint32(72).uint64(message.executedTransactionCount);
3156
3222
  }
3157
3223
  for (const v of message.transactions) {
3158
3224
  SubscribeUpdateTransactionInfo.encode(v, writer.uint32(50).fork()).join();
3159
3225
  }
3160
- if (message.updatedAccountCount !== 0) {
3226
+ if (message.updatedAccountCount !== 0n) {
3227
+ if (BigInt.asUintN(64, message.updatedAccountCount) !== message.updatedAccountCount) {
3228
+ throw new globalThis.Error("value provided for field message.updatedAccountCount of type uint64 too large");
3229
+ }
3161
3230
  writer.uint32(80).uint64(message.updatedAccountCount);
3162
3231
  }
3163
3232
  for (const v of message.accounts) {
3164
3233
  SubscribeUpdateAccountInfo.encode(v, writer.uint32(90).fork()).join();
3165
3234
  }
3166
- if (message.entriesCount !== 0) {
3235
+ if (message.entriesCount !== 0n) {
3236
+ if (BigInt.asUintN(64, message.entriesCount) !== message.entriesCount) {
3237
+ throw new globalThis.Error("value provided for field message.entriesCount of type uint64 too large");
3238
+ }
3167
3239
  writer.uint32(96).uint64(message.entriesCount);
3168
3240
  }
3169
3241
  for (const v of message.entries) {
@@ -3182,7 +3254,7 @@ export const SubscribeUpdateBlock = {
3182
3254
  if (tag !== 8) {
3183
3255
  break;
3184
3256
  }
3185
- message.slot = longToNumber(reader.uint64());
3257
+ message.slot = reader.uint64();
3186
3258
  continue;
3187
3259
  }
3188
3260
  case 2: {
@@ -3217,7 +3289,7 @@ export const SubscribeUpdateBlock = {
3217
3289
  if (tag !== 56) {
3218
3290
  break;
3219
3291
  }
3220
- message.parentSlot = longToNumber(reader.uint64());
3292
+ message.parentSlot = reader.uint64();
3221
3293
  continue;
3222
3294
  }
3223
3295
  case 8: {
@@ -3231,7 +3303,7 @@ export const SubscribeUpdateBlock = {
3231
3303
  if (tag !== 72) {
3232
3304
  break;
3233
3305
  }
3234
- message.executedTransactionCount = longToNumber(reader.uint64());
3306
+ message.executedTransactionCount = reader.uint64();
3235
3307
  continue;
3236
3308
  }
3237
3309
  case 6: {
@@ -3245,7 +3317,7 @@ export const SubscribeUpdateBlock = {
3245
3317
  if (tag !== 80) {
3246
3318
  break;
3247
3319
  }
3248
- message.updatedAccountCount = longToNumber(reader.uint64());
3320
+ message.updatedAccountCount = reader.uint64();
3249
3321
  continue;
3250
3322
  }
3251
3323
  case 11: {
@@ -3259,7 +3331,7 @@ export const SubscribeUpdateBlock = {
3259
3331
  if (tag !== 96) {
3260
3332
  break;
3261
3333
  }
3262
- message.entriesCount = longToNumber(reader.uint64());
3334
+ message.entriesCount = reader.uint64();
3263
3335
  continue;
3264
3336
  }
3265
3337
  case 13: {
@@ -3279,7 +3351,7 @@ export const SubscribeUpdateBlock = {
3279
3351
  },
3280
3352
  fromJSON(object) {
3281
3353
  return {
3282
- slot: isSet(object.slot) ? globalThis.Number(object.slot) : 0,
3354
+ slot: isSet(object.slot) ? BigInt(object.slot) : 0n,
3283
3355
  blockhash: isSet(object.blockhash) ? globalThis.String(object.blockhash) : "",
3284
3356
  rewards: isSet(object.rewards) ? Rewards.fromJSON(object.rewards) : undefined,
3285
3357
  blockTime: isSet(object.blockTime)
@@ -3293,36 +3365,36 @@ export const SubscribeUpdateBlock = {
3293
3365
  ? BlockHeight.fromJSON(object.block_height)
3294
3366
  : undefined,
3295
3367
  parentSlot: isSet(object.parentSlot)
3296
- ? globalThis.Number(object.parentSlot)
3368
+ ? BigInt(object.parentSlot)
3297
3369
  : isSet(object.parent_slot)
3298
- ? globalThis.Number(object.parent_slot)
3299
- : 0,
3370
+ ? BigInt(object.parent_slot)
3371
+ : 0n,
3300
3372
  parentBlockhash: isSet(object.parentBlockhash)
3301
3373
  ? globalThis.String(object.parentBlockhash)
3302
3374
  : isSet(object.parent_blockhash)
3303
3375
  ? globalThis.String(object.parent_blockhash)
3304
3376
  : "",
3305
3377
  executedTransactionCount: isSet(object.executedTransactionCount)
3306
- ? globalThis.Number(object.executedTransactionCount)
3378
+ ? BigInt(object.executedTransactionCount)
3307
3379
  : isSet(object.executed_transaction_count)
3308
- ? globalThis.Number(object.executed_transaction_count)
3309
- : 0,
3380
+ ? BigInt(object.executed_transaction_count)
3381
+ : 0n,
3310
3382
  transactions: globalThis.Array.isArray(object?.transactions)
3311
3383
  ? object.transactions.map((e) => SubscribeUpdateTransactionInfo.fromJSON(e))
3312
3384
  : [],
3313
3385
  updatedAccountCount: isSet(object.updatedAccountCount)
3314
- ? globalThis.Number(object.updatedAccountCount)
3386
+ ? BigInt(object.updatedAccountCount)
3315
3387
  : isSet(object.updated_account_count)
3316
- ? globalThis.Number(object.updated_account_count)
3317
- : 0,
3388
+ ? BigInt(object.updated_account_count)
3389
+ : 0n,
3318
3390
  accounts: globalThis.Array.isArray(object?.accounts)
3319
3391
  ? object.accounts.map((e) => SubscribeUpdateAccountInfo.fromJSON(e))
3320
3392
  : [],
3321
3393
  entriesCount: isSet(object.entriesCount)
3322
- ? globalThis.Number(object.entriesCount)
3394
+ ? BigInt(object.entriesCount)
3323
3395
  : isSet(object.entries_count)
3324
- ? globalThis.Number(object.entries_count)
3325
- : 0,
3396
+ ? BigInt(object.entries_count)
3397
+ : 0n,
3326
3398
  entries: globalThis.Array.isArray(object?.entries)
3327
3399
  ? object.entries.map((e) => SubscribeUpdateEntry.fromJSON(e))
3328
3400
  : [],
@@ -3330,8 +3402,8 @@ export const SubscribeUpdateBlock = {
3330
3402
  },
3331
3403
  toJSON(message) {
3332
3404
  const obj = {};
3333
- if (message.slot !== 0) {
3334
- obj.slot = Math.round(message.slot);
3405
+ if (message.slot !== 0n) {
3406
+ obj.slot = message.slot.toString();
3335
3407
  }
3336
3408
  if (message.blockhash !== "") {
3337
3409
  obj.blockhash = message.blockhash;
@@ -3345,26 +3417,26 @@ export const SubscribeUpdateBlock = {
3345
3417
  if (message.blockHeight !== undefined) {
3346
3418
  obj.blockHeight = BlockHeight.toJSON(message.blockHeight);
3347
3419
  }
3348
- if (message.parentSlot !== 0) {
3349
- obj.parentSlot = Math.round(message.parentSlot);
3420
+ if (message.parentSlot !== 0n) {
3421
+ obj.parentSlot = message.parentSlot.toString();
3350
3422
  }
3351
3423
  if (message.parentBlockhash !== "") {
3352
3424
  obj.parentBlockhash = message.parentBlockhash;
3353
3425
  }
3354
- if (message.executedTransactionCount !== 0) {
3355
- obj.executedTransactionCount = Math.round(message.executedTransactionCount);
3426
+ if (message.executedTransactionCount !== 0n) {
3427
+ obj.executedTransactionCount = message.executedTransactionCount.toString();
3356
3428
  }
3357
3429
  if (message.transactions?.length) {
3358
3430
  obj.transactions = message.transactions.map((e) => SubscribeUpdateTransactionInfo.toJSON(e));
3359
3431
  }
3360
- if (message.updatedAccountCount !== 0) {
3361
- obj.updatedAccountCount = Math.round(message.updatedAccountCount);
3432
+ if (message.updatedAccountCount !== 0n) {
3433
+ obj.updatedAccountCount = message.updatedAccountCount.toString();
3362
3434
  }
3363
3435
  if (message.accounts?.length) {
3364
3436
  obj.accounts = message.accounts.map((e) => SubscribeUpdateAccountInfo.toJSON(e));
3365
3437
  }
3366
- if (message.entriesCount !== 0) {
3367
- obj.entriesCount = Math.round(message.entriesCount);
3438
+ if (message.entriesCount !== 0n) {
3439
+ obj.entriesCount = message.entriesCount.toString();
3368
3440
  }
3369
3441
  if (message.entries?.length) {
3370
3442
  obj.entries = message.entries.map((e) => SubscribeUpdateEntry.toJSON(e));
@@ -3376,7 +3448,7 @@ export const SubscribeUpdateBlock = {
3376
3448
  },
3377
3449
  fromPartial(object) {
3378
3450
  const message = createBaseSubscribeUpdateBlock();
3379
- message.slot = object.slot ?? 0;
3451
+ message.slot = object.slot ?? 0n;
3380
3452
  message.blockhash = object.blockhash ?? "";
3381
3453
  message.rewards = (object.rewards !== undefined && object.rewards !== null)
3382
3454
  ? Rewards.fromPartial(object.rewards)
@@ -3387,33 +3459,36 @@ export const SubscribeUpdateBlock = {
3387
3459
  message.blockHeight = (object.blockHeight !== undefined && object.blockHeight !== null)
3388
3460
  ? BlockHeight.fromPartial(object.blockHeight)
3389
3461
  : undefined;
3390
- message.parentSlot = object.parentSlot ?? 0;
3462
+ message.parentSlot = object.parentSlot ?? 0n;
3391
3463
  message.parentBlockhash = object.parentBlockhash ?? "";
3392
- message.executedTransactionCount = object.executedTransactionCount ?? 0;
3464
+ message.executedTransactionCount = object.executedTransactionCount ?? 0n;
3393
3465
  message.transactions = object.transactions?.map((e) => SubscribeUpdateTransactionInfo.fromPartial(e)) || [];
3394
- message.updatedAccountCount = object.updatedAccountCount ?? 0;
3466
+ message.updatedAccountCount = object.updatedAccountCount ?? 0n;
3395
3467
  message.accounts = object.accounts?.map((e) => SubscribeUpdateAccountInfo.fromPartial(e)) || [];
3396
- message.entriesCount = object.entriesCount ?? 0;
3468
+ message.entriesCount = object.entriesCount ?? 0n;
3397
3469
  message.entries = object.entries?.map((e) => SubscribeUpdateEntry.fromPartial(e)) || [];
3398
3470
  return message;
3399
3471
  },
3400
3472
  };
3401
3473
  function createBaseSubscribeUpdateBlockMeta() {
3402
3474
  return {
3403
- slot: 0,
3475
+ slot: 0n,
3404
3476
  blockhash: "",
3405
3477
  rewards: undefined,
3406
3478
  blockTime: undefined,
3407
3479
  blockHeight: undefined,
3408
- parentSlot: 0,
3480
+ parentSlot: 0n,
3409
3481
  parentBlockhash: "",
3410
- executedTransactionCount: 0,
3411
- entriesCount: 0,
3482
+ executedTransactionCount: 0n,
3483
+ entriesCount: 0n,
3412
3484
  };
3413
3485
  }
3414
3486
  export const SubscribeUpdateBlockMeta = {
3415
3487
  encode(message, writer = new BinaryWriter()) {
3416
- if (message.slot !== 0) {
3488
+ if (message.slot !== 0n) {
3489
+ if (BigInt.asUintN(64, message.slot) !== message.slot) {
3490
+ throw new globalThis.Error("value provided for field message.slot of type uint64 too large");
3491
+ }
3417
3492
  writer.uint32(8).uint64(message.slot);
3418
3493
  }
3419
3494
  if (message.blockhash !== "") {
@@ -3428,16 +3503,25 @@ export const SubscribeUpdateBlockMeta = {
3428
3503
  if (message.blockHeight !== undefined) {
3429
3504
  BlockHeight.encode(message.blockHeight, writer.uint32(42).fork()).join();
3430
3505
  }
3431
- if (message.parentSlot !== 0) {
3506
+ if (message.parentSlot !== 0n) {
3507
+ if (BigInt.asUintN(64, message.parentSlot) !== message.parentSlot) {
3508
+ throw new globalThis.Error("value provided for field message.parentSlot of type uint64 too large");
3509
+ }
3432
3510
  writer.uint32(48).uint64(message.parentSlot);
3433
3511
  }
3434
3512
  if (message.parentBlockhash !== "") {
3435
3513
  writer.uint32(58).string(message.parentBlockhash);
3436
3514
  }
3437
- if (message.executedTransactionCount !== 0) {
3515
+ if (message.executedTransactionCount !== 0n) {
3516
+ if (BigInt.asUintN(64, message.executedTransactionCount) !== message.executedTransactionCount) {
3517
+ throw new globalThis.Error("value provided for field message.executedTransactionCount of type uint64 too large");
3518
+ }
3438
3519
  writer.uint32(64).uint64(message.executedTransactionCount);
3439
3520
  }
3440
- if (message.entriesCount !== 0) {
3521
+ if (message.entriesCount !== 0n) {
3522
+ if (BigInt.asUintN(64, message.entriesCount) !== message.entriesCount) {
3523
+ throw new globalThis.Error("value provided for field message.entriesCount of type uint64 too large");
3524
+ }
3441
3525
  writer.uint32(72).uint64(message.entriesCount);
3442
3526
  }
3443
3527
  return writer;
@@ -3453,7 +3537,7 @@ export const SubscribeUpdateBlockMeta = {
3453
3537
  if (tag !== 8) {
3454
3538
  break;
3455
3539
  }
3456
- message.slot = longToNumber(reader.uint64());
3540
+ message.slot = reader.uint64();
3457
3541
  continue;
3458
3542
  }
3459
3543
  case 2: {
@@ -3488,7 +3572,7 @@ export const SubscribeUpdateBlockMeta = {
3488
3572
  if (tag !== 48) {
3489
3573
  break;
3490
3574
  }
3491
- message.parentSlot = longToNumber(reader.uint64());
3575
+ message.parentSlot = reader.uint64();
3492
3576
  continue;
3493
3577
  }
3494
3578
  case 7: {
@@ -3502,14 +3586,14 @@ export const SubscribeUpdateBlockMeta = {
3502
3586
  if (tag !== 64) {
3503
3587
  break;
3504
3588
  }
3505
- message.executedTransactionCount = longToNumber(reader.uint64());
3589
+ message.executedTransactionCount = reader.uint64();
3506
3590
  continue;
3507
3591
  }
3508
3592
  case 9: {
3509
3593
  if (tag !== 72) {
3510
3594
  break;
3511
3595
  }
3512
- message.entriesCount = longToNumber(reader.uint64());
3596
+ message.entriesCount = reader.uint64();
3513
3597
  continue;
3514
3598
  }
3515
3599
  }
@@ -3522,7 +3606,7 @@ export const SubscribeUpdateBlockMeta = {
3522
3606
  },
3523
3607
  fromJSON(object) {
3524
3608
  return {
3525
- slot: isSet(object.slot) ? globalThis.Number(object.slot) : 0,
3609
+ slot: isSet(object.slot) ? BigInt(object.slot) : 0n,
3526
3610
  blockhash: isSet(object.blockhash) ? globalThis.String(object.blockhash) : "",
3527
3611
  rewards: isSet(object.rewards) ? Rewards.fromJSON(object.rewards) : undefined,
3528
3612
  blockTime: isSet(object.blockTime)
@@ -3536,31 +3620,31 @@ export const SubscribeUpdateBlockMeta = {
3536
3620
  ? BlockHeight.fromJSON(object.block_height)
3537
3621
  : undefined,
3538
3622
  parentSlot: isSet(object.parentSlot)
3539
- ? globalThis.Number(object.parentSlot)
3623
+ ? BigInt(object.parentSlot)
3540
3624
  : isSet(object.parent_slot)
3541
- ? globalThis.Number(object.parent_slot)
3542
- : 0,
3625
+ ? BigInt(object.parent_slot)
3626
+ : 0n,
3543
3627
  parentBlockhash: isSet(object.parentBlockhash)
3544
3628
  ? globalThis.String(object.parentBlockhash)
3545
3629
  : isSet(object.parent_blockhash)
3546
3630
  ? globalThis.String(object.parent_blockhash)
3547
3631
  : "",
3548
3632
  executedTransactionCount: isSet(object.executedTransactionCount)
3549
- ? globalThis.Number(object.executedTransactionCount)
3633
+ ? BigInt(object.executedTransactionCount)
3550
3634
  : isSet(object.executed_transaction_count)
3551
- ? globalThis.Number(object.executed_transaction_count)
3552
- : 0,
3635
+ ? BigInt(object.executed_transaction_count)
3636
+ : 0n,
3553
3637
  entriesCount: isSet(object.entriesCount)
3554
- ? globalThis.Number(object.entriesCount)
3638
+ ? BigInt(object.entriesCount)
3555
3639
  : isSet(object.entries_count)
3556
- ? globalThis.Number(object.entries_count)
3557
- : 0,
3640
+ ? BigInt(object.entries_count)
3641
+ : 0n,
3558
3642
  };
3559
3643
  },
3560
3644
  toJSON(message) {
3561
3645
  const obj = {};
3562
- if (message.slot !== 0) {
3563
- obj.slot = Math.round(message.slot);
3646
+ if (message.slot !== 0n) {
3647
+ obj.slot = message.slot.toString();
3564
3648
  }
3565
3649
  if (message.blockhash !== "") {
3566
3650
  obj.blockhash = message.blockhash;
@@ -3574,17 +3658,17 @@ export const SubscribeUpdateBlockMeta = {
3574
3658
  if (message.blockHeight !== undefined) {
3575
3659
  obj.blockHeight = BlockHeight.toJSON(message.blockHeight);
3576
3660
  }
3577
- if (message.parentSlot !== 0) {
3578
- obj.parentSlot = Math.round(message.parentSlot);
3661
+ if (message.parentSlot !== 0n) {
3662
+ obj.parentSlot = message.parentSlot.toString();
3579
3663
  }
3580
3664
  if (message.parentBlockhash !== "") {
3581
3665
  obj.parentBlockhash = message.parentBlockhash;
3582
3666
  }
3583
- if (message.executedTransactionCount !== 0) {
3584
- obj.executedTransactionCount = Math.round(message.executedTransactionCount);
3667
+ if (message.executedTransactionCount !== 0n) {
3668
+ obj.executedTransactionCount = message.executedTransactionCount.toString();
3585
3669
  }
3586
- if (message.entriesCount !== 0) {
3587
- obj.entriesCount = Math.round(message.entriesCount);
3670
+ if (message.entriesCount !== 0n) {
3671
+ obj.entriesCount = message.entriesCount.toString();
3588
3672
  }
3589
3673
  return obj;
3590
3674
  },
@@ -3593,7 +3677,7 @@ export const SubscribeUpdateBlockMeta = {
3593
3677
  },
3594
3678
  fromPartial(object) {
3595
3679
  const message = createBaseSubscribeUpdateBlockMeta();
3596
- message.slot = object.slot ?? 0;
3680
+ message.slot = object.slot ?? 0n;
3597
3681
  message.blockhash = object.blockhash ?? "";
3598
3682
  message.rewards = (object.rewards !== undefined && object.rewards !== null)
3599
3683
  ? Rewards.fromPartial(object.rewards)
@@ -3604,41 +3688,56 @@ export const SubscribeUpdateBlockMeta = {
3604
3688
  message.blockHeight = (object.blockHeight !== undefined && object.blockHeight !== null)
3605
3689
  ? BlockHeight.fromPartial(object.blockHeight)
3606
3690
  : undefined;
3607
- message.parentSlot = object.parentSlot ?? 0;
3691
+ message.parentSlot = object.parentSlot ?? 0n;
3608
3692
  message.parentBlockhash = object.parentBlockhash ?? "";
3609
- message.executedTransactionCount = object.executedTransactionCount ?? 0;
3610
- message.entriesCount = object.entriesCount ?? 0;
3693
+ message.executedTransactionCount = object.executedTransactionCount ?? 0n;
3694
+ message.entriesCount = object.entriesCount ?? 0n;
3611
3695
  return message;
3612
3696
  },
3613
3697
  };
3614
3698
  function createBaseSubscribeUpdateEntry() {
3615
3699
  return {
3616
- slot: 0,
3617
- index: 0,
3618
- numHashes: 0,
3700
+ slot: 0n,
3701
+ index: 0n,
3702
+ numHashes: 0n,
3619
3703
  hash: new Uint8Array(0),
3620
- executedTransactionCount: 0,
3621
- startingTransactionIndex: 0,
3704
+ executedTransactionCount: 0n,
3705
+ startingTransactionIndex: 0n,
3622
3706
  };
3623
3707
  }
3624
3708
  export const SubscribeUpdateEntry = {
3625
3709
  encode(message, writer = new BinaryWriter()) {
3626
- if (message.slot !== 0) {
3710
+ if (message.slot !== 0n) {
3711
+ if (BigInt.asUintN(64, message.slot) !== message.slot) {
3712
+ throw new globalThis.Error("value provided for field message.slot of type uint64 too large");
3713
+ }
3627
3714
  writer.uint32(8).uint64(message.slot);
3628
3715
  }
3629
- if (message.index !== 0) {
3716
+ if (message.index !== 0n) {
3717
+ if (BigInt.asUintN(64, message.index) !== message.index) {
3718
+ throw new globalThis.Error("value provided for field message.index of type uint64 too large");
3719
+ }
3630
3720
  writer.uint32(16).uint64(message.index);
3631
3721
  }
3632
- if (message.numHashes !== 0) {
3722
+ if (message.numHashes !== 0n) {
3723
+ if (BigInt.asUintN(64, message.numHashes) !== message.numHashes) {
3724
+ throw new globalThis.Error("value provided for field message.numHashes of type uint64 too large");
3725
+ }
3633
3726
  writer.uint32(24).uint64(message.numHashes);
3634
3727
  }
3635
3728
  if (message.hash.length !== 0) {
3636
3729
  writer.uint32(34).bytes(message.hash);
3637
3730
  }
3638
- if (message.executedTransactionCount !== 0) {
3731
+ if (message.executedTransactionCount !== 0n) {
3732
+ if (BigInt.asUintN(64, message.executedTransactionCount) !== message.executedTransactionCount) {
3733
+ throw new globalThis.Error("value provided for field message.executedTransactionCount of type uint64 too large");
3734
+ }
3639
3735
  writer.uint32(40).uint64(message.executedTransactionCount);
3640
3736
  }
3641
- if (message.startingTransactionIndex !== 0) {
3737
+ if (message.startingTransactionIndex !== 0n) {
3738
+ if (BigInt.asUintN(64, message.startingTransactionIndex) !== message.startingTransactionIndex) {
3739
+ throw new globalThis.Error("value provided for field message.startingTransactionIndex of type uint64 too large");
3740
+ }
3642
3741
  writer.uint32(48).uint64(message.startingTransactionIndex);
3643
3742
  }
3644
3743
  return writer;
@@ -3654,21 +3753,21 @@ export const SubscribeUpdateEntry = {
3654
3753
  if (tag !== 8) {
3655
3754
  break;
3656
3755
  }
3657
- message.slot = longToNumber(reader.uint64());
3756
+ message.slot = reader.uint64();
3658
3757
  continue;
3659
3758
  }
3660
3759
  case 2: {
3661
3760
  if (tag !== 16) {
3662
3761
  break;
3663
3762
  }
3664
- message.index = longToNumber(reader.uint64());
3763
+ message.index = reader.uint64();
3665
3764
  continue;
3666
3765
  }
3667
3766
  case 3: {
3668
3767
  if (tag !== 24) {
3669
3768
  break;
3670
3769
  }
3671
- message.numHashes = longToNumber(reader.uint64());
3770
+ message.numHashes = reader.uint64();
3672
3771
  continue;
3673
3772
  }
3674
3773
  case 4: {
@@ -3682,14 +3781,14 @@ export const SubscribeUpdateEntry = {
3682
3781
  if (tag !== 40) {
3683
3782
  break;
3684
3783
  }
3685
- message.executedTransactionCount = longToNumber(reader.uint64());
3784
+ message.executedTransactionCount = reader.uint64();
3686
3785
  continue;
3687
3786
  }
3688
3787
  case 6: {
3689
3788
  if (tag !== 48) {
3690
3789
  break;
3691
3790
  }
3692
- message.startingTransactionIndex = longToNumber(reader.uint64());
3791
+ message.startingTransactionIndex = reader.uint64();
3693
3792
  continue;
3694
3793
  }
3695
3794
  }
@@ -3702,45 +3801,45 @@ export const SubscribeUpdateEntry = {
3702
3801
  },
3703
3802
  fromJSON(object) {
3704
3803
  return {
3705
- slot: isSet(object.slot) ? globalThis.Number(object.slot) : 0,
3706
- index: isSet(object.index) ? globalThis.Number(object.index) : 0,
3804
+ slot: isSet(object.slot) ? BigInt(object.slot) : 0n,
3805
+ index: isSet(object.index) ? BigInt(object.index) : 0n,
3707
3806
  numHashes: isSet(object.numHashes)
3708
- ? globalThis.Number(object.numHashes)
3807
+ ? BigInt(object.numHashes)
3709
3808
  : isSet(object.num_hashes)
3710
- ? globalThis.Number(object.num_hashes)
3711
- : 0,
3809
+ ? BigInt(object.num_hashes)
3810
+ : 0n,
3712
3811
  hash: isSet(object.hash) ? bytesFromBase64(object.hash) : new Uint8Array(0),
3713
3812
  executedTransactionCount: isSet(object.executedTransactionCount)
3714
- ? globalThis.Number(object.executedTransactionCount)
3813
+ ? BigInt(object.executedTransactionCount)
3715
3814
  : isSet(object.executed_transaction_count)
3716
- ? globalThis.Number(object.executed_transaction_count)
3717
- : 0,
3815
+ ? BigInt(object.executed_transaction_count)
3816
+ : 0n,
3718
3817
  startingTransactionIndex: isSet(object.startingTransactionIndex)
3719
- ? globalThis.Number(object.startingTransactionIndex)
3818
+ ? BigInt(object.startingTransactionIndex)
3720
3819
  : isSet(object.starting_transaction_index)
3721
- ? globalThis.Number(object.starting_transaction_index)
3722
- : 0,
3820
+ ? BigInt(object.starting_transaction_index)
3821
+ : 0n,
3723
3822
  };
3724
3823
  },
3725
3824
  toJSON(message) {
3726
3825
  const obj = {};
3727
- if (message.slot !== 0) {
3728
- obj.slot = Math.round(message.slot);
3826
+ if (message.slot !== 0n) {
3827
+ obj.slot = message.slot.toString();
3729
3828
  }
3730
- if (message.index !== 0) {
3731
- obj.index = Math.round(message.index);
3829
+ if (message.index !== 0n) {
3830
+ obj.index = message.index.toString();
3732
3831
  }
3733
- if (message.numHashes !== 0) {
3734
- obj.numHashes = Math.round(message.numHashes);
3832
+ if (message.numHashes !== 0n) {
3833
+ obj.numHashes = message.numHashes.toString();
3735
3834
  }
3736
3835
  if (message.hash.length !== 0) {
3737
3836
  obj.hash = base64FromBytes(message.hash);
3738
3837
  }
3739
- if (message.executedTransactionCount !== 0) {
3740
- obj.executedTransactionCount = Math.round(message.executedTransactionCount);
3838
+ if (message.executedTransactionCount !== 0n) {
3839
+ obj.executedTransactionCount = message.executedTransactionCount.toString();
3741
3840
  }
3742
- if (message.startingTransactionIndex !== 0) {
3743
- obj.startingTransactionIndex = Math.round(message.startingTransactionIndex);
3841
+ if (message.startingTransactionIndex !== 0n) {
3842
+ obj.startingTransactionIndex = message.startingTransactionIndex.toString();
3744
3843
  }
3745
3844
  return obj;
3746
3845
  },
@@ -3749,24 +3848,27 @@ export const SubscribeUpdateEntry = {
3749
3848
  },
3750
3849
  fromPartial(object) {
3751
3850
  const message = createBaseSubscribeUpdateEntry();
3752
- message.slot = object.slot ?? 0;
3753
- message.index = object.index ?? 0;
3754
- message.numHashes = object.numHashes ?? 0;
3851
+ message.slot = object.slot ?? 0n;
3852
+ message.index = object.index ?? 0n;
3853
+ message.numHashes = object.numHashes ?? 0n;
3755
3854
  message.hash = object.hash ?? new Uint8Array(0);
3756
- message.executedTransactionCount = object.executedTransactionCount ?? 0;
3757
- message.startingTransactionIndex = object.startingTransactionIndex ?? 0;
3855
+ message.executedTransactionCount = object.executedTransactionCount ?? 0n;
3856
+ message.startingTransactionIndex = object.startingTransactionIndex ?? 0n;
3758
3857
  return message;
3759
3858
  },
3760
3859
  };
3761
3860
  function createBaseSubscribeUpdateDeshredTransaction() {
3762
- return { transaction: undefined, slot: 0 };
3861
+ return { transaction: undefined, slot: 0n };
3763
3862
  }
3764
3863
  export const SubscribeUpdateDeshredTransaction = {
3765
3864
  encode(message, writer = new BinaryWriter()) {
3766
3865
  if (message.transaction !== undefined) {
3767
3866
  SubscribeUpdateDeshredTransactionInfo.encode(message.transaction, writer.uint32(10).fork()).join();
3768
3867
  }
3769
- if (message.slot !== 0) {
3868
+ if (message.slot !== 0n) {
3869
+ if (BigInt.asUintN(64, message.slot) !== message.slot) {
3870
+ throw new globalThis.Error("value provided for field message.slot of type uint64 too large");
3871
+ }
3770
3872
  writer.uint32(16).uint64(message.slot);
3771
3873
  }
3772
3874
  return writer;
@@ -3789,7 +3891,7 @@ export const SubscribeUpdateDeshredTransaction = {
3789
3891
  if (tag !== 16) {
3790
3892
  break;
3791
3893
  }
3792
- message.slot = longToNumber(reader.uint64());
3894
+ message.slot = reader.uint64();
3793
3895
  continue;
3794
3896
  }
3795
3897
  }
@@ -3805,7 +3907,7 @@ export const SubscribeUpdateDeshredTransaction = {
3805
3907
  transaction: isSet(object.transaction)
3806
3908
  ? SubscribeUpdateDeshredTransactionInfo.fromJSON(object.transaction)
3807
3909
  : undefined,
3808
- slot: isSet(object.slot) ? globalThis.Number(object.slot) : 0,
3910
+ slot: isSet(object.slot) ? BigInt(object.slot) : 0n,
3809
3911
  };
3810
3912
  },
3811
3913
  toJSON(message) {
@@ -3813,8 +3915,8 @@ export const SubscribeUpdateDeshredTransaction = {
3813
3915
  if (message.transaction !== undefined) {
3814
3916
  obj.transaction = SubscribeUpdateDeshredTransactionInfo.toJSON(message.transaction);
3815
3917
  }
3816
- if (message.slot !== 0) {
3817
- obj.slot = Math.round(message.slot);
3918
+ if (message.slot !== 0n) {
3919
+ obj.slot = message.slot.toString();
3818
3920
  }
3819
3921
  return obj;
3820
3922
  },
@@ -3826,7 +3928,7 @@ export const SubscribeUpdateDeshredTransaction = {
3826
3928
  message.transaction = (object.transaction !== undefined && object.transaction !== null)
3827
3929
  ? SubscribeUpdateDeshredTransactionInfo.fromPartial(object.transaction)
3828
3930
  : undefined;
3829
- message.slot = object.slot ?? 0;
3931
+ message.slot = object.slot ?? 0n;
3830
3932
  return message;
3831
3933
  },
3832
3934
  };
@@ -4221,6 +4323,9 @@ function createBaseSubscribeReplayInfoResponse() {
4221
4323
  export const SubscribeReplayInfoResponse = {
4222
4324
  encode(message, writer = new BinaryWriter()) {
4223
4325
  if (message.firstAvailable !== undefined) {
4326
+ if (BigInt.asUintN(64, message.firstAvailable) !== message.firstAvailable) {
4327
+ throw new globalThis.Error("value provided for field message.firstAvailable of type uint64 too large");
4328
+ }
4224
4329
  writer.uint32(8).uint64(message.firstAvailable);
4225
4330
  }
4226
4331
  return writer;
@@ -4236,7 +4341,7 @@ export const SubscribeReplayInfoResponse = {
4236
4341
  if (tag !== 8) {
4237
4342
  break;
4238
4343
  }
4239
- message.firstAvailable = longToNumber(reader.uint64());
4344
+ message.firstAvailable = reader.uint64();
4240
4345
  continue;
4241
4346
  }
4242
4347
  }
@@ -4250,16 +4355,16 @@ export const SubscribeReplayInfoResponse = {
4250
4355
  fromJSON(object) {
4251
4356
  return {
4252
4357
  firstAvailable: isSet(object.firstAvailable)
4253
- ? globalThis.Number(object.firstAvailable)
4358
+ ? BigInt(object.firstAvailable)
4254
4359
  : isSet(object.first_available)
4255
- ? globalThis.Number(object.first_available)
4360
+ ? BigInt(object.first_available)
4256
4361
  : undefined,
4257
4362
  };
4258
4363
  },
4259
4364
  toJSON(message) {
4260
4365
  const obj = {};
4261
4366
  if (message.firstAvailable !== undefined) {
4262
- obj.firstAvailable = Math.round(message.firstAvailable);
4367
+ obj.firstAvailable = message.firstAvailable.toString();
4263
4368
  }
4264
4369
  return obj;
4265
4370
  },
@@ -4426,17 +4531,23 @@ export const GetLatestBlockhashRequest = {
4426
4531
  },
4427
4532
  };
4428
4533
  function createBaseGetLatestBlockhashResponse() {
4429
- return { slot: 0, blockhash: "", lastValidBlockHeight: 0 };
4534
+ return { slot: 0n, blockhash: "", lastValidBlockHeight: 0n };
4430
4535
  }
4431
4536
  export const GetLatestBlockhashResponse = {
4432
4537
  encode(message, writer = new BinaryWriter()) {
4433
- if (message.slot !== 0) {
4538
+ if (message.slot !== 0n) {
4539
+ if (BigInt.asUintN(64, message.slot) !== message.slot) {
4540
+ throw new globalThis.Error("value provided for field message.slot of type uint64 too large");
4541
+ }
4434
4542
  writer.uint32(8).uint64(message.slot);
4435
4543
  }
4436
4544
  if (message.blockhash !== "") {
4437
4545
  writer.uint32(18).string(message.blockhash);
4438
4546
  }
4439
- if (message.lastValidBlockHeight !== 0) {
4547
+ if (message.lastValidBlockHeight !== 0n) {
4548
+ if (BigInt.asUintN(64, message.lastValidBlockHeight) !== message.lastValidBlockHeight) {
4549
+ throw new globalThis.Error("value provided for field message.lastValidBlockHeight of type uint64 too large");
4550
+ }
4440
4551
  writer.uint32(24).uint64(message.lastValidBlockHeight);
4441
4552
  }
4442
4553
  return writer;
@@ -4452,7 +4563,7 @@ export const GetLatestBlockhashResponse = {
4452
4563
  if (tag !== 8) {
4453
4564
  break;
4454
4565
  }
4455
- message.slot = longToNumber(reader.uint64());
4566
+ message.slot = reader.uint64();
4456
4567
  continue;
4457
4568
  }
4458
4569
  case 2: {
@@ -4466,7 +4577,7 @@ export const GetLatestBlockhashResponse = {
4466
4577
  if (tag !== 24) {
4467
4578
  break;
4468
4579
  }
4469
- message.lastValidBlockHeight = longToNumber(reader.uint64());
4580
+ message.lastValidBlockHeight = reader.uint64();
4470
4581
  continue;
4471
4582
  }
4472
4583
  }
@@ -4479,25 +4590,25 @@ export const GetLatestBlockhashResponse = {
4479
4590
  },
4480
4591
  fromJSON(object) {
4481
4592
  return {
4482
- slot: isSet(object.slot) ? globalThis.Number(object.slot) : 0,
4593
+ slot: isSet(object.slot) ? BigInt(object.slot) : 0n,
4483
4594
  blockhash: isSet(object.blockhash) ? globalThis.String(object.blockhash) : "",
4484
4595
  lastValidBlockHeight: isSet(object.lastValidBlockHeight)
4485
- ? globalThis.Number(object.lastValidBlockHeight)
4596
+ ? BigInt(object.lastValidBlockHeight)
4486
4597
  : isSet(object.last_valid_block_height)
4487
- ? globalThis.Number(object.last_valid_block_height)
4488
- : 0,
4598
+ ? BigInt(object.last_valid_block_height)
4599
+ : 0n,
4489
4600
  };
4490
4601
  },
4491
4602
  toJSON(message) {
4492
4603
  const obj = {};
4493
- if (message.slot !== 0) {
4494
- obj.slot = Math.round(message.slot);
4604
+ if (message.slot !== 0n) {
4605
+ obj.slot = message.slot.toString();
4495
4606
  }
4496
4607
  if (message.blockhash !== "") {
4497
4608
  obj.blockhash = message.blockhash;
4498
4609
  }
4499
- if (message.lastValidBlockHeight !== 0) {
4500
- obj.lastValidBlockHeight = Math.round(message.lastValidBlockHeight);
4610
+ if (message.lastValidBlockHeight !== 0n) {
4611
+ obj.lastValidBlockHeight = message.lastValidBlockHeight.toString();
4501
4612
  }
4502
4613
  return obj;
4503
4614
  },
@@ -4506,9 +4617,9 @@ export const GetLatestBlockhashResponse = {
4506
4617
  },
4507
4618
  fromPartial(object) {
4508
4619
  const message = createBaseGetLatestBlockhashResponse();
4509
- message.slot = object.slot ?? 0;
4620
+ message.slot = object.slot ?? 0n;
4510
4621
  message.blockhash = object.blockhash ?? "";
4511
- message.lastValidBlockHeight = object.lastValidBlockHeight ?? 0;
4622
+ message.lastValidBlockHeight = object.lastValidBlockHeight ?? 0n;
4512
4623
  return message;
4513
4624
  },
4514
4625
  };
@@ -4564,11 +4675,14 @@ export const GetBlockHeightRequest = {
4564
4675
  },
4565
4676
  };
4566
4677
  function createBaseGetBlockHeightResponse() {
4567
- return { blockHeight: 0 };
4678
+ return { blockHeight: 0n };
4568
4679
  }
4569
4680
  export const GetBlockHeightResponse = {
4570
4681
  encode(message, writer = new BinaryWriter()) {
4571
- if (message.blockHeight !== 0) {
4682
+ if (message.blockHeight !== 0n) {
4683
+ if (BigInt.asUintN(64, message.blockHeight) !== message.blockHeight) {
4684
+ throw new globalThis.Error("value provided for field message.blockHeight of type uint64 too large");
4685
+ }
4572
4686
  writer.uint32(8).uint64(message.blockHeight);
4573
4687
  }
4574
4688
  return writer;
@@ -4584,7 +4698,7 @@ export const GetBlockHeightResponse = {
4584
4698
  if (tag !== 8) {
4585
4699
  break;
4586
4700
  }
4587
- message.blockHeight = longToNumber(reader.uint64());
4701
+ message.blockHeight = reader.uint64();
4588
4702
  continue;
4589
4703
  }
4590
4704
  }
@@ -4598,16 +4712,16 @@ export const GetBlockHeightResponse = {
4598
4712
  fromJSON(object) {
4599
4713
  return {
4600
4714
  blockHeight: isSet(object.blockHeight)
4601
- ? globalThis.Number(object.blockHeight)
4715
+ ? BigInt(object.blockHeight)
4602
4716
  : isSet(object.block_height)
4603
- ? globalThis.Number(object.block_height)
4604
- : 0,
4717
+ ? BigInt(object.block_height)
4718
+ : 0n,
4605
4719
  };
4606
4720
  },
4607
4721
  toJSON(message) {
4608
4722
  const obj = {};
4609
- if (message.blockHeight !== 0) {
4610
- obj.blockHeight = Math.round(message.blockHeight);
4723
+ if (message.blockHeight !== 0n) {
4724
+ obj.blockHeight = message.blockHeight.toString();
4611
4725
  }
4612
4726
  return obj;
4613
4727
  },
@@ -4616,7 +4730,7 @@ export const GetBlockHeightResponse = {
4616
4730
  },
4617
4731
  fromPartial(object) {
4618
4732
  const message = createBaseGetBlockHeightResponse();
4619
- message.blockHeight = object.blockHeight ?? 0;
4733
+ message.blockHeight = object.blockHeight ?? 0n;
4620
4734
  return message;
4621
4735
  },
4622
4736
  };
@@ -4672,11 +4786,14 @@ export const GetSlotRequest = {
4672
4786
  },
4673
4787
  };
4674
4788
  function createBaseGetSlotResponse() {
4675
- return { slot: 0 };
4789
+ return { slot: 0n };
4676
4790
  }
4677
4791
  export const GetSlotResponse = {
4678
4792
  encode(message, writer = new BinaryWriter()) {
4679
- if (message.slot !== 0) {
4793
+ if (message.slot !== 0n) {
4794
+ if (BigInt.asUintN(64, message.slot) !== message.slot) {
4795
+ throw new globalThis.Error("value provided for field message.slot of type uint64 too large");
4796
+ }
4680
4797
  writer.uint32(8).uint64(message.slot);
4681
4798
  }
4682
4799
  return writer;
@@ -4692,7 +4809,7 @@ export const GetSlotResponse = {
4692
4809
  if (tag !== 8) {
4693
4810
  break;
4694
4811
  }
4695
- message.slot = longToNumber(reader.uint64());
4812
+ message.slot = reader.uint64();
4696
4813
  continue;
4697
4814
  }
4698
4815
  }
@@ -4704,12 +4821,12 @@ export const GetSlotResponse = {
4704
4821
  return message;
4705
4822
  },
4706
4823
  fromJSON(object) {
4707
- return { slot: isSet(object.slot) ? globalThis.Number(object.slot) : 0 };
4824
+ return { slot: isSet(object.slot) ? BigInt(object.slot) : 0n };
4708
4825
  },
4709
4826
  toJSON(message) {
4710
4827
  const obj = {};
4711
- if (message.slot !== 0) {
4712
- obj.slot = Math.round(message.slot);
4828
+ if (message.slot !== 0n) {
4829
+ obj.slot = message.slot.toString();
4713
4830
  }
4714
4831
  return obj;
4715
4832
  },
@@ -4718,7 +4835,7 @@ export const GetSlotResponse = {
4718
4835
  },
4719
4836
  fromPartial(object) {
4720
4837
  const message = createBaseGetSlotResponse();
4721
- message.slot = object.slot ?? 0;
4838
+ message.slot = object.slot ?? 0n;
4722
4839
  return message;
4723
4840
  },
4724
4841
  };
@@ -4879,11 +4996,14 @@ export const IsBlockhashValidRequest = {
4879
4996
  },
4880
4997
  };
4881
4998
  function createBaseIsBlockhashValidResponse() {
4882
- return { slot: 0, valid: false };
4999
+ return { slot: 0n, valid: false };
4883
5000
  }
4884
5001
  export const IsBlockhashValidResponse = {
4885
5002
  encode(message, writer = new BinaryWriter()) {
4886
- if (message.slot !== 0) {
5003
+ if (message.slot !== 0n) {
5004
+ if (BigInt.asUintN(64, message.slot) !== message.slot) {
5005
+ throw new globalThis.Error("value provided for field message.slot of type uint64 too large");
5006
+ }
4887
5007
  writer.uint32(8).uint64(message.slot);
4888
5008
  }
4889
5009
  if (message.valid !== false) {
@@ -4902,7 +5022,7 @@ export const IsBlockhashValidResponse = {
4902
5022
  if (tag !== 8) {
4903
5023
  break;
4904
5024
  }
4905
- message.slot = longToNumber(reader.uint64());
5025
+ message.slot = reader.uint64();
4906
5026
  continue;
4907
5027
  }
4908
5028
  case 2: {
@@ -4922,14 +5042,14 @@ export const IsBlockhashValidResponse = {
4922
5042
  },
4923
5043
  fromJSON(object) {
4924
5044
  return {
4925
- slot: isSet(object.slot) ? globalThis.Number(object.slot) : 0,
5045
+ slot: isSet(object.slot) ? BigInt(object.slot) : 0n,
4926
5046
  valid: isSet(object.valid) ? globalThis.Boolean(object.valid) : false,
4927
5047
  };
4928
5048
  },
4929
5049
  toJSON(message) {
4930
5050
  const obj = {};
4931
- if (message.slot !== 0) {
4932
- obj.slot = Math.round(message.slot);
5051
+ if (message.slot !== 0n) {
5052
+ obj.slot = message.slot.toString();
4933
5053
  }
4934
5054
  if (message.valid !== false) {
4935
5055
  obj.valid = message.valid;
@@ -4941,7 +5061,7 @@ export const IsBlockhashValidResponse = {
4941
5061
  },
4942
5062
  fromPartial(object) {
4943
5063
  const message = createBaseIsBlockhashValidResponse();
4944
- message.slot = object.slot ?? 0;
5064
+ message.slot = object.slot ?? 0n;
4945
5065
  message.valid = object.valid ?? false;
4946
5066
  return message;
4947
5067
  },
@@ -5056,12 +5176,12 @@ function base64FromBytes(arr) {
5056
5176
  }
5057
5177
  }
5058
5178
  function toTimestamp(date) {
5059
- const seconds = Math.trunc(date.getTime() / 1_000);
5179
+ const seconds = BigInt(Math.trunc(date.getTime() / 1_000));
5060
5180
  const nanos = (date.getTime() % 1_000) * 1_000_000;
5061
5181
  return { seconds, nanos };
5062
5182
  }
5063
5183
  function fromTimestamp(t) {
5064
- let millis = (t.seconds || 0) * 1_000;
5184
+ let millis = (globalThis.Number(t.seconds.toString()) || 0) * 1_000;
5065
5185
  millis += (t.nanos || 0) / 1_000_000;
5066
5186
  return new globalThis.Date(millis);
5067
5187
  }
@@ -5076,16 +5196,6 @@ function fromJsonTimestamp(o) {
5076
5196
  return fromTimestamp(Timestamp.fromJSON(o));
5077
5197
  }
5078
5198
  }
5079
- function longToNumber(int64) {
5080
- const num = globalThis.Number(int64.toString());
5081
- if (num > globalThis.Number.MAX_SAFE_INTEGER) {
5082
- throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
5083
- }
5084
- if (num < globalThis.Number.MIN_SAFE_INTEGER) {
5085
- throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
5086
- }
5087
- return num;
5088
- }
5089
5199
  function isObject(value) {
5090
5200
  return typeof value === "object" && value !== null;
5091
5201
  }