@taquito/rpc 14.0.0 → 14.1.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.
@@ -67,6 +67,7 @@
67
67
  RPCMethodName["GET_CURRENT_QUORUM"] = "getCurrentQuorum";
68
68
  RPCMethodName["GET_DELEGATE"] = "getDelegate";
69
69
  RPCMethodName["GET_DELEGATES"] = "getDelegates";
70
+ RPCMethodName["GET_VOTING_INFO"] = "getVotingInfo";
70
71
  RPCMethodName["GET_ENDORSING_RIGHTS"] = "getEndorsingRights";
71
72
  RPCMethodName["GET_ENTRYPOINTS"] = "getEntrypoints";
72
73
  RPCMethodName["GET_LIVE_BLOCKS"] = "getLiveBlocks";
@@ -489,6 +490,32 @@
489
490
  }
490
491
  });
491
492
  }
493
+ /**
494
+ *
495
+ * @param address delegate address which we want to retrieve
496
+ * @param options contains generic configuration for rpc calls
497
+ *
498
+ * @description Returns the delegate info (e.g. voting power) found in the listings of the current voting period.
499
+ *
500
+ * @see https://tezos.gitlab.io/kathmandu/rpc.html#get-block-id-context-delegates-pkh-voting-info
501
+ */
502
+ getVotingInfo(address, { block } = defaultRPCOptions) {
503
+ return __awaiter(this, void 0, void 0, function* () {
504
+ this.validateAddress(address);
505
+ const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), RPCMethodName.GET_VOTING_INFO, [
506
+ block,
507
+ address,
508
+ ]);
509
+ if (this.has(key)) {
510
+ return this.get(key);
511
+ }
512
+ else {
513
+ const response = this.rpcClient.getVotingInfo(address, { block });
514
+ this.put(key, response);
515
+ return response;
516
+ }
517
+ });
518
+ }
492
519
  /**
493
520
  *
494
521
  * @param options contains generic configuration for rpc calls
@@ -1138,8 +1165,8 @@
1138
1165
 
1139
1166
  // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
1140
1167
  const VERSION = {
1141
- "commitHash": "b1a433145402043facaec3519daceb21a305deef",
1142
- "version": "14.0.0"
1168
+ "commitHash": "232709b09cd380c4a70183a7e0b506d6bf2c2626",
1169
+ "version": "14.1.0"
1143
1170
  };
1144
1171
 
1145
1172
  /***
@@ -1427,6 +1454,24 @@
1427
1454
  : undefined });
1428
1455
  });
1429
1456
  }
1457
+ /**
1458
+ *
1459
+ * @param address delegate address which we want to retrieve
1460
+ * @param options contains generic configuration for rpc calls
1461
+ *
1462
+ * @description Returns the delegate info (e.g. voting power) found in the listings of the current voting period.
1463
+ *
1464
+ * @see https://tezos.gitlab.io/kathmandu/rpc.html#get-block-id-context-delegates-pkh-voting-info
1465
+ */
1466
+ getVotingInfo(address, { block } = defaultRPCOptions) {
1467
+ return __awaiter(this, void 0, void 0, function* () {
1468
+ this.validateAddress(address);
1469
+ return yield this.httpBackend.createRequest({
1470
+ url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/delegates/${address}/voting_info`),
1471
+ method: 'GET',
1472
+ });
1473
+ });
1474
+ }
1430
1475
  /**
1431
1476
  *
1432
1477
  * @param options contains generic configuration for rpc calls