@orbitflare/sdk 0.5.1 → 0.6.0

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 (40) hide show
  1. package/README.md +116 -3
  2. package/dist/config.d.ts.map +1 -1
  3. package/dist/config.js +1 -0
  4. package/dist/config.js.map +1 -1
  5. package/dist/error.d.ts.map +1 -1
  6. package/dist/error.js +14 -1
  7. package/dist/error.js.map +1 -1
  8. package/dist/events.d.ts +45 -0
  9. package/dist/events.d.ts.map +1 -0
  10. package/dist/events.js +98 -0
  11. package/dist/events.js.map +1 -0
  12. package/dist/grpc.d.ts +49 -20
  13. package/dist/grpc.d.ts.map +1 -1
  14. package/dist/grpc.js +205 -121
  15. package/dist/grpc.js.map +1 -1
  16. package/dist/jetstream/index.d.ts +12 -19
  17. package/dist/jetstream/index.d.ts.map +1 -1
  18. package/dist/jetstream/index.js +61 -108
  19. package/dist/jetstream/index.js.map +1 -1
  20. package/dist/jetstream/v2.d.ts +21 -29
  21. package/dist/jetstream/v2.d.ts.map +1 -1
  22. package/dist/jetstream/v2.js +107 -198
  23. package/dist/jetstream/v2.js.map +1 -1
  24. package/dist/proto/geyser.d.ts +245 -2
  25. package/dist/proto/geyser.d.ts.map +1 -1
  26. package/dist/proto/geyser.js +2969 -311
  27. package/dist/proto/geyser.js.map +1 -1
  28. package/dist/proto/jetstream_v2.d.ts +168 -25
  29. package/dist/proto/jetstream_v2.d.ts.map +1 -1
  30. package/dist/proto/jetstream_v2.js +754 -34
  31. package/dist/proto/jetstream_v2.js.map +1 -1
  32. package/dist/proto/solana-storage.d.ts +19 -0
  33. package/dist/proto/solana-storage.d.ts.map +1 -1
  34. package/dist/proto/solana-storage.js +6 -0
  35. package/dist/proto/solana-storage.js.map +1 -1
  36. package/dist/streaming.d.ts +58 -0
  37. package/dist/streaming.d.ts.map +1 -0
  38. package/dist/streaming.js +169 -0
  39. package/dist/streaming.js.map +1 -0
  40. package/package.json +4 -2
@@ -108,6 +108,100 @@ export function slotStatusToJSON(object) {
108
108
  return "UNRECOGNIZED";
109
109
  }
110
110
  }
111
+ /**
112
+ * Hash algorithm used to build the filter. Carried on the wire so future
113
+ * releases can add alternative algorithms (e.g., xxh3) without breaking
114
+ * existing clients. Readers should verify this matches a supported algorithm
115
+ * before deserializing.
116
+ */
117
+ export var CuckooHashAlgorithm;
118
+ (function (CuckooHashAlgorithm) {
119
+ CuckooHashAlgorithm[CuckooHashAlgorithm["SIP_HASH"] = 0] = "SIP_HASH";
120
+ CuckooHashAlgorithm[CuckooHashAlgorithm["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
121
+ })(CuckooHashAlgorithm || (CuckooHashAlgorithm = {}));
122
+ export function cuckooHashAlgorithmFromJSON(object) {
123
+ switch (object) {
124
+ case 0:
125
+ case "SIP_HASH":
126
+ return CuckooHashAlgorithm.SIP_HASH;
127
+ case -1:
128
+ case "UNRECOGNIZED":
129
+ default:
130
+ return CuckooHashAlgorithm.UNRECOGNIZED;
131
+ }
132
+ }
133
+ export function cuckooHashAlgorithmToJSON(object) {
134
+ switch (object) {
135
+ case CuckooHashAlgorithm.SIP_HASH:
136
+ return "SIP_HASH";
137
+ case CuckooHashAlgorithm.UNRECOGNIZED:
138
+ default:
139
+ return "UNRECOGNIZED";
140
+ }
141
+ }
142
+ export var TokenAccountExpansionControlFlag;
143
+ (function (TokenAccountExpansionControlFlag) {
144
+ /** ALL - Match an owner if it owns a pre OR post token balance on the tx. */
145
+ TokenAccountExpansionControlFlag[TokenAccountExpansionControlFlag["ALL"] = 0] = "ALL";
146
+ /**
147
+ * BALANCE_CHANGED - Match an owner whose token balance changed in amount (per
148
+ * `account_index`) or whose token account was closed.
149
+ */
150
+ TokenAccountExpansionControlFlag[TokenAccountExpansionControlFlag["BALANCE_CHANGED"] = 1] = "BALANCE_CHANGED";
151
+ TokenAccountExpansionControlFlag[TokenAccountExpansionControlFlag["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
152
+ })(TokenAccountExpansionControlFlag || (TokenAccountExpansionControlFlag = {}));
153
+ export function tokenAccountExpansionControlFlagFromJSON(object) {
154
+ switch (object) {
155
+ case 0:
156
+ case "ALL":
157
+ return TokenAccountExpansionControlFlag.ALL;
158
+ case 1:
159
+ case "BALANCE_CHANGED":
160
+ return TokenAccountExpansionControlFlag.BALANCE_CHANGED;
161
+ case -1:
162
+ case "UNRECOGNIZED":
163
+ default:
164
+ return TokenAccountExpansionControlFlag.UNRECOGNIZED;
165
+ }
166
+ }
167
+ export function tokenAccountExpansionControlFlagToJSON(object) {
168
+ switch (object) {
169
+ case TokenAccountExpansionControlFlag.ALL:
170
+ return "ALL";
171
+ case TokenAccountExpansionControlFlag.BALANCE_CHANGED:
172
+ return "BALANCE_CHANGED";
173
+ case TokenAccountExpansionControlFlag.UNRECOGNIZED:
174
+ default:
175
+ return "UNRECOGNIZED";
176
+ }
177
+ }
178
+ /** Encoding of BlockFooterVotesAggregate.signature. Readers reject kinds they do not know. */
179
+ export var BlockFooterSignatureKind;
180
+ (function (BlockFooterSignatureKind) {
181
+ /** COMPRESSED_BLS12_381_G2 - 96 bytes. */
182
+ BlockFooterSignatureKind[BlockFooterSignatureKind["COMPRESSED_BLS12_381_G2"] = 0] = "COMPRESSED_BLS12_381_G2";
183
+ BlockFooterSignatureKind[BlockFooterSignatureKind["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
184
+ })(BlockFooterSignatureKind || (BlockFooterSignatureKind = {}));
185
+ export function blockFooterSignatureKindFromJSON(object) {
186
+ switch (object) {
187
+ case 0:
188
+ case "COMPRESSED_BLS12_381_G2":
189
+ return BlockFooterSignatureKind.COMPRESSED_BLS12_381_G2;
190
+ case -1:
191
+ case "UNRECOGNIZED":
192
+ default:
193
+ return BlockFooterSignatureKind.UNRECOGNIZED;
194
+ }
195
+ }
196
+ export function blockFooterSignatureKindToJSON(object) {
197
+ switch (object) {
198
+ case BlockFooterSignatureKind.COMPRESSED_BLS12_381_G2:
199
+ return "COMPRESSED_BLS12_381_G2";
200
+ case BlockFooterSignatureKind.UNRECOGNIZED:
201
+ default:
202
+ return "UNRECOGNIZED";
203
+ }
204
+ }
111
205
  function createBaseSubscribeRequest() {
112
206
  return {
113
207
  accounts: {},
@@ -121,6 +215,7 @@ function createBaseSubscribeRequest() {
121
215
  accountsDataSlice: [],
122
216
  ping: undefined,
123
217
  fromSlot: undefined,
218
+ blockFooter: {},
124
219
  };
125
220
  }
126
221
  export const SubscribeRequest = {
@@ -161,6 +256,9 @@ export const SubscribeRequest = {
161
256
  }
162
257
  writer.uint32(88).uint64(message.fromSlot);
163
258
  }
259
+ globalThis.Object.entries(message.blockFooter).forEach(([key, value]) => {
260
+ SubscribeRequest_BlockFooterEntry.encode({ key: key, value }, writer.uint32(98).fork()).join();
261
+ });
164
262
  return writer;
165
263
  },
166
264
  decode(input, length) {
@@ -274,6 +372,16 @@ export const SubscribeRequest = {
274
372
  message.fromSlot = reader.uint64();
275
373
  continue;
276
374
  }
375
+ case 12: {
376
+ if (tag !== 98) {
377
+ break;
378
+ }
379
+ const entry12 = SubscribeRequest_BlockFooterEntry.decode(reader, reader.uint32());
380
+ if (entry12.value !== undefined) {
381
+ message.blockFooter[entry12.key] = entry12.value;
382
+ }
383
+ continue;
384
+ }
277
385
  }
278
386
  if ((tag & 7) === 4 || tag === 0) {
279
387
  break;
@@ -397,6 +505,27 @@ export const SubscribeRequest = {
397
505
  : isSet(object.from_slot)
398
506
  ? BigInt(object.from_slot)
399
507
  : undefined,
508
+ blockFooter: isObject(object.blockFooter)
509
+ ? globalThis.Object.entries(object.blockFooter).reduce((acc, [key, value]) => {
510
+ globalThis.Object.defineProperty(acc, key, {
511
+ value: SubscribeRequestFilterBlockFooter.fromJSON(value),
512
+ enumerable: true,
513
+ configurable: true,
514
+ writable: true,
515
+ });
516
+ return acc;
517
+ }, {})
518
+ : isObject(object.block_footer)
519
+ ? globalThis.Object.entries(object.block_footer).reduce((acc, [key, value]) => {
520
+ globalThis.Object.defineProperty(acc, key, {
521
+ value: SubscribeRequestFilterBlockFooter.fromJSON(value),
522
+ enumerable: true,
523
+ configurable: true,
524
+ writable: true,
525
+ });
526
+ return acc;
527
+ }, {})
528
+ : {},
400
529
  };
401
530
  },
402
531
  toJSON(message) {
@@ -476,6 +605,15 @@ export const SubscribeRequest = {
476
605
  if (message.fromSlot !== undefined) {
477
606
  obj.fromSlot = message.fromSlot.toString();
478
607
  }
608
+ if (message.blockFooter) {
609
+ const entries = globalThis.Object.entries(message.blockFooter);
610
+ if (entries.length > 0) {
611
+ obj.blockFooter = {};
612
+ entries.forEach(([k, v]) => {
613
+ obj.blockFooter[k] = SubscribeRequestFilterBlockFooter.toJSON(v);
614
+ });
615
+ }
616
+ }
479
617
  return obj;
480
618
  },
481
619
  create(base) {
@@ -540,6 +678,13 @@ export const SubscribeRequest = {
540
678
  message.fromSlot = (object.fromSlot !== undefined && object.fromSlot !== null)
541
679
  ? BigInt(object.fromSlot)
542
680
  : undefined;
681
+ message.blockFooter =
682
+ globalThis.Object.entries(object.blockFooter ?? {}).reduce((acc, [key, value]) => {
683
+ if (value !== undefined) {
684
+ acc[key] = SubscribeRequestFilterBlockFooter.fromPartial(value);
685
+ }
686
+ return acc;
687
+ }, {});
543
688
  return message;
544
689
  },
545
690
  };
@@ -1103,8 +1248,256 @@ export const SubscribeRequest_EntryEntry = {
1103
1248
  return message;
1104
1249
  },
1105
1250
  };
1251
+ function createBaseSubscribeRequest_BlockFooterEntry() {
1252
+ return { key: "", value: undefined };
1253
+ }
1254
+ export const SubscribeRequest_BlockFooterEntry = {
1255
+ encode(message, writer = new BinaryWriter()) {
1256
+ if (message.key !== "") {
1257
+ writer.uint32(10).string(message.key);
1258
+ }
1259
+ if (message.value !== undefined) {
1260
+ SubscribeRequestFilterBlockFooter.encode(message.value, writer.uint32(18).fork()).join();
1261
+ }
1262
+ return writer;
1263
+ },
1264
+ decode(input, length) {
1265
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1266
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1267
+ if (previousRecursionDepth >= 100) {
1268
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1269
+ }
1270
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1271
+ try {
1272
+ const end = length === undefined ? reader.len : reader.pos + length;
1273
+ const message = createBaseSubscribeRequest_BlockFooterEntry();
1274
+ while (reader.pos < end) {
1275
+ const tag = reader.uint32();
1276
+ switch (tag >>> 3) {
1277
+ case 1: {
1278
+ if (tag !== 10) {
1279
+ break;
1280
+ }
1281
+ message.key = reader.string();
1282
+ continue;
1283
+ }
1284
+ case 2: {
1285
+ if (tag !== 18) {
1286
+ break;
1287
+ }
1288
+ message.value = SubscribeRequestFilterBlockFooter.decode(reader, reader.uint32());
1289
+ continue;
1290
+ }
1291
+ }
1292
+ if ((tag & 7) === 4 || tag === 0) {
1293
+ break;
1294
+ }
1295
+ reader.skip(tag & 7);
1296
+ }
1297
+ return message;
1298
+ }
1299
+ finally {
1300
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1301
+ }
1302
+ },
1303
+ fromJSON(object) {
1304
+ return {
1305
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
1306
+ value: isSet(object.value) ? SubscribeRequestFilterBlockFooter.fromJSON(object.value) : undefined,
1307
+ };
1308
+ },
1309
+ toJSON(message) {
1310
+ const obj = {};
1311
+ if (message.key !== "") {
1312
+ obj.key = message.key;
1313
+ }
1314
+ if (message.value !== undefined) {
1315
+ obj.value = SubscribeRequestFilterBlockFooter.toJSON(message.value);
1316
+ }
1317
+ return obj;
1318
+ },
1319
+ create(base) {
1320
+ return SubscribeRequest_BlockFooterEntry.fromPartial(base ?? {});
1321
+ },
1322
+ fromPartial(object) {
1323
+ const message = createBaseSubscribeRequest_BlockFooterEntry();
1324
+ message.key = object.key ?? "";
1325
+ message.value = (object.value !== undefined && object.value !== null)
1326
+ ? SubscribeRequestFilterBlockFooter.fromPartial(object.value)
1327
+ : undefined;
1328
+ return message;
1329
+ },
1330
+ };
1331
+ function createBaseCuckooFilter() {
1332
+ return {
1333
+ data: new Uint8Array(0),
1334
+ bucketCount: 0,
1335
+ entriesPerBucket: 0,
1336
+ fingerprintBits: 0,
1337
+ hashSeed: 0n,
1338
+ hashAlgorithm: 0,
1339
+ };
1340
+ }
1341
+ export const CuckooFilter = {
1342
+ encode(message, writer = new BinaryWriter()) {
1343
+ if (message.data.length !== 0) {
1344
+ writer.uint32(10).bytes(message.data);
1345
+ }
1346
+ if (message.bucketCount !== 0) {
1347
+ writer.uint32(16).uint32(message.bucketCount);
1348
+ }
1349
+ if (message.entriesPerBucket !== 0) {
1350
+ writer.uint32(24).uint32(message.entriesPerBucket);
1351
+ }
1352
+ if (message.fingerprintBits !== 0) {
1353
+ writer.uint32(32).uint32(message.fingerprintBits);
1354
+ }
1355
+ if (message.hashSeed !== 0n) {
1356
+ if (BigInt.asUintN(64, message.hashSeed) !== message.hashSeed) {
1357
+ throw new globalThis.Error("value provided for field message.hashSeed of type uint64 too large");
1358
+ }
1359
+ writer.uint32(40).uint64(message.hashSeed);
1360
+ }
1361
+ if (message.hashAlgorithm !== 0) {
1362
+ writer.uint32(48).int32(message.hashAlgorithm);
1363
+ }
1364
+ return writer;
1365
+ },
1366
+ decode(input, length) {
1367
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1368
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
1369
+ if (previousRecursionDepth >= 100) {
1370
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
1371
+ }
1372
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
1373
+ try {
1374
+ const end = length === undefined ? reader.len : reader.pos + length;
1375
+ const message = createBaseCuckooFilter();
1376
+ while (reader.pos < end) {
1377
+ const tag = reader.uint32();
1378
+ switch (tag >>> 3) {
1379
+ case 1: {
1380
+ if (tag !== 10) {
1381
+ break;
1382
+ }
1383
+ message.data = reader.bytes();
1384
+ continue;
1385
+ }
1386
+ case 2: {
1387
+ if (tag !== 16) {
1388
+ break;
1389
+ }
1390
+ message.bucketCount = reader.uint32();
1391
+ continue;
1392
+ }
1393
+ case 3: {
1394
+ if (tag !== 24) {
1395
+ break;
1396
+ }
1397
+ message.entriesPerBucket = reader.uint32();
1398
+ continue;
1399
+ }
1400
+ case 4: {
1401
+ if (tag !== 32) {
1402
+ break;
1403
+ }
1404
+ message.fingerprintBits = reader.uint32();
1405
+ continue;
1406
+ }
1407
+ case 5: {
1408
+ if (tag !== 40) {
1409
+ break;
1410
+ }
1411
+ message.hashSeed = reader.uint64();
1412
+ continue;
1413
+ }
1414
+ case 6: {
1415
+ if (tag !== 48) {
1416
+ break;
1417
+ }
1418
+ message.hashAlgorithm = reader.int32();
1419
+ continue;
1420
+ }
1421
+ }
1422
+ if ((tag & 7) === 4 || tag === 0) {
1423
+ break;
1424
+ }
1425
+ reader.skip(tag & 7);
1426
+ }
1427
+ return message;
1428
+ }
1429
+ finally {
1430
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
1431
+ }
1432
+ },
1433
+ fromJSON(object) {
1434
+ return {
1435
+ data: isSet(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0),
1436
+ bucketCount: isSet(object.bucketCount)
1437
+ ? globalThis.Number(object.bucketCount)
1438
+ : isSet(object.bucket_count)
1439
+ ? globalThis.Number(object.bucket_count)
1440
+ : 0,
1441
+ entriesPerBucket: isSet(object.entriesPerBucket)
1442
+ ? globalThis.Number(object.entriesPerBucket)
1443
+ : isSet(object.entries_per_bucket)
1444
+ ? globalThis.Number(object.entries_per_bucket)
1445
+ : 0,
1446
+ fingerprintBits: isSet(object.fingerprintBits)
1447
+ ? globalThis.Number(object.fingerprintBits)
1448
+ : isSet(object.fingerprint_bits)
1449
+ ? globalThis.Number(object.fingerprint_bits)
1450
+ : 0,
1451
+ hashSeed: isSet(object.hashSeed)
1452
+ ? BigInt(object.hashSeed)
1453
+ : isSet(object.hash_seed)
1454
+ ? BigInt(object.hash_seed)
1455
+ : 0n,
1456
+ hashAlgorithm: isSet(object.hashAlgorithm)
1457
+ ? cuckooHashAlgorithmFromJSON(object.hashAlgorithm)
1458
+ : isSet(object.hash_algorithm)
1459
+ ? cuckooHashAlgorithmFromJSON(object.hash_algorithm)
1460
+ : 0,
1461
+ };
1462
+ },
1463
+ toJSON(message) {
1464
+ const obj = {};
1465
+ if (message.data.length !== 0) {
1466
+ obj.data = base64FromBytes(message.data);
1467
+ }
1468
+ if (message.bucketCount !== 0) {
1469
+ obj.bucketCount = Math.round(message.bucketCount);
1470
+ }
1471
+ if (message.entriesPerBucket !== 0) {
1472
+ obj.entriesPerBucket = Math.round(message.entriesPerBucket);
1473
+ }
1474
+ if (message.fingerprintBits !== 0) {
1475
+ obj.fingerprintBits = Math.round(message.fingerprintBits);
1476
+ }
1477
+ if (message.hashSeed !== 0n) {
1478
+ obj.hashSeed = message.hashSeed.toString();
1479
+ }
1480
+ if (message.hashAlgorithm !== 0) {
1481
+ obj.hashAlgorithm = cuckooHashAlgorithmToJSON(message.hashAlgorithm);
1482
+ }
1483
+ return obj;
1484
+ },
1485
+ create(base) {
1486
+ return CuckooFilter.fromPartial(base ?? {});
1487
+ },
1488
+ fromPartial(object) {
1489
+ const message = createBaseCuckooFilter();
1490
+ message.data = object.data ?? new Uint8Array(0);
1491
+ message.bucketCount = object.bucketCount ?? 0;
1492
+ message.entriesPerBucket = object.entriesPerBucket ?? 0;
1493
+ message.fingerprintBits = object.fingerprintBits ?? 0;
1494
+ message.hashSeed = (object.hashSeed !== undefined && object.hashSeed !== null) ? BigInt(object.hashSeed) : 0n;
1495
+ message.hashAlgorithm = object.hashAlgorithm ?? 0;
1496
+ return message;
1497
+ },
1498
+ };
1106
1499
  function createBaseSubscribeRequestFilterAccounts() {
1107
- return { account: [], owner: [], filters: [], nonemptyTxnSignature: undefined };
1500
+ return { account: [], owner: [], filters: [], nonemptyTxnSignature: undefined, cuckooAccountsFilter: undefined };
1108
1501
  }
1109
1502
  export const SubscribeRequestFilterAccounts = {
1110
1503
  encode(message, writer = new BinaryWriter()) {
@@ -1120,6 +1513,9 @@ export const SubscribeRequestFilterAccounts = {
1120
1513
  if (message.nonemptyTxnSignature !== undefined) {
1121
1514
  writer.uint32(40).bool(message.nonemptyTxnSignature);
1122
1515
  }
1516
+ if (message.cuckooAccountsFilter !== undefined) {
1517
+ CuckooFilter.encode(message.cuckooAccountsFilter, writer.uint32(50).fork()).join();
1518
+ }
1123
1519
  return writer;
1124
1520
  },
1125
1521
  decode(input, length) {
@@ -1163,6 +1559,13 @@ export const SubscribeRequestFilterAccounts = {
1163
1559
  message.nonemptyTxnSignature = reader.bool();
1164
1560
  continue;
1165
1561
  }
1562
+ case 6: {
1563
+ if (tag !== 50) {
1564
+ break;
1565
+ }
1566
+ message.cuckooAccountsFilter = CuckooFilter.decode(reader, reader.uint32());
1567
+ continue;
1568
+ }
1166
1569
  }
1167
1570
  if ((tag & 7) === 4 || tag === 0) {
1168
1571
  break;
@@ -1187,6 +1590,11 @@ export const SubscribeRequestFilterAccounts = {
1187
1590
  : isSet(object.nonempty_txn_signature)
1188
1591
  ? globalThis.Boolean(object.nonempty_txn_signature)
1189
1592
  : undefined,
1593
+ cuckooAccountsFilter: isSet(object.cuckooAccountsFilter)
1594
+ ? CuckooFilter.fromJSON(object.cuckooAccountsFilter)
1595
+ : isSet(object.cuckoo_accounts_filter)
1596
+ ? CuckooFilter.fromJSON(object.cuckoo_accounts_filter)
1597
+ : undefined,
1190
1598
  };
1191
1599
  },
1192
1600
  toJSON(message) {
@@ -1203,6 +1611,9 @@ export const SubscribeRequestFilterAccounts = {
1203
1611
  if (message.nonemptyTxnSignature !== undefined) {
1204
1612
  obj.nonemptyTxnSignature = message.nonemptyTxnSignature;
1205
1613
  }
1614
+ if (message.cuckooAccountsFilter !== undefined) {
1615
+ obj.cuckooAccountsFilter = CuckooFilter.toJSON(message.cuckooAccountsFilter);
1616
+ }
1206
1617
  return obj;
1207
1618
  },
1208
1619
  create(base) {
@@ -1214,6 +1625,9 @@ export const SubscribeRequestFilterAccounts = {
1214
1625
  message.owner = object.owner?.map((e) => e) || [];
1215
1626
  message.filters = object.filters?.map((e) => SubscribeRequestFilterAccountsFilter.fromPartial(e)) || [];
1216
1627
  message.nonemptyTxnSignature = object.nonemptyTxnSignature ?? undefined;
1628
+ message.cuckooAccountsFilter = (object.cuckooAccountsFilter !== undefined && object.cuckooAccountsFilter !== null)
1629
+ ? CuckooFilter.fromPartial(object.cuckooAccountsFilter)
1630
+ : undefined;
1217
1631
  return message;
1218
1632
  },
1219
1633
  };
@@ -1665,6 +2079,8 @@ function createBaseSubscribeRequestFilterTransactions() {
1665
2079
  accountInclude: [],
1666
2080
  accountExclude: [],
1667
2081
  accountRequired: [],
2082
+ cuckooAccountInclude: undefined,
2083
+ tokenAccounts: undefined,
1668
2084
  };
1669
2085
  }
1670
2086
  export const SubscribeRequestFilterTransactions = {
@@ -1687,6 +2103,12 @@ export const SubscribeRequestFilterTransactions = {
1687
2103
  for (const v of message.accountRequired) {
1688
2104
  writer.uint32(50).string(v);
1689
2105
  }
2106
+ if (message.cuckooAccountInclude !== undefined) {
2107
+ CuckooFilter.encode(message.cuckooAccountInclude, writer.uint32(58).fork()).join();
2108
+ }
2109
+ if (message.tokenAccounts !== undefined) {
2110
+ writer.uint32(240).int32(message.tokenAccounts);
2111
+ }
1690
2112
  return writer;
1691
2113
  },
1692
2114
  decode(input, length) {
@@ -1744,11 +2166,25 @@ export const SubscribeRequestFilterTransactions = {
1744
2166
  message.accountRequired.push(reader.string());
1745
2167
  continue;
1746
2168
  }
1747
- }
1748
- if ((tag & 7) === 4 || tag === 0) {
1749
- break;
1750
- }
1751
- reader.skip(tag & 7);
2169
+ case 7: {
2170
+ if (tag !== 58) {
2171
+ break;
2172
+ }
2173
+ message.cuckooAccountInclude = CuckooFilter.decode(reader, reader.uint32());
2174
+ continue;
2175
+ }
2176
+ case 30: {
2177
+ if (tag !== 240) {
2178
+ break;
2179
+ }
2180
+ message.tokenAccounts = reader.int32();
2181
+ continue;
2182
+ }
2183
+ }
2184
+ if ((tag & 7) === 4 || tag === 0) {
2185
+ break;
2186
+ }
2187
+ reader.skip(tag & 7);
1752
2188
  }
1753
2189
  return message;
1754
2190
  }
@@ -1776,6 +2212,16 @@ export const SubscribeRequestFilterTransactions = {
1776
2212
  : globalThis.Array.isArray(object?.account_required)
1777
2213
  ? object.account_required.map((e) => globalThis.String(e))
1778
2214
  : [],
2215
+ cuckooAccountInclude: isSet(object.cuckooAccountInclude)
2216
+ ? CuckooFilter.fromJSON(object.cuckooAccountInclude)
2217
+ : isSet(object.cuckoo_account_include)
2218
+ ? CuckooFilter.fromJSON(object.cuckoo_account_include)
2219
+ : undefined,
2220
+ tokenAccounts: isSet(object.tokenAccounts)
2221
+ ? tokenAccountExpansionControlFlagFromJSON(object.tokenAccounts)
2222
+ : isSet(object.token_accounts)
2223
+ ? tokenAccountExpansionControlFlagFromJSON(object.token_accounts)
2224
+ : undefined,
1779
2225
  };
1780
2226
  },
1781
2227
  toJSON(message) {
@@ -1798,6 +2244,12 @@ export const SubscribeRequestFilterTransactions = {
1798
2244
  if (message.accountRequired?.length) {
1799
2245
  obj.accountRequired = message.accountRequired;
1800
2246
  }
2247
+ if (message.cuckooAccountInclude !== undefined) {
2248
+ obj.cuckooAccountInclude = CuckooFilter.toJSON(message.cuckooAccountInclude);
2249
+ }
2250
+ if (message.tokenAccounts !== undefined) {
2251
+ obj.tokenAccounts = tokenAccountExpansionControlFlagToJSON(message.tokenAccounts);
2252
+ }
1801
2253
  return obj;
1802
2254
  },
1803
2255
  create(base) {
@@ -1811,11 +2263,21 @@ export const SubscribeRequestFilterTransactions = {
1811
2263
  message.accountInclude = object.accountInclude?.map((e) => e) || [];
1812
2264
  message.accountExclude = object.accountExclude?.map((e) => e) || [];
1813
2265
  message.accountRequired = object.accountRequired?.map((e) => e) || [];
2266
+ message.cuckooAccountInclude = (object.cuckooAccountInclude !== undefined && object.cuckooAccountInclude !== null)
2267
+ ? CuckooFilter.fromPartial(object.cuckooAccountInclude)
2268
+ : undefined;
2269
+ message.tokenAccounts = object.tokenAccounts ?? undefined;
1814
2270
  return message;
1815
2271
  },
1816
2272
  };
1817
2273
  function createBaseSubscribeRequestFilterBlocks() {
1818
- return { accountInclude: [], includeTransactions: undefined, includeAccounts: undefined, includeEntries: undefined };
2274
+ return {
2275
+ accountInclude: [],
2276
+ includeTransactions: undefined,
2277
+ includeAccounts: undefined,
2278
+ includeEntries: undefined,
2279
+ cuckooAccountInclude: undefined,
2280
+ };
1819
2281
  }
1820
2282
  export const SubscribeRequestFilterBlocks = {
1821
2283
  encode(message, writer = new BinaryWriter()) {
@@ -1831,6 +2293,9 @@ export const SubscribeRequestFilterBlocks = {
1831
2293
  if (message.includeEntries !== undefined) {
1832
2294
  writer.uint32(32).bool(message.includeEntries);
1833
2295
  }
2296
+ if (message.cuckooAccountInclude !== undefined) {
2297
+ CuckooFilter.encode(message.cuckooAccountInclude, writer.uint32(42).fork()).join();
2298
+ }
1834
2299
  return writer;
1835
2300
  },
1836
2301
  decode(input, length) {
@@ -1874,6 +2339,13 @@ export const SubscribeRequestFilterBlocks = {
1874
2339
  message.includeEntries = reader.bool();
1875
2340
  continue;
1876
2341
  }
2342
+ case 5: {
2343
+ if (tag !== 42) {
2344
+ break;
2345
+ }
2346
+ message.cuckooAccountInclude = CuckooFilter.decode(reader, reader.uint32());
2347
+ continue;
2348
+ }
1877
2349
  }
1878
2350
  if ((tag & 7) === 4 || tag === 0) {
1879
2351
  break;
@@ -1908,6 +2380,11 @@ export const SubscribeRequestFilterBlocks = {
1908
2380
  : isSet(object.include_entries)
1909
2381
  ? globalThis.Boolean(object.include_entries)
1910
2382
  : undefined,
2383
+ cuckooAccountInclude: isSet(object.cuckooAccountInclude)
2384
+ ? CuckooFilter.fromJSON(object.cuckooAccountInclude)
2385
+ : isSet(object.cuckoo_account_include)
2386
+ ? CuckooFilter.fromJSON(object.cuckoo_account_include)
2387
+ : undefined,
1911
2388
  };
1912
2389
  },
1913
2390
  toJSON(message) {
@@ -1924,6 +2401,9 @@ export const SubscribeRequestFilterBlocks = {
1924
2401
  if (message.includeEntries !== undefined) {
1925
2402
  obj.includeEntries = message.includeEntries;
1926
2403
  }
2404
+ if (message.cuckooAccountInclude !== undefined) {
2405
+ obj.cuckooAccountInclude = CuckooFilter.toJSON(message.cuckooAccountInclude);
2406
+ }
1927
2407
  return obj;
1928
2408
  },
1929
2409
  create(base) {
@@ -1935,6 +2415,9 @@ export const SubscribeRequestFilterBlocks = {
1935
2415
  message.includeTransactions = object.includeTransactions ?? undefined;
1936
2416
  message.includeAccounts = object.includeAccounts ?? undefined;
1937
2417
  message.includeEntries = object.includeEntries ?? undefined;
2418
+ message.cuckooAccountInclude = (object.cuckooAccountInclude !== undefined && object.cuckooAccountInclude !== null)
2419
+ ? CuckooFilter.fromPartial(object.cuckooAccountInclude)
2420
+ : undefined;
1938
2421
  return message;
1939
2422
  },
1940
2423
  };
@@ -1986,10 +2469,13 @@ export const SubscribeRequestFilterBlocksMeta = {
1986
2469
  },
1987
2470
  };
1988
2471
  function createBaseSubscribeRequestFilterEntry() {
1989
- return {};
2472
+ return { includeUpdateParent: undefined };
1990
2473
  }
1991
2474
  export const SubscribeRequestFilterEntry = {
1992
- encode(_, writer = new BinaryWriter()) {
2475
+ encode(message, writer = new BinaryWriter()) {
2476
+ if (message.includeUpdateParent !== undefined) {
2477
+ writer.uint32(8).bool(message.includeUpdateParent);
2478
+ }
1993
2479
  return writer;
1994
2480
  },
1995
2481
  decode(input, length) {
@@ -2005,6 +2491,13 @@ export const SubscribeRequestFilterEntry = {
2005
2491
  while (reader.pos < end) {
2006
2492
  const tag = reader.uint32();
2007
2493
  switch (tag >>> 3) {
2494
+ case 1: {
2495
+ if (tag !== 8) {
2496
+ break;
2497
+ }
2498
+ message.includeUpdateParent = reader.bool();
2499
+ continue;
2500
+ }
2008
2501
  }
2009
2502
  if ((tag & 7) === 4 || tag === 0) {
2010
2503
  break;
@@ -2017,23 +2510,106 @@ export const SubscribeRequestFilterEntry = {
2017
2510
  reader.__tsProtoDecodeDepth = previousRecursionDepth;
2018
2511
  }
2019
2512
  },
2020
- fromJSON(_) {
2021
- return {};
2513
+ fromJSON(object) {
2514
+ return {
2515
+ includeUpdateParent: isSet(object.includeUpdateParent)
2516
+ ? globalThis.Boolean(object.includeUpdateParent)
2517
+ : isSet(object.include_update_parent)
2518
+ ? globalThis.Boolean(object.include_update_parent)
2519
+ : undefined,
2520
+ };
2022
2521
  },
2023
- toJSON(_) {
2522
+ toJSON(message) {
2024
2523
  const obj = {};
2524
+ if (message.includeUpdateParent !== undefined) {
2525
+ obj.includeUpdateParent = message.includeUpdateParent;
2526
+ }
2025
2527
  return obj;
2026
2528
  },
2027
2529
  create(base) {
2028
2530
  return SubscribeRequestFilterEntry.fromPartial(base ?? {});
2029
2531
  },
2030
- fromPartial(_) {
2532
+ fromPartial(object) {
2031
2533
  const message = createBaseSubscribeRequestFilterEntry();
2534
+ message.includeUpdateParent = object.includeUpdateParent ?? undefined;
2535
+ return message;
2536
+ },
2537
+ };
2538
+ function createBaseSubscribeRequestFilterBlockFooter() {
2539
+ return { includeCertificates: undefined };
2540
+ }
2541
+ export const SubscribeRequestFilterBlockFooter = {
2542
+ encode(message, writer = new BinaryWriter()) {
2543
+ if (message.includeCertificates !== undefined) {
2544
+ writer.uint32(8).bool(message.includeCertificates);
2545
+ }
2546
+ return writer;
2547
+ },
2548
+ decode(input, length) {
2549
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2550
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
2551
+ if (previousRecursionDepth >= 100) {
2552
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
2553
+ }
2554
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
2555
+ try {
2556
+ const end = length === undefined ? reader.len : reader.pos + length;
2557
+ const message = createBaseSubscribeRequestFilterBlockFooter();
2558
+ while (reader.pos < end) {
2559
+ const tag = reader.uint32();
2560
+ switch (tag >>> 3) {
2561
+ case 1: {
2562
+ if (tag !== 8) {
2563
+ break;
2564
+ }
2565
+ message.includeCertificates = reader.bool();
2566
+ continue;
2567
+ }
2568
+ }
2569
+ if ((tag & 7) === 4 || tag === 0) {
2570
+ break;
2571
+ }
2572
+ reader.skip(tag & 7);
2573
+ }
2574
+ return message;
2575
+ }
2576
+ finally {
2577
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
2578
+ }
2579
+ },
2580
+ fromJSON(object) {
2581
+ return {
2582
+ includeCertificates: isSet(object.includeCertificates)
2583
+ ? globalThis.Boolean(object.includeCertificates)
2584
+ : isSet(object.include_certificates)
2585
+ ? globalThis.Boolean(object.include_certificates)
2586
+ : undefined,
2587
+ };
2588
+ },
2589
+ toJSON(message) {
2590
+ const obj = {};
2591
+ if (message.includeCertificates !== undefined) {
2592
+ obj.includeCertificates = message.includeCertificates;
2593
+ }
2594
+ return obj;
2595
+ },
2596
+ create(base) {
2597
+ return SubscribeRequestFilterBlockFooter.fromPartial(base ?? {});
2598
+ },
2599
+ fromPartial(object) {
2600
+ const message = createBaseSubscribeRequestFilterBlockFooter();
2601
+ message.includeCertificates = object.includeCertificates ?? undefined;
2032
2602
  return message;
2033
2603
  },
2034
2604
  };
2035
2605
  function createBaseSubscribeRequestFilterDeshredTransactions() {
2036
- return { vote: undefined, accountInclude: [], accountExclude: [], accountRequired: [] };
2606
+ return {
2607
+ vote: undefined,
2608
+ accountInclude: [],
2609
+ accountExclude: [],
2610
+ accountRequired: [],
2611
+ includeUpdateParent: undefined,
2612
+ };
2037
2613
  }
2038
2614
  export const SubscribeRequestFilterDeshredTransactions = {
2039
2615
  encode(message, writer = new BinaryWriter()) {
@@ -2049,6 +2625,9 @@ export const SubscribeRequestFilterDeshredTransactions = {
2049
2625
  for (const v of message.accountRequired) {
2050
2626
  writer.uint32(34).string(v);
2051
2627
  }
2628
+ if (message.includeUpdateParent !== undefined) {
2629
+ writer.uint32(40).bool(message.includeUpdateParent);
2630
+ }
2052
2631
  return writer;
2053
2632
  },
2054
2633
  decode(input, length) {
@@ -2092,6 +2671,13 @@ export const SubscribeRequestFilterDeshredTransactions = {
2092
2671
  message.accountRequired.push(reader.string());
2093
2672
  continue;
2094
2673
  }
2674
+ case 5: {
2675
+ if (tag !== 40) {
2676
+ break;
2677
+ }
2678
+ message.includeUpdateParent = reader.bool();
2679
+ continue;
2680
+ }
2095
2681
  }
2096
2682
  if ((tag & 7) === 4 || tag === 0) {
2097
2683
  break;
@@ -2122,6 +2708,11 @@ export const SubscribeRequestFilterDeshredTransactions = {
2122
2708
  : globalThis.Array.isArray(object?.account_required)
2123
2709
  ? object.account_required.map((e) => globalThis.String(e))
2124
2710
  : [],
2711
+ includeUpdateParent: isSet(object.includeUpdateParent)
2712
+ ? globalThis.Boolean(object.includeUpdateParent)
2713
+ : isSet(object.include_update_parent)
2714
+ ? globalThis.Boolean(object.include_update_parent)
2715
+ : undefined,
2125
2716
  };
2126
2717
  },
2127
2718
  toJSON(message) {
@@ -2138,6 +2729,9 @@ export const SubscribeRequestFilterDeshredTransactions = {
2138
2729
  if (message.accountRequired?.length) {
2139
2730
  obj.accountRequired = message.accountRequired;
2140
2731
  }
2732
+ if (message.includeUpdateParent !== undefined) {
2733
+ obj.includeUpdateParent = message.includeUpdateParent;
2734
+ }
2141
2735
  return obj;
2142
2736
  },
2143
2737
  create(base) {
@@ -2149,6 +2743,7 @@ export const SubscribeRequestFilterDeshredTransactions = {
2149
2743
  message.accountInclude = object.accountInclude?.map((e) => e) || [];
2150
2744
  message.accountExclude = object.accountExclude?.map((e) => e) || [];
2151
2745
  message.accountRequired = object.accountRequired?.map((e) => e) || [];
2746
+ message.includeUpdateParent = object.includeUpdateParent ?? undefined;
2152
2747
  return message;
2153
2748
  },
2154
2749
  };
@@ -2298,7 +2893,7 @@ export const SubscribeRequestPing = {
2298
2893
  },
2299
2894
  };
2300
2895
  function createBaseSubscribeDeshredRequest() {
2301
- return { deshredTransactions: {}, ping: undefined };
2896
+ return { deshredTransactions: {}, ping: undefined, slots: {} };
2302
2897
  }
2303
2898
  export const SubscribeDeshredRequest = {
2304
2899
  encode(message, writer = new BinaryWriter()) {
@@ -2309,6 +2904,9 @@ export const SubscribeDeshredRequest = {
2309
2904
  if (message.ping !== undefined) {
2310
2905
  SubscribeRequestPing.encode(message.ping, writer.uint32(18).fork()).join();
2311
2906
  }
2907
+ globalThis.Object.entries(message.slots).forEach(([key, value]) => {
2908
+ SubscribeDeshredRequest_SlotsEntry.encode({ key: key, value }, writer.uint32(26).fork()).join();
2909
+ });
2312
2910
  return writer;
2313
2911
  },
2314
2912
  decode(input, length) {
@@ -2341,6 +2939,16 @@ export const SubscribeDeshredRequest = {
2341
2939
  message.ping = SubscribeRequestPing.decode(reader, reader.uint32());
2342
2940
  continue;
2343
2941
  }
2942
+ case 3: {
2943
+ if (tag !== 26) {
2944
+ break;
2945
+ }
2946
+ const entry3 = SubscribeDeshredRequest_SlotsEntry.decode(reader, reader.uint32());
2947
+ if (entry3.value !== undefined) {
2948
+ message.slots[entry3.key] = entry3.value;
2949
+ }
2950
+ continue;
2951
+ }
2344
2952
  }
2345
2953
  if ((tag & 7) === 4 || tag === 0) {
2346
2954
  break;
@@ -2377,6 +2985,17 @@ export const SubscribeDeshredRequest = {
2377
2985
  }, {})
2378
2986
  : {},
2379
2987
  ping: isSet(object.ping) ? SubscribeRequestPing.fromJSON(object.ping) : undefined,
2988
+ slots: isObject(object.slots)
2989
+ ? globalThis.Object.entries(object.slots).reduce((acc, [key, value]) => {
2990
+ globalThis.Object.defineProperty(acc, key, {
2991
+ value: SubscribeRequestFilterSlots.fromJSON(value),
2992
+ enumerable: true,
2993
+ configurable: true,
2994
+ writable: true,
2995
+ });
2996
+ return acc;
2997
+ }, {})
2998
+ : {},
2380
2999
  };
2381
3000
  },
2382
3001
  toJSON(message) {
@@ -2393,6 +3012,15 @@ export const SubscribeDeshredRequest = {
2393
3012
  if (message.ping !== undefined) {
2394
3013
  obj.ping = SubscribeRequestPing.toJSON(message.ping);
2395
3014
  }
3015
+ if (message.slots) {
3016
+ const entries = globalThis.Object.entries(message.slots);
3017
+ if (entries.length > 0) {
3018
+ obj.slots = {};
3019
+ entries.forEach(([k, v]) => {
3020
+ obj.slots[k] = SubscribeRequestFilterSlots.toJSON(v);
3021
+ });
3022
+ }
3023
+ }
2396
3024
  return obj;
2397
3025
  },
2398
3026
  create(base) {
@@ -2410,6 +3038,12 @@ export const SubscribeDeshredRequest = {
2410
3038
  message.ping = (object.ping !== undefined && object.ping !== null)
2411
3039
  ? SubscribeRequestPing.fromPartial(object.ping)
2412
3040
  : undefined;
3041
+ message.slots = globalThis.Object.entries(object.slots ?? {}).reduce((acc, [key, value]) => {
3042
+ if (value !== undefined) {
3043
+ acc[key] = SubscribeRequestFilterSlots.fromPartial(value);
3044
+ }
3045
+ return acc;
3046
+ }, {});
2413
3047
  return message;
2414
3048
  },
2415
3049
  };
@@ -2493,6 +3127,86 @@ export const SubscribeDeshredRequest_DeshredTransactionsEntry = {
2493
3127
  return message;
2494
3128
  },
2495
3129
  };
3130
+ function createBaseSubscribeDeshredRequest_SlotsEntry() {
3131
+ return { key: "", value: undefined };
3132
+ }
3133
+ export const SubscribeDeshredRequest_SlotsEntry = {
3134
+ encode(message, writer = new BinaryWriter()) {
3135
+ if (message.key !== "") {
3136
+ writer.uint32(10).string(message.key);
3137
+ }
3138
+ if (message.value !== undefined) {
3139
+ SubscribeRequestFilterSlots.encode(message.value, writer.uint32(18).fork()).join();
3140
+ }
3141
+ return writer;
3142
+ },
3143
+ decode(input, length) {
3144
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3145
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
3146
+ if (previousRecursionDepth >= 100) {
3147
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
3148
+ }
3149
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
3150
+ try {
3151
+ const end = length === undefined ? reader.len : reader.pos + length;
3152
+ const message = createBaseSubscribeDeshredRequest_SlotsEntry();
3153
+ while (reader.pos < end) {
3154
+ const tag = reader.uint32();
3155
+ switch (tag >>> 3) {
3156
+ case 1: {
3157
+ if (tag !== 10) {
3158
+ break;
3159
+ }
3160
+ message.key = reader.string();
3161
+ continue;
3162
+ }
3163
+ case 2: {
3164
+ if (tag !== 18) {
3165
+ break;
3166
+ }
3167
+ message.value = SubscribeRequestFilterSlots.decode(reader, reader.uint32());
3168
+ continue;
3169
+ }
3170
+ }
3171
+ if ((tag & 7) === 4 || tag === 0) {
3172
+ break;
3173
+ }
3174
+ reader.skip(tag & 7);
3175
+ }
3176
+ return message;
3177
+ }
3178
+ finally {
3179
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
3180
+ }
3181
+ },
3182
+ fromJSON(object) {
3183
+ return {
3184
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
3185
+ value: isSet(object.value) ? SubscribeRequestFilterSlots.fromJSON(object.value) : undefined,
3186
+ };
3187
+ },
3188
+ toJSON(message) {
3189
+ const obj = {};
3190
+ if (message.key !== "") {
3191
+ obj.key = message.key;
3192
+ }
3193
+ if (message.value !== undefined) {
3194
+ obj.value = SubscribeRequestFilterSlots.toJSON(message.value);
3195
+ }
3196
+ return obj;
3197
+ },
3198
+ create(base) {
3199
+ return SubscribeDeshredRequest_SlotsEntry.fromPartial(base ?? {});
3200
+ },
3201
+ fromPartial(object) {
3202
+ const message = createBaseSubscribeDeshredRequest_SlotsEntry();
3203
+ message.key = object.key ?? "";
3204
+ message.value = (object.value !== undefined && object.value !== null)
3205
+ ? SubscribeRequestFilterSlots.fromPartial(object.value)
3206
+ : undefined;
3207
+ return message;
3208
+ },
3209
+ };
2496
3210
  function createBaseSubscribeUpdate() {
2497
3211
  return {
2498
3212
  filters: [],
@@ -2505,6 +3219,8 @@ function createBaseSubscribeUpdate() {
2505
3219
  pong: undefined,
2506
3220
  blockMeta: undefined,
2507
3221
  entry: undefined,
3222
+ blockFooter: undefined,
3223
+ entryUpdateParent: undefined,
2508
3224
  createdAt: undefined,
2509
3225
  };
2510
3226
  }
@@ -2540,6 +3256,12 @@ export const SubscribeUpdate = {
2540
3256
  if (message.entry !== undefined) {
2541
3257
  SubscribeUpdateEntry.encode(message.entry, writer.uint32(66).fork()).join();
2542
3258
  }
3259
+ if (message.blockFooter !== undefined) {
3260
+ SubscribeUpdateBlockFooter.encode(message.blockFooter, writer.uint32(98).fork()).join();
3261
+ }
3262
+ if (message.entryUpdateParent !== undefined) {
3263
+ SubscribeUpdateEntryUpdateParent.encode(message.entryUpdateParent, writer.uint32(106).fork()).join();
3264
+ }
2543
3265
  if (message.createdAt !== undefined) {
2544
3266
  Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(90).fork()).join();
2545
3267
  }
@@ -2628,6 +3350,20 @@ export const SubscribeUpdate = {
2628
3350
  message.entry = SubscribeUpdateEntry.decode(reader, reader.uint32());
2629
3351
  continue;
2630
3352
  }
3353
+ case 12: {
3354
+ if (tag !== 98) {
3355
+ break;
3356
+ }
3357
+ message.blockFooter = SubscribeUpdateBlockFooter.decode(reader, reader.uint32());
3358
+ continue;
3359
+ }
3360
+ case 13: {
3361
+ if (tag !== 106) {
3362
+ break;
3363
+ }
3364
+ message.entryUpdateParent = SubscribeUpdateEntryUpdateParent.decode(reader, reader.uint32());
3365
+ continue;
3366
+ }
2631
3367
  case 11: {
2632
3368
  if (tag !== 90) {
2633
3369
  break;
@@ -2667,6 +3403,16 @@ export const SubscribeUpdate = {
2667
3403
  ? SubscribeUpdateBlockMeta.fromJSON(object.block_meta)
2668
3404
  : undefined,
2669
3405
  entry: isSet(object.entry) ? SubscribeUpdateEntry.fromJSON(object.entry) : undefined,
3406
+ blockFooter: isSet(object.blockFooter)
3407
+ ? SubscribeUpdateBlockFooter.fromJSON(object.blockFooter)
3408
+ : isSet(object.block_footer)
3409
+ ? SubscribeUpdateBlockFooter.fromJSON(object.block_footer)
3410
+ : undefined,
3411
+ entryUpdateParent: isSet(object.entryUpdateParent)
3412
+ ? SubscribeUpdateEntryUpdateParent.fromJSON(object.entryUpdateParent)
3413
+ : isSet(object.entry_update_parent)
3414
+ ? SubscribeUpdateEntryUpdateParent.fromJSON(object.entry_update_parent)
3415
+ : undefined,
2670
3416
  createdAt: isSet(object.createdAt)
2671
3417
  ? fromJsonTimestamp(object.createdAt)
2672
3418
  : isSet(object.created_at)
@@ -2706,6 +3452,12 @@ export const SubscribeUpdate = {
2706
3452
  if (message.entry !== undefined) {
2707
3453
  obj.entry = SubscribeUpdateEntry.toJSON(message.entry);
2708
3454
  }
3455
+ if (message.blockFooter !== undefined) {
3456
+ obj.blockFooter = SubscribeUpdateBlockFooter.toJSON(message.blockFooter);
3457
+ }
3458
+ if (message.entryUpdateParent !== undefined) {
3459
+ obj.entryUpdateParent = SubscribeUpdateEntryUpdateParent.toJSON(message.entryUpdateParent);
3460
+ }
2709
3461
  if (message.createdAt !== undefined) {
2710
3462
  obj.createdAt = message.createdAt.toISOString();
2711
3463
  }
@@ -2744,12 +3496,18 @@ export const SubscribeUpdate = {
2744
3496
  message.entry = (object.entry !== undefined && object.entry !== null)
2745
3497
  ? SubscribeUpdateEntry.fromPartial(object.entry)
2746
3498
  : undefined;
3499
+ message.blockFooter = (object.blockFooter !== undefined && object.blockFooter !== null)
3500
+ ? SubscribeUpdateBlockFooter.fromPartial(object.blockFooter)
3501
+ : undefined;
3502
+ message.entryUpdateParent = (object.entryUpdateParent !== undefined && object.entryUpdateParent !== null)
3503
+ ? SubscribeUpdateEntryUpdateParent.fromPartial(object.entryUpdateParent)
3504
+ : undefined;
2747
3505
  message.createdAt = object.createdAt ?? undefined;
2748
3506
  return message;
2749
3507
  },
2750
3508
  };
2751
3509
  function createBaseSubscribeUpdateAccount() {
2752
- return { account: undefined, slot: 0n, isStartup: false };
3510
+ return { account: undefined, slot: 0n, isStartup: false, bankId: undefined };
2753
3511
  }
2754
3512
  export const SubscribeUpdateAccount = {
2755
3513
  encode(message, writer = new BinaryWriter()) {
@@ -2765,6 +3523,12 @@ export const SubscribeUpdateAccount = {
2765
3523
  if (message.isStartup !== false) {
2766
3524
  writer.uint32(24).bool(message.isStartup);
2767
3525
  }
3526
+ if (message.bankId !== undefined) {
3527
+ if (BigInt.asUintN(64, message.bankId) !== message.bankId) {
3528
+ throw new globalThis.Error("value provided for field message.bankId of type uint64 too large");
3529
+ }
3530
+ writer.uint32(32).uint64(message.bankId);
3531
+ }
2768
3532
  return writer;
2769
3533
  },
2770
3534
  decode(input, length) {
@@ -2801,10 +3565,17 @@ export const SubscribeUpdateAccount = {
2801
3565
  message.isStartup = reader.bool();
2802
3566
  continue;
2803
3567
  }
2804
- }
2805
- if ((tag & 7) === 4 || tag === 0) {
2806
- break;
2807
- }
3568
+ case 4: {
3569
+ if (tag !== 32) {
3570
+ break;
3571
+ }
3572
+ message.bankId = reader.uint64();
3573
+ continue;
3574
+ }
3575
+ }
3576
+ if ((tag & 7) === 4 || tag === 0) {
3577
+ break;
3578
+ }
2808
3579
  reader.skip(tag & 7);
2809
3580
  }
2810
3581
  return message;
@@ -2822,6 +3593,7 @@ export const SubscribeUpdateAccount = {
2822
3593
  : isSet(object.is_startup)
2823
3594
  ? globalThis.Boolean(object.is_startup)
2824
3595
  : false,
3596
+ bankId: isSet(object.bankId) ? BigInt(object.bankId) : isSet(object.bank_id) ? BigInt(object.bank_id) : undefined,
2825
3597
  };
2826
3598
  },
2827
3599
  toJSON(message) {
@@ -2835,6 +3607,9 @@ export const SubscribeUpdateAccount = {
2835
3607
  if (message.isStartup !== false) {
2836
3608
  obj.isStartup = message.isStartup;
2837
3609
  }
3610
+ if (message.bankId !== undefined) {
3611
+ obj.bankId = message.bankId.toString();
3612
+ }
2838
3613
  return obj;
2839
3614
  },
2840
3615
  create(base) {
@@ -2847,6 +3622,7 @@ export const SubscribeUpdateAccount = {
2847
3622
  : undefined;
2848
3623
  message.slot = (object.slot !== undefined && object.slot !== null) ? BigInt(object.slot) : 0n;
2849
3624
  message.isStartup = object.isStartup ?? false;
3625
+ message.bankId = (object.bankId !== undefined && object.bankId !== null) ? BigInt(object.bankId) : undefined;
2850
3626
  return message;
2851
3627
  },
2852
3628
  };
@@ -3051,7 +3827,7 @@ export const SubscribeUpdateAccountInfo = {
3051
3827
  },
3052
3828
  };
3053
3829
  function createBaseSubscribeUpdateSlot() {
3054
- return { slot: 0n, parent: undefined, status: 0, deadError: undefined };
3830
+ return { slot: 0n, parent: undefined, status: 0, deadError: undefined, bankId: undefined };
3055
3831
  }
3056
3832
  export const SubscribeUpdateSlot = {
3057
3833
  encode(message, writer = new BinaryWriter()) {
@@ -3073,6 +3849,12 @@ export const SubscribeUpdateSlot = {
3073
3849
  if (message.deadError !== undefined) {
3074
3850
  writer.uint32(34).string(message.deadError);
3075
3851
  }
3852
+ if (message.bankId !== undefined) {
3853
+ if (BigInt.asUintN(64, message.bankId) !== message.bankId) {
3854
+ throw new globalThis.Error("value provided for field message.bankId of type uint64 too large");
3855
+ }
3856
+ writer.uint32(40).uint64(message.bankId);
3857
+ }
3076
3858
  return writer;
3077
3859
  },
3078
3860
  decode(input, length) {
@@ -3116,6 +3898,13 @@ export const SubscribeUpdateSlot = {
3116
3898
  message.deadError = reader.string();
3117
3899
  continue;
3118
3900
  }
3901
+ case 5: {
3902
+ if (tag !== 40) {
3903
+ break;
3904
+ }
3905
+ message.bankId = reader.uint64();
3906
+ continue;
3907
+ }
3119
3908
  }
3120
3909
  if ((tag & 7) === 4 || tag === 0) {
3121
3910
  break;
@@ -3138,6 +3927,7 @@ export const SubscribeUpdateSlot = {
3138
3927
  : isSet(object.dead_error)
3139
3928
  ? globalThis.String(object.dead_error)
3140
3929
  : undefined,
3930
+ bankId: isSet(object.bankId) ? BigInt(object.bankId) : isSet(object.bank_id) ? BigInt(object.bank_id) : undefined,
3141
3931
  };
3142
3932
  },
3143
3933
  toJSON(message) {
@@ -3154,6 +3944,9 @@ export const SubscribeUpdateSlot = {
3154
3944
  if (message.deadError !== undefined) {
3155
3945
  obj.deadError = message.deadError;
3156
3946
  }
3947
+ if (message.bankId !== undefined) {
3948
+ obj.bankId = message.bankId.toString();
3949
+ }
3157
3950
  return obj;
3158
3951
  },
3159
3952
  create(base) {
@@ -3165,11 +3958,12 @@ export const SubscribeUpdateSlot = {
3165
3958
  message.parent = (object.parent !== undefined && object.parent !== null) ? BigInt(object.parent) : undefined;
3166
3959
  message.status = object.status ?? 0;
3167
3960
  message.deadError = object.deadError ?? undefined;
3961
+ message.bankId = (object.bankId !== undefined && object.bankId !== null) ? BigInt(object.bankId) : undefined;
3168
3962
  return message;
3169
3963
  },
3170
3964
  };
3171
3965
  function createBaseSubscribeUpdateTransaction() {
3172
- return { transaction: undefined, slot: 0n };
3966
+ return { transaction: undefined, slot: 0n, bankId: 0n };
3173
3967
  }
3174
3968
  export const SubscribeUpdateTransaction = {
3175
3969
  encode(message, writer = new BinaryWriter()) {
@@ -3182,6 +3976,12 @@ export const SubscribeUpdateTransaction = {
3182
3976
  }
3183
3977
  writer.uint32(16).uint64(message.slot);
3184
3978
  }
3979
+ if (message.bankId !== 0n) {
3980
+ if (BigInt.asUintN(64, message.bankId) !== message.bankId) {
3981
+ throw new globalThis.Error("value provided for field message.bankId of type uint64 too large");
3982
+ }
3983
+ writer.uint32(24).uint64(message.bankId);
3984
+ }
3185
3985
  return writer;
3186
3986
  },
3187
3987
  decode(input, length) {
@@ -3211,6 +4011,13 @@ export const SubscribeUpdateTransaction = {
3211
4011
  message.slot = reader.uint64();
3212
4012
  continue;
3213
4013
  }
4014
+ case 3: {
4015
+ if (tag !== 24) {
4016
+ break;
4017
+ }
4018
+ message.bankId = reader.uint64();
4019
+ continue;
4020
+ }
3214
4021
  }
3215
4022
  if ((tag & 7) === 4 || tag === 0) {
3216
4023
  break;
@@ -3227,6 +4034,7 @@ export const SubscribeUpdateTransaction = {
3227
4034
  return {
3228
4035
  transaction: isSet(object.transaction) ? SubscribeUpdateTransactionInfo.fromJSON(object.transaction) : undefined,
3229
4036
  slot: isSet(object.slot) ? BigInt(object.slot) : 0n,
4037
+ bankId: isSet(object.bankId) ? BigInt(object.bankId) : isSet(object.bank_id) ? BigInt(object.bank_id) : 0n,
3230
4038
  };
3231
4039
  },
3232
4040
  toJSON(message) {
@@ -3237,6 +4045,9 @@ export const SubscribeUpdateTransaction = {
3237
4045
  if (message.slot !== 0n) {
3238
4046
  obj.slot = message.slot.toString();
3239
4047
  }
4048
+ if (message.bankId !== 0n) {
4049
+ obj.bankId = message.bankId.toString();
4050
+ }
3240
4051
  return obj;
3241
4052
  },
3242
4053
  create(base) {
@@ -3248,6 +4059,7 @@ export const SubscribeUpdateTransaction = {
3248
4059
  ? SubscribeUpdateTransactionInfo.fromPartial(object.transaction)
3249
4060
  : undefined;
3250
4061
  message.slot = (object.slot !== undefined && object.slot !== null) ? BigInt(object.slot) : 0n;
4062
+ message.bankId = (object.bankId !== undefined && object.bankId !== null) ? BigInt(object.bankId) : 0n;
3251
4063
  return message;
3252
4064
  },
3253
4065
  };
@@ -3386,7 +4198,7 @@ export const SubscribeUpdateTransactionInfo = {
3386
4198
  },
3387
4199
  };
3388
4200
  function createBaseSubscribeUpdateTransactionStatus() {
3389
- return { slot: 0n, signature: new Uint8Array(0), isVote: false, index: 0n, err: undefined };
4201
+ return { slot: 0n, signature: new Uint8Array(0), isVote: false, index: 0n, err: undefined, bankId: 0n };
3390
4202
  }
3391
4203
  export const SubscribeUpdateTransactionStatus = {
3392
4204
  encode(message, writer = new BinaryWriter()) {
@@ -3411,6 +4223,12 @@ export const SubscribeUpdateTransactionStatus = {
3411
4223
  if (message.err !== undefined) {
3412
4224
  TransactionError.encode(message.err, writer.uint32(42).fork()).join();
3413
4225
  }
4226
+ if (message.bankId !== 0n) {
4227
+ if (BigInt.asUintN(64, message.bankId) !== message.bankId) {
4228
+ throw new globalThis.Error("value provided for field message.bankId of type uint64 too large");
4229
+ }
4230
+ writer.uint32(48).uint64(message.bankId);
4231
+ }
3414
4232
  return writer;
3415
4233
  },
3416
4234
  decode(input, length) {
@@ -3461,6 +4279,13 @@ export const SubscribeUpdateTransactionStatus = {
3461
4279
  message.err = TransactionError.decode(reader, reader.uint32());
3462
4280
  continue;
3463
4281
  }
4282
+ case 6: {
4283
+ if (tag !== 48) {
4284
+ break;
4285
+ }
4286
+ message.bankId = reader.uint64();
4287
+ continue;
4288
+ }
3464
4289
  }
3465
4290
  if ((tag & 7) === 4 || tag === 0) {
3466
4291
  break;
@@ -3484,6 +4309,7 @@ export const SubscribeUpdateTransactionStatus = {
3484
4309
  : false,
3485
4310
  index: isSet(object.index) ? BigInt(object.index) : 0n,
3486
4311
  err: isSet(object.err) ? TransactionError.fromJSON(object.err) : undefined,
4312
+ bankId: isSet(object.bankId) ? BigInt(object.bankId) : isSet(object.bank_id) ? BigInt(object.bank_id) : 0n,
3487
4313
  };
3488
4314
  },
3489
4315
  toJSON(message) {
@@ -3503,6 +4329,9 @@ export const SubscribeUpdateTransactionStatus = {
3503
4329
  if (message.err !== undefined) {
3504
4330
  obj.err = TransactionError.toJSON(message.err);
3505
4331
  }
4332
+ if (message.bankId !== 0n) {
4333
+ obj.bankId = message.bankId.toString();
4334
+ }
3506
4335
  return obj;
3507
4336
  },
3508
4337
  create(base) {
@@ -3517,6 +4346,7 @@ export const SubscribeUpdateTransactionStatus = {
3517
4346
  message.err = (object.err !== undefined && object.err !== null)
3518
4347
  ? TransactionError.fromPartial(object.err)
3519
4348
  : undefined;
4349
+ message.bankId = (object.bankId !== undefined && object.bankId !== null) ? BigInt(object.bankId) : 0n;
3520
4350
  return message;
3521
4351
  },
3522
4352
  };
@@ -3535,6 +4365,7 @@ function createBaseSubscribeUpdateBlock() {
3535
4365
  accounts: [],
3536
4366
  entriesCount: 0n,
3537
4367
  entries: [],
4368
+ bankId: 0n,
3538
4369
  };
3539
4370
  }
3540
4371
  export const SubscribeUpdateBlock = {
@@ -3593,6 +4424,12 @@ export const SubscribeUpdateBlock = {
3593
4424
  for (const v of message.entries) {
3594
4425
  SubscribeUpdateEntry.encode(v, writer.uint32(106).fork()).join();
3595
4426
  }
4427
+ if (message.bankId !== 0n) {
4428
+ if (BigInt.asUintN(64, message.bankId) !== message.bankId) {
4429
+ throw new globalThis.Error("value provided for field message.bankId of type uint64 too large");
4430
+ }
4431
+ writer.uint32(112).uint64(message.bankId);
4432
+ }
3596
4433
  return writer;
3597
4434
  },
3598
4435
  decode(input, length) {
@@ -3699,6 +4536,13 @@ export const SubscribeUpdateBlock = {
3699
4536
  message.entries.push(SubscribeUpdateEntry.decode(reader, reader.uint32()));
3700
4537
  continue;
3701
4538
  }
4539
+ case 14: {
4540
+ if (tag !== 112) {
4541
+ break;
4542
+ }
4543
+ message.bankId = reader.uint64();
4544
+ continue;
4545
+ }
3702
4546
  }
3703
4547
  if ((tag & 7) === 4 || tag === 0) {
3704
4548
  break;
@@ -3760,6 +4604,7 @@ export const SubscribeUpdateBlock = {
3760
4604
  entries: globalThis.Array.isArray(object?.entries)
3761
4605
  ? object.entries.map((e) => SubscribeUpdateEntry.fromJSON(e))
3762
4606
  : [],
4607
+ bankId: isSet(object.bankId) ? BigInt(object.bankId) : isSet(object.bank_id) ? BigInt(object.bank_id) : 0n,
3763
4608
  };
3764
4609
  },
3765
4610
  toJSON(message) {
@@ -3803,6 +4648,9 @@ export const SubscribeUpdateBlock = {
3803
4648
  if (message.entries?.length) {
3804
4649
  obj.entries = message.entries.map((e) => SubscribeUpdateEntry.toJSON(e));
3805
4650
  }
4651
+ if (message.bankId !== 0n) {
4652
+ obj.bankId = message.bankId.toString();
4653
+ }
3806
4654
  return obj;
3807
4655
  },
3808
4656
  create(base) {
@@ -3838,6 +4686,7 @@ export const SubscribeUpdateBlock = {
3838
4686
  ? BigInt(object.entriesCount)
3839
4687
  : 0n;
3840
4688
  message.entries = object.entries?.map((e) => SubscribeUpdateEntry.fromPartial(e)) || [];
4689
+ message.bankId = (object.bankId !== undefined && object.bankId !== null) ? BigInt(object.bankId) : 0n;
3841
4690
  return message;
3842
4691
  },
3843
4692
  };
@@ -3852,6 +4701,7 @@ function createBaseSubscribeUpdateBlockMeta() {
3852
4701
  parentBlockhash: "",
3853
4702
  executedTransactionCount: 0n,
3854
4703
  entriesCount: 0n,
4704
+ bankId: 0n,
3855
4705
  };
3856
4706
  }
3857
4707
  export const SubscribeUpdateBlockMeta = {
@@ -3895,6 +4745,12 @@ export const SubscribeUpdateBlockMeta = {
3895
4745
  }
3896
4746
  writer.uint32(72).uint64(message.entriesCount);
3897
4747
  }
4748
+ if (message.bankId !== 0n) {
4749
+ if (BigInt.asUintN(64, message.bankId) !== message.bankId) {
4750
+ throw new globalThis.Error("value provided for field message.bankId of type uint64 too large");
4751
+ }
4752
+ writer.uint32(80).uint64(message.bankId);
4753
+ }
3898
4754
  return writer;
3899
4755
  },
3900
4756
  decode(input, length) {
@@ -3973,6 +4829,13 @@ export const SubscribeUpdateBlockMeta = {
3973
4829
  message.entriesCount = reader.uint64();
3974
4830
  continue;
3975
4831
  }
4832
+ case 10: {
4833
+ if (tag !== 80) {
4834
+ break;
4835
+ }
4836
+ message.bankId = reader.uint64();
4837
+ continue;
4838
+ }
3976
4839
  }
3977
4840
  if ((tag & 7) === 4 || tag === 0) {
3978
4841
  break;
@@ -4020,6 +4883,7 @@ export const SubscribeUpdateBlockMeta = {
4020
4883
  : isSet(object.entries_count)
4021
4884
  ? BigInt(object.entries_count)
4022
4885
  : 0n,
4886
+ bankId: isSet(object.bankId) ? BigInt(object.bankId) : isSet(object.bank_id) ? BigInt(object.bank_id) : 0n,
4023
4887
  };
4024
4888
  },
4025
4889
  toJSON(message) {
@@ -4051,6 +4915,9 @@ export const SubscribeUpdateBlockMeta = {
4051
4915
  if (message.entriesCount !== 0n) {
4052
4916
  obj.entriesCount = message.entriesCount.toString();
4053
4917
  }
4918
+ if (message.bankId !== 0n) {
4919
+ obj.bankId = message.bankId.toString();
4920
+ }
4054
4921
  return obj;
4055
4922
  },
4056
4923
  create(base) {
@@ -4080,20 +4947,23 @@ export const SubscribeUpdateBlockMeta = {
4080
4947
  message.entriesCount = (object.entriesCount !== undefined && object.entriesCount !== null)
4081
4948
  ? BigInt(object.entriesCount)
4082
4949
  : 0n;
4950
+ message.bankId = (object.bankId !== undefined && object.bankId !== null) ? BigInt(object.bankId) : 0n;
4083
4951
  return message;
4084
4952
  },
4085
4953
  };
4086
- function createBaseSubscribeUpdateEntry() {
4954
+ function createBaseSubscribeUpdateBlockFooter() {
4087
4955
  return {
4088
4956
  slot: 0n,
4089
- index: 0n,
4090
- numHashes: 0n,
4091
- hash: new Uint8Array(0),
4092
- executedTransactionCount: 0n,
4093
- startingTransactionIndex: 0n,
4957
+ bankId: 0n,
4958
+ bankHash: new Uint8Array(0),
4959
+ blockProducerTimeNanos: 0n,
4960
+ blockUserAgent: new Uint8Array(0),
4961
+ blockFinalCert: undefined,
4962
+ skipRewardCert: undefined,
4963
+ notarRewardCert: undefined,
4094
4964
  };
4095
4965
  }
4096
- export const SubscribeUpdateEntry = {
4966
+ export const SubscribeUpdateBlockFooter = {
4097
4967
  encode(message, writer = new BinaryWriter()) {
4098
4968
  if (message.slot !== 0n) {
4099
4969
  if (BigInt.asUintN(64, message.slot) !== message.slot) {
@@ -4101,32 +4971,32 @@ export const SubscribeUpdateEntry = {
4101
4971
  }
4102
4972
  writer.uint32(8).uint64(message.slot);
4103
4973
  }
4104
- if (message.index !== 0n) {
4105
- if (BigInt.asUintN(64, message.index) !== message.index) {
4106
- throw new globalThis.Error("value provided for field message.index of type uint64 too large");
4974
+ if (message.bankId !== 0n) {
4975
+ if (BigInt.asUintN(64, message.bankId) !== message.bankId) {
4976
+ throw new globalThis.Error("value provided for field message.bankId of type uint64 too large");
4107
4977
  }
4108
- writer.uint32(16).uint64(message.index);
4978
+ writer.uint32(16).uint64(message.bankId);
4109
4979
  }
4110
- if (message.numHashes !== 0n) {
4111
- if (BigInt.asUintN(64, message.numHashes) !== message.numHashes) {
4112
- throw new globalThis.Error("value provided for field message.numHashes of type uint64 too large");
4980
+ if (message.bankHash.length !== 0) {
4981
+ writer.uint32(26).bytes(message.bankHash);
4982
+ }
4983
+ if (message.blockProducerTimeNanos !== 0n) {
4984
+ if (BigInt.asUintN(64, message.blockProducerTimeNanos) !== message.blockProducerTimeNanos) {
4985
+ throw new globalThis.Error("value provided for field message.blockProducerTimeNanos of type uint64 too large");
4113
4986
  }
4114
- writer.uint32(24).uint64(message.numHashes);
4987
+ writer.uint32(32).uint64(message.blockProducerTimeNanos);
4115
4988
  }
4116
- if (message.hash.length !== 0) {
4117
- writer.uint32(34).bytes(message.hash);
4989
+ if (message.blockUserAgent.length !== 0) {
4990
+ writer.uint32(42).bytes(message.blockUserAgent);
4118
4991
  }
4119
- if (message.executedTransactionCount !== 0n) {
4120
- if (BigInt.asUintN(64, message.executedTransactionCount) !== message.executedTransactionCount) {
4121
- throw new globalThis.Error("value provided for field message.executedTransactionCount of type uint64 too large");
4122
- }
4123
- writer.uint32(40).uint64(message.executedTransactionCount);
4992
+ if (message.blockFinalCert !== undefined) {
4993
+ BlockFooterFinalCert.encode(message.blockFinalCert, writer.uint32(74).fork()).join();
4124
4994
  }
4125
- if (message.startingTransactionIndex !== 0n) {
4126
- if (BigInt.asUintN(64, message.startingTransactionIndex) !== message.startingTransactionIndex) {
4127
- throw new globalThis.Error("value provided for field message.startingTransactionIndex of type uint64 too large");
4128
- }
4129
- writer.uint32(48).uint64(message.startingTransactionIndex);
4995
+ if (message.skipRewardCert !== undefined) {
4996
+ BlockFooterSkipRewardCert.encode(message.skipRewardCert, writer.uint32(82).fork()).join();
4997
+ }
4998
+ if (message.notarRewardCert !== undefined) {
4999
+ BlockFooterNotarRewardCert.encode(message.notarRewardCert, writer.uint32(90).fork()).join();
4130
5000
  }
4131
5001
  return writer;
4132
5002
  },
@@ -4139,7 +5009,7 @@ export const SubscribeUpdateEntry = {
4139
5009
  reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
4140
5010
  try {
4141
5011
  const end = length === undefined ? reader.len : reader.pos + length;
4142
- const message = createBaseSubscribeUpdateEntry();
5012
+ const message = createBaseSubscribeUpdateBlockFooter();
4143
5013
  while (reader.pos < end) {
4144
5014
  const tag = reader.uint32();
4145
5015
  switch (tag >>> 3) {
@@ -4154,35 +5024,49 @@ export const SubscribeUpdateEntry = {
4154
5024
  if (tag !== 16) {
4155
5025
  break;
4156
5026
  }
4157
- message.index = reader.uint64();
5027
+ message.bankId = reader.uint64();
4158
5028
  continue;
4159
5029
  }
4160
5030
  case 3: {
4161
- if (tag !== 24) {
5031
+ if (tag !== 26) {
4162
5032
  break;
4163
5033
  }
4164
- message.numHashes = reader.uint64();
5034
+ message.bankHash = reader.bytes();
4165
5035
  continue;
4166
5036
  }
4167
5037
  case 4: {
4168
- if (tag !== 34) {
5038
+ if (tag !== 32) {
4169
5039
  break;
4170
5040
  }
4171
- message.hash = reader.bytes();
5041
+ message.blockProducerTimeNanos = reader.uint64();
4172
5042
  continue;
4173
5043
  }
4174
5044
  case 5: {
4175
- if (tag !== 40) {
5045
+ if (tag !== 42) {
4176
5046
  break;
4177
5047
  }
4178
- message.executedTransactionCount = reader.uint64();
5048
+ message.blockUserAgent = reader.bytes();
4179
5049
  continue;
4180
5050
  }
4181
- case 6: {
4182
- if (tag !== 48) {
5051
+ case 9: {
5052
+ if (tag !== 74) {
4183
5053
  break;
4184
5054
  }
4185
- message.startingTransactionIndex = reader.uint64();
5055
+ message.blockFinalCert = BlockFooterFinalCert.decode(reader, reader.uint32());
5056
+ continue;
5057
+ }
5058
+ case 10: {
5059
+ if (tag !== 82) {
5060
+ break;
5061
+ }
5062
+ message.skipRewardCert = BlockFooterSkipRewardCert.decode(reader, reader.uint32());
5063
+ continue;
5064
+ }
5065
+ case 11: {
5066
+ if (tag !== 90) {
5067
+ break;
5068
+ }
5069
+ message.notarRewardCert = BlockFooterNotarRewardCert.decode(reader, reader.uint32());
4186
5070
  continue;
4187
5071
  }
4188
5072
  }
@@ -4200,23 +5084,37 @@ export const SubscribeUpdateEntry = {
4200
5084
  fromJSON(object) {
4201
5085
  return {
4202
5086
  slot: isSet(object.slot) ? BigInt(object.slot) : 0n,
4203
- index: isSet(object.index) ? BigInt(object.index) : 0n,
4204
- numHashes: isSet(object.numHashes)
4205
- ? BigInt(object.numHashes)
4206
- : isSet(object.num_hashes)
4207
- ? BigInt(object.num_hashes)
4208
- : 0n,
4209
- hash: isSet(object.hash) ? bytesFromBase64(object.hash) : new Uint8Array(0),
4210
- executedTransactionCount: isSet(object.executedTransactionCount)
4211
- ? BigInt(object.executedTransactionCount)
4212
- : isSet(object.executed_transaction_count)
4213
- ? BigInt(object.executed_transaction_count)
4214
- : 0n,
4215
- startingTransactionIndex: isSet(object.startingTransactionIndex)
4216
- ? BigInt(object.startingTransactionIndex)
4217
- : isSet(object.starting_transaction_index)
4218
- ? BigInt(object.starting_transaction_index)
5087
+ bankId: isSet(object.bankId) ? BigInt(object.bankId) : isSet(object.bank_id) ? BigInt(object.bank_id) : 0n,
5088
+ bankHash: isSet(object.bankHash)
5089
+ ? bytesFromBase64(object.bankHash)
5090
+ : isSet(object.bank_hash)
5091
+ ? bytesFromBase64(object.bank_hash)
5092
+ : new Uint8Array(0),
5093
+ blockProducerTimeNanos: isSet(object.blockProducerTimeNanos)
5094
+ ? BigInt(object.blockProducerTimeNanos)
5095
+ : isSet(object.block_producer_time_nanos)
5096
+ ? BigInt(object.block_producer_time_nanos)
4219
5097
  : 0n,
5098
+ blockUserAgent: isSet(object.blockUserAgent)
5099
+ ? bytesFromBase64(object.blockUserAgent)
5100
+ : isSet(object.block_user_agent)
5101
+ ? bytesFromBase64(object.block_user_agent)
5102
+ : new Uint8Array(0),
5103
+ blockFinalCert: isSet(object.blockFinalCert)
5104
+ ? BlockFooterFinalCert.fromJSON(object.blockFinalCert)
5105
+ : isSet(object.block_final_cert)
5106
+ ? BlockFooterFinalCert.fromJSON(object.block_final_cert)
5107
+ : undefined,
5108
+ skipRewardCert: isSet(object.skipRewardCert)
5109
+ ? BlockFooterSkipRewardCert.fromJSON(object.skipRewardCert)
5110
+ : isSet(object.skip_reward_cert)
5111
+ ? BlockFooterSkipRewardCert.fromJSON(object.skip_reward_cert)
5112
+ : undefined,
5113
+ notarRewardCert: isSet(object.notarRewardCert)
5114
+ ? BlockFooterNotarRewardCert.fromJSON(object.notarRewardCert)
5115
+ : isSet(object.notar_reward_cert)
5116
+ ? BlockFooterNotarRewardCert.fromJSON(object.notar_reward_cert)
5117
+ : undefined,
4220
5118
  };
4221
5119
  },
4222
5120
  toJSON(message) {
@@ -4224,56 +5122,75 @@ export const SubscribeUpdateEntry = {
4224
5122
  if (message.slot !== 0n) {
4225
5123
  obj.slot = message.slot.toString();
4226
5124
  }
4227
- if (message.index !== 0n) {
4228
- obj.index = message.index.toString();
5125
+ if (message.bankId !== 0n) {
5126
+ obj.bankId = message.bankId.toString();
4229
5127
  }
4230
- if (message.numHashes !== 0n) {
4231
- obj.numHashes = message.numHashes.toString();
5128
+ if (message.bankHash.length !== 0) {
5129
+ obj.bankHash = base64FromBytes(message.bankHash);
4232
5130
  }
4233
- if (message.hash.length !== 0) {
4234
- obj.hash = base64FromBytes(message.hash);
5131
+ if (message.blockProducerTimeNanos !== 0n) {
5132
+ obj.blockProducerTimeNanos = message.blockProducerTimeNanos.toString();
4235
5133
  }
4236
- if (message.executedTransactionCount !== 0n) {
4237
- obj.executedTransactionCount = message.executedTransactionCount.toString();
5134
+ if (message.blockUserAgent.length !== 0) {
5135
+ obj.blockUserAgent = base64FromBytes(message.blockUserAgent);
4238
5136
  }
4239
- if (message.startingTransactionIndex !== 0n) {
4240
- obj.startingTransactionIndex = message.startingTransactionIndex.toString();
5137
+ if (message.blockFinalCert !== undefined) {
5138
+ obj.blockFinalCert = BlockFooterFinalCert.toJSON(message.blockFinalCert);
5139
+ }
5140
+ if (message.skipRewardCert !== undefined) {
5141
+ obj.skipRewardCert = BlockFooterSkipRewardCert.toJSON(message.skipRewardCert);
5142
+ }
5143
+ if (message.notarRewardCert !== undefined) {
5144
+ obj.notarRewardCert = BlockFooterNotarRewardCert.toJSON(message.notarRewardCert);
4241
5145
  }
4242
5146
  return obj;
4243
5147
  },
4244
5148
  create(base) {
4245
- return SubscribeUpdateEntry.fromPartial(base ?? {});
5149
+ return SubscribeUpdateBlockFooter.fromPartial(base ?? {});
4246
5150
  },
4247
5151
  fromPartial(object) {
4248
- const message = createBaseSubscribeUpdateEntry();
5152
+ const message = createBaseSubscribeUpdateBlockFooter();
4249
5153
  message.slot = (object.slot !== undefined && object.slot !== null) ? BigInt(object.slot) : 0n;
4250
- message.index = (object.index !== undefined && object.index !== null) ? BigInt(object.index) : 0n;
4251
- message.numHashes = (object.numHashes !== undefined && object.numHashes !== null) ? BigInt(object.numHashes) : 0n;
4252
- message.hash = object.hash ?? new Uint8Array(0);
4253
- message.executedTransactionCount =
4254
- (object.executedTransactionCount !== undefined && object.executedTransactionCount !== null)
4255
- ? BigInt(object.executedTransactionCount)
4256
- : 0n;
4257
- message.startingTransactionIndex =
4258
- (object.startingTransactionIndex !== undefined && object.startingTransactionIndex !== null)
4259
- ? BigInt(object.startingTransactionIndex)
5154
+ message.bankId = (object.bankId !== undefined && object.bankId !== null) ? BigInt(object.bankId) : 0n;
5155
+ message.bankHash = object.bankHash ?? new Uint8Array(0);
5156
+ message.blockProducerTimeNanos =
5157
+ (object.blockProducerTimeNanos !== undefined && object.blockProducerTimeNanos !== null)
5158
+ ? BigInt(object.blockProducerTimeNanos)
4260
5159
  : 0n;
5160
+ message.blockUserAgent = object.blockUserAgent ?? new Uint8Array(0);
5161
+ message.blockFinalCert = (object.blockFinalCert !== undefined && object.blockFinalCert !== null)
5162
+ ? BlockFooterFinalCert.fromPartial(object.blockFinalCert)
5163
+ : undefined;
5164
+ message.skipRewardCert = (object.skipRewardCert !== undefined && object.skipRewardCert !== null)
5165
+ ? BlockFooterSkipRewardCert.fromPartial(object.skipRewardCert)
5166
+ : undefined;
5167
+ message.notarRewardCert = (object.notarRewardCert !== undefined && object.notarRewardCert !== null)
5168
+ ? BlockFooterNotarRewardCert.fromPartial(object.notarRewardCert)
5169
+ : undefined;
4261
5170
  return message;
4262
5171
  },
4263
5172
  };
4264
- function createBaseSubscribeUpdateDeshredTransaction() {
4265
- return { transaction: undefined, slot: 0n };
5173
+ function createBaseBlockFooterVotesAggregate() {
5174
+ return {
5175
+ signatureKind: 0,
5176
+ signature: new Uint8Array(0),
5177
+ blockId: new Uint8Array(0),
5178
+ signerBitmap: new Uint8Array(0),
5179
+ };
4266
5180
  }
4267
- export const SubscribeUpdateDeshredTransaction = {
5181
+ export const BlockFooterVotesAggregate = {
4268
5182
  encode(message, writer = new BinaryWriter()) {
4269
- if (message.transaction !== undefined) {
4270
- SubscribeUpdateDeshredTransactionInfo.encode(message.transaction, writer.uint32(10).fork()).join();
5183
+ if (message.signatureKind !== 0) {
5184
+ writer.uint32(8).int32(message.signatureKind);
4271
5185
  }
4272
- if (message.slot !== 0n) {
4273
- if (BigInt.asUintN(64, message.slot) !== message.slot) {
4274
- throw new globalThis.Error("value provided for field message.slot of type uint64 too large");
4275
- }
4276
- writer.uint32(16).uint64(message.slot);
5186
+ if (message.signature.length !== 0) {
5187
+ writer.uint32(18).bytes(message.signature);
5188
+ }
5189
+ if (message.blockId.length !== 0) {
5190
+ writer.uint32(26).bytes(message.blockId);
5191
+ }
5192
+ if (message.signerBitmap.length !== 0) {
5193
+ writer.uint32(34).bytes(message.signerBitmap);
4277
5194
  }
4278
5195
  return writer;
4279
5196
  },
@@ -4286,22 +5203,36 @@ export const SubscribeUpdateDeshredTransaction = {
4286
5203
  reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
4287
5204
  try {
4288
5205
  const end = length === undefined ? reader.len : reader.pos + length;
4289
- const message = createBaseSubscribeUpdateDeshredTransaction();
5206
+ const message = createBaseBlockFooterVotesAggregate();
4290
5207
  while (reader.pos < end) {
4291
5208
  const tag = reader.uint32();
4292
5209
  switch (tag >>> 3) {
4293
5210
  case 1: {
4294
- if (tag !== 10) {
5211
+ if (tag !== 8) {
4295
5212
  break;
4296
5213
  }
4297
- message.transaction = SubscribeUpdateDeshredTransactionInfo.decode(reader, reader.uint32());
5214
+ message.signatureKind = reader.int32();
4298
5215
  continue;
4299
5216
  }
4300
5217
  case 2: {
4301
- if (tag !== 16) {
5218
+ if (tag !== 18) {
4302
5219
  break;
4303
5220
  }
4304
- message.slot = reader.uint64();
5221
+ message.signature = reader.bytes();
5222
+ continue;
5223
+ }
5224
+ case 3: {
5225
+ if (tag !== 26) {
5226
+ break;
5227
+ }
5228
+ message.blockId = reader.bytes();
5229
+ continue;
5230
+ }
5231
+ case 4: {
5232
+ if (tag !== 34) {
5233
+ break;
5234
+ }
5235
+ message.signerBitmap = reader.bytes();
4305
5236
  continue;
4306
5237
  }
4307
5238
  }
@@ -4318,59 +5249,68 @@ export const SubscribeUpdateDeshredTransaction = {
4318
5249
  },
4319
5250
  fromJSON(object) {
4320
5251
  return {
4321
- transaction: isSet(object.transaction)
4322
- ? SubscribeUpdateDeshredTransactionInfo.fromJSON(object.transaction)
4323
- : undefined,
4324
- slot: isSet(object.slot) ? BigInt(object.slot) : 0n,
5252
+ signatureKind: isSet(object.signatureKind)
5253
+ ? blockFooterSignatureKindFromJSON(object.signatureKind)
5254
+ : isSet(object.signature_kind)
5255
+ ? blockFooterSignatureKindFromJSON(object.signature_kind)
5256
+ : 0,
5257
+ signature: isSet(object.signature) ? bytesFromBase64(object.signature) : new Uint8Array(0),
5258
+ blockId: isSet(object.blockId)
5259
+ ? bytesFromBase64(object.blockId)
5260
+ : isSet(object.block_id)
5261
+ ? bytesFromBase64(object.block_id)
5262
+ : new Uint8Array(0),
5263
+ signerBitmap: isSet(object.signerBitmap)
5264
+ ? bytesFromBase64(object.signerBitmap)
5265
+ : isSet(object.signer_bitmap)
5266
+ ? bytesFromBase64(object.signer_bitmap)
5267
+ : new Uint8Array(0),
4325
5268
  };
4326
5269
  },
4327
5270
  toJSON(message) {
4328
5271
  const obj = {};
4329
- if (message.transaction !== undefined) {
4330
- obj.transaction = SubscribeUpdateDeshredTransactionInfo.toJSON(message.transaction);
5272
+ if (message.signatureKind !== 0) {
5273
+ obj.signatureKind = blockFooterSignatureKindToJSON(message.signatureKind);
4331
5274
  }
4332
- if (message.slot !== 0n) {
4333
- obj.slot = message.slot.toString();
5275
+ if (message.signature.length !== 0) {
5276
+ obj.signature = base64FromBytes(message.signature);
5277
+ }
5278
+ if (message.blockId.length !== 0) {
5279
+ obj.blockId = base64FromBytes(message.blockId);
5280
+ }
5281
+ if (message.signerBitmap.length !== 0) {
5282
+ obj.signerBitmap = base64FromBytes(message.signerBitmap);
4334
5283
  }
4335
5284
  return obj;
4336
5285
  },
4337
5286
  create(base) {
4338
- return SubscribeUpdateDeshredTransaction.fromPartial(base ?? {});
5287
+ return BlockFooterVotesAggregate.fromPartial(base ?? {});
4339
5288
  },
4340
5289
  fromPartial(object) {
4341
- const message = createBaseSubscribeUpdateDeshredTransaction();
4342
- message.transaction = (object.transaction !== undefined && object.transaction !== null)
4343
- ? SubscribeUpdateDeshredTransactionInfo.fromPartial(object.transaction)
4344
- : undefined;
4345
- message.slot = (object.slot !== undefined && object.slot !== null) ? BigInt(object.slot) : 0n;
5290
+ const message = createBaseBlockFooterVotesAggregate();
5291
+ message.signatureKind = object.signatureKind ?? 0;
5292
+ message.signature = object.signature ?? new Uint8Array(0);
5293
+ message.blockId = object.blockId ?? new Uint8Array(0);
5294
+ message.signerBitmap = object.signerBitmap ?? new Uint8Array(0);
4346
5295
  return message;
4347
5296
  },
4348
5297
  };
4349
- function createBaseSubscribeUpdateDeshredTransactionInfo() {
4350
- return {
4351
- signature: new Uint8Array(0),
4352
- isVote: false,
4353
- transaction: undefined,
4354
- loadedWritableAddresses: [],
4355
- loadedReadonlyAddresses: [],
4356
- };
5298
+ function createBaseBlockFooterFinalCert() {
5299
+ return { slot: 0n, finalAggregate: undefined, notarAggregate: undefined };
4357
5300
  }
4358
- export const SubscribeUpdateDeshredTransactionInfo = {
5301
+ export const BlockFooterFinalCert = {
4359
5302
  encode(message, writer = new BinaryWriter()) {
4360
- if (message.signature.length !== 0) {
4361
- writer.uint32(10).bytes(message.signature);
4362
- }
4363
- if (message.isVote !== false) {
4364
- writer.uint32(16).bool(message.isVote);
4365
- }
4366
- if (message.transaction !== undefined) {
4367
- Transaction.encode(message.transaction, writer.uint32(26).fork()).join();
5303
+ if (message.slot !== 0n) {
5304
+ if (BigInt.asUintN(64, message.slot) !== message.slot) {
5305
+ throw new globalThis.Error("value provided for field message.slot of type uint64 too large");
5306
+ }
5307
+ writer.uint32(8).uint64(message.slot);
4368
5308
  }
4369
- for (const v of message.loadedWritableAddresses) {
4370
- writer.uint32(34).bytes(v);
5309
+ if (message.finalAggregate !== undefined) {
5310
+ BlockFooterVotesAggregate.encode(message.finalAggregate, writer.uint32(18).fork()).join();
4371
5311
  }
4372
- for (const v of message.loadedReadonlyAddresses) {
4373
- writer.uint32(42).bytes(v);
5312
+ if (message.notarAggregate !== undefined) {
5313
+ BlockFooterVotesAggregate.encode(message.notarAggregate, writer.uint32(26).fork()).join();
4374
5314
  }
4375
5315
  return writer;
4376
5316
  },
@@ -4383,43 +5323,1397 @@ export const SubscribeUpdateDeshredTransactionInfo = {
4383
5323
  reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
4384
5324
  try {
4385
5325
  const end = length === undefined ? reader.len : reader.pos + length;
4386
- const message = createBaseSubscribeUpdateDeshredTransactionInfo();
5326
+ const message = createBaseBlockFooterFinalCert();
4387
5327
  while (reader.pos < end) {
4388
5328
  const tag = reader.uint32();
4389
5329
  switch (tag >>> 3) {
4390
5330
  case 1: {
4391
- if (tag !== 10) {
5331
+ if (tag !== 8) {
4392
5332
  break;
4393
5333
  }
4394
- message.signature = reader.bytes();
5334
+ message.slot = reader.uint64();
4395
5335
  continue;
4396
5336
  }
4397
5337
  case 2: {
4398
- if (tag !== 16) {
5338
+ if (tag !== 18) {
4399
5339
  break;
4400
5340
  }
4401
- message.isVote = reader.bool();
5341
+ message.finalAggregate = BlockFooterVotesAggregate.decode(reader, reader.uint32());
4402
5342
  continue;
4403
5343
  }
4404
5344
  case 3: {
4405
5345
  if (tag !== 26) {
4406
5346
  break;
4407
5347
  }
4408
- message.transaction = Transaction.decode(reader, reader.uint32());
5348
+ message.notarAggregate = BlockFooterVotesAggregate.decode(reader, reader.uint32());
4409
5349
  continue;
4410
5350
  }
4411
- case 4: {
4412
- if (tag !== 34) {
4413
- break;
4414
- }
4415
- message.loadedWritableAddresses.push(reader.bytes());
4416
- continue;
5351
+ }
5352
+ if ((tag & 7) === 4 || tag === 0) {
5353
+ break;
5354
+ }
5355
+ reader.skip(tag & 7);
5356
+ }
5357
+ return message;
5358
+ }
5359
+ finally {
5360
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
5361
+ }
5362
+ },
5363
+ fromJSON(object) {
5364
+ return {
5365
+ slot: isSet(object.slot) ? BigInt(object.slot) : 0n,
5366
+ finalAggregate: isSet(object.finalAggregate)
5367
+ ? BlockFooterVotesAggregate.fromJSON(object.finalAggregate)
5368
+ : isSet(object.final_aggregate)
5369
+ ? BlockFooterVotesAggregate.fromJSON(object.final_aggregate)
5370
+ : undefined,
5371
+ notarAggregate: isSet(object.notarAggregate)
5372
+ ? BlockFooterVotesAggregate.fromJSON(object.notarAggregate)
5373
+ : isSet(object.notar_aggregate)
5374
+ ? BlockFooterVotesAggregate.fromJSON(object.notar_aggregate)
5375
+ : undefined,
5376
+ };
5377
+ },
5378
+ toJSON(message) {
5379
+ const obj = {};
5380
+ if (message.slot !== 0n) {
5381
+ obj.slot = message.slot.toString();
5382
+ }
5383
+ if (message.finalAggregate !== undefined) {
5384
+ obj.finalAggregate = BlockFooterVotesAggregate.toJSON(message.finalAggregate);
5385
+ }
5386
+ if (message.notarAggregate !== undefined) {
5387
+ obj.notarAggregate = BlockFooterVotesAggregate.toJSON(message.notarAggregate);
5388
+ }
5389
+ return obj;
5390
+ },
5391
+ create(base) {
5392
+ return BlockFooterFinalCert.fromPartial(base ?? {});
5393
+ },
5394
+ fromPartial(object) {
5395
+ const message = createBaseBlockFooterFinalCert();
5396
+ message.slot = (object.slot !== undefined && object.slot !== null) ? BigInt(object.slot) : 0n;
5397
+ message.finalAggregate = (object.finalAggregate !== undefined && object.finalAggregate !== null)
5398
+ ? BlockFooterVotesAggregate.fromPartial(object.finalAggregate)
5399
+ : undefined;
5400
+ message.notarAggregate = (object.notarAggregate !== undefined && object.notarAggregate !== null)
5401
+ ? BlockFooterVotesAggregate.fromPartial(object.notarAggregate)
5402
+ : undefined;
5403
+ return message;
5404
+ },
5405
+ };
5406
+ function createBaseBlockFooterSkipRewardCert() {
5407
+ return { slot: 0n, aggregate: undefined };
5408
+ }
5409
+ export const BlockFooterSkipRewardCert = {
5410
+ encode(message, writer = new BinaryWriter()) {
5411
+ if (message.slot !== 0n) {
5412
+ if (BigInt.asUintN(64, message.slot) !== message.slot) {
5413
+ throw new globalThis.Error("value provided for field message.slot of type uint64 too large");
5414
+ }
5415
+ writer.uint32(8).uint64(message.slot);
5416
+ }
5417
+ if (message.aggregate !== undefined) {
5418
+ BlockFooterVotesAggregate.encode(message.aggregate, writer.uint32(18).fork()).join();
5419
+ }
5420
+ return writer;
5421
+ },
5422
+ decode(input, length) {
5423
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5424
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
5425
+ if (previousRecursionDepth >= 100) {
5426
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
5427
+ }
5428
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
5429
+ try {
5430
+ const end = length === undefined ? reader.len : reader.pos + length;
5431
+ const message = createBaseBlockFooterSkipRewardCert();
5432
+ while (reader.pos < end) {
5433
+ const tag = reader.uint32();
5434
+ switch (tag >>> 3) {
5435
+ case 1: {
5436
+ if (tag !== 8) {
5437
+ break;
5438
+ }
5439
+ message.slot = reader.uint64();
5440
+ continue;
5441
+ }
5442
+ case 2: {
5443
+ if (tag !== 18) {
5444
+ break;
5445
+ }
5446
+ message.aggregate = BlockFooterVotesAggregate.decode(reader, reader.uint32());
5447
+ continue;
5448
+ }
5449
+ }
5450
+ if ((tag & 7) === 4 || tag === 0) {
5451
+ break;
5452
+ }
5453
+ reader.skip(tag & 7);
5454
+ }
5455
+ return message;
5456
+ }
5457
+ finally {
5458
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
5459
+ }
5460
+ },
5461
+ fromJSON(object) {
5462
+ return {
5463
+ slot: isSet(object.slot) ? BigInt(object.slot) : 0n,
5464
+ aggregate: isSet(object.aggregate) ? BlockFooterVotesAggregate.fromJSON(object.aggregate) : undefined,
5465
+ };
5466
+ },
5467
+ toJSON(message) {
5468
+ const obj = {};
5469
+ if (message.slot !== 0n) {
5470
+ obj.slot = message.slot.toString();
5471
+ }
5472
+ if (message.aggregate !== undefined) {
5473
+ obj.aggregate = BlockFooterVotesAggregate.toJSON(message.aggregate);
5474
+ }
5475
+ return obj;
5476
+ },
5477
+ create(base) {
5478
+ return BlockFooterSkipRewardCert.fromPartial(base ?? {});
5479
+ },
5480
+ fromPartial(object) {
5481
+ const message = createBaseBlockFooterSkipRewardCert();
5482
+ message.slot = (object.slot !== undefined && object.slot !== null) ? BigInt(object.slot) : 0n;
5483
+ message.aggregate = (object.aggregate !== undefined && object.aggregate !== null)
5484
+ ? BlockFooterVotesAggregate.fromPartial(object.aggregate)
5485
+ : undefined;
5486
+ return message;
5487
+ },
5488
+ };
5489
+ function createBaseBlockFooterNotarRewardCert() {
5490
+ return { slot: 0n, aggregate: undefined };
5491
+ }
5492
+ export const BlockFooterNotarRewardCert = {
5493
+ encode(message, writer = new BinaryWriter()) {
5494
+ if (message.slot !== 0n) {
5495
+ if (BigInt.asUintN(64, message.slot) !== message.slot) {
5496
+ throw new globalThis.Error("value provided for field message.slot of type uint64 too large");
5497
+ }
5498
+ writer.uint32(8).uint64(message.slot);
5499
+ }
5500
+ if (message.aggregate !== undefined) {
5501
+ BlockFooterVotesAggregate.encode(message.aggregate, writer.uint32(18).fork()).join();
5502
+ }
5503
+ return writer;
5504
+ },
5505
+ decode(input, length) {
5506
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5507
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
5508
+ if (previousRecursionDepth >= 100) {
5509
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
5510
+ }
5511
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
5512
+ try {
5513
+ const end = length === undefined ? reader.len : reader.pos + length;
5514
+ const message = createBaseBlockFooterNotarRewardCert();
5515
+ while (reader.pos < end) {
5516
+ const tag = reader.uint32();
5517
+ switch (tag >>> 3) {
5518
+ case 1: {
5519
+ if (tag !== 8) {
5520
+ break;
5521
+ }
5522
+ message.slot = reader.uint64();
5523
+ continue;
5524
+ }
5525
+ case 2: {
5526
+ if (tag !== 18) {
5527
+ break;
5528
+ }
5529
+ message.aggregate = BlockFooterVotesAggregate.decode(reader, reader.uint32());
5530
+ continue;
5531
+ }
5532
+ }
5533
+ if ((tag & 7) === 4 || tag === 0) {
5534
+ break;
5535
+ }
5536
+ reader.skip(tag & 7);
5537
+ }
5538
+ return message;
5539
+ }
5540
+ finally {
5541
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
5542
+ }
5543
+ },
5544
+ fromJSON(object) {
5545
+ return {
5546
+ slot: isSet(object.slot) ? BigInt(object.slot) : 0n,
5547
+ aggregate: isSet(object.aggregate) ? BlockFooterVotesAggregate.fromJSON(object.aggregate) : undefined,
5548
+ };
5549
+ },
5550
+ toJSON(message) {
5551
+ const obj = {};
5552
+ if (message.slot !== 0n) {
5553
+ obj.slot = message.slot.toString();
5554
+ }
5555
+ if (message.aggregate !== undefined) {
5556
+ obj.aggregate = BlockFooterVotesAggregate.toJSON(message.aggregate);
5557
+ }
5558
+ return obj;
5559
+ },
5560
+ create(base) {
5561
+ return BlockFooterNotarRewardCert.fromPartial(base ?? {});
5562
+ },
5563
+ fromPartial(object) {
5564
+ const message = createBaseBlockFooterNotarRewardCert();
5565
+ message.slot = (object.slot !== undefined && object.slot !== null) ? BigInt(object.slot) : 0n;
5566
+ message.aggregate = (object.aggregate !== undefined && object.aggregate !== null)
5567
+ ? BlockFooterVotesAggregate.fromPartial(object.aggregate)
5568
+ : undefined;
5569
+ return message;
5570
+ },
5571
+ };
5572
+ function createBaseSubscribeUpdateEntry() {
5573
+ return {
5574
+ slot: 0n,
5575
+ index: 0n,
5576
+ numHashes: 0n,
5577
+ hash: new Uint8Array(0),
5578
+ executedTransactionCount: 0n,
5579
+ startingTransactionIndex: 0n,
5580
+ bankId: 0n,
5581
+ };
5582
+ }
5583
+ export const SubscribeUpdateEntry = {
5584
+ encode(message, writer = new BinaryWriter()) {
5585
+ if (message.slot !== 0n) {
5586
+ if (BigInt.asUintN(64, message.slot) !== message.slot) {
5587
+ throw new globalThis.Error("value provided for field message.slot of type uint64 too large");
5588
+ }
5589
+ writer.uint32(8).uint64(message.slot);
5590
+ }
5591
+ if (message.index !== 0n) {
5592
+ if (BigInt.asUintN(64, message.index) !== message.index) {
5593
+ throw new globalThis.Error("value provided for field message.index of type uint64 too large");
5594
+ }
5595
+ writer.uint32(16).uint64(message.index);
5596
+ }
5597
+ if (message.numHashes !== 0n) {
5598
+ if (BigInt.asUintN(64, message.numHashes) !== message.numHashes) {
5599
+ throw new globalThis.Error("value provided for field message.numHashes of type uint64 too large");
5600
+ }
5601
+ writer.uint32(24).uint64(message.numHashes);
5602
+ }
5603
+ if (message.hash.length !== 0) {
5604
+ writer.uint32(34).bytes(message.hash);
5605
+ }
5606
+ if (message.executedTransactionCount !== 0n) {
5607
+ if (BigInt.asUintN(64, message.executedTransactionCount) !== message.executedTransactionCount) {
5608
+ throw new globalThis.Error("value provided for field message.executedTransactionCount of type uint64 too large");
5609
+ }
5610
+ writer.uint32(40).uint64(message.executedTransactionCount);
5611
+ }
5612
+ if (message.startingTransactionIndex !== 0n) {
5613
+ if (BigInt.asUintN(64, message.startingTransactionIndex) !== message.startingTransactionIndex) {
5614
+ throw new globalThis.Error("value provided for field message.startingTransactionIndex of type uint64 too large");
5615
+ }
5616
+ writer.uint32(48).uint64(message.startingTransactionIndex);
5617
+ }
5618
+ if (message.bankId !== 0n) {
5619
+ if (BigInt.asUintN(64, message.bankId) !== message.bankId) {
5620
+ throw new globalThis.Error("value provided for field message.bankId of type uint64 too large");
5621
+ }
5622
+ writer.uint32(56).uint64(message.bankId);
5623
+ }
5624
+ return writer;
5625
+ },
5626
+ decode(input, length) {
5627
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5628
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
5629
+ if (previousRecursionDepth >= 100) {
5630
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
5631
+ }
5632
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
5633
+ try {
5634
+ const end = length === undefined ? reader.len : reader.pos + length;
5635
+ const message = createBaseSubscribeUpdateEntry();
5636
+ while (reader.pos < end) {
5637
+ const tag = reader.uint32();
5638
+ switch (tag >>> 3) {
5639
+ case 1: {
5640
+ if (tag !== 8) {
5641
+ break;
5642
+ }
5643
+ message.slot = reader.uint64();
5644
+ continue;
5645
+ }
5646
+ case 2: {
5647
+ if (tag !== 16) {
5648
+ break;
5649
+ }
5650
+ message.index = reader.uint64();
5651
+ continue;
5652
+ }
5653
+ case 3: {
5654
+ if (tag !== 24) {
5655
+ break;
5656
+ }
5657
+ message.numHashes = reader.uint64();
5658
+ continue;
5659
+ }
5660
+ case 4: {
5661
+ if (tag !== 34) {
5662
+ break;
5663
+ }
5664
+ message.hash = reader.bytes();
5665
+ continue;
5666
+ }
5667
+ case 5: {
5668
+ if (tag !== 40) {
5669
+ break;
5670
+ }
5671
+ message.executedTransactionCount = reader.uint64();
5672
+ continue;
5673
+ }
5674
+ case 6: {
5675
+ if (tag !== 48) {
5676
+ break;
5677
+ }
5678
+ message.startingTransactionIndex = reader.uint64();
5679
+ continue;
5680
+ }
5681
+ case 7: {
5682
+ if (tag !== 56) {
5683
+ break;
5684
+ }
5685
+ message.bankId = reader.uint64();
5686
+ continue;
5687
+ }
5688
+ }
5689
+ if ((tag & 7) === 4 || tag === 0) {
5690
+ break;
5691
+ }
5692
+ reader.skip(tag & 7);
5693
+ }
5694
+ return message;
5695
+ }
5696
+ finally {
5697
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
5698
+ }
5699
+ },
5700
+ fromJSON(object) {
5701
+ return {
5702
+ slot: isSet(object.slot) ? BigInt(object.slot) : 0n,
5703
+ index: isSet(object.index) ? BigInt(object.index) : 0n,
5704
+ numHashes: isSet(object.numHashes)
5705
+ ? BigInt(object.numHashes)
5706
+ : isSet(object.num_hashes)
5707
+ ? BigInt(object.num_hashes)
5708
+ : 0n,
5709
+ hash: isSet(object.hash) ? bytesFromBase64(object.hash) : new Uint8Array(0),
5710
+ executedTransactionCount: isSet(object.executedTransactionCount)
5711
+ ? BigInt(object.executedTransactionCount)
5712
+ : isSet(object.executed_transaction_count)
5713
+ ? BigInt(object.executed_transaction_count)
5714
+ : 0n,
5715
+ startingTransactionIndex: isSet(object.startingTransactionIndex)
5716
+ ? BigInt(object.startingTransactionIndex)
5717
+ : isSet(object.starting_transaction_index)
5718
+ ? BigInt(object.starting_transaction_index)
5719
+ : 0n,
5720
+ bankId: isSet(object.bankId) ? BigInt(object.bankId) : isSet(object.bank_id) ? BigInt(object.bank_id) : 0n,
5721
+ };
5722
+ },
5723
+ toJSON(message) {
5724
+ const obj = {};
5725
+ if (message.slot !== 0n) {
5726
+ obj.slot = message.slot.toString();
5727
+ }
5728
+ if (message.index !== 0n) {
5729
+ obj.index = message.index.toString();
5730
+ }
5731
+ if (message.numHashes !== 0n) {
5732
+ obj.numHashes = message.numHashes.toString();
5733
+ }
5734
+ if (message.hash.length !== 0) {
5735
+ obj.hash = base64FromBytes(message.hash);
5736
+ }
5737
+ if (message.executedTransactionCount !== 0n) {
5738
+ obj.executedTransactionCount = message.executedTransactionCount.toString();
5739
+ }
5740
+ if (message.startingTransactionIndex !== 0n) {
5741
+ obj.startingTransactionIndex = message.startingTransactionIndex.toString();
5742
+ }
5743
+ if (message.bankId !== 0n) {
5744
+ obj.bankId = message.bankId.toString();
5745
+ }
5746
+ return obj;
5747
+ },
5748
+ create(base) {
5749
+ return SubscribeUpdateEntry.fromPartial(base ?? {});
5750
+ },
5751
+ fromPartial(object) {
5752
+ const message = createBaseSubscribeUpdateEntry();
5753
+ message.slot = (object.slot !== undefined && object.slot !== null) ? BigInt(object.slot) : 0n;
5754
+ message.index = (object.index !== undefined && object.index !== null) ? BigInt(object.index) : 0n;
5755
+ message.numHashes = (object.numHashes !== undefined && object.numHashes !== null) ? BigInt(object.numHashes) : 0n;
5756
+ message.hash = object.hash ?? new Uint8Array(0);
5757
+ message.executedTransactionCount =
5758
+ (object.executedTransactionCount !== undefined && object.executedTransactionCount !== null)
5759
+ ? BigInt(object.executedTransactionCount)
5760
+ : 0n;
5761
+ message.startingTransactionIndex =
5762
+ (object.startingTransactionIndex !== undefined && object.startingTransactionIndex !== null)
5763
+ ? BigInt(object.startingTransactionIndex)
5764
+ : 0n;
5765
+ message.bankId = (object.bankId !== undefined && object.bankId !== null) ? BigInt(object.bankId) : 0n;
5766
+ return message;
5767
+ },
5768
+ };
5769
+ function createBaseSubscribeUpdateEntryUpdateParent() {
5770
+ return { slot: 0n, clearedBankId: 0n, parentSlot: 0n, parentBlockId: new Uint8Array(0) };
5771
+ }
5772
+ export const SubscribeUpdateEntryUpdateParent = {
5773
+ encode(message, writer = new BinaryWriter()) {
5774
+ if (message.slot !== 0n) {
5775
+ if (BigInt.asUintN(64, message.slot) !== message.slot) {
5776
+ throw new globalThis.Error("value provided for field message.slot of type uint64 too large");
5777
+ }
5778
+ writer.uint32(8).uint64(message.slot);
5779
+ }
5780
+ if (message.clearedBankId !== 0n) {
5781
+ if (BigInt.asUintN(64, message.clearedBankId) !== message.clearedBankId) {
5782
+ throw new globalThis.Error("value provided for field message.clearedBankId of type uint64 too large");
5783
+ }
5784
+ writer.uint32(16).uint64(message.clearedBankId);
5785
+ }
5786
+ if (message.parentSlot !== 0n) {
5787
+ if (BigInt.asUintN(64, message.parentSlot) !== message.parentSlot) {
5788
+ throw new globalThis.Error("value provided for field message.parentSlot of type uint64 too large");
5789
+ }
5790
+ writer.uint32(24).uint64(message.parentSlot);
5791
+ }
5792
+ if (message.parentBlockId.length !== 0) {
5793
+ writer.uint32(34).bytes(message.parentBlockId);
5794
+ }
5795
+ return writer;
5796
+ },
5797
+ decode(input, length) {
5798
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5799
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
5800
+ if (previousRecursionDepth >= 100) {
5801
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
5802
+ }
5803
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
5804
+ try {
5805
+ const end = length === undefined ? reader.len : reader.pos + length;
5806
+ const message = createBaseSubscribeUpdateEntryUpdateParent();
5807
+ while (reader.pos < end) {
5808
+ const tag = reader.uint32();
5809
+ switch (tag >>> 3) {
5810
+ case 1: {
5811
+ if (tag !== 8) {
5812
+ break;
5813
+ }
5814
+ message.slot = reader.uint64();
5815
+ continue;
5816
+ }
5817
+ case 2: {
5818
+ if (tag !== 16) {
5819
+ break;
5820
+ }
5821
+ message.clearedBankId = reader.uint64();
5822
+ continue;
5823
+ }
5824
+ case 3: {
5825
+ if (tag !== 24) {
5826
+ break;
5827
+ }
5828
+ message.parentSlot = reader.uint64();
5829
+ continue;
5830
+ }
5831
+ case 4: {
5832
+ if (tag !== 34) {
5833
+ break;
5834
+ }
5835
+ message.parentBlockId = reader.bytes();
5836
+ continue;
5837
+ }
5838
+ }
5839
+ if ((tag & 7) === 4 || tag === 0) {
5840
+ break;
5841
+ }
5842
+ reader.skip(tag & 7);
5843
+ }
5844
+ return message;
5845
+ }
5846
+ finally {
5847
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
5848
+ }
5849
+ },
5850
+ fromJSON(object) {
5851
+ return {
5852
+ slot: isSet(object.slot) ? BigInt(object.slot) : 0n,
5853
+ clearedBankId: isSet(object.clearedBankId)
5854
+ ? BigInt(object.clearedBankId)
5855
+ : isSet(object.cleared_bank_id)
5856
+ ? BigInt(object.cleared_bank_id)
5857
+ : 0n,
5858
+ parentSlot: isSet(object.parentSlot)
5859
+ ? BigInt(object.parentSlot)
5860
+ : isSet(object.parent_slot)
5861
+ ? BigInt(object.parent_slot)
5862
+ : 0n,
5863
+ parentBlockId: isSet(object.parentBlockId)
5864
+ ? bytesFromBase64(object.parentBlockId)
5865
+ : isSet(object.parent_block_id)
5866
+ ? bytesFromBase64(object.parent_block_id)
5867
+ : new Uint8Array(0),
5868
+ };
5869
+ },
5870
+ toJSON(message) {
5871
+ const obj = {};
5872
+ if (message.slot !== 0n) {
5873
+ obj.slot = message.slot.toString();
5874
+ }
5875
+ if (message.clearedBankId !== 0n) {
5876
+ obj.clearedBankId = message.clearedBankId.toString();
5877
+ }
5878
+ if (message.parentSlot !== 0n) {
5879
+ obj.parentSlot = message.parentSlot.toString();
5880
+ }
5881
+ if (message.parentBlockId.length !== 0) {
5882
+ obj.parentBlockId = base64FromBytes(message.parentBlockId);
5883
+ }
5884
+ return obj;
5885
+ },
5886
+ create(base) {
5887
+ return SubscribeUpdateEntryUpdateParent.fromPartial(base ?? {});
5888
+ },
5889
+ fromPartial(object) {
5890
+ const message = createBaseSubscribeUpdateEntryUpdateParent();
5891
+ message.slot = (object.slot !== undefined && object.slot !== null) ? BigInt(object.slot) : 0n;
5892
+ message.clearedBankId = (object.clearedBankId !== undefined && object.clearedBankId !== null)
5893
+ ? BigInt(object.clearedBankId)
5894
+ : 0n;
5895
+ message.parentSlot = (object.parentSlot !== undefined && object.parentSlot !== null)
5896
+ ? BigInt(object.parentSlot)
5897
+ : 0n;
5898
+ message.parentBlockId = object.parentBlockId ?? new Uint8Array(0);
5899
+ return message;
5900
+ },
5901
+ };
5902
+ function createBaseSubscribeUpdateDeshredUpdateParent() {
5903
+ return { slot: 0n, updateParentFecSetIndex: 0, parentSlot: 0n, parentBlockId: new Uint8Array(0) };
5904
+ }
5905
+ export const SubscribeUpdateDeshredUpdateParent = {
5906
+ encode(message, writer = new BinaryWriter()) {
5907
+ if (message.slot !== 0n) {
5908
+ if (BigInt.asUintN(64, message.slot) !== message.slot) {
5909
+ throw new globalThis.Error("value provided for field message.slot of type uint64 too large");
5910
+ }
5911
+ writer.uint32(8).uint64(message.slot);
5912
+ }
5913
+ if (message.updateParentFecSetIndex !== 0) {
5914
+ writer.uint32(16).uint32(message.updateParentFecSetIndex);
5915
+ }
5916
+ if (message.parentSlot !== 0n) {
5917
+ if (BigInt.asUintN(64, message.parentSlot) !== message.parentSlot) {
5918
+ throw new globalThis.Error("value provided for field message.parentSlot of type uint64 too large");
5919
+ }
5920
+ writer.uint32(24).uint64(message.parentSlot);
5921
+ }
5922
+ if (message.parentBlockId.length !== 0) {
5923
+ writer.uint32(34).bytes(message.parentBlockId);
5924
+ }
5925
+ return writer;
5926
+ },
5927
+ decode(input, length) {
5928
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
5929
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
5930
+ if (previousRecursionDepth >= 100) {
5931
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
5932
+ }
5933
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
5934
+ try {
5935
+ const end = length === undefined ? reader.len : reader.pos + length;
5936
+ const message = createBaseSubscribeUpdateDeshredUpdateParent();
5937
+ while (reader.pos < end) {
5938
+ const tag = reader.uint32();
5939
+ switch (tag >>> 3) {
5940
+ case 1: {
5941
+ if (tag !== 8) {
5942
+ break;
5943
+ }
5944
+ message.slot = reader.uint64();
5945
+ continue;
5946
+ }
5947
+ case 2: {
5948
+ if (tag !== 16) {
5949
+ break;
5950
+ }
5951
+ message.updateParentFecSetIndex = reader.uint32();
5952
+ continue;
5953
+ }
5954
+ case 3: {
5955
+ if (tag !== 24) {
5956
+ break;
5957
+ }
5958
+ message.parentSlot = reader.uint64();
5959
+ continue;
5960
+ }
5961
+ case 4: {
5962
+ if (tag !== 34) {
5963
+ break;
5964
+ }
5965
+ message.parentBlockId = reader.bytes();
5966
+ continue;
5967
+ }
5968
+ }
5969
+ if ((tag & 7) === 4 || tag === 0) {
5970
+ break;
5971
+ }
5972
+ reader.skip(tag & 7);
5973
+ }
5974
+ return message;
5975
+ }
5976
+ finally {
5977
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
5978
+ }
5979
+ },
5980
+ fromJSON(object) {
5981
+ return {
5982
+ slot: isSet(object.slot) ? BigInt(object.slot) : 0n,
5983
+ updateParentFecSetIndex: isSet(object.updateParentFecSetIndex)
5984
+ ? globalThis.Number(object.updateParentFecSetIndex)
5985
+ : isSet(object.update_parent_fec_set_index)
5986
+ ? globalThis.Number(object.update_parent_fec_set_index)
5987
+ : 0,
5988
+ parentSlot: isSet(object.parentSlot)
5989
+ ? BigInt(object.parentSlot)
5990
+ : isSet(object.parent_slot)
5991
+ ? BigInt(object.parent_slot)
5992
+ : 0n,
5993
+ parentBlockId: isSet(object.parentBlockId)
5994
+ ? bytesFromBase64(object.parentBlockId)
5995
+ : isSet(object.parent_block_id)
5996
+ ? bytesFromBase64(object.parent_block_id)
5997
+ : new Uint8Array(0),
5998
+ };
5999
+ },
6000
+ toJSON(message) {
6001
+ const obj = {};
6002
+ if (message.slot !== 0n) {
6003
+ obj.slot = message.slot.toString();
6004
+ }
6005
+ if (message.updateParentFecSetIndex !== 0) {
6006
+ obj.updateParentFecSetIndex = Math.round(message.updateParentFecSetIndex);
6007
+ }
6008
+ if (message.parentSlot !== 0n) {
6009
+ obj.parentSlot = message.parentSlot.toString();
6010
+ }
6011
+ if (message.parentBlockId.length !== 0) {
6012
+ obj.parentBlockId = base64FromBytes(message.parentBlockId);
6013
+ }
6014
+ return obj;
6015
+ },
6016
+ create(base) {
6017
+ return SubscribeUpdateDeshredUpdateParent.fromPartial(base ?? {});
6018
+ },
6019
+ fromPartial(object) {
6020
+ const message = createBaseSubscribeUpdateDeshredUpdateParent();
6021
+ message.slot = (object.slot !== undefined && object.slot !== null) ? BigInt(object.slot) : 0n;
6022
+ message.updateParentFecSetIndex = object.updateParentFecSetIndex ?? 0;
6023
+ message.parentSlot = (object.parentSlot !== undefined && object.parentSlot !== null)
6024
+ ? BigInt(object.parentSlot)
6025
+ : 0n;
6026
+ message.parentBlockId = object.parentBlockId ?? new Uint8Array(0);
6027
+ return message;
6028
+ },
6029
+ };
6030
+ function createBaseSubscribeUpdateDeshredTransaction() {
6031
+ return { transaction: undefined, slot: 0n };
6032
+ }
6033
+ export const SubscribeUpdateDeshredTransaction = {
6034
+ encode(message, writer = new BinaryWriter()) {
6035
+ if (message.transaction !== undefined) {
6036
+ SubscribeUpdateDeshredTransactionInfo.encode(message.transaction, writer.uint32(10).fork()).join();
6037
+ }
6038
+ if (message.slot !== 0n) {
6039
+ if (BigInt.asUintN(64, message.slot) !== message.slot) {
6040
+ throw new globalThis.Error("value provided for field message.slot of type uint64 too large");
6041
+ }
6042
+ writer.uint32(16).uint64(message.slot);
6043
+ }
6044
+ return writer;
6045
+ },
6046
+ decode(input, length) {
6047
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6048
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
6049
+ if (previousRecursionDepth >= 100) {
6050
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
6051
+ }
6052
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
6053
+ try {
6054
+ const end = length === undefined ? reader.len : reader.pos + length;
6055
+ const message = createBaseSubscribeUpdateDeshredTransaction();
6056
+ while (reader.pos < end) {
6057
+ const tag = reader.uint32();
6058
+ switch (tag >>> 3) {
6059
+ case 1: {
6060
+ if (tag !== 10) {
6061
+ break;
6062
+ }
6063
+ message.transaction = SubscribeUpdateDeshredTransactionInfo.decode(reader, reader.uint32());
6064
+ continue;
6065
+ }
6066
+ case 2: {
6067
+ if (tag !== 16) {
6068
+ break;
6069
+ }
6070
+ message.slot = reader.uint64();
6071
+ continue;
6072
+ }
6073
+ }
6074
+ if ((tag & 7) === 4 || tag === 0) {
6075
+ break;
6076
+ }
6077
+ reader.skip(tag & 7);
6078
+ }
6079
+ return message;
6080
+ }
6081
+ finally {
6082
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
6083
+ }
6084
+ },
6085
+ fromJSON(object) {
6086
+ return {
6087
+ transaction: isSet(object.transaction)
6088
+ ? SubscribeUpdateDeshredTransactionInfo.fromJSON(object.transaction)
6089
+ : undefined,
6090
+ slot: isSet(object.slot) ? BigInt(object.slot) : 0n,
6091
+ };
6092
+ },
6093
+ toJSON(message) {
6094
+ const obj = {};
6095
+ if (message.transaction !== undefined) {
6096
+ obj.transaction = SubscribeUpdateDeshredTransactionInfo.toJSON(message.transaction);
6097
+ }
6098
+ if (message.slot !== 0n) {
6099
+ obj.slot = message.slot.toString();
6100
+ }
6101
+ return obj;
6102
+ },
6103
+ create(base) {
6104
+ return SubscribeUpdateDeshredTransaction.fromPartial(base ?? {});
6105
+ },
6106
+ fromPartial(object) {
6107
+ const message = createBaseSubscribeUpdateDeshredTransaction();
6108
+ message.transaction = (object.transaction !== undefined && object.transaction !== null)
6109
+ ? SubscribeUpdateDeshredTransactionInfo.fromPartial(object.transaction)
6110
+ : undefined;
6111
+ message.slot = (object.slot !== undefined && object.slot !== null) ? BigInt(object.slot) : 0n;
6112
+ return message;
6113
+ },
6114
+ };
6115
+ function createBaseSubscribeUpdateDeshredTransactionInfo() {
6116
+ return {
6117
+ signature: new Uint8Array(0),
6118
+ isVote: false,
6119
+ transaction: undefined,
6120
+ loadedWritableAddresses: [],
6121
+ loadedReadonlyAddresses: [],
6122
+ completedDataSetStartingShredIndex: 0,
6123
+ completedDataSetEndingShredIndexExclusive: 0,
6124
+ };
6125
+ }
6126
+ export const SubscribeUpdateDeshredTransactionInfo = {
6127
+ encode(message, writer = new BinaryWriter()) {
6128
+ if (message.signature.length !== 0) {
6129
+ writer.uint32(10).bytes(message.signature);
6130
+ }
6131
+ if (message.isVote !== false) {
6132
+ writer.uint32(16).bool(message.isVote);
6133
+ }
6134
+ if (message.transaction !== undefined) {
6135
+ Transaction.encode(message.transaction, writer.uint32(26).fork()).join();
6136
+ }
6137
+ for (const v of message.loadedWritableAddresses) {
6138
+ writer.uint32(34).bytes(v);
6139
+ }
6140
+ for (const v of message.loadedReadonlyAddresses) {
6141
+ writer.uint32(42).bytes(v);
6142
+ }
6143
+ if (message.completedDataSetStartingShredIndex !== 0) {
6144
+ writer.uint32(48).uint32(message.completedDataSetStartingShredIndex);
6145
+ }
6146
+ if (message.completedDataSetEndingShredIndexExclusive !== 0) {
6147
+ writer.uint32(56).uint32(message.completedDataSetEndingShredIndexExclusive);
6148
+ }
6149
+ return writer;
6150
+ },
6151
+ decode(input, length) {
6152
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6153
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
6154
+ if (previousRecursionDepth >= 100) {
6155
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
6156
+ }
6157
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
6158
+ try {
6159
+ const end = length === undefined ? reader.len : reader.pos + length;
6160
+ const message = createBaseSubscribeUpdateDeshredTransactionInfo();
6161
+ while (reader.pos < end) {
6162
+ const tag = reader.uint32();
6163
+ switch (tag >>> 3) {
6164
+ case 1: {
6165
+ if (tag !== 10) {
6166
+ break;
6167
+ }
6168
+ message.signature = reader.bytes();
6169
+ continue;
6170
+ }
6171
+ case 2: {
6172
+ if (tag !== 16) {
6173
+ break;
6174
+ }
6175
+ message.isVote = reader.bool();
6176
+ continue;
6177
+ }
6178
+ case 3: {
6179
+ if (tag !== 26) {
6180
+ break;
6181
+ }
6182
+ message.transaction = Transaction.decode(reader, reader.uint32());
6183
+ continue;
6184
+ }
6185
+ case 4: {
6186
+ if (tag !== 34) {
6187
+ break;
6188
+ }
6189
+ message.loadedWritableAddresses.push(reader.bytes());
6190
+ continue;
6191
+ }
6192
+ case 5: {
6193
+ if (tag !== 42) {
6194
+ break;
6195
+ }
6196
+ message.loadedReadonlyAddresses.push(reader.bytes());
6197
+ continue;
6198
+ }
6199
+ case 6: {
6200
+ if (tag !== 48) {
6201
+ break;
6202
+ }
6203
+ message.completedDataSetStartingShredIndex = reader.uint32();
6204
+ continue;
6205
+ }
6206
+ case 7: {
6207
+ if (tag !== 56) {
6208
+ break;
6209
+ }
6210
+ message.completedDataSetEndingShredIndexExclusive = reader.uint32();
6211
+ continue;
6212
+ }
6213
+ }
6214
+ if ((tag & 7) === 4 || tag === 0) {
6215
+ break;
6216
+ }
6217
+ reader.skip(tag & 7);
6218
+ }
6219
+ return message;
6220
+ }
6221
+ finally {
6222
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
6223
+ }
6224
+ },
6225
+ fromJSON(object) {
6226
+ return {
6227
+ signature: isSet(object.signature) ? bytesFromBase64(object.signature) : new Uint8Array(0),
6228
+ isVote: isSet(object.isVote)
6229
+ ? globalThis.Boolean(object.isVote)
6230
+ : isSet(object.is_vote)
6231
+ ? globalThis.Boolean(object.is_vote)
6232
+ : false,
6233
+ transaction: isSet(object.transaction) ? Transaction.fromJSON(object.transaction) : undefined,
6234
+ loadedWritableAddresses: globalThis.Array.isArray(object?.loadedWritableAddresses)
6235
+ ? object.loadedWritableAddresses.map((e) => bytesFromBase64(e))
6236
+ : globalThis.Array.isArray(object?.loaded_writable_addresses)
6237
+ ? object.loaded_writable_addresses.map((e) => bytesFromBase64(e))
6238
+ : [],
6239
+ loadedReadonlyAddresses: globalThis.Array.isArray(object?.loadedReadonlyAddresses)
6240
+ ? object.loadedReadonlyAddresses.map((e) => bytesFromBase64(e))
6241
+ : globalThis.Array.isArray(object?.loaded_readonly_addresses)
6242
+ ? object.loaded_readonly_addresses.map((e) => bytesFromBase64(e))
6243
+ : [],
6244
+ completedDataSetStartingShredIndex: isSet(object.completedDataSetStartingShredIndex)
6245
+ ? globalThis.Number(object.completedDataSetStartingShredIndex)
6246
+ : isSet(object.completed_data_set_starting_shred_index)
6247
+ ? globalThis.Number(object.completed_data_set_starting_shred_index)
6248
+ : 0,
6249
+ completedDataSetEndingShredIndexExclusive: isSet(object.completedDataSetEndingShredIndexExclusive)
6250
+ ? globalThis.Number(object.completedDataSetEndingShredIndexExclusive)
6251
+ : isSet(object.completed_data_set_ending_shred_index_exclusive)
6252
+ ? globalThis.Number(object.completed_data_set_ending_shred_index_exclusive)
6253
+ : 0,
6254
+ };
6255
+ },
6256
+ toJSON(message) {
6257
+ const obj = {};
6258
+ if (message.signature.length !== 0) {
6259
+ obj.signature = base64FromBytes(message.signature);
6260
+ }
6261
+ if (message.isVote !== false) {
6262
+ obj.isVote = message.isVote;
6263
+ }
6264
+ if (message.transaction !== undefined) {
6265
+ obj.transaction = Transaction.toJSON(message.transaction);
6266
+ }
6267
+ if (message.loadedWritableAddresses?.length) {
6268
+ obj.loadedWritableAddresses = message.loadedWritableAddresses.map((e) => base64FromBytes(e));
6269
+ }
6270
+ if (message.loadedReadonlyAddresses?.length) {
6271
+ obj.loadedReadonlyAddresses = message.loadedReadonlyAddresses.map((e) => base64FromBytes(e));
6272
+ }
6273
+ if (message.completedDataSetStartingShredIndex !== 0) {
6274
+ obj.completedDataSetStartingShredIndex = Math.round(message.completedDataSetStartingShredIndex);
6275
+ }
6276
+ if (message.completedDataSetEndingShredIndexExclusive !== 0) {
6277
+ obj.completedDataSetEndingShredIndexExclusive = Math.round(message.completedDataSetEndingShredIndexExclusive);
6278
+ }
6279
+ return obj;
6280
+ },
6281
+ create(base) {
6282
+ return SubscribeUpdateDeshredTransactionInfo.fromPartial(base ?? {});
6283
+ },
6284
+ fromPartial(object) {
6285
+ const message = createBaseSubscribeUpdateDeshredTransactionInfo();
6286
+ message.signature = object.signature ?? new Uint8Array(0);
6287
+ message.isVote = object.isVote ?? false;
6288
+ message.transaction = (object.transaction !== undefined && object.transaction !== null)
6289
+ ? Transaction.fromPartial(object.transaction)
6290
+ : undefined;
6291
+ message.loadedWritableAddresses = object.loadedWritableAddresses?.map((e) => e) || [];
6292
+ message.loadedReadonlyAddresses = object.loadedReadonlyAddresses?.map((e) => e) || [];
6293
+ message.completedDataSetStartingShredIndex = object.completedDataSetStartingShredIndex ?? 0;
6294
+ message.completedDataSetEndingShredIndexExclusive = object.completedDataSetEndingShredIndexExclusive ?? 0;
6295
+ return message;
6296
+ },
6297
+ };
6298
+ function createBaseSubscribeUpdatePing() {
6299
+ return {};
6300
+ }
6301
+ export const SubscribeUpdatePing = {
6302
+ encode(_, writer = new BinaryWriter()) {
6303
+ return writer;
6304
+ },
6305
+ decode(input, length) {
6306
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6307
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
6308
+ if (previousRecursionDepth >= 100) {
6309
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
6310
+ }
6311
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
6312
+ try {
6313
+ const end = length === undefined ? reader.len : reader.pos + length;
6314
+ const message = createBaseSubscribeUpdatePing();
6315
+ while (reader.pos < end) {
6316
+ const tag = reader.uint32();
6317
+ switch (tag >>> 3) {
6318
+ }
6319
+ if ((tag & 7) === 4 || tag === 0) {
6320
+ break;
6321
+ }
6322
+ reader.skip(tag & 7);
6323
+ }
6324
+ return message;
6325
+ }
6326
+ finally {
6327
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
6328
+ }
6329
+ },
6330
+ fromJSON(_) {
6331
+ return {};
6332
+ },
6333
+ toJSON(_) {
6334
+ const obj = {};
6335
+ return obj;
6336
+ },
6337
+ create(base) {
6338
+ return SubscribeUpdatePing.fromPartial(base ?? {});
6339
+ },
6340
+ fromPartial(_) {
6341
+ const message = createBaseSubscribeUpdatePing();
6342
+ return message;
6343
+ },
6344
+ };
6345
+ function createBaseSubscribeUpdatePong() {
6346
+ return { id: 0 };
6347
+ }
6348
+ export const SubscribeUpdatePong = {
6349
+ encode(message, writer = new BinaryWriter()) {
6350
+ if (message.id !== 0) {
6351
+ writer.uint32(8).int32(message.id);
6352
+ }
6353
+ return writer;
6354
+ },
6355
+ decode(input, length) {
6356
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6357
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
6358
+ if (previousRecursionDepth >= 100) {
6359
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
6360
+ }
6361
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
6362
+ try {
6363
+ const end = length === undefined ? reader.len : reader.pos + length;
6364
+ const message = createBaseSubscribeUpdatePong();
6365
+ while (reader.pos < end) {
6366
+ const tag = reader.uint32();
6367
+ switch (tag >>> 3) {
6368
+ case 1: {
6369
+ if (tag !== 8) {
6370
+ break;
6371
+ }
6372
+ message.id = reader.int32();
6373
+ continue;
6374
+ }
6375
+ }
6376
+ if ((tag & 7) === 4 || tag === 0) {
6377
+ break;
6378
+ }
6379
+ reader.skip(tag & 7);
6380
+ }
6381
+ return message;
6382
+ }
6383
+ finally {
6384
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
6385
+ }
6386
+ },
6387
+ fromJSON(object) {
6388
+ return { id: isSet(object.id) ? globalThis.Number(object.id) : 0 };
6389
+ },
6390
+ toJSON(message) {
6391
+ const obj = {};
6392
+ if (message.id !== 0) {
6393
+ obj.id = Math.round(message.id);
6394
+ }
6395
+ return obj;
6396
+ },
6397
+ create(base) {
6398
+ return SubscribeUpdatePong.fromPartial(base ?? {});
6399
+ },
6400
+ fromPartial(object) {
6401
+ const message = createBaseSubscribeUpdatePong();
6402
+ message.id = object.id ?? 0;
6403
+ return message;
6404
+ },
6405
+ };
6406
+ function createBaseSubscribeUpdateDeshred() {
6407
+ return {
6408
+ filters: [],
6409
+ deshredTransaction: undefined,
6410
+ ping: undefined,
6411
+ pong: undefined,
6412
+ slot: undefined,
6413
+ deshredUpdateParent: undefined,
6414
+ createdAt: undefined,
6415
+ };
6416
+ }
6417
+ export const SubscribeUpdateDeshred = {
6418
+ encode(message, writer = new BinaryWriter()) {
6419
+ for (const v of message.filters) {
6420
+ writer.uint32(10).string(v);
6421
+ }
6422
+ if (message.deshredTransaction !== undefined) {
6423
+ SubscribeUpdateDeshredTransaction.encode(message.deshredTransaction, writer.uint32(18).fork()).join();
6424
+ }
6425
+ if (message.ping !== undefined) {
6426
+ SubscribeUpdatePing.encode(message.ping, writer.uint32(26).fork()).join();
6427
+ }
6428
+ if (message.pong !== undefined) {
6429
+ SubscribeUpdatePong.encode(message.pong, writer.uint32(34).fork()).join();
6430
+ }
6431
+ if (message.slot !== undefined) {
6432
+ SubscribeUpdateSlot.encode(message.slot, writer.uint32(50).fork()).join();
6433
+ }
6434
+ if (message.deshredUpdateParent !== undefined) {
6435
+ SubscribeUpdateDeshredUpdateParent.encode(message.deshredUpdateParent, writer.uint32(58).fork()).join();
6436
+ }
6437
+ if (message.createdAt !== undefined) {
6438
+ Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(42).fork()).join();
6439
+ }
6440
+ return writer;
6441
+ },
6442
+ decode(input, length) {
6443
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6444
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
6445
+ if (previousRecursionDepth >= 100) {
6446
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
6447
+ }
6448
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
6449
+ try {
6450
+ const end = length === undefined ? reader.len : reader.pos + length;
6451
+ const message = createBaseSubscribeUpdateDeshred();
6452
+ while (reader.pos < end) {
6453
+ const tag = reader.uint32();
6454
+ switch (tag >>> 3) {
6455
+ case 1: {
6456
+ if (tag !== 10) {
6457
+ break;
6458
+ }
6459
+ message.filters.push(reader.string());
6460
+ continue;
6461
+ }
6462
+ case 2: {
6463
+ if (tag !== 18) {
6464
+ break;
6465
+ }
6466
+ message.deshredTransaction = SubscribeUpdateDeshredTransaction.decode(reader, reader.uint32());
6467
+ continue;
6468
+ }
6469
+ case 3: {
6470
+ if (tag !== 26) {
6471
+ break;
6472
+ }
6473
+ message.ping = SubscribeUpdatePing.decode(reader, reader.uint32());
6474
+ continue;
6475
+ }
6476
+ case 4: {
6477
+ if (tag !== 34) {
6478
+ break;
6479
+ }
6480
+ message.pong = SubscribeUpdatePong.decode(reader, reader.uint32());
6481
+ continue;
6482
+ }
6483
+ case 6: {
6484
+ if (tag !== 50) {
6485
+ break;
6486
+ }
6487
+ message.slot = SubscribeUpdateSlot.decode(reader, reader.uint32());
6488
+ continue;
6489
+ }
6490
+ case 7: {
6491
+ if (tag !== 58) {
6492
+ break;
6493
+ }
6494
+ message.deshredUpdateParent = SubscribeUpdateDeshredUpdateParent.decode(reader, reader.uint32());
6495
+ continue;
6496
+ }
6497
+ case 5: {
6498
+ if (tag !== 42) {
6499
+ break;
6500
+ }
6501
+ message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
6502
+ continue;
6503
+ }
6504
+ }
6505
+ if ((tag & 7) === 4 || tag === 0) {
6506
+ break;
6507
+ }
6508
+ reader.skip(tag & 7);
6509
+ }
6510
+ return message;
6511
+ }
6512
+ finally {
6513
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
6514
+ }
6515
+ },
6516
+ fromJSON(object) {
6517
+ return {
6518
+ filters: globalThis.Array.isArray(object?.filters) ? object.filters.map((e) => globalThis.String(e)) : [],
6519
+ deshredTransaction: isSet(object.deshredTransaction)
6520
+ ? SubscribeUpdateDeshredTransaction.fromJSON(object.deshredTransaction)
6521
+ : isSet(object.deshred_transaction)
6522
+ ? SubscribeUpdateDeshredTransaction.fromJSON(object.deshred_transaction)
6523
+ : undefined,
6524
+ ping: isSet(object.ping) ? SubscribeUpdatePing.fromJSON(object.ping) : undefined,
6525
+ pong: isSet(object.pong) ? SubscribeUpdatePong.fromJSON(object.pong) : undefined,
6526
+ slot: isSet(object.slot) ? SubscribeUpdateSlot.fromJSON(object.slot) : undefined,
6527
+ deshredUpdateParent: isSet(object.deshredUpdateParent)
6528
+ ? SubscribeUpdateDeshredUpdateParent.fromJSON(object.deshredUpdateParent)
6529
+ : isSet(object.deshred_update_parent)
6530
+ ? SubscribeUpdateDeshredUpdateParent.fromJSON(object.deshred_update_parent)
6531
+ : undefined,
6532
+ createdAt: isSet(object.createdAt)
6533
+ ? fromJsonTimestamp(object.createdAt)
6534
+ : isSet(object.created_at)
6535
+ ? fromJsonTimestamp(object.created_at)
6536
+ : undefined,
6537
+ };
6538
+ },
6539
+ toJSON(message) {
6540
+ const obj = {};
6541
+ if (message.filters?.length) {
6542
+ obj.filters = message.filters;
6543
+ }
6544
+ if (message.deshredTransaction !== undefined) {
6545
+ obj.deshredTransaction = SubscribeUpdateDeshredTransaction.toJSON(message.deshredTransaction);
6546
+ }
6547
+ if (message.ping !== undefined) {
6548
+ obj.ping = SubscribeUpdatePing.toJSON(message.ping);
6549
+ }
6550
+ if (message.pong !== undefined) {
6551
+ obj.pong = SubscribeUpdatePong.toJSON(message.pong);
6552
+ }
6553
+ if (message.slot !== undefined) {
6554
+ obj.slot = SubscribeUpdateSlot.toJSON(message.slot);
6555
+ }
6556
+ if (message.deshredUpdateParent !== undefined) {
6557
+ obj.deshredUpdateParent = SubscribeUpdateDeshredUpdateParent.toJSON(message.deshredUpdateParent);
6558
+ }
6559
+ if (message.createdAt !== undefined) {
6560
+ obj.createdAt = message.createdAt.toISOString();
6561
+ }
6562
+ return obj;
6563
+ },
6564
+ create(base) {
6565
+ return SubscribeUpdateDeshred.fromPartial(base ?? {});
6566
+ },
6567
+ fromPartial(object) {
6568
+ const message = createBaseSubscribeUpdateDeshred();
6569
+ message.filters = object.filters?.map((e) => e) || [];
6570
+ message.deshredTransaction = (object.deshredTransaction !== undefined && object.deshredTransaction !== null)
6571
+ ? SubscribeUpdateDeshredTransaction.fromPartial(object.deshredTransaction)
6572
+ : undefined;
6573
+ message.ping = (object.ping !== undefined && object.ping !== null)
6574
+ ? SubscribeUpdatePing.fromPartial(object.ping)
6575
+ : undefined;
6576
+ message.pong = (object.pong !== undefined && object.pong !== null)
6577
+ ? SubscribeUpdatePong.fromPartial(object.pong)
6578
+ : undefined;
6579
+ message.slot = (object.slot !== undefined && object.slot !== null)
6580
+ ? SubscribeUpdateSlot.fromPartial(object.slot)
6581
+ : undefined;
6582
+ message.deshredUpdateParent = (object.deshredUpdateParent !== undefined && object.deshredUpdateParent !== null)
6583
+ ? SubscribeUpdateDeshredUpdateParent.fromPartial(object.deshredUpdateParent)
6584
+ : undefined;
6585
+ message.createdAt = object.createdAt ?? undefined;
6586
+ return message;
6587
+ },
6588
+ };
6589
+ function createBaseSubscribeGossipRequest() {
6590
+ return {};
6591
+ }
6592
+ export const SubscribeGossipRequest = {
6593
+ encode(_, writer = new BinaryWriter()) {
6594
+ return writer;
6595
+ },
6596
+ decode(input, length) {
6597
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6598
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
6599
+ if (previousRecursionDepth >= 100) {
6600
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
6601
+ }
6602
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
6603
+ try {
6604
+ const end = length === undefined ? reader.len : reader.pos + length;
6605
+ const message = createBaseSubscribeGossipRequest();
6606
+ while (reader.pos < end) {
6607
+ const tag = reader.uint32();
6608
+ switch (tag >>> 3) {
6609
+ }
6610
+ if ((tag & 7) === 4 || tag === 0) {
6611
+ break;
6612
+ }
6613
+ reader.skip(tag & 7);
6614
+ }
6615
+ return message;
6616
+ }
6617
+ finally {
6618
+ reader.__tsProtoDecodeDepth = previousRecursionDepth;
6619
+ }
6620
+ },
6621
+ fromJSON(_) {
6622
+ return {};
6623
+ },
6624
+ toJSON(_) {
6625
+ const obj = {};
6626
+ return obj;
6627
+ },
6628
+ create(base) {
6629
+ return SubscribeGossipRequest.fromPartial(base ?? {});
6630
+ },
6631
+ fromPartial(_) {
6632
+ const message = createBaseSubscribeGossipRequest();
6633
+ return message;
6634
+ },
6635
+ };
6636
+ function createBaseSubscribeUpdateGossip() {
6637
+ return { node: undefined, removed: undefined, ping: undefined, snapshot: undefined, createdAt: undefined, seq: 0n };
6638
+ }
6639
+ export const SubscribeUpdateGossip = {
6640
+ encode(message, writer = new BinaryWriter()) {
6641
+ if (message.node !== undefined) {
6642
+ SubscribeUpdateContactInfoNode.encode(message.node, writer.uint32(10).fork()).join();
6643
+ }
6644
+ if (message.removed !== undefined) {
6645
+ SubscribeUpdateContactInfoRemoved.encode(message.removed, writer.uint32(18).fork()).join();
6646
+ }
6647
+ if (message.ping !== undefined) {
6648
+ SubscribeUpdatePing.encode(message.ping, writer.uint32(26).fork()).join();
6649
+ }
6650
+ if (message.snapshot !== undefined) {
6651
+ GossipTopology.encode(message.snapshot, writer.uint32(50).fork()).join();
6652
+ }
6653
+ if (message.createdAt !== undefined) {
6654
+ Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(42).fork()).join();
6655
+ }
6656
+ if (message.seq !== 0n) {
6657
+ if (BigInt.asUintN(64, message.seq) !== message.seq) {
6658
+ throw new globalThis.Error("value provided for field message.seq of type uint64 too large");
6659
+ }
6660
+ writer.uint32(56).uint64(message.seq);
6661
+ }
6662
+ return writer;
6663
+ },
6664
+ decode(input, length) {
6665
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
6666
+ const previousRecursionDepth = reader.__tsProtoDecodeDepth ?? 0;
6667
+ if (previousRecursionDepth >= 100) {
6668
+ throw new globalThis.Error("protobuf decode recursion limit exceeded");
6669
+ }
6670
+ reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
6671
+ try {
6672
+ const end = length === undefined ? reader.len : reader.pos + length;
6673
+ const message = createBaseSubscribeUpdateGossip();
6674
+ while (reader.pos < end) {
6675
+ const tag = reader.uint32();
6676
+ switch (tag >>> 3) {
6677
+ case 1: {
6678
+ if (tag !== 10) {
6679
+ break;
6680
+ }
6681
+ message.node = SubscribeUpdateContactInfoNode.decode(reader, reader.uint32());
6682
+ continue;
6683
+ }
6684
+ case 2: {
6685
+ if (tag !== 18) {
6686
+ break;
6687
+ }
6688
+ message.removed = SubscribeUpdateContactInfoRemoved.decode(reader, reader.uint32());
6689
+ continue;
6690
+ }
6691
+ case 3: {
6692
+ if (tag !== 26) {
6693
+ break;
6694
+ }
6695
+ message.ping = SubscribeUpdatePing.decode(reader, reader.uint32());
6696
+ continue;
6697
+ }
6698
+ case 6: {
6699
+ if (tag !== 50) {
6700
+ break;
6701
+ }
6702
+ message.snapshot = GossipTopology.decode(reader, reader.uint32());
6703
+ continue;
4417
6704
  }
4418
6705
  case 5: {
4419
6706
  if (tag !== 42) {
4420
6707
  break;
4421
6708
  }
4422
- message.loadedReadonlyAddresses.push(reader.bytes());
6709
+ message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
6710
+ continue;
6711
+ }
6712
+ case 7: {
6713
+ if (tag !== 56) {
6714
+ break;
6715
+ }
6716
+ message.seq = reader.uint64();
4423
6717
  continue;
4424
6718
  }
4425
6719
  }
@@ -4436,64 +6730,70 @@ export const SubscribeUpdateDeshredTransactionInfo = {
4436
6730
  },
4437
6731
  fromJSON(object) {
4438
6732
  return {
4439
- signature: isSet(object.signature) ? bytesFromBase64(object.signature) : new Uint8Array(0),
4440
- isVote: isSet(object.isVote)
4441
- ? globalThis.Boolean(object.isVote)
4442
- : isSet(object.is_vote)
4443
- ? globalThis.Boolean(object.is_vote)
4444
- : false,
4445
- transaction: isSet(object.transaction) ? Transaction.fromJSON(object.transaction) : undefined,
4446
- loadedWritableAddresses: globalThis.Array.isArray(object?.loadedWritableAddresses)
4447
- ? object.loadedWritableAddresses.map((e) => bytesFromBase64(e))
4448
- : globalThis.Array.isArray(object?.loaded_writable_addresses)
4449
- ? object.loaded_writable_addresses.map((e) => bytesFromBase64(e))
4450
- : [],
4451
- loadedReadonlyAddresses: globalThis.Array.isArray(object?.loadedReadonlyAddresses)
4452
- ? object.loadedReadonlyAddresses.map((e) => bytesFromBase64(e))
4453
- : globalThis.Array.isArray(object?.loaded_readonly_addresses)
4454
- ? object.loaded_readonly_addresses.map((e) => bytesFromBase64(e))
4455
- : [],
6733
+ node: isSet(object.node) ? SubscribeUpdateContactInfoNode.fromJSON(object.node) : undefined,
6734
+ removed: isSet(object.removed) ? SubscribeUpdateContactInfoRemoved.fromJSON(object.removed) : undefined,
6735
+ ping: isSet(object.ping) ? SubscribeUpdatePing.fromJSON(object.ping) : undefined,
6736
+ snapshot: isSet(object.snapshot) ? GossipTopology.fromJSON(object.snapshot) : undefined,
6737
+ createdAt: isSet(object.createdAt)
6738
+ ? fromJsonTimestamp(object.createdAt)
6739
+ : isSet(object.created_at)
6740
+ ? fromJsonTimestamp(object.created_at)
6741
+ : undefined,
6742
+ seq: isSet(object.seq) ? BigInt(object.seq) : 0n,
4456
6743
  };
4457
6744
  },
4458
6745
  toJSON(message) {
4459
6746
  const obj = {};
4460
- if (message.signature.length !== 0) {
4461
- obj.signature = base64FromBytes(message.signature);
6747
+ if (message.node !== undefined) {
6748
+ obj.node = SubscribeUpdateContactInfoNode.toJSON(message.node);
4462
6749
  }
4463
- if (message.isVote !== false) {
4464
- obj.isVote = message.isVote;
6750
+ if (message.removed !== undefined) {
6751
+ obj.removed = SubscribeUpdateContactInfoRemoved.toJSON(message.removed);
4465
6752
  }
4466
- if (message.transaction !== undefined) {
4467
- obj.transaction = Transaction.toJSON(message.transaction);
6753
+ if (message.ping !== undefined) {
6754
+ obj.ping = SubscribeUpdatePing.toJSON(message.ping);
4468
6755
  }
4469
- if (message.loadedWritableAddresses?.length) {
4470
- obj.loadedWritableAddresses = message.loadedWritableAddresses.map((e) => base64FromBytes(e));
6756
+ if (message.snapshot !== undefined) {
6757
+ obj.snapshot = GossipTopology.toJSON(message.snapshot);
4471
6758
  }
4472
- if (message.loadedReadonlyAddresses?.length) {
4473
- obj.loadedReadonlyAddresses = message.loadedReadonlyAddresses.map((e) => base64FromBytes(e));
6759
+ if (message.createdAt !== undefined) {
6760
+ obj.createdAt = message.createdAt.toISOString();
6761
+ }
6762
+ if (message.seq !== 0n) {
6763
+ obj.seq = message.seq.toString();
4474
6764
  }
4475
6765
  return obj;
4476
6766
  },
4477
6767
  create(base) {
4478
- return SubscribeUpdateDeshredTransactionInfo.fromPartial(base ?? {});
6768
+ return SubscribeUpdateGossip.fromPartial(base ?? {});
4479
6769
  },
4480
6770
  fromPartial(object) {
4481
- const message = createBaseSubscribeUpdateDeshredTransactionInfo();
4482
- message.signature = object.signature ?? new Uint8Array(0);
4483
- message.isVote = object.isVote ?? false;
4484
- message.transaction = (object.transaction !== undefined && object.transaction !== null)
4485
- ? Transaction.fromPartial(object.transaction)
6771
+ const message = createBaseSubscribeUpdateGossip();
6772
+ message.node = (object.node !== undefined && object.node !== null)
6773
+ ? SubscribeUpdateContactInfoNode.fromPartial(object.node)
4486
6774
  : undefined;
4487
- message.loadedWritableAddresses = object.loadedWritableAddresses?.map((e) => e) || [];
4488
- message.loadedReadonlyAddresses = object.loadedReadonlyAddresses?.map((e) => e) || [];
6775
+ message.removed = (object.removed !== undefined && object.removed !== null)
6776
+ ? SubscribeUpdateContactInfoRemoved.fromPartial(object.removed)
6777
+ : undefined;
6778
+ message.ping = (object.ping !== undefined && object.ping !== null)
6779
+ ? SubscribeUpdatePing.fromPartial(object.ping)
6780
+ : undefined;
6781
+ message.snapshot = (object.snapshot !== undefined && object.snapshot !== null)
6782
+ ? GossipTopology.fromPartial(object.snapshot)
6783
+ : undefined;
6784
+ message.createdAt = object.createdAt ?? undefined;
6785
+ message.seq = (object.seq !== undefined && object.seq !== null) ? BigInt(object.seq) : 0n;
4489
6786
  return message;
4490
6787
  },
4491
6788
  };
4492
- function createBaseSubscribeUpdatePing() {
4493
- return {};
6789
+ function createBaseGossipTopology() {
6790
+ return { nodes: [] };
4494
6791
  }
4495
- export const SubscribeUpdatePing = {
4496
- encode(_, writer = new BinaryWriter()) {
6792
+ export const GossipTopology = {
6793
+ encode(message, writer = new BinaryWriter()) {
6794
+ for (const v of message.nodes) {
6795
+ SubscribeUpdateContactInfoNode.encode(v, writer.uint32(10).fork()).join();
6796
+ }
4497
6797
  return writer;
4498
6798
  },
4499
6799
  decode(input, length) {
@@ -4505,10 +6805,17 @@ export const SubscribeUpdatePing = {
4505
6805
  reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
4506
6806
  try {
4507
6807
  const end = length === undefined ? reader.len : reader.pos + length;
4508
- const message = createBaseSubscribeUpdatePing();
6808
+ const message = createBaseGossipTopology();
4509
6809
  while (reader.pos < end) {
4510
6810
  const tag = reader.uint32();
4511
6811
  switch (tag >>> 3) {
6812
+ case 1: {
6813
+ if (tag !== 10) {
6814
+ break;
6815
+ }
6816
+ message.nodes.push(SubscribeUpdateContactInfoNode.decode(reader, reader.uint32()));
6817
+ continue;
6818
+ }
4512
6819
  }
4513
6820
  if ((tag & 7) === 4 || tag === 0) {
4514
6821
  break;
@@ -4521,28 +6828,128 @@ export const SubscribeUpdatePing = {
4521
6828
  reader.__tsProtoDecodeDepth = previousRecursionDepth;
4522
6829
  }
4523
6830
  },
4524
- fromJSON(_) {
4525
- return {};
6831
+ fromJSON(object) {
6832
+ return {
6833
+ nodes: globalThis.Array.isArray(object?.nodes)
6834
+ ? object.nodes.map((e) => SubscribeUpdateContactInfoNode.fromJSON(e))
6835
+ : [],
6836
+ };
4526
6837
  },
4527
- toJSON(_) {
6838
+ toJSON(message) {
4528
6839
  const obj = {};
6840
+ if (message.nodes?.length) {
6841
+ obj.nodes = message.nodes.map((e) => SubscribeUpdateContactInfoNode.toJSON(e));
6842
+ }
4529
6843
  return obj;
4530
6844
  },
4531
6845
  create(base) {
4532
- return SubscribeUpdatePing.fromPartial(base ?? {});
6846
+ return GossipTopology.fromPartial(base ?? {});
4533
6847
  },
4534
- fromPartial(_) {
4535
- const message = createBaseSubscribeUpdatePing();
6848
+ fromPartial(object) {
6849
+ const message = createBaseGossipTopology();
6850
+ message.nodes = object.nodes?.map((e) => SubscribeUpdateContactInfoNode.fromPartial(e)) || [];
4536
6851
  return message;
4537
6852
  },
4538
6853
  };
4539
- function createBaseSubscribeUpdatePong() {
4540
- return { id: 0 };
6854
+ function createBaseSubscribeUpdateContactInfoNode() {
6855
+ return {
6856
+ pubkey: new Uint8Array(0),
6857
+ wallclock: 0n,
6858
+ outset: 0n,
6859
+ shredVersion: 0,
6860
+ versionMajor: 0,
6861
+ versionMinor: 0,
6862
+ versionPatch: 0,
6863
+ versionCommit: 0,
6864
+ versionFeatureSet: 0,
6865
+ versionClientId: 0,
6866
+ gossip: undefined,
6867
+ tpuQuic: undefined,
6868
+ tpuForwardsQuic: undefined,
6869
+ tpuVoteUdp: undefined,
6870
+ tpuVoteQuic: undefined,
6871
+ tvuUdp: undefined,
6872
+ tvuQuic: undefined,
6873
+ serveRepairUdp: undefined,
6874
+ serveRepairQuic: undefined,
6875
+ rpc: undefined,
6876
+ rpcPubsub: undefined,
6877
+ alpenglow: undefined,
6878
+ };
4541
6879
  }
4542
- export const SubscribeUpdatePong = {
6880
+ export const SubscribeUpdateContactInfoNode = {
4543
6881
  encode(message, writer = new BinaryWriter()) {
4544
- if (message.id !== 0) {
4545
- writer.uint32(8).int32(message.id);
6882
+ if (message.pubkey.length !== 0) {
6883
+ writer.uint32(10).bytes(message.pubkey);
6884
+ }
6885
+ if (message.wallclock !== 0n) {
6886
+ if (BigInt.asUintN(64, message.wallclock) !== message.wallclock) {
6887
+ throw new globalThis.Error("value provided for field message.wallclock of type uint64 too large");
6888
+ }
6889
+ writer.uint32(16).uint64(message.wallclock);
6890
+ }
6891
+ if (message.outset !== 0n) {
6892
+ if (BigInt.asUintN(64, message.outset) !== message.outset) {
6893
+ throw new globalThis.Error("value provided for field message.outset of type uint64 too large");
6894
+ }
6895
+ writer.uint32(24).uint64(message.outset);
6896
+ }
6897
+ if (message.shredVersion !== 0) {
6898
+ writer.uint32(32).uint32(message.shredVersion);
6899
+ }
6900
+ if (message.versionMajor !== 0) {
6901
+ writer.uint32(40).uint32(message.versionMajor);
6902
+ }
6903
+ if (message.versionMinor !== 0) {
6904
+ writer.uint32(48).uint32(message.versionMinor);
6905
+ }
6906
+ if (message.versionPatch !== 0) {
6907
+ writer.uint32(56).uint32(message.versionPatch);
6908
+ }
6909
+ if (message.versionCommit !== 0) {
6910
+ writer.uint32(64).uint32(message.versionCommit);
6911
+ }
6912
+ if (message.versionFeatureSet !== 0) {
6913
+ writer.uint32(72).uint32(message.versionFeatureSet);
6914
+ }
6915
+ if (message.versionClientId !== 0) {
6916
+ writer.uint32(80).uint32(message.versionClientId);
6917
+ }
6918
+ if (message.gossip !== undefined) {
6919
+ writer.uint32(90).string(message.gossip);
6920
+ }
6921
+ if (message.tpuQuic !== undefined) {
6922
+ writer.uint32(98).string(message.tpuQuic);
6923
+ }
6924
+ if (message.tpuForwardsQuic !== undefined) {
6925
+ writer.uint32(106).string(message.tpuForwardsQuic);
6926
+ }
6927
+ if (message.tpuVoteUdp !== undefined) {
6928
+ writer.uint32(114).string(message.tpuVoteUdp);
6929
+ }
6930
+ if (message.tpuVoteQuic !== undefined) {
6931
+ writer.uint32(122).string(message.tpuVoteQuic);
6932
+ }
6933
+ if (message.tvuUdp !== undefined) {
6934
+ writer.uint32(130).string(message.tvuUdp);
6935
+ }
6936
+ if (message.tvuQuic !== undefined) {
6937
+ writer.uint32(138).string(message.tvuQuic);
6938
+ }
6939
+ if (message.serveRepairUdp !== undefined) {
6940
+ writer.uint32(146).string(message.serveRepairUdp);
6941
+ }
6942
+ if (message.serveRepairQuic !== undefined) {
6943
+ writer.uint32(154).string(message.serveRepairQuic);
6944
+ }
6945
+ if (message.rpc !== undefined) {
6946
+ writer.uint32(162).string(message.rpc);
6947
+ }
6948
+ if (message.rpcPubsub !== undefined) {
6949
+ writer.uint32(170).string(message.rpcPubsub);
6950
+ }
6951
+ if (message.alpenglow !== undefined) {
6952
+ writer.uint32(178).string(message.alpenglow);
4546
6953
  }
4547
6954
  return writer;
4548
6955
  },
@@ -4555,15 +6962,162 @@ export const SubscribeUpdatePong = {
4555
6962
  reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
4556
6963
  try {
4557
6964
  const end = length === undefined ? reader.len : reader.pos + length;
4558
- const message = createBaseSubscribeUpdatePong();
6965
+ const message = createBaseSubscribeUpdateContactInfoNode();
4559
6966
  while (reader.pos < end) {
4560
6967
  const tag = reader.uint32();
4561
6968
  switch (tag >>> 3) {
4562
6969
  case 1: {
4563
- if (tag !== 8) {
6970
+ if (tag !== 10) {
4564
6971
  break;
4565
6972
  }
4566
- message.id = reader.int32();
6973
+ message.pubkey = reader.bytes();
6974
+ continue;
6975
+ }
6976
+ case 2: {
6977
+ if (tag !== 16) {
6978
+ break;
6979
+ }
6980
+ message.wallclock = reader.uint64();
6981
+ continue;
6982
+ }
6983
+ case 3: {
6984
+ if (tag !== 24) {
6985
+ break;
6986
+ }
6987
+ message.outset = reader.uint64();
6988
+ continue;
6989
+ }
6990
+ case 4: {
6991
+ if (tag !== 32) {
6992
+ break;
6993
+ }
6994
+ message.shredVersion = reader.uint32();
6995
+ continue;
6996
+ }
6997
+ case 5: {
6998
+ if (tag !== 40) {
6999
+ break;
7000
+ }
7001
+ message.versionMajor = reader.uint32();
7002
+ continue;
7003
+ }
7004
+ case 6: {
7005
+ if (tag !== 48) {
7006
+ break;
7007
+ }
7008
+ message.versionMinor = reader.uint32();
7009
+ continue;
7010
+ }
7011
+ case 7: {
7012
+ if (tag !== 56) {
7013
+ break;
7014
+ }
7015
+ message.versionPatch = reader.uint32();
7016
+ continue;
7017
+ }
7018
+ case 8: {
7019
+ if (tag !== 64) {
7020
+ break;
7021
+ }
7022
+ message.versionCommit = reader.uint32();
7023
+ continue;
7024
+ }
7025
+ case 9: {
7026
+ if (tag !== 72) {
7027
+ break;
7028
+ }
7029
+ message.versionFeatureSet = reader.uint32();
7030
+ continue;
7031
+ }
7032
+ case 10: {
7033
+ if (tag !== 80) {
7034
+ break;
7035
+ }
7036
+ message.versionClientId = reader.uint32();
7037
+ continue;
7038
+ }
7039
+ case 11: {
7040
+ if (tag !== 90) {
7041
+ break;
7042
+ }
7043
+ message.gossip = reader.string();
7044
+ continue;
7045
+ }
7046
+ case 12: {
7047
+ if (tag !== 98) {
7048
+ break;
7049
+ }
7050
+ message.tpuQuic = reader.string();
7051
+ continue;
7052
+ }
7053
+ case 13: {
7054
+ if (tag !== 106) {
7055
+ break;
7056
+ }
7057
+ message.tpuForwardsQuic = reader.string();
7058
+ continue;
7059
+ }
7060
+ case 14: {
7061
+ if (tag !== 114) {
7062
+ break;
7063
+ }
7064
+ message.tpuVoteUdp = reader.string();
7065
+ continue;
7066
+ }
7067
+ case 15: {
7068
+ if (tag !== 122) {
7069
+ break;
7070
+ }
7071
+ message.tpuVoteQuic = reader.string();
7072
+ continue;
7073
+ }
7074
+ case 16: {
7075
+ if (tag !== 130) {
7076
+ break;
7077
+ }
7078
+ message.tvuUdp = reader.string();
7079
+ continue;
7080
+ }
7081
+ case 17: {
7082
+ if (tag !== 138) {
7083
+ break;
7084
+ }
7085
+ message.tvuQuic = reader.string();
7086
+ continue;
7087
+ }
7088
+ case 18: {
7089
+ if (tag !== 146) {
7090
+ break;
7091
+ }
7092
+ message.serveRepairUdp = reader.string();
7093
+ continue;
7094
+ }
7095
+ case 19: {
7096
+ if (tag !== 154) {
7097
+ break;
7098
+ }
7099
+ message.serveRepairQuic = reader.string();
7100
+ continue;
7101
+ }
7102
+ case 20: {
7103
+ if (tag !== 162) {
7104
+ break;
7105
+ }
7106
+ message.rpc = reader.string();
7107
+ continue;
7108
+ }
7109
+ case 21: {
7110
+ if (tag !== 170) {
7111
+ break;
7112
+ }
7113
+ message.rpcPubsub = reader.string();
7114
+ continue;
7115
+ }
7116
+ case 22: {
7117
+ if (tag !== 178) {
7118
+ break;
7119
+ }
7120
+ message.alpenglow = reader.string();
4567
7121
  continue;
4568
7122
  }
4569
7123
  }
@@ -4579,43 +7133,202 @@ export const SubscribeUpdatePong = {
4579
7133
  }
4580
7134
  },
4581
7135
  fromJSON(object) {
4582
- return { id: isSet(object.id) ? globalThis.Number(object.id) : 0 };
7136
+ return {
7137
+ pubkey: isSet(object.pubkey) ? bytesFromBase64(object.pubkey) : new Uint8Array(0),
7138
+ wallclock: isSet(object.wallclock) ? BigInt(object.wallclock) : 0n,
7139
+ outset: isSet(object.outset) ? BigInt(object.outset) : 0n,
7140
+ shredVersion: isSet(object.shredVersion)
7141
+ ? globalThis.Number(object.shredVersion)
7142
+ : isSet(object.shred_version)
7143
+ ? globalThis.Number(object.shred_version)
7144
+ : 0,
7145
+ versionMajor: isSet(object.versionMajor)
7146
+ ? globalThis.Number(object.versionMajor)
7147
+ : isSet(object.version_major)
7148
+ ? globalThis.Number(object.version_major)
7149
+ : 0,
7150
+ versionMinor: isSet(object.versionMinor)
7151
+ ? globalThis.Number(object.versionMinor)
7152
+ : isSet(object.version_minor)
7153
+ ? globalThis.Number(object.version_minor)
7154
+ : 0,
7155
+ versionPatch: isSet(object.versionPatch)
7156
+ ? globalThis.Number(object.versionPatch)
7157
+ : isSet(object.version_patch)
7158
+ ? globalThis.Number(object.version_patch)
7159
+ : 0,
7160
+ versionCommit: isSet(object.versionCommit)
7161
+ ? globalThis.Number(object.versionCommit)
7162
+ : isSet(object.version_commit)
7163
+ ? globalThis.Number(object.version_commit)
7164
+ : 0,
7165
+ versionFeatureSet: isSet(object.versionFeatureSet)
7166
+ ? globalThis.Number(object.versionFeatureSet)
7167
+ : isSet(object.version_feature_set)
7168
+ ? globalThis.Number(object.version_feature_set)
7169
+ : 0,
7170
+ versionClientId: isSet(object.versionClientId)
7171
+ ? globalThis.Number(object.versionClientId)
7172
+ : isSet(object.version_client_id)
7173
+ ? globalThis.Number(object.version_client_id)
7174
+ : 0,
7175
+ gossip: isSet(object.gossip) ? globalThis.String(object.gossip) : undefined,
7176
+ tpuQuic: isSet(object.tpuQuic)
7177
+ ? globalThis.String(object.tpuQuic)
7178
+ : isSet(object.tpu_quic)
7179
+ ? globalThis.String(object.tpu_quic)
7180
+ : undefined,
7181
+ tpuForwardsQuic: isSet(object.tpuForwardsQuic)
7182
+ ? globalThis.String(object.tpuForwardsQuic)
7183
+ : isSet(object.tpu_forwards_quic)
7184
+ ? globalThis.String(object.tpu_forwards_quic)
7185
+ : undefined,
7186
+ tpuVoteUdp: isSet(object.tpuVoteUdp)
7187
+ ? globalThis.String(object.tpuVoteUdp)
7188
+ : isSet(object.tpu_vote_udp)
7189
+ ? globalThis.String(object.tpu_vote_udp)
7190
+ : undefined,
7191
+ tpuVoteQuic: isSet(object.tpuVoteQuic)
7192
+ ? globalThis.String(object.tpuVoteQuic)
7193
+ : isSet(object.tpu_vote_quic)
7194
+ ? globalThis.String(object.tpu_vote_quic)
7195
+ : undefined,
7196
+ tvuUdp: isSet(object.tvuUdp)
7197
+ ? globalThis.String(object.tvuUdp)
7198
+ : isSet(object.tvu_udp)
7199
+ ? globalThis.String(object.tvu_udp)
7200
+ : undefined,
7201
+ tvuQuic: isSet(object.tvuQuic)
7202
+ ? globalThis.String(object.tvuQuic)
7203
+ : isSet(object.tvu_quic)
7204
+ ? globalThis.String(object.tvu_quic)
7205
+ : undefined,
7206
+ serveRepairUdp: isSet(object.serveRepairUdp)
7207
+ ? globalThis.String(object.serveRepairUdp)
7208
+ : isSet(object.serve_repair_udp)
7209
+ ? globalThis.String(object.serve_repair_udp)
7210
+ : undefined,
7211
+ serveRepairQuic: isSet(object.serveRepairQuic)
7212
+ ? globalThis.String(object.serveRepairQuic)
7213
+ : isSet(object.serve_repair_quic)
7214
+ ? globalThis.String(object.serve_repair_quic)
7215
+ : undefined,
7216
+ rpc: isSet(object.rpc) ? globalThis.String(object.rpc) : undefined,
7217
+ rpcPubsub: isSet(object.rpcPubsub)
7218
+ ? globalThis.String(object.rpcPubsub)
7219
+ : isSet(object.rpc_pubsub)
7220
+ ? globalThis.String(object.rpc_pubsub)
7221
+ : undefined,
7222
+ alpenglow: isSet(object.alpenglow) ? globalThis.String(object.alpenglow) : undefined,
7223
+ };
4583
7224
  },
4584
7225
  toJSON(message) {
4585
7226
  const obj = {};
4586
- if (message.id !== 0) {
4587
- obj.id = Math.round(message.id);
7227
+ if (message.pubkey.length !== 0) {
7228
+ obj.pubkey = base64FromBytes(message.pubkey);
7229
+ }
7230
+ if (message.wallclock !== 0n) {
7231
+ obj.wallclock = message.wallclock.toString();
7232
+ }
7233
+ if (message.outset !== 0n) {
7234
+ obj.outset = message.outset.toString();
7235
+ }
7236
+ if (message.shredVersion !== 0) {
7237
+ obj.shredVersion = Math.round(message.shredVersion);
7238
+ }
7239
+ if (message.versionMajor !== 0) {
7240
+ obj.versionMajor = Math.round(message.versionMajor);
7241
+ }
7242
+ if (message.versionMinor !== 0) {
7243
+ obj.versionMinor = Math.round(message.versionMinor);
7244
+ }
7245
+ if (message.versionPatch !== 0) {
7246
+ obj.versionPatch = Math.round(message.versionPatch);
7247
+ }
7248
+ if (message.versionCommit !== 0) {
7249
+ obj.versionCommit = Math.round(message.versionCommit);
7250
+ }
7251
+ if (message.versionFeatureSet !== 0) {
7252
+ obj.versionFeatureSet = Math.round(message.versionFeatureSet);
7253
+ }
7254
+ if (message.versionClientId !== 0) {
7255
+ obj.versionClientId = Math.round(message.versionClientId);
7256
+ }
7257
+ if (message.gossip !== undefined) {
7258
+ obj.gossip = message.gossip;
7259
+ }
7260
+ if (message.tpuQuic !== undefined) {
7261
+ obj.tpuQuic = message.tpuQuic;
7262
+ }
7263
+ if (message.tpuForwardsQuic !== undefined) {
7264
+ obj.tpuForwardsQuic = message.tpuForwardsQuic;
7265
+ }
7266
+ if (message.tpuVoteUdp !== undefined) {
7267
+ obj.tpuVoteUdp = message.tpuVoteUdp;
7268
+ }
7269
+ if (message.tpuVoteQuic !== undefined) {
7270
+ obj.tpuVoteQuic = message.tpuVoteQuic;
7271
+ }
7272
+ if (message.tvuUdp !== undefined) {
7273
+ obj.tvuUdp = message.tvuUdp;
7274
+ }
7275
+ if (message.tvuQuic !== undefined) {
7276
+ obj.tvuQuic = message.tvuQuic;
7277
+ }
7278
+ if (message.serveRepairUdp !== undefined) {
7279
+ obj.serveRepairUdp = message.serveRepairUdp;
7280
+ }
7281
+ if (message.serveRepairQuic !== undefined) {
7282
+ obj.serveRepairQuic = message.serveRepairQuic;
7283
+ }
7284
+ if (message.rpc !== undefined) {
7285
+ obj.rpc = message.rpc;
7286
+ }
7287
+ if (message.rpcPubsub !== undefined) {
7288
+ obj.rpcPubsub = message.rpcPubsub;
7289
+ }
7290
+ if (message.alpenglow !== undefined) {
7291
+ obj.alpenglow = message.alpenglow;
4588
7292
  }
4589
7293
  return obj;
4590
7294
  },
4591
7295
  create(base) {
4592
- return SubscribeUpdatePong.fromPartial(base ?? {});
7296
+ return SubscribeUpdateContactInfoNode.fromPartial(base ?? {});
4593
7297
  },
4594
7298
  fromPartial(object) {
4595
- const message = createBaseSubscribeUpdatePong();
4596
- message.id = object.id ?? 0;
7299
+ const message = createBaseSubscribeUpdateContactInfoNode();
7300
+ message.pubkey = object.pubkey ?? new Uint8Array(0);
7301
+ message.wallclock = (object.wallclock !== undefined && object.wallclock !== null) ? BigInt(object.wallclock) : 0n;
7302
+ message.outset = (object.outset !== undefined && object.outset !== null) ? BigInt(object.outset) : 0n;
7303
+ message.shredVersion = object.shredVersion ?? 0;
7304
+ message.versionMajor = object.versionMajor ?? 0;
7305
+ message.versionMinor = object.versionMinor ?? 0;
7306
+ message.versionPatch = object.versionPatch ?? 0;
7307
+ message.versionCommit = object.versionCommit ?? 0;
7308
+ message.versionFeatureSet = object.versionFeatureSet ?? 0;
7309
+ message.versionClientId = object.versionClientId ?? 0;
7310
+ message.gossip = object.gossip ?? undefined;
7311
+ message.tpuQuic = object.tpuQuic ?? undefined;
7312
+ message.tpuForwardsQuic = object.tpuForwardsQuic ?? undefined;
7313
+ message.tpuVoteUdp = object.tpuVoteUdp ?? undefined;
7314
+ message.tpuVoteQuic = object.tpuVoteQuic ?? undefined;
7315
+ message.tvuUdp = object.tvuUdp ?? undefined;
7316
+ message.tvuQuic = object.tvuQuic ?? undefined;
7317
+ message.serveRepairUdp = object.serveRepairUdp ?? undefined;
7318
+ message.serveRepairQuic = object.serveRepairQuic ?? undefined;
7319
+ message.rpc = object.rpc ?? undefined;
7320
+ message.rpcPubsub = object.rpcPubsub ?? undefined;
7321
+ message.alpenglow = object.alpenglow ?? undefined;
4597
7322
  return message;
4598
7323
  },
4599
7324
  };
4600
- function createBaseSubscribeUpdateDeshred() {
4601
- return { filters: [], deshredTransaction: undefined, ping: undefined, pong: undefined, createdAt: undefined };
7325
+ function createBaseSubscribeUpdateContactInfoRemoved() {
7326
+ return { pubkey: new Uint8Array(0) };
4602
7327
  }
4603
- export const SubscribeUpdateDeshred = {
7328
+ export const SubscribeUpdateContactInfoRemoved = {
4604
7329
  encode(message, writer = new BinaryWriter()) {
4605
- for (const v of message.filters) {
4606
- writer.uint32(10).string(v);
4607
- }
4608
- if (message.deshredTransaction !== undefined) {
4609
- SubscribeUpdateDeshredTransaction.encode(message.deshredTransaction, writer.uint32(18).fork()).join();
4610
- }
4611
- if (message.ping !== undefined) {
4612
- SubscribeUpdatePing.encode(message.ping, writer.uint32(26).fork()).join();
4613
- }
4614
- if (message.pong !== undefined) {
4615
- SubscribeUpdatePong.encode(message.pong, writer.uint32(34).fork()).join();
4616
- }
4617
- if (message.createdAt !== undefined) {
4618
- Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(42).fork()).join();
7330
+ if (message.pubkey.length !== 0) {
7331
+ writer.uint32(10).bytes(message.pubkey);
4619
7332
  }
4620
7333
  return writer;
4621
7334
  },
@@ -4628,7 +7341,7 @@ export const SubscribeUpdateDeshred = {
4628
7341
  reader.__tsProtoDecodeDepth = previousRecursionDepth + 1;
4629
7342
  try {
4630
7343
  const end = length === undefined ? reader.len : reader.pos + length;
4631
- const message = createBaseSubscribeUpdateDeshred();
7344
+ const message = createBaseSubscribeUpdateContactInfoRemoved();
4632
7345
  while (reader.pos < end) {
4633
7346
  const tag = reader.uint32();
4634
7347
  switch (tag >>> 3) {
@@ -4636,35 +7349,7 @@ export const SubscribeUpdateDeshred = {
4636
7349
  if (tag !== 10) {
4637
7350
  break;
4638
7351
  }
4639
- message.filters.push(reader.string());
4640
- continue;
4641
- }
4642
- case 2: {
4643
- if (tag !== 18) {
4644
- break;
4645
- }
4646
- message.deshredTransaction = SubscribeUpdateDeshredTransaction.decode(reader, reader.uint32());
4647
- continue;
4648
- }
4649
- case 3: {
4650
- if (tag !== 26) {
4651
- break;
4652
- }
4653
- message.ping = SubscribeUpdatePing.decode(reader, reader.uint32());
4654
- continue;
4655
- }
4656
- case 4: {
4657
- if (tag !== 34) {
4658
- break;
4659
- }
4660
- message.pong = SubscribeUpdatePong.decode(reader, reader.uint32());
4661
- continue;
4662
- }
4663
- case 5: {
4664
- if (tag !== 42) {
4665
- break;
4666
- }
4667
- message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
7352
+ message.pubkey = reader.bytes();
4668
7353
  continue;
4669
7354
  }
4670
7355
  }
@@ -4680,57 +7365,21 @@ export const SubscribeUpdateDeshred = {
4680
7365
  }
4681
7366
  },
4682
7367
  fromJSON(object) {
4683
- return {
4684
- filters: globalThis.Array.isArray(object?.filters) ? object.filters.map((e) => globalThis.String(e)) : [],
4685
- deshredTransaction: isSet(object.deshredTransaction)
4686
- ? SubscribeUpdateDeshredTransaction.fromJSON(object.deshredTransaction)
4687
- : isSet(object.deshred_transaction)
4688
- ? SubscribeUpdateDeshredTransaction.fromJSON(object.deshred_transaction)
4689
- : undefined,
4690
- ping: isSet(object.ping) ? SubscribeUpdatePing.fromJSON(object.ping) : undefined,
4691
- pong: isSet(object.pong) ? SubscribeUpdatePong.fromJSON(object.pong) : undefined,
4692
- createdAt: isSet(object.createdAt)
4693
- ? fromJsonTimestamp(object.createdAt)
4694
- : isSet(object.created_at)
4695
- ? fromJsonTimestamp(object.created_at)
4696
- : undefined,
4697
- };
7368
+ return { pubkey: isSet(object.pubkey) ? bytesFromBase64(object.pubkey) : new Uint8Array(0) };
4698
7369
  },
4699
7370
  toJSON(message) {
4700
7371
  const obj = {};
4701
- if (message.filters?.length) {
4702
- obj.filters = message.filters;
4703
- }
4704
- if (message.deshredTransaction !== undefined) {
4705
- obj.deshredTransaction = SubscribeUpdateDeshredTransaction.toJSON(message.deshredTransaction);
4706
- }
4707
- if (message.ping !== undefined) {
4708
- obj.ping = SubscribeUpdatePing.toJSON(message.ping);
4709
- }
4710
- if (message.pong !== undefined) {
4711
- obj.pong = SubscribeUpdatePong.toJSON(message.pong);
4712
- }
4713
- if (message.createdAt !== undefined) {
4714
- obj.createdAt = message.createdAt.toISOString();
7372
+ if (message.pubkey.length !== 0) {
7373
+ obj.pubkey = base64FromBytes(message.pubkey);
4715
7374
  }
4716
7375
  return obj;
4717
7376
  },
4718
7377
  create(base) {
4719
- return SubscribeUpdateDeshred.fromPartial(base ?? {});
7378
+ return SubscribeUpdateContactInfoRemoved.fromPartial(base ?? {});
4720
7379
  },
4721
7380
  fromPartial(object) {
4722
- const message = createBaseSubscribeUpdateDeshred();
4723
- message.filters = object.filters?.map((e) => e) || [];
4724
- message.deshredTransaction = (object.deshredTransaction !== undefined && object.deshredTransaction !== null)
4725
- ? SubscribeUpdateDeshredTransaction.fromPartial(object.deshredTransaction)
4726
- : undefined;
4727
- message.ping = (object.ping !== undefined && object.ping !== null)
4728
- ? SubscribeUpdatePing.fromPartial(object.ping)
4729
- : undefined;
4730
- message.pong = (object.pong !== undefined && object.pong !== null)
4731
- ? SubscribeUpdatePong.fromPartial(object.pong)
4732
- : undefined;
4733
- message.createdAt = object.createdAt ?? undefined;
7381
+ const message = createBaseSubscribeUpdateContactInfoRemoved();
7382
+ message.pubkey = object.pubkey ?? new Uint8Array(0);
4734
7383
  return message;
4735
7384
  },
4736
7385
  };
@@ -5685,6 +8334,15 @@ export const GeyserService = {
5685
8334
  responseSerialize: (value) => Buffer.from(SubscribeUpdateDeshred.encode(value).finish()),
5686
8335
  responseDeserialize: (value) => SubscribeUpdateDeshred.decode(value),
5687
8336
  },
8337
+ subscribeGossip: {
8338
+ path: "/geyser.Geyser/SubscribeGossip",
8339
+ requestStream: false,
8340
+ responseStream: true,
8341
+ requestSerialize: (value) => Buffer.from(SubscribeGossipRequest.encode(value).finish()),
8342
+ requestDeserialize: (value) => SubscribeGossipRequest.decode(value),
8343
+ responseSerialize: (value) => Buffer.from(SubscribeUpdateGossip.encode(value).finish()),
8344
+ responseDeserialize: (value) => SubscribeUpdateGossip.decode(value),
8345
+ },
5688
8346
  subscribeReplayInfo: {
5689
8347
  path: "/geyser.Geyser/SubscribeReplayInfo",
5690
8348
  requestStream: false,