@vocdoni/proto 1.15.3 → 1.15.4

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.
@@ -1201,7 +1201,11 @@ var require_reader = __commonJS({
1201
1201
  this.pos += length;
1202
1202
  if (Array.isArray(this.buf))
1203
1203
  return this.buf.slice(start, end);
1204
- return start === end ? new this.buf.constructor(0) : this._slice.call(this.buf, start, end);
1204
+ if (start === end) {
1205
+ var nativeBuffer = util.Buffer;
1206
+ return nativeBuffer ? nativeBuffer.alloc(0) : new this.buf.constructor(0);
1207
+ }
1208
+ return this._slice.call(this.buf, start, end);
1205
1209
  };
1206
1210
  Reader.prototype.string = function read_string() {
1207
1211
  var bytes = this.bytes();
@@ -1432,7 +1436,6 @@ __export(vochain_exports, {
1432
1436
  EnvelopeType: () => EnvelopeType,
1433
1437
  FaucetPackage: () => FaucetPackage,
1434
1438
  FaucetPayload: () => FaucetPayload,
1435
- MintTokensTx: () => MintTokensTx,
1436
1439
  NewProcessTx: () => NewProcessTx,
1437
1440
  OracleList: () => OracleList,
1438
1441
  Process: () => Process,
@@ -1449,8 +1452,6 @@ __export(vochain_exports, {
1449
1452
  ProofCA_Type: () => ProofCA_Type,
1450
1453
  ProofEthereumAccount: () => ProofEthereumAccount,
1451
1454
  ProofEthereumStorage: () => ProofEthereumStorage,
1452
- ProofGraviton: () => ProofGraviton,
1453
- ProofIden3: () => ProofIden3,
1454
1455
  ProofMinime: () => ProofMinime,
1455
1456
  ProofZkSNARK: () => ProofZkSNARK,
1456
1457
  QuestionResult: () => QuestionResult,
@@ -1466,7 +1467,6 @@ __export(vochain_exports, {
1466
1467
  SourceNetworkId: () => SourceNetworkId,
1467
1468
  StoredKeys: () => StoredKeys,
1468
1469
  TendermintHeader: () => TendermintHeader,
1469
- Treasurer: () => Treasurer,
1470
1470
  Tx: () => Tx,
1471
1471
  TxType: () => TxType,
1472
1472
  Validator: () => Validator,
@@ -1509,9 +1509,7 @@ var TxType = /* @__PURE__ */ ((TxType2) => {
1509
1509
  TxType2[TxType2["VOTE"] = 11] = "VOTE";
1510
1510
  TxType2[TxType2["SET_PROCESS_RESULTS"] = 12] = "SET_PROCESS_RESULTS";
1511
1511
  TxType2[TxType2["REGISTER_VOTER_KEY"] = 13] = "REGISTER_VOTER_KEY";
1512
- TxType2[TxType2["MINT_TOKENS"] = 14] = "MINT_TOKENS";
1513
1512
  TxType2[TxType2["SEND_TOKENS"] = 15] = "SEND_TOKENS";
1514
- TxType2[TxType2["SET_TRANSACTION_COSTS"] = 16] = "SET_TRANSACTION_COSTS";
1515
1513
  TxType2[TxType2["SET_ACCOUNT_INFO_URI"] = 17] = "SET_ACCOUNT_INFO_URI";
1516
1514
  TxType2[TxType2["ADD_DELEGATE_FOR_ACCOUNT"] = 18] = "ADD_DELEGATE_FOR_ACCOUNT";
1517
1515
  TxType2[TxType2["DEL_DELEGATE_FOR_ACCOUNT"] = 19] = "DEL_DELEGATE_FOR_ACCOUNT";
@@ -1522,6 +1520,7 @@ var TxType = /* @__PURE__ */ ((TxType2) => {
1522
1520
  TxType2[TxType2["SET_ACCOUNT_SIK"] = 24] = "SET_ACCOUNT_SIK";
1523
1521
  TxType2[TxType2["DEL_ACCOUNT_SIK"] = 25] = "DEL_ACCOUNT_SIK";
1524
1522
  TxType2[TxType2["REGISTER_SIK"] = 26] = "REGISTER_SIK";
1523
+ TxType2[TxType2["SET_ACCOUNT_VALIDATOR"] = 27] = "SET_ACCOUNT_VALIDATOR";
1525
1524
  TxType2[TxType2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
1526
1525
  return TxType2;
1527
1526
  })(TxType || {});
@@ -1569,15 +1568,9 @@ function txTypeFromJSON(object) {
1569
1568
  case 13:
1570
1569
  case "REGISTER_VOTER_KEY":
1571
1570
  return 13 /* REGISTER_VOTER_KEY */;
1572
- case 14:
1573
- case "MINT_TOKENS":
1574
- return 14 /* MINT_TOKENS */;
1575
1571
  case 15:
1576
1572
  case "SEND_TOKENS":
1577
1573
  return 15 /* SEND_TOKENS */;
1578
- case 16:
1579
- case "SET_TRANSACTION_COSTS":
1580
- return 16 /* SET_TRANSACTION_COSTS */;
1581
1574
  case 17:
1582
1575
  case "SET_ACCOUNT_INFO_URI":
1583
1576
  return 17 /* SET_ACCOUNT_INFO_URI */;
@@ -1608,6 +1601,9 @@ function txTypeFromJSON(object) {
1608
1601
  case 26:
1609
1602
  case "REGISTER_SIK":
1610
1603
  return 26 /* REGISTER_SIK */;
1604
+ case 27:
1605
+ case "SET_ACCOUNT_VALIDATOR":
1606
+ return 27 /* SET_ACCOUNT_VALIDATOR */;
1611
1607
  case -1:
1612
1608
  case "UNRECOGNIZED":
1613
1609
  default:
@@ -1644,12 +1640,8 @@ function txTypeToJSON(object) {
1644
1640
  return "SET_PROCESS_RESULTS";
1645
1641
  case 13 /* REGISTER_VOTER_KEY */:
1646
1642
  return "REGISTER_VOTER_KEY";
1647
- case 14 /* MINT_TOKENS */:
1648
- return "MINT_TOKENS";
1649
1643
  case 15 /* SEND_TOKENS */:
1650
1644
  return "SEND_TOKENS";
1651
- case 16 /* SET_TRANSACTION_COSTS */:
1652
- return "SET_TRANSACTION_COSTS";
1653
1645
  case 17 /* SET_ACCOUNT_INFO_URI */:
1654
1646
  return "SET_ACCOUNT_INFO_URI";
1655
1647
  case 18 /* ADD_DELEGATE_FOR_ACCOUNT */:
@@ -1670,6 +1662,8 @@ function txTypeToJSON(object) {
1670
1662
  return "DEL_ACCOUNT_SIK";
1671
1663
  case 26 /* REGISTER_SIK */:
1672
1664
  return "REGISTER_SIK";
1665
+ case 27 /* SET_ACCOUNT_VALIDATOR */:
1666
+ return "SET_ACCOUNT_VALIDATOR";
1673
1667
  case -1 /* UNRECOGNIZED */:
1674
1668
  default:
1675
1669
  return "UNRECOGNIZED";
@@ -1919,8 +1913,6 @@ var Census_Type = /* @__PURE__ */ ((Census_Type2) => {
1919
1913
  Census_Type2[Census_Type2["ETHEREUMSTORAGE"] = 3] = "ETHEREUMSTORAGE";
1920
1914
  Census_Type2[Census_Type2["ETHEREUMACCOUNT"] = 4] = "ETHEREUMACCOUNT";
1921
1915
  Census_Type2[Census_Type2["CA"] = 5] = "CA";
1922
- Census_Type2[Census_Type2["GRAVITON"] = 1001] = "GRAVITON";
1923
- Census_Type2[Census_Type2["IDEN3"] = 1002] = "IDEN3";
1924
1916
  Census_Type2[Census_Type2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
1925
1917
  return Census_Type2;
1926
1918
  })(Census_Type || {});
@@ -1944,12 +1936,6 @@ function census_TypeFromJSON(object) {
1944
1936
  case 5:
1945
1937
  case "CA":
1946
1938
  return 5 /* CA */;
1947
- case 1001:
1948
- case "GRAVITON":
1949
- return 1001 /* GRAVITON */;
1950
- case 1002:
1951
- case "IDEN3":
1952
- return 1002 /* IDEN3 */;
1953
1939
  case -1:
1954
1940
  case "UNRECOGNIZED":
1955
1941
  default:
@@ -1970,10 +1956,6 @@ function census_TypeToJSON(object) {
1970
1956
  return "ETHEREUMACCOUNT";
1971
1957
  case 5 /* CA */:
1972
1958
  return "CA";
1973
- case 1001 /* GRAVITON */:
1974
- return "GRAVITON";
1975
- case 1002 /* IDEN3 */:
1976
- return "IDEN3";
1977
1959
  case -1 /* UNRECOGNIZED */:
1978
1960
  default:
1979
1961
  return "UNRECOGNIZED";
@@ -2189,7 +2171,7 @@ var VoteEnvelope = {
2189
2171
  proof: isSet(object.proof) ? Proof.fromJSON(object.proof) : void 0,
2190
2172
  votePackage: isSet(object.votePackage) ? bytesFromBase64(object.votePackage) : new Uint8Array(0),
2191
2173
  nullifier: isSet(object.nullifier) ? bytesFromBase64(object.nullifier) : new Uint8Array(0),
2192
- encryptionKeyIndexes: Array.isArray(object?.encryptionKeyIndexes) ? object.encryptionKeyIndexes.map((e) => Number(e)) : []
2174
+ encryptionKeyIndexes: globalThis.Array.isArray(object?.encryptionKeyIndexes) ? object.encryptionKeyIndexes.map((e) => globalThis.Number(e)) : []
2193
2175
  };
2194
2176
  },
2195
2177
  toJSON(message) {
@@ -2271,12 +2253,6 @@ function createBaseProof() {
2271
2253
  var Proof = {
2272
2254
  encode(message, writer = import_minimal.default.Writer.create()) {
2273
2255
  switch (message.payload?.$case) {
2274
- case "graviton":
2275
- ProofGraviton.encode(message.payload.graviton, writer.uint32(10).fork()).ldelim();
2276
- break;
2277
- case "iden3":
2278
- ProofIden3.encode(message.payload.iden3, writer.uint32(18).fork()).ldelim();
2279
- break;
2280
2256
  case "ethereumStorage":
2281
2257
  ProofEthereumStorage.encode(message.payload.ethereumStorage, writer.uint32(26).fork()).ldelim();
2282
2258
  break;
@@ -2305,18 +2281,6 @@ var Proof = {
2305
2281
  while (reader.pos < end) {
2306
2282
  const tag = reader.uint32();
2307
2283
  switch (tag >>> 3) {
2308
- case 1:
2309
- if (tag !== 10) {
2310
- break;
2311
- }
2312
- message.payload = { $case: "graviton", graviton: ProofGraviton.decode(reader, reader.uint32()) };
2313
- continue;
2314
- case 2:
2315
- if (tag !== 18) {
2316
- break;
2317
- }
2318
- message.payload = { $case: "iden3", iden3: ProofIden3.decode(reader, reader.uint32()) };
2319
- continue;
2320
2284
  case 3:
2321
2285
  if (tag !== 26) {
2322
2286
  break;
@@ -2369,17 +2333,11 @@ var Proof = {
2369
2333
  },
2370
2334
  fromJSON(object) {
2371
2335
  return {
2372
- payload: isSet(object.graviton) ? { $case: "graviton", graviton: ProofGraviton.fromJSON(object.graviton) } : isSet(object.iden3) ? { $case: "iden3", iden3: ProofIden3.fromJSON(object.iden3) } : isSet(object.ethereumStorage) ? { $case: "ethereumStorage", ethereumStorage: ProofEthereumStorage.fromJSON(object.ethereumStorage) } : isSet(object.ethereumAccount) ? { $case: "ethereumAccount", ethereumAccount: ProofEthereumAccount.fromJSON(object.ethereumAccount) } : isSet(object.ca) ? { $case: "ca", ca: ProofCA.fromJSON(object.ca) } : isSet(object.arbo) ? { $case: "arbo", arbo: ProofArbo.fromJSON(object.arbo) } : isSet(object.zkSnark) ? { $case: "zkSnark", zkSnark: ProofZkSNARK.fromJSON(object.zkSnark) } : isSet(object.minimeStorage) ? { $case: "minimeStorage", minimeStorage: ProofMinime.fromJSON(object.minimeStorage) } : void 0
2336
+ payload: isSet(object.ethereumStorage) ? { $case: "ethereumStorage", ethereumStorage: ProofEthereumStorage.fromJSON(object.ethereumStorage) } : isSet(object.ethereumAccount) ? { $case: "ethereumAccount", ethereumAccount: ProofEthereumAccount.fromJSON(object.ethereumAccount) } : isSet(object.ca) ? { $case: "ca", ca: ProofCA.fromJSON(object.ca) } : isSet(object.arbo) ? { $case: "arbo", arbo: ProofArbo.fromJSON(object.arbo) } : isSet(object.zkSnark) ? { $case: "zkSnark", zkSnark: ProofZkSNARK.fromJSON(object.zkSnark) } : isSet(object.minimeStorage) ? { $case: "minimeStorage", minimeStorage: ProofMinime.fromJSON(object.minimeStorage) } : void 0
2373
2337
  };
2374
2338
  },
2375
2339
  toJSON(message) {
2376
2340
  const obj = {};
2377
- if (message.payload?.$case === "graviton") {
2378
- obj.graviton = ProofGraviton.toJSON(message.payload.graviton);
2379
- }
2380
- if (message.payload?.$case === "iden3") {
2381
- obj.iden3 = ProofIden3.toJSON(message.payload.iden3);
2382
- }
2383
2341
  if (message.payload?.$case === "ethereumStorage") {
2384
2342
  obj.ethereumStorage = ProofEthereumStorage.toJSON(message.payload.ethereumStorage);
2385
2343
  }
@@ -2405,12 +2363,6 @@ var Proof = {
2405
2363
  },
2406
2364
  fromPartial(object) {
2407
2365
  const message = createBaseProof();
2408
- if (object.payload?.$case === "graviton" && object.payload?.graviton !== void 0 && object.payload?.graviton !== null) {
2409
- message.payload = { $case: "graviton", graviton: ProofGraviton.fromPartial(object.payload.graviton) };
2410
- }
2411
- if (object.payload?.$case === "iden3" && object.payload?.iden3 !== void 0 && object.payload?.iden3 !== null) {
2412
- message.payload = { $case: "iden3", iden3: ProofIden3.fromPartial(object.payload.iden3) };
2413
- }
2414
2366
  if (object.payload?.$case === "ethereumStorage" && object.payload?.ethereumStorage !== void 0 && object.payload?.ethereumStorage !== null) {
2415
2367
  message.payload = {
2416
2368
  $case: "ethereumStorage",
@@ -2441,106 +2393,6 @@ var Proof = {
2441
2393
  return message;
2442
2394
  }
2443
2395
  };
2444
- function createBaseProofGraviton() {
2445
- return { siblings: new Uint8Array(0) };
2446
- }
2447
- var ProofGraviton = {
2448
- encode(message, writer = import_minimal.default.Writer.create()) {
2449
- if (message.siblings.length !== 0) {
2450
- writer.uint32(10).bytes(message.siblings);
2451
- }
2452
- return writer;
2453
- },
2454
- decode(input, length) {
2455
- const reader = input instanceof import_minimal.default.Reader ? input : import_minimal.default.Reader.create(input);
2456
- let end = length === void 0 ? reader.len : reader.pos + length;
2457
- const message = createBaseProofGraviton();
2458
- while (reader.pos < end) {
2459
- const tag = reader.uint32();
2460
- switch (tag >>> 3) {
2461
- case 1:
2462
- if (tag !== 10) {
2463
- break;
2464
- }
2465
- message.siblings = reader.bytes();
2466
- continue;
2467
- }
2468
- if ((tag & 7) === 4 || tag === 0) {
2469
- break;
2470
- }
2471
- reader.skipType(tag & 7);
2472
- }
2473
- return message;
2474
- },
2475
- fromJSON(object) {
2476
- return { siblings: isSet(object.siblings) ? bytesFromBase64(object.siblings) : new Uint8Array(0) };
2477
- },
2478
- toJSON(message) {
2479
- const obj = {};
2480
- if (message.siblings.length !== 0) {
2481
- obj.siblings = base64FromBytes(message.siblings);
2482
- }
2483
- return obj;
2484
- },
2485
- create(base) {
2486
- return ProofGraviton.fromPartial(base ?? {});
2487
- },
2488
- fromPartial(object) {
2489
- const message = createBaseProofGraviton();
2490
- message.siblings = object.siblings ?? new Uint8Array(0);
2491
- return message;
2492
- }
2493
- };
2494
- function createBaseProofIden3() {
2495
- return { siblings: new Uint8Array(0) };
2496
- }
2497
- var ProofIden3 = {
2498
- encode(message, writer = import_minimal.default.Writer.create()) {
2499
- if (message.siblings.length !== 0) {
2500
- writer.uint32(10).bytes(message.siblings);
2501
- }
2502
- return writer;
2503
- },
2504
- decode(input, length) {
2505
- const reader = input instanceof import_minimal.default.Reader ? input : import_minimal.default.Reader.create(input);
2506
- let end = length === void 0 ? reader.len : reader.pos + length;
2507
- const message = createBaseProofIden3();
2508
- while (reader.pos < end) {
2509
- const tag = reader.uint32();
2510
- switch (tag >>> 3) {
2511
- case 1:
2512
- if (tag !== 10) {
2513
- break;
2514
- }
2515
- message.siblings = reader.bytes();
2516
- continue;
2517
- }
2518
- if ((tag & 7) === 4 || tag === 0) {
2519
- break;
2520
- }
2521
- reader.skipType(tag & 7);
2522
- }
2523
- return message;
2524
- },
2525
- fromJSON(object) {
2526
- return { siblings: isSet(object.siblings) ? bytesFromBase64(object.siblings) : new Uint8Array(0) };
2527
- },
2528
- toJSON(message) {
2529
- const obj = {};
2530
- if (message.siblings.length !== 0) {
2531
- obj.siblings = base64FromBytes(message.siblings);
2532
- }
2533
- return obj;
2534
- },
2535
- create(base) {
2536
- return ProofIden3.fromPartial(base ?? {});
2537
- },
2538
- fromPartial(object) {
2539
- const message = createBaseProofIden3();
2540
- message.siblings = object.siblings ?? new Uint8Array(0);
2541
- return message;
2542
- }
2543
- };
2544
2396
  function createBaseProofEthereumStorage() {
2545
2397
  return { key: new Uint8Array(0), value: new Uint8Array(0), siblings: [] };
2546
2398
  }
@@ -2594,7 +2446,7 @@ var ProofEthereumStorage = {
2594
2446
  return {
2595
2447
  key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(0),
2596
2448
  value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(0),
2597
- siblings: Array.isArray(object?.siblings) ? object.siblings.map((e) => bytesFromBase64(e)) : []
2449
+ siblings: globalThis.Array.isArray(object?.siblings) ? object.siblings.map((e) => bytesFromBase64(e)) : []
2598
2450
  };
2599
2451
  },
2600
2452
  toJSON(message) {
@@ -2700,7 +2552,7 @@ var ProofEthereumAccount = {
2700
2552
  balance: isSet(object.balance) ? bytesFromBase64(object.balance) : new Uint8Array(0),
2701
2553
  storageHash: isSet(object.storageHash) ? bytesFromBase64(object.storageHash) : new Uint8Array(0),
2702
2554
  codeHash: isSet(object.codeHash) ? bytesFromBase64(object.codeHash) : new Uint8Array(0),
2703
- siblings: Array.isArray(object?.siblings) ? object.siblings.map((e) => bytesFromBase64(e)) : []
2555
+ siblings: globalThis.Array.isArray(object?.siblings) ? object.siblings.map((e) => bytesFromBase64(e)) : []
2704
2556
  };
2705
2557
  },
2706
2558
  toJSON(message) {
@@ -3130,11 +2982,11 @@ var ProofZkSNARK = {
3130
2982
  },
3131
2983
  fromJSON(object) {
3132
2984
  return {
3133
- circuitParametersIndex: isSet(object.circuitParametersIndex) ? Number(object.circuitParametersIndex) : 0,
3134
- a: Array.isArray(object?.a) ? object.a.map((e) => String(e)) : [],
3135
- b: Array.isArray(object?.b) ? object.b.map((e) => String(e)) : [],
3136
- c: Array.isArray(object?.c) ? object.c.map((e) => String(e)) : [],
3137
- publicInputs: Array.isArray(object?.publicInputs) ? object.publicInputs.map((e) => String(e)) : []
2985
+ circuitParametersIndex: isSet(object.circuitParametersIndex) ? globalThis.Number(object.circuitParametersIndex) : 0,
2986
+ a: globalThis.Array.isArray(object?.a) ? object.a.map((e) => globalThis.String(e)) : [],
2987
+ b: globalThis.Array.isArray(object?.b) ? object.b.map((e) => globalThis.String(e)) : [],
2988
+ c: globalThis.Array.isArray(object?.c) ? object.c.map((e) => globalThis.String(e)) : [],
2989
+ publicInputs: globalThis.Array.isArray(object?.publicInputs) ? object.publicInputs.map((e) => globalThis.String(e)) : []
3138
2990
  };
3139
2991
  },
3140
2992
  toJSON(message) {
@@ -3238,11 +3090,11 @@ var Account = {
3238
3090
  },
3239
3091
  fromJSON(object) {
3240
3092
  return {
3241
- balance: isSet(object.balance) ? Number(object.balance) : 0,
3242
- nonce: isSet(object.nonce) ? Number(object.nonce) : 0,
3243
- infoURI: isSet(object.infoURI) ? String(object.infoURI) : "",
3244
- delegateAddrs: Array.isArray(object?.delegateAddrs) ? object.delegateAddrs.map((e) => bytesFromBase64(e)) : [],
3245
- processIndex: isSet(object.processIndex) ? Number(object.processIndex) : 0
3093
+ balance: isSet(object.balance) ? globalThis.Number(object.balance) : 0,
3094
+ nonce: isSet(object.nonce) ? globalThis.Number(object.nonce) : 0,
3095
+ infoURI: isSet(object.infoURI) ? globalThis.String(object.infoURI) : "",
3096
+ delegateAddrs: globalThis.Array.isArray(object?.delegateAddrs) ? object.delegateAddrs.map((e) => bytesFromBase64(e)) : [],
3097
+ processIndex: isSet(object.processIndex) ? globalThis.Number(object.processIndex) : 0
3246
3098
  };
3247
3099
  },
3248
3100
  toJSON(message) {
@@ -3277,72 +3129,6 @@ var Account = {
3277
3129
  return message;
3278
3130
  }
3279
3131
  };
3280
- function createBaseTreasurer() {
3281
- return { address: new Uint8Array(0), nonce: 0 };
3282
- }
3283
- var Treasurer = {
3284
- encode(message, writer = import_minimal.default.Writer.create()) {
3285
- if (message.address.length !== 0) {
3286
- writer.uint32(10).bytes(message.address);
3287
- }
3288
- if (message.nonce !== 0) {
3289
- writer.uint32(16).uint32(message.nonce);
3290
- }
3291
- return writer;
3292
- },
3293
- decode(input, length) {
3294
- const reader = input instanceof import_minimal.default.Reader ? input : import_minimal.default.Reader.create(input);
3295
- let end = length === void 0 ? reader.len : reader.pos + length;
3296
- const message = createBaseTreasurer();
3297
- while (reader.pos < end) {
3298
- const tag = reader.uint32();
3299
- switch (tag >>> 3) {
3300
- case 1:
3301
- if (tag !== 10) {
3302
- break;
3303
- }
3304
- message.address = reader.bytes();
3305
- continue;
3306
- case 2:
3307
- if (tag !== 16) {
3308
- break;
3309
- }
3310
- message.nonce = reader.uint32();
3311
- continue;
3312
- }
3313
- if ((tag & 7) === 4 || tag === 0) {
3314
- break;
3315
- }
3316
- reader.skipType(tag & 7);
3317
- }
3318
- return message;
3319
- },
3320
- fromJSON(object) {
3321
- return {
3322
- address: isSet(object.address) ? bytesFromBase64(object.address) : new Uint8Array(0),
3323
- nonce: isSet(object.nonce) ? Number(object.nonce) : 0
3324
- };
3325
- },
3326
- toJSON(message) {
3327
- const obj = {};
3328
- if (message.address.length !== 0) {
3329
- obj.address = base64FromBytes(message.address);
3330
- }
3331
- if (message.nonce !== 0) {
3332
- obj.nonce = Math.round(message.nonce);
3333
- }
3334
- return obj;
3335
- },
3336
- create(base) {
3337
- return Treasurer.fromPartial(base ?? {});
3338
- },
3339
- fromPartial(object) {
3340
- const message = createBaseTreasurer();
3341
- message.address = object.address ?? new Uint8Array(0);
3342
- message.nonce = object.nonce ?? 0;
3343
- return message;
3344
- }
3345
- };
3346
3132
  function createBaseTx() {
3347
3133
  return { payload: void 0 };
3348
3134
  }
@@ -3364,9 +3150,6 @@ var Tx = {
3364
3150
  case "registerKey":
3365
3151
  RegisterKeyTx.encode(message.payload.registerKey, writer.uint32(42).fork()).ldelim();
3366
3152
  break;
3367
- case "mintTokens":
3368
- MintTokensTx.encode(message.payload.mintTokens, writer.uint32(50).fork()).ldelim();
3369
- break;
3370
3153
  case "sendTokens":
3371
3154
  SendTokensTx.encode(message.payload.sendTokens, writer.uint32(58).fork()).ldelim();
3372
3155
  break;
@@ -3431,12 +3214,6 @@ var Tx = {
3431
3214
  }
3432
3215
  message.payload = { $case: "registerKey", registerKey: RegisterKeyTx.decode(reader, reader.uint32()) };
3433
3216
  continue;
3434
- case 6:
3435
- if (tag !== 50) {
3436
- break;
3437
- }
3438
- message.payload = { $case: "mintTokens", mintTokens: MintTokensTx.decode(reader, reader.uint32()) };
3439
- continue;
3440
3217
  case 7:
3441
3218
  if (tag !== 58) {
3442
3219
  break;
@@ -3498,7 +3275,7 @@ var Tx = {
3498
3275
  },
3499
3276
  fromJSON(object) {
3500
3277
  return {
3501
- payload: isSet(object.vote) ? { $case: "vote", vote: VoteEnvelope.fromJSON(object.vote) } : isSet(object.newProcess) ? { $case: "newProcess", newProcess: NewProcessTx.fromJSON(object.newProcess) } : isSet(object.admin) ? { $case: "admin", admin: AdminTx.fromJSON(object.admin) } : isSet(object.setProcess) ? { $case: "setProcess", setProcess: SetProcessTx.fromJSON(object.setProcess) } : isSet(object.registerKey) ? { $case: "registerKey", registerKey: RegisterKeyTx.fromJSON(object.registerKey) } : isSet(object.mintTokens) ? { $case: "mintTokens", mintTokens: MintTokensTx.fromJSON(object.mintTokens) } : isSet(object.sendTokens) ? { $case: "sendTokens", sendTokens: SendTokensTx.fromJSON(object.sendTokens) } : isSet(object.setTransactionCosts) ? {
3278
+ payload: isSet(object.vote) ? { $case: "vote", vote: VoteEnvelope.fromJSON(object.vote) } : isSet(object.newProcess) ? { $case: "newProcess", newProcess: NewProcessTx.fromJSON(object.newProcess) } : isSet(object.admin) ? { $case: "admin", admin: AdminTx.fromJSON(object.admin) } : isSet(object.setProcess) ? { $case: "setProcess", setProcess: SetProcessTx.fromJSON(object.setProcess) } : isSet(object.registerKey) ? { $case: "registerKey", registerKey: RegisterKeyTx.fromJSON(object.registerKey) } : isSet(object.sendTokens) ? { $case: "sendTokens", sendTokens: SendTokensTx.fromJSON(object.sendTokens) } : isSet(object.setTransactionCosts) ? {
3502
3279
  $case: "setTransactionCosts",
3503
3280
  setTransactionCosts: SetTransactionCostsTx.fromJSON(object.setTransactionCosts)
3504
3281
  } : isSet(object.setAccount) ? { $case: "setAccount", setAccount: SetAccountTx.fromJSON(object.setAccount) } : isSet(object.collectFaucet) ? { $case: "collectFaucet", collectFaucet: CollectFaucetTx.fromJSON(object.collectFaucet) } : isSet(object.setKeykeeper) ? { $case: "setKeykeeper", setKeykeeper: SetKeykeeperTx.fromJSON(object.setKeykeeper) } : isSet(object.setSIK) ? { $case: "setSIK", setSIK: SIKTx.fromJSON(object.setSIK) } : isSet(object.delSIK) ? { $case: "delSIK", delSIK: SIKTx.fromJSON(object.delSIK) } : isSet(object.registerSIK) ? { $case: "registerSIK", registerSIK: RegisterSIKTx.fromJSON(object.registerSIK) } : void 0
@@ -3521,9 +3298,6 @@ var Tx = {
3521
3298
  if (message.payload?.$case === "registerKey") {
3522
3299
  obj.registerKey = RegisterKeyTx.toJSON(message.payload.registerKey);
3523
3300
  }
3524
- if (message.payload?.$case === "mintTokens") {
3525
- obj.mintTokens = MintTokensTx.toJSON(message.payload.mintTokens);
3526
- }
3527
3301
  if (message.payload?.$case === "sendTokens") {
3528
3302
  obj.sendTokens = SendTokensTx.toJSON(message.payload.sendTokens);
3529
3303
  }
@@ -3570,9 +3344,6 @@ var Tx = {
3570
3344
  if (object.payload?.$case === "registerKey" && object.payload?.registerKey !== void 0 && object.payload?.registerKey !== null) {
3571
3345
  message.payload = { $case: "registerKey", registerKey: RegisterKeyTx.fromPartial(object.payload.registerKey) };
3572
3346
  }
3573
- if (object.payload?.$case === "mintTokens" && object.payload?.mintTokens !== void 0 && object.payload?.mintTokens !== null) {
3574
- message.payload = { $case: "mintTokens", mintTokens: MintTokensTx.fromPartial(object.payload.mintTokens) };
3575
- }
3576
3347
  if (object.payload?.$case === "sendTokens" && object.payload?.sendTokens !== void 0 && object.payload?.sendTokens !== null) {
3577
3348
  message.payload = { $case: "sendTokens", sendTokens: SendTokensTx.fromPartial(object.payload.sendTokens) };
3578
3349
  }
@@ -3727,7 +3498,7 @@ var NewProcessTx = {
3727
3498
  fromJSON(object) {
3728
3499
  return {
3729
3500
  txtype: isSet(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
3730
- nonce: isSet(object.nonce) ? Number(object.nonce) : 0,
3501
+ nonce: isSet(object.nonce) ? globalThis.Number(object.nonce) : 0,
3731
3502
  process: isSet(object.process) ? Process.fromJSON(object.process) : void 0
3732
3503
  };
3733
3504
  },
@@ -3881,15 +3652,15 @@ var SetProcessTx = {
3881
3652
  fromJSON(object) {
3882
3653
  return {
3883
3654
  txtype: isSet(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
3884
- nonce: isSet(object.nonce) ? Number(object.nonce) : 0,
3655
+ nonce: isSet(object.nonce) ? globalThis.Number(object.nonce) : 0,
3885
3656
  processId: isSet(object.processId) ? bytesFromBase64(object.processId) : new Uint8Array(0),
3886
3657
  status: isSet(object.status) ? processStatusFromJSON(object.status) : void 0,
3887
- questionIndex: isSet(object.questionIndex) ? Number(object.questionIndex) : void 0,
3658
+ questionIndex: isSet(object.questionIndex) ? globalThis.Number(object.questionIndex) : void 0,
3888
3659
  censusRoot: isSet(object.censusRoot) ? bytesFromBase64(object.censusRoot) : void 0,
3889
- censusURI: isSet(object.censusURI) ? String(object.censusURI) : void 0,
3660
+ censusURI: isSet(object.censusURI) ? globalThis.String(object.censusURI) : void 0,
3890
3661
  proof: isSet(object.proof) ? Proof.fromJSON(object.proof) : void 0,
3891
3662
  results: isSet(object.results) ? ProcessResult.fromJSON(object.results) : void 0,
3892
- tempSIKs: isSet(object.tempSIKs) ? Boolean(object.tempSIKs) : void 0
3663
+ tempSIKs: isSet(object.tempSIKs) ? globalThis.Boolean(object.tempSIKs) : void 0
3893
3664
  };
3894
3665
  },
3895
3666
  toJSON(message) {
@@ -4064,10 +3835,10 @@ var AdminTx = {
4064
3835
  address: isSet(object.address) ? bytesFromBase64(object.address) : void 0,
4065
3836
  encryptionPrivateKey: isSet(object.encryptionPrivateKey) ? bytesFromBase64(object.encryptionPrivateKey) : void 0,
4066
3837
  encryptionPublicKey: isSet(object.encryptionPublicKey) ? bytesFromBase64(object.encryptionPublicKey) : void 0,
4067
- keyIndex: isSet(object.keyIndex) ? Number(object.keyIndex) : void 0,
4068
- power: isSet(object.power) ? Number(object.power) : void 0,
3838
+ keyIndex: isSet(object.keyIndex) ? globalThis.Number(object.keyIndex) : void 0,
3839
+ power: isSet(object.power) ? globalThis.Number(object.power) : void 0,
4069
3840
  publicKey: isSet(object.publicKey) ? bytesFromBase64(object.publicKey) : void 0,
4070
- nonce: isSet(object.nonce) ? Number(object.nonce) : 0
3841
+ nonce: isSet(object.nonce) ? globalThis.Number(object.nonce) : 0
4071
3842
  };
4072
3843
  },
4073
3844
  toJSON(message) {
@@ -4187,11 +3958,11 @@ var RegisterKeyTx = {
4187
3958
  },
4188
3959
  fromJSON(object) {
4189
3960
  return {
4190
- nonce: isSet(object.nonce) ? Number(object.nonce) : 0,
3961
+ nonce: isSet(object.nonce) ? globalThis.Number(object.nonce) : 0,
4191
3962
  processId: isSet(object.processId) ? bytesFromBase64(object.processId) : new Uint8Array(0),
4192
3963
  proof: isSet(object.proof) ? Proof.fromJSON(object.proof) : void 0,
4193
3964
  newKey: isSet(object.newKey) ? bytesFromBase64(object.newKey) : new Uint8Array(0),
4194
- weight: isSet(object.weight) ? String(object.weight) : ""
3965
+ weight: isSet(object.weight) ? globalThis.String(object.weight) : ""
4195
3966
  };
4196
3967
  },
4197
3968
  toJSON(message) {
@@ -4226,100 +3997,6 @@ var RegisterKeyTx = {
4226
3997
  return message;
4227
3998
  }
4228
3999
  };
4229
- function createBaseMintTokensTx() {
4230
- return { txtype: 0, nonce: 0, to: new Uint8Array(0), value: 0 };
4231
- }
4232
- var MintTokensTx = {
4233
- encode(message, writer = import_minimal.default.Writer.create()) {
4234
- if (message.txtype !== 0) {
4235
- writer.uint32(8).int32(message.txtype);
4236
- }
4237
- if (message.nonce !== 0) {
4238
- writer.uint32(16).uint32(message.nonce);
4239
- }
4240
- if (message.to.length !== 0) {
4241
- writer.uint32(26).bytes(message.to);
4242
- }
4243
- if (message.value !== 0) {
4244
- writer.uint32(32).uint64(message.value);
4245
- }
4246
- return writer;
4247
- },
4248
- decode(input, length) {
4249
- const reader = input instanceof import_minimal.default.Reader ? input : import_minimal.default.Reader.create(input);
4250
- let end = length === void 0 ? reader.len : reader.pos + length;
4251
- const message = createBaseMintTokensTx();
4252
- while (reader.pos < end) {
4253
- const tag = reader.uint32();
4254
- switch (tag >>> 3) {
4255
- case 1:
4256
- if (tag !== 8) {
4257
- break;
4258
- }
4259
- message.txtype = reader.int32();
4260
- continue;
4261
- case 2:
4262
- if (tag !== 16) {
4263
- break;
4264
- }
4265
- message.nonce = reader.uint32();
4266
- continue;
4267
- case 3:
4268
- if (tag !== 26) {
4269
- break;
4270
- }
4271
- message.to = reader.bytes();
4272
- continue;
4273
- case 4:
4274
- if (tag !== 32) {
4275
- break;
4276
- }
4277
- message.value = longToNumber(reader.uint64());
4278
- continue;
4279
- }
4280
- if ((tag & 7) === 4 || tag === 0) {
4281
- break;
4282
- }
4283
- reader.skipType(tag & 7);
4284
- }
4285
- return message;
4286
- },
4287
- fromJSON(object) {
4288
- return {
4289
- txtype: isSet(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
4290
- nonce: isSet(object.nonce) ? Number(object.nonce) : 0,
4291
- to: isSet(object.to) ? bytesFromBase64(object.to) : new Uint8Array(0),
4292
- value: isSet(object.value) ? Number(object.value) : 0
4293
- };
4294
- },
4295
- toJSON(message) {
4296
- const obj = {};
4297
- if (message.txtype !== 0) {
4298
- obj.txtype = txTypeToJSON(message.txtype);
4299
- }
4300
- if (message.nonce !== 0) {
4301
- obj.nonce = Math.round(message.nonce);
4302
- }
4303
- if (message.to.length !== 0) {
4304
- obj.to = base64FromBytes(message.to);
4305
- }
4306
- if (message.value !== 0) {
4307
- obj.value = Math.round(message.value);
4308
- }
4309
- return obj;
4310
- },
4311
- create(base) {
4312
- return MintTokensTx.fromPartial(base ?? {});
4313
- },
4314
- fromPartial(object) {
4315
- const message = createBaseMintTokensTx();
4316
- message.txtype = object.txtype ?? 0;
4317
- message.nonce = object.nonce ?? 0;
4318
- message.to = object.to ?? new Uint8Array(0);
4319
- message.value = object.value ?? 0;
4320
- return message;
4321
- }
4322
- };
4323
4000
  function createBaseSendTokensTx() {
4324
4001
  return { txtype: 0, nonce: 0, from: new Uint8Array(0), to: new Uint8Array(0), value: 0 };
4325
4002
  }
@@ -4390,10 +4067,10 @@ var SendTokensTx = {
4390
4067
  fromJSON(object) {
4391
4068
  return {
4392
4069
  txtype: isSet(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
4393
- nonce: isSet(object.nonce) ? Number(object.nonce) : 0,
4070
+ nonce: isSet(object.nonce) ? globalThis.Number(object.nonce) : 0,
4394
4071
  from: isSet(object.from) ? bytesFromBase64(object.from) : new Uint8Array(0),
4395
4072
  to: isSet(object.to) ? bytesFromBase64(object.to) : new Uint8Array(0),
4396
- value: isSet(object.value) ? Number(object.value) : 0
4073
+ value: isSet(object.value) ? globalThis.Number(object.value) : 0
4397
4074
  };
4398
4075
  },
4399
4076
  toJSON(message) {
@@ -4480,8 +4157,8 @@ var SetTransactionCostsTx = {
4480
4157
  fromJSON(object) {
4481
4158
  return {
4482
4159
  txtype: isSet(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
4483
- nonce: isSet(object.nonce) ? Number(object.nonce) : 0,
4484
- value: isSet(object.value) ? Number(object.value) : 0
4160
+ nonce: isSet(object.nonce) ? globalThis.Number(object.nonce) : 0,
4161
+ value: isSet(object.value) ? globalThis.Number(object.value) : 0
4485
4162
  };
4486
4163
  },
4487
4164
  toJSON(message) {
@@ -4516,7 +4193,9 @@ function createBaseSetAccountTx() {
4516
4193
  account: void 0,
4517
4194
  faucetPackage: void 0,
4518
4195
  delegates: [],
4519
- SIK: void 0
4196
+ SIK: void 0,
4197
+ publicKey: void 0,
4198
+ name: void 0
4520
4199
  };
4521
4200
  }
4522
4201
  var SetAccountTx = {
@@ -4542,6 +4221,12 @@ var SetAccountTx = {
4542
4221
  if (message.SIK !== void 0) {
4543
4222
  writer.uint32(58).bytes(message.SIK);
4544
4223
  }
4224
+ if (message.publicKey !== void 0) {
4225
+ writer.uint32(66).bytes(message.publicKey);
4226
+ }
4227
+ if (message.name !== void 0) {
4228
+ writer.uint32(74).string(message.name);
4229
+ }
4545
4230
  return writer;
4546
4231
  },
4547
4232
  decode(input, length) {
@@ -4593,6 +4278,18 @@ var SetAccountTx = {
4593
4278
  }
4594
4279
  message.SIK = reader.bytes();
4595
4280
  continue;
4281
+ case 8:
4282
+ if (tag !== 66) {
4283
+ break;
4284
+ }
4285
+ message.publicKey = reader.bytes();
4286
+ continue;
4287
+ case 9:
4288
+ if (tag !== 74) {
4289
+ break;
4290
+ }
4291
+ message.name = reader.string();
4292
+ continue;
4596
4293
  }
4597
4294
  if ((tag & 7) === 4 || tag === 0) {
4598
4295
  break;
@@ -4604,12 +4301,14 @@ var SetAccountTx = {
4604
4301
  fromJSON(object) {
4605
4302
  return {
4606
4303
  txtype: isSet(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
4607
- nonce: isSet(object.nonce) ? Number(object.nonce) : void 0,
4608
- infoURI: isSet(object.infoURI) ? String(object.infoURI) : void 0,
4304
+ nonce: isSet(object.nonce) ? globalThis.Number(object.nonce) : void 0,
4305
+ infoURI: isSet(object.infoURI) ? globalThis.String(object.infoURI) : void 0,
4609
4306
  account: isSet(object.account) ? bytesFromBase64(object.account) : void 0,
4610
4307
  faucetPackage: isSet(object.faucetPackage) ? FaucetPackage.fromJSON(object.faucetPackage) : void 0,
4611
- delegates: Array.isArray(object?.delegates) ? object.delegates.map((e) => bytesFromBase64(e)) : [],
4612
- SIK: isSet(object.SIK) ? bytesFromBase64(object.SIK) : void 0
4308
+ delegates: globalThis.Array.isArray(object?.delegates) ? object.delegates.map((e) => bytesFromBase64(e)) : [],
4309
+ SIK: isSet(object.SIK) ? bytesFromBase64(object.SIK) : void 0,
4310
+ publicKey: isSet(object.publicKey) ? bytesFromBase64(object.publicKey) : void 0,
4311
+ name: isSet(object.name) ? globalThis.String(object.name) : void 0
4613
4312
  };
4614
4313
  },
4615
4314
  toJSON(message) {
@@ -4635,6 +4334,12 @@ var SetAccountTx = {
4635
4334
  if (message.SIK !== void 0) {
4636
4335
  obj.SIK = base64FromBytes(message.SIK);
4637
4336
  }
4337
+ if (message.publicKey !== void 0) {
4338
+ obj.publicKey = base64FromBytes(message.publicKey);
4339
+ }
4340
+ if (message.name !== void 0) {
4341
+ obj.name = message.name;
4342
+ }
4638
4343
  return obj;
4639
4344
  },
4640
4345
  create(base) {
@@ -4649,17 +4354,22 @@ var SetAccountTx = {
4649
4354
  message.faucetPackage = object.faucetPackage !== void 0 && object.faucetPackage !== null ? FaucetPackage.fromPartial(object.faucetPackage) : void 0;
4650
4355
  message.delegates = object.delegates?.map((e) => e) || [];
4651
4356
  message.SIK = object.SIK ?? void 0;
4357
+ message.publicKey = object.publicKey ?? void 0;
4358
+ message.name = object.name ?? void 0;
4652
4359
  return message;
4653
4360
  }
4654
4361
  };
4655
4362
  function createBaseSIKTx() {
4656
- return { txtype: 0, SIK: void 0 };
4363
+ return { txtype: 0, nonce: void 0, SIK: void 0 };
4657
4364
  }
4658
4365
  var SIKTx = {
4659
4366
  encode(message, writer = import_minimal.default.Writer.create()) {
4660
4367
  if (message.txtype !== 0) {
4661
4368
  writer.uint32(8).int32(message.txtype);
4662
4369
  }
4370
+ if (message.nonce !== void 0) {
4371
+ writer.uint32(16).uint32(message.nonce);
4372
+ }
4663
4373
  if (message.SIK !== void 0) {
4664
4374
  writer.uint32(26).bytes(message.SIK);
4665
4375
  }
@@ -4678,6 +4388,12 @@ var SIKTx = {
4678
4388
  }
4679
4389
  message.txtype = reader.int32();
4680
4390
  continue;
4391
+ case 2:
4392
+ if (tag !== 16) {
4393
+ break;
4394
+ }
4395
+ message.nonce = reader.uint32();
4396
+ continue;
4681
4397
  case 3:
4682
4398
  if (tag !== 26) {
4683
4399
  break;
@@ -4695,6 +4411,7 @@ var SIKTx = {
4695
4411
  fromJSON(object) {
4696
4412
  return {
4697
4413
  txtype: isSet(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
4414
+ nonce: isSet(object.nonce) ? globalThis.Number(object.nonce) : void 0,
4698
4415
  SIK: isSet(object.SIK) ? bytesFromBase64(object.SIK) : void 0
4699
4416
  };
4700
4417
  },
@@ -4703,6 +4420,9 @@ var SIKTx = {
4703
4420
  if (message.txtype !== 0) {
4704
4421
  obj.txtype = txTypeToJSON(message.txtype);
4705
4422
  }
4423
+ if (message.nonce !== void 0) {
4424
+ obj.nonce = Math.round(message.nonce);
4425
+ }
4706
4426
  if (message.SIK !== void 0) {
4707
4427
  obj.SIK = base64FromBytes(message.SIK);
4708
4428
  }
@@ -4714,6 +4434,7 @@ var SIKTx = {
4714
4434
  fromPartial(object) {
4715
4435
  const message = createBaseSIKTx();
4716
4436
  message.txtype = object.txtype ?? 0;
4437
+ message.nonce = object.nonce ?? void 0;
4717
4438
  message.SIK = object.SIK ?? void 0;
4718
4439
  return message;
4719
4440
  }
@@ -4851,7 +4572,7 @@ var CollectFaucetTx = {
4851
4572
  return {
4852
4573
  txType: isSet(object.txType) ? txTypeFromJSON(object.txType) : 0,
4853
4574
  faucetPackage: isSet(object.faucetPackage) ? FaucetPackage.fromJSON(object.faucetPackage) : void 0,
4854
- nonce: isSet(object.nonce) ? Number(object.nonce) : 0
4575
+ nonce: isSet(object.nonce) ? globalThis.Number(object.nonce) : 0
4855
4576
  };
4856
4577
  },
4857
4578
  toJSON(message) {
@@ -4929,9 +4650,9 @@ var FaucetPayload = {
4929
4650
  },
4930
4651
  fromJSON(object) {
4931
4652
  return {
4932
- identifier: isSet(object.identifier) ? Number(object.identifier) : 0,
4653
+ identifier: isSet(object.identifier) ? globalThis.Number(object.identifier) : 0,
4933
4654
  to: isSet(object.to) ? bytesFromBase64(object.to) : new Uint8Array(0),
4934
- amount: isSet(object.amount) ? Number(object.amount) : 0
4655
+ amount: isSet(object.amount) ? globalThis.Number(object.amount) : 0
4935
4656
  };
4936
4657
  },
4937
4658
  toJSON(message) {
@@ -5076,7 +4797,7 @@ var SetKeykeeperTx = {
5076
4797
  fromJSON(object) {
5077
4798
  return {
5078
4799
  txtype: isSet(object.txtype) ? txTypeFromJSON(object.txtype) : 0,
5079
- nonce: isSet(object.nonce) ? Number(object.nonce) : 0,
4800
+ nonce: isSet(object.nonce) ? globalThis.Number(object.nonce) : 0,
5080
4801
  keykeeper: isSet(object.keykeeper) ? bytesFromBase64(object.keykeeper) : new Uint8Array(0)
5081
4802
  };
5082
4803
  },
@@ -5441,35 +5162,35 @@ var Process = {
5441
5162
  return {
5442
5163
  processId: isSet(object.processId) ? bytesFromBase64(object.processId) : new Uint8Array(0),
5443
5164
  entityId: isSet(object.entityId) ? bytesFromBase64(object.entityId) : new Uint8Array(0),
5444
- startBlock: isSet(object.startBlock) ? Number(object.startBlock) : 0,
5445
- blockCount: isSet(object.blockCount) ? Number(object.blockCount) : 0,
5165
+ startBlock: isSet(object.startBlock) ? globalThis.Number(object.startBlock) : 0,
5166
+ blockCount: isSet(object.blockCount) ? globalThis.Number(object.blockCount) : 0,
5446
5167
  censusRoot: isSet(object.censusRoot) ? bytesFromBase64(object.censusRoot) : new Uint8Array(0),
5447
- censusURI: isSet(object.censusURI) ? String(object.censusURI) : void 0,
5448
- encryptionPrivateKeys: Array.isArray(object?.encryptionPrivateKeys) ? object.encryptionPrivateKeys.map((e) => String(e)) : [],
5449
- encryptionPublicKeys: Array.isArray(object?.encryptionPublicKeys) ? object.encryptionPublicKeys.map((e) => String(e)) : [],
5450
- keyIndex: isSet(object.keyIndex) ? Number(object.keyIndex) : void 0,
5168
+ censusURI: isSet(object.censusURI) ? globalThis.String(object.censusURI) : void 0,
5169
+ encryptionPrivateKeys: globalThis.Array.isArray(object?.encryptionPrivateKeys) ? object.encryptionPrivateKeys.map((e) => globalThis.String(e)) : [],
5170
+ encryptionPublicKeys: globalThis.Array.isArray(object?.encryptionPublicKeys) ? object.encryptionPublicKeys.map((e) => globalThis.String(e)) : [],
5171
+ keyIndex: isSet(object.keyIndex) ? globalThis.Number(object.keyIndex) : void 0,
5451
5172
  status: isSet(object.status) ? processStatusFromJSON(object.status) : 0,
5452
5173
  paramsSignature: isSet(object.paramsSignature) ? bytesFromBase64(object.paramsSignature) : void 0,
5453
- namespace: isSet(object.namespace) ? Number(object.namespace) : 0,
5174
+ namespace: isSet(object.namespace) ? globalThis.Number(object.namespace) : 0,
5454
5175
  envelopeType: isSet(object.envelopeType) ? EnvelopeType.fromJSON(object.envelopeType) : void 0,
5455
5176
  mode: isSet(object.mode) ? ProcessMode.fromJSON(object.mode) : void 0,
5456
- questionIndex: isSet(object.questionIndex) ? Number(object.questionIndex) : void 0,
5457
- questionCount: isSet(object.questionCount) ? Number(object.questionCount) : void 0,
5177
+ questionIndex: isSet(object.questionIndex) ? globalThis.Number(object.questionIndex) : void 0,
5178
+ questionCount: isSet(object.questionCount) ? globalThis.Number(object.questionCount) : void 0,
5458
5179
  voteOptions: isSet(object.voteOptions) ? ProcessVoteOptions.fromJSON(object.voteOptions) : void 0,
5459
5180
  censusOrigin: isSet(object.censusOrigin) ? censusOriginFromJSON(object.censusOrigin) : 0,
5460
5181
  results: isSet(object.results) ? ProcessResult.fromJSON(object.results) : void 0,
5461
- ethIndexSlot: isSet(object.ethIndexSlot) ? Number(object.ethIndexSlot) : void 0,
5462
- sourceBlockHeight: isSet(object.sourceBlockHeight) ? Number(object.sourceBlockHeight) : void 0,
5182
+ ethIndexSlot: isSet(object.ethIndexSlot) ? globalThis.Number(object.ethIndexSlot) : void 0,
5183
+ sourceBlockHeight: isSet(object.sourceBlockHeight) ? globalThis.Number(object.sourceBlockHeight) : void 0,
5463
5184
  owner: isSet(object.owner) ? bytesFromBase64(object.owner) : void 0,
5464
- metadata: isSet(object.metadata) ? String(object.metadata) : void 0,
5185
+ metadata: isSet(object.metadata) ? globalThis.String(object.metadata) : void 0,
5465
5186
  sourceNetworkId: isSet(object.sourceNetworkId) ? sourceNetworkIdFromJSON(object.sourceNetworkId) : 0,
5466
- maxCensusSize: isSet(object.maxCensusSize) ? Number(object.maxCensusSize) : 0,
5187
+ maxCensusSize: isSet(object.maxCensusSize) ? globalThis.Number(object.maxCensusSize) : 0,
5467
5188
  rollingCensusRoot: isSet(object.rollingCensusRoot) ? bytesFromBase64(object.rollingCensusRoot) : void 0,
5468
- rollingCensusSize: isSet(object.rollingCensusSize) ? Number(object.rollingCensusSize) : void 0,
5189
+ rollingCensusSize: isSet(object.rollingCensusSize) ? globalThis.Number(object.rollingCensusSize) : void 0,
5469
5190
  nullifiersRoot: isSet(object.nullifiersRoot) ? bytesFromBase64(object.nullifiersRoot) : void 0,
5470
5191
  sourceNetworkContractAddr: isSet(object.sourceNetworkContractAddr) ? bytesFromBase64(object.sourceNetworkContractAddr) : void 0,
5471
- tokenDecimals: isSet(object.tokenDecimals) ? Number(object.tokenDecimals) : void 0,
5472
- tempSIKs: isSet(object.tempSIKs) ? Boolean(object.tempSIKs) : void 0
5192
+ tokenDecimals: isSet(object.tokenDecimals) ? globalThis.Number(object.tokenDecimals) : void 0,
5193
+ tempSIKs: isSet(object.tempSIKs) ? globalThis.Boolean(object.tempSIKs) : void 0
5473
5194
  };
5474
5195
  },
5475
5196
  toJSON(message) {
@@ -5677,11 +5398,11 @@ var EnvelopeType = {
5677
5398
  },
5678
5399
  fromJSON(object) {
5679
5400
  return {
5680
- serial: isSet(object.serial) ? Boolean(object.serial) : false,
5681
- anonymous: isSet(object.anonymous) ? Boolean(object.anonymous) : false,
5682
- encryptedVotes: isSet(object.encryptedVotes) ? Boolean(object.encryptedVotes) : false,
5683
- uniqueValues: isSet(object.uniqueValues) ? Boolean(object.uniqueValues) : false,
5684
- costFromWeight: isSet(object.costFromWeight) ? Boolean(object.costFromWeight) : false
5401
+ serial: isSet(object.serial) ? globalThis.Boolean(object.serial) : false,
5402
+ anonymous: isSet(object.anonymous) ? globalThis.Boolean(object.anonymous) : false,
5403
+ encryptedVotes: isSet(object.encryptedVotes) ? globalThis.Boolean(object.encryptedVotes) : false,
5404
+ uniqueValues: isSet(object.uniqueValues) ? globalThis.Boolean(object.uniqueValues) : false,
5405
+ costFromWeight: isSet(object.costFromWeight) ? globalThis.Boolean(object.costFromWeight) : false
5685
5406
  };
5686
5407
  },
5687
5408
  toJSON(message) {
@@ -5785,11 +5506,11 @@ var ProcessMode = {
5785
5506
  },
5786
5507
  fromJSON(object) {
5787
5508
  return {
5788
- autoStart: isSet(object.autoStart) ? Boolean(object.autoStart) : false,
5789
- interruptible: isSet(object.interruptible) ? Boolean(object.interruptible) : false,
5790
- dynamicCensus: isSet(object.dynamicCensus) ? Boolean(object.dynamicCensus) : false,
5791
- encryptedMetaData: isSet(object.encryptedMetaData) ? Boolean(object.encryptedMetaData) : false,
5792
- preRegister: isSet(object.preRegister) ? Boolean(object.preRegister) : false
5509
+ autoStart: isSet(object.autoStart) ? globalThis.Boolean(object.autoStart) : false,
5510
+ interruptible: isSet(object.interruptible) ? globalThis.Boolean(object.interruptible) : false,
5511
+ dynamicCensus: isSet(object.dynamicCensus) ? globalThis.Boolean(object.dynamicCensus) : false,
5512
+ encryptedMetaData: isSet(object.encryptedMetaData) ? globalThis.Boolean(object.encryptedMetaData) : false,
5513
+ preRegister: isSet(object.preRegister) ? globalThis.Boolean(object.preRegister) : false
5793
5514
  };
5794
5515
  },
5795
5516
  toJSON(message) {
@@ -5893,11 +5614,11 @@ var ProcessVoteOptions = {
5893
5614
  },
5894
5615
  fromJSON(object) {
5895
5616
  return {
5896
- maxCount: isSet(object.maxCount) ? Number(object.maxCount) : 0,
5897
- maxValue: isSet(object.maxValue) ? Number(object.maxValue) : 0,
5898
- maxVoteOverwrites: isSet(object.maxVoteOverwrites) ? Number(object.maxVoteOverwrites) : 0,
5899
- maxTotalCost: isSet(object.maxTotalCost) ? Number(object.maxTotalCost) : 0,
5900
- costExponent: isSet(object.costExponent) ? Number(object.costExponent) : 0
5617
+ maxCount: isSet(object.maxCount) ? globalThis.Number(object.maxCount) : 0,
5618
+ maxValue: isSet(object.maxValue) ? globalThis.Number(object.maxValue) : 0,
5619
+ maxVoteOverwrites: isSet(object.maxVoteOverwrites) ? globalThis.Number(object.maxVoteOverwrites) : 0,
5620
+ maxTotalCost: isSet(object.maxTotalCost) ? globalThis.Number(object.maxTotalCost) : 0,
5621
+ costExponent: isSet(object.costExponent) ? globalThis.Number(object.costExponent) : 0
5901
5622
  };
5902
5623
  },
5903
5624
  toJSON(message) {
@@ -5964,7 +5685,9 @@ var OracleList = {
5964
5685
  return message;
5965
5686
  },
5966
5687
  fromJSON(object) {
5967
- return { oracles: Array.isArray(object?.oracles) ? object.oracles.map((e) => bytesFromBase64(e)) : [] };
5688
+ return {
5689
+ oracles: globalThis.Array.isArray(object?.oracles) ? object.oracles.map((e) => bytesFromBase64(e)) : []
5690
+ };
5968
5691
  },
5969
5692
  toJSON(message) {
5970
5693
  const obj = {};
@@ -6015,7 +5738,7 @@ var ValidatorList = {
6015
5738
  },
6016
5739
  fromJSON(object) {
6017
5740
  return {
6018
- validators: Array.isArray(object?.validators) ? object.validators.map((e) => Validator.fromJSON(e)) : []
5741
+ validators: globalThis.Array.isArray(object?.validators) ? object.validators.map((e) => Validator.fromJSON(e)) : []
6019
5742
  };
6020
5743
  },
6021
5744
  toJSON(message) {
@@ -6035,7 +5758,18 @@ var ValidatorList = {
6035
5758
  }
6036
5759
  };
6037
5760
  function createBaseValidator() {
6038
- return { address: new Uint8Array(0), pubKey: new Uint8Array(0), power: 0, name: "", keyIndex: 0 };
5761
+ return {
5762
+ address: new Uint8Array(0),
5763
+ pubKey: new Uint8Array(0),
5764
+ power: 0,
5765
+ name: "",
5766
+ keyIndex: 0,
5767
+ height: 0,
5768
+ proposals: 0,
5769
+ votes: 0,
5770
+ validatorAddress: new Uint8Array(0),
5771
+ score: 0
5772
+ };
6039
5773
  }
6040
5774
  var Validator = {
6041
5775
  encode(message, writer = import_minimal.default.Writer.create()) {
@@ -6054,6 +5788,21 @@ var Validator = {
6054
5788
  if (message.keyIndex !== 0) {
6055
5789
  writer.uint32(40).uint32(message.keyIndex);
6056
5790
  }
5791
+ if (message.height !== 0) {
5792
+ writer.uint32(48).uint64(message.height);
5793
+ }
5794
+ if (message.proposals !== 0) {
5795
+ writer.uint32(56).uint64(message.proposals);
5796
+ }
5797
+ if (message.votes !== 0) {
5798
+ writer.uint32(64).uint64(message.votes);
5799
+ }
5800
+ if (message.validatorAddress.length !== 0) {
5801
+ writer.uint32(74).bytes(message.validatorAddress);
5802
+ }
5803
+ if (message.score !== 0) {
5804
+ writer.uint32(80).uint32(message.score);
5805
+ }
6057
5806
  return writer;
6058
5807
  },
6059
5808
  decode(input, length) {
@@ -6093,6 +5842,36 @@ var Validator = {
6093
5842
  }
6094
5843
  message.keyIndex = reader.uint32();
6095
5844
  continue;
5845
+ case 6:
5846
+ if (tag !== 48) {
5847
+ break;
5848
+ }
5849
+ message.height = longToNumber(reader.uint64());
5850
+ continue;
5851
+ case 7:
5852
+ if (tag !== 56) {
5853
+ break;
5854
+ }
5855
+ message.proposals = longToNumber(reader.uint64());
5856
+ continue;
5857
+ case 8:
5858
+ if (tag !== 64) {
5859
+ break;
5860
+ }
5861
+ message.votes = longToNumber(reader.uint64());
5862
+ continue;
5863
+ case 9:
5864
+ if (tag !== 74) {
5865
+ break;
5866
+ }
5867
+ message.validatorAddress = reader.bytes();
5868
+ continue;
5869
+ case 10:
5870
+ if (tag !== 80) {
5871
+ break;
5872
+ }
5873
+ message.score = reader.uint32();
5874
+ continue;
6096
5875
  }
6097
5876
  if ((tag & 7) === 4 || tag === 0) {
6098
5877
  break;
@@ -6105,9 +5884,14 @@ var Validator = {
6105
5884
  return {
6106
5885
  address: isSet(object.address) ? bytesFromBase64(object.address) : new Uint8Array(0),
6107
5886
  pubKey: isSet(object.pubKey) ? bytesFromBase64(object.pubKey) : new Uint8Array(0),
6108
- power: isSet(object.power) ? Number(object.power) : 0,
6109
- name: isSet(object.name) ? String(object.name) : "",
6110
- keyIndex: isSet(object.keyIndex) ? Number(object.keyIndex) : 0
5887
+ power: isSet(object.power) ? globalThis.Number(object.power) : 0,
5888
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
5889
+ keyIndex: isSet(object.keyIndex) ? globalThis.Number(object.keyIndex) : 0,
5890
+ height: isSet(object.height) ? globalThis.Number(object.height) : 0,
5891
+ proposals: isSet(object.proposals) ? globalThis.Number(object.proposals) : 0,
5892
+ votes: isSet(object.votes) ? globalThis.Number(object.votes) : 0,
5893
+ validatorAddress: isSet(object.validatorAddress) ? bytesFromBase64(object.validatorAddress) : new Uint8Array(0),
5894
+ score: isSet(object.score) ? globalThis.Number(object.score) : 0
6111
5895
  };
6112
5896
  },
6113
5897
  toJSON(message) {
@@ -6127,6 +5911,21 @@ var Validator = {
6127
5911
  if (message.keyIndex !== 0) {
6128
5912
  obj.keyIndex = Math.round(message.keyIndex);
6129
5913
  }
5914
+ if (message.height !== 0) {
5915
+ obj.height = Math.round(message.height);
5916
+ }
5917
+ if (message.proposals !== 0) {
5918
+ obj.proposals = Math.round(message.proposals);
5919
+ }
5920
+ if (message.votes !== 0) {
5921
+ obj.votes = Math.round(message.votes);
5922
+ }
5923
+ if (message.validatorAddress.length !== 0) {
5924
+ obj.validatorAddress = base64FromBytes(message.validatorAddress);
5925
+ }
5926
+ if (message.score !== 0) {
5927
+ obj.score = Math.round(message.score);
5928
+ }
6130
5929
  return obj;
6131
5930
  },
6132
5931
  create(base) {
@@ -6139,6 +5938,11 @@ var Validator = {
6139
5938
  message.power = object.power ?? 0;
6140
5939
  message.name = object.name ?? "";
6141
5940
  message.keyIndex = object.keyIndex ?? 0;
5941
+ message.height = object.height ?? 0;
5942
+ message.proposals = object.proposals ?? 0;
5943
+ message.votes = object.votes ?? 0;
5944
+ message.validatorAddress = object.validatorAddress ?? new Uint8Array(0);
5945
+ message.score = object.score ?? 0;
6142
5946
  return message;
6143
5947
  }
6144
5948
  };
@@ -6297,9 +6101,9 @@ var TendermintHeader = {
6297
6101
  },
6298
6102
  fromJSON(object) {
6299
6103
  return {
6300
- chainId: isSet(object.chainId) ? String(object.chainId) : "",
6301
- height: isSet(object.height) ? Number(object.height) : 0,
6302
- timestamp: isSet(object.timestamp) ? Number(object.timestamp) : 0,
6104
+ chainId: isSet(object.chainId) ? globalThis.String(object.chainId) : "",
6105
+ height: isSet(object.height) ? globalThis.Number(object.height) : 0,
6106
+ timestamp: isSet(object.timestamp) ? globalThis.Number(object.timestamp) : 0,
6303
6107
  blockID: isSet(object.blockID) ? bytesFromBase64(object.blockID) : new Uint8Array(0),
6304
6108
  lastCommitHash: isSet(object.lastCommitHash) ? bytesFromBase64(object.lastCommitHash) : new Uint8Array(0),
6305
6109
  dataHash: isSet(object.dataHash) ? bytesFromBase64(object.dataHash) : new Uint8Array(0),
@@ -6408,7 +6212,9 @@ var ProcessResult = {
6408
6212
  return message;
6409
6213
  },
6410
6214
  fromJSON(object) {
6411
- return { votes: Array.isArray(object?.votes) ? object.votes.map((e) => QuestionResult.fromJSON(e)) : [] };
6215
+ return {
6216
+ votes: globalThis.Array.isArray(object?.votes) ? object.votes.map((e) => QuestionResult.fromJSON(e)) : []
6217
+ };
6412
6218
  },
6413
6219
  toJSON(message) {
6414
6220
  const obj = {};
@@ -6458,7 +6264,9 @@ var QuestionResult = {
6458
6264
  return message;
6459
6265
  },
6460
6266
  fromJSON(object) {
6461
- return { question: Array.isArray(object?.question) ? object.question.map((e) => bytesFromBase64(e)) : [] };
6267
+ return {
6268
+ question: globalThis.Array.isArray(object?.question) ? object.question.map((e) => bytesFromBase64(e)) : []
6269
+ };
6462
6270
  },
6463
6271
  toJSON(message) {
6464
6272
  const obj = {};
@@ -6509,7 +6317,7 @@ var ProcessEndingList = {
6509
6317
  },
6510
6318
  fromJSON(object) {
6511
6319
  return {
6512
- processList: Array.isArray(object?.processList) ? object.processList.map((e) => bytesFromBase64(e)) : []
6320
+ processList: globalThis.Array.isArray(object?.processList) ? object.processList.map((e) => bytesFromBase64(e)) : []
6513
6321
  };
6514
6322
  },
6515
6323
  toJSON(message) {
@@ -6560,7 +6368,7 @@ var StoredKeys = {
6560
6368
  return message;
6561
6369
  },
6562
6370
  fromJSON(object) {
6563
- return { pids: Array.isArray(object?.pids) ? object.pids.map((e) => bytesFromBase64(e)) : [] };
6371
+ return { pids: globalThis.Array.isArray(object?.pids) ? object.pids.map((e) => bytesFromBase64(e)) : [] };
6564
6372
  },
6565
6373
  toJSON(message) {
6566
6374
  const obj = {};
@@ -6578,26 +6386,11 @@ var StoredKeys = {
6578
6386
  return message;
6579
6387
  }
6580
6388
  };
6581
- var tsProtoGlobalThis = (() => {
6582
- if (typeof globalThis !== "undefined") {
6583
- return globalThis;
6584
- }
6585
- if (typeof self !== "undefined") {
6586
- return self;
6587
- }
6588
- if (typeof window !== "undefined") {
6589
- return window;
6590
- }
6591
- if (typeof global !== "undefined") {
6592
- return global;
6593
- }
6594
- throw "Unable to locate global object";
6595
- })();
6596
6389
  function bytesFromBase64(b64) {
6597
- if (tsProtoGlobalThis.Buffer) {
6598
- return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64"));
6390
+ if (globalThis.Buffer) {
6391
+ return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
6599
6392
  } else {
6600
- const bin = tsProtoGlobalThis.atob(b64);
6393
+ const bin = globalThis.atob(b64);
6601
6394
  const arr = new Uint8Array(bin.length);
6602
6395
  for (let i = 0; i < bin.length; ++i) {
6603
6396
  arr[i] = bin.charCodeAt(i);
@@ -6606,19 +6399,19 @@ function bytesFromBase64(b64) {
6606
6399
  }
6607
6400
  }
6608
6401
  function base64FromBytes(arr) {
6609
- if (tsProtoGlobalThis.Buffer) {
6610
- return tsProtoGlobalThis.Buffer.from(arr).toString("base64");
6402
+ if (globalThis.Buffer) {
6403
+ return globalThis.Buffer.from(arr).toString("base64");
6611
6404
  } else {
6612
6405
  const bin = [];
6613
6406
  arr.forEach((byte) => {
6614
- bin.push(String.fromCharCode(byte));
6407
+ bin.push(globalThis.String.fromCharCode(byte));
6615
6408
  });
6616
- return tsProtoGlobalThis.btoa(bin.join(""));
6409
+ return globalThis.btoa(bin.join(""));
6617
6410
  }
6618
6411
  }
6619
6412
  function longToNumber(long) {
6620
- if (long.gt(Number.MAX_SAFE_INTEGER)) {
6621
- throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
6413
+ if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
6414
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
6622
6415
  }
6623
6416
  return long.toNumber();
6624
6417
  }
@@ -6641,7 +6434,6 @@ function isSet(value) {
6641
6434
  EnvelopeType,
6642
6435
  FaucetPackage,
6643
6436
  FaucetPayload,
6644
- MintTokensTx,
6645
6437
  NewProcessTx,
6646
6438
  OracleList,
6647
6439
  Process,
@@ -6658,8 +6450,6 @@ function isSet(value) {
6658
6450
  ProofCA_Type,
6659
6451
  ProofEthereumAccount,
6660
6452
  ProofEthereumStorage,
6661
- ProofGraviton,
6662
- ProofIden3,
6663
6453
  ProofMinime,
6664
6454
  ProofZkSNARK,
6665
6455
  QuestionResult,
@@ -6675,7 +6465,6 @@ function isSet(value) {
6675
6465
  SourceNetworkId,
6676
6466
  StoredKeys,
6677
6467
  TendermintHeader,
6678
- Treasurer,
6679
6468
  Tx,
6680
6469
  TxType,
6681
6470
  Validator,