@taquito/rpc 20.0.2-beta.0 → 20.0.2-beta.2
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.
- package/dist/lib/rpc-client-modules/rpc-cache.js +102 -102
- package/dist/lib/taquito-rpc.js +102 -102
- package/dist/lib/utils/utils.js +2 -3
- package/dist/lib/version.js +2 -2
- package/dist/taquito-rpc.es6.js +206 -206
- package/dist/taquito-rpc.umd.js +206 -206
- package/dist/types/taquito-rpc.d.ts +1 -1
- package/package.json +19 -19
|
@@ -100,8 +100,8 @@ class RpcClientCache {
|
|
|
100
100
|
* @description Get the block's hash, its unique identifier.
|
|
101
101
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-hash
|
|
102
102
|
*/
|
|
103
|
-
getBlockHash(
|
|
104
|
-
return __awaiter(this,
|
|
103
|
+
getBlockHash() {
|
|
104
|
+
return __awaiter(this, arguments, void 0, function* ({ block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
105
105
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_BLOCK_HASH, [
|
|
106
106
|
block,
|
|
107
107
|
]);
|
|
@@ -120,8 +120,8 @@ class RpcClientCache {
|
|
|
120
120
|
* @description List the ancestors of the given block which, if referred to as the branch in an operation header, are recent enough for that operation to be included in the current block.
|
|
121
121
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-live-blocks
|
|
122
122
|
*/
|
|
123
|
-
getLiveBlocks(
|
|
124
|
-
return __awaiter(this,
|
|
123
|
+
getLiveBlocks() {
|
|
124
|
+
return __awaiter(this, arguments, void 0, function* ({ block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
125
125
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_LIVE_BLOCKS, [
|
|
126
126
|
block,
|
|
127
127
|
]);
|
|
@@ -141,8 +141,8 @@ class RpcClientCache {
|
|
|
141
141
|
* @description Access the spendable balance of a contract, excluding frozen bonds
|
|
142
142
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-balance
|
|
143
143
|
*/
|
|
144
|
-
getBalance(
|
|
145
|
-
return __awaiter(this,
|
|
144
|
+
getBalance(address_1) {
|
|
145
|
+
return __awaiter(this, arguments, void 0, function* (address, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
146
146
|
this.validateAddress(address);
|
|
147
147
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_BALANCE, [
|
|
148
148
|
block,
|
|
@@ -164,8 +164,8 @@ class RpcClientCache {
|
|
|
164
164
|
* @description Access the full balance of a contract, including frozen bonds and stake.
|
|
165
165
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-full-balance
|
|
166
166
|
*/
|
|
167
|
-
getFullBalance(
|
|
168
|
-
return __awaiter(this,
|
|
167
|
+
getFullBalance(address_1) {
|
|
168
|
+
return __awaiter(this, arguments, void 0, function* (address, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
169
169
|
this.validateAddress(address);
|
|
170
170
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_FULL_BALANCE, [
|
|
171
171
|
block,
|
|
@@ -187,8 +187,8 @@ class RpcClientCache {
|
|
|
187
187
|
* @description Access the staked balance of a contract. Returns None if the contract is originated, or neither delegated nor a delegate.
|
|
188
188
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-staked-balance
|
|
189
189
|
*/
|
|
190
|
-
getStakedBalance(
|
|
191
|
-
return __awaiter(this,
|
|
190
|
+
getStakedBalance(address_1) {
|
|
191
|
+
return __awaiter(this, arguments, void 0, function* (address, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
192
192
|
this.validateAddress(address);
|
|
193
193
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_STAKED_BALANCE, [
|
|
194
194
|
block,
|
|
@@ -210,8 +210,8 @@ class RpcClientCache {
|
|
|
210
210
|
* @description Access the balance of a contract that was requested for an unstake operation, and is no longer frozen, which means it will appear in the spendable balance of the contract after any stake/unstake/finalize_unstake operation. Returns None if the contract is originated.
|
|
211
211
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-unstaked-finalizable-balance
|
|
212
212
|
*/
|
|
213
|
-
getUnstakedFinalizableBalance(
|
|
214
|
-
return __awaiter(this,
|
|
213
|
+
getUnstakedFinalizableBalance(address_1) {
|
|
214
|
+
return __awaiter(this, arguments, void 0, function* (address, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
215
215
|
this.validateAddress(address);
|
|
216
216
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_UNSTAKED_FINALIZABLE_BALANCE, [block, address]);
|
|
217
217
|
if (this.has(key)) {
|
|
@@ -230,8 +230,8 @@ class RpcClientCache {
|
|
|
230
230
|
* @description Access the balance of a contract that was requested for an unstake operation, but is still frozen for the duration of the slashing period. Returns None if the contract is originated.
|
|
231
231
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-unstaked-frozen-balance
|
|
232
232
|
*/
|
|
233
|
-
getUnstakedFrozenBalance(
|
|
234
|
-
return __awaiter(this,
|
|
233
|
+
getUnstakedFrozenBalance(address_1) {
|
|
234
|
+
return __awaiter(this, arguments, void 0, function* (address, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
235
235
|
this.validateAddress(address);
|
|
236
236
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_UNSTAKED_FROZEN_BALANCE, [block, address]);
|
|
237
237
|
if (this.has(key)) {
|
|
@@ -250,8 +250,8 @@ class RpcClientCache {
|
|
|
250
250
|
* @description Access the unstake requests of the contract. The requests that appear in the finalizable field can be finalized, which means that the contract can transfer these (no longer frozen) funds to their spendable balance with a [finalize_unstake] operation call. Returns null if there is no unstake request pending.
|
|
251
251
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-unstake-requests
|
|
252
252
|
*/
|
|
253
|
-
getUnstakeRequests(
|
|
254
|
-
return __awaiter(this,
|
|
253
|
+
getUnstakeRequests(address_1) {
|
|
254
|
+
return __awaiter(this, arguments, void 0, function* (address, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
255
255
|
this.validateAddress(address);
|
|
256
256
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_UNSTAKE_REQUESTS, [block, address]);
|
|
257
257
|
if (this.has(key)) {
|
|
@@ -270,8 +270,8 @@ class RpcClientCache {
|
|
|
270
270
|
* @description Access the data of the contract.
|
|
271
271
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-storage
|
|
272
272
|
*/
|
|
273
|
-
getStorage(
|
|
274
|
-
return __awaiter(this,
|
|
273
|
+
getStorage(address_1) {
|
|
274
|
+
return __awaiter(this, arguments, void 0, function* (address, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
275
275
|
this.validateContract(address);
|
|
276
276
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_STORAGE, [
|
|
277
277
|
block,
|
|
@@ -293,8 +293,8 @@ class RpcClientCache {
|
|
|
293
293
|
* @description Access the code and data of the contract.
|
|
294
294
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-script
|
|
295
295
|
*/
|
|
296
|
-
getScript(
|
|
297
|
-
return __awaiter(this,
|
|
296
|
+
getScript(address_1) {
|
|
297
|
+
return __awaiter(this, arguments, void 0, function* (address, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
298
298
|
this.validateContract(address);
|
|
299
299
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_SCRIPT, [
|
|
300
300
|
block,
|
|
@@ -316,8 +316,8 @@ class RpcClientCache {
|
|
|
316
316
|
* @param options contains generic configuration for rpc calls to specified block (default to head)
|
|
317
317
|
* @description Access the script of the contract and normalize it using the requested unparsing mode.
|
|
318
318
|
*/
|
|
319
|
-
getNormalizedScript(
|
|
320
|
-
return __awaiter(this,
|
|
319
|
+
getNormalizedScript(address_1) {
|
|
320
|
+
return __awaiter(this, arguments, void 0, function* (address, unparsingMode = { unparsing_mode: 'Readable' }, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
321
321
|
this.validateContract(address);
|
|
322
322
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_NORMALIZED_SCRIPT, [block, address], unparsingMode);
|
|
323
323
|
if (this.has(key)) {
|
|
@@ -336,8 +336,8 @@ class RpcClientCache {
|
|
|
336
336
|
* @description Access the complete status of a contract.
|
|
337
337
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id
|
|
338
338
|
*/
|
|
339
|
-
getContract(
|
|
340
|
-
return __awaiter(this,
|
|
339
|
+
getContract(address_1) {
|
|
340
|
+
return __awaiter(this, arguments, void 0, function* (address, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
341
341
|
this.validateAddress(address);
|
|
342
342
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_CONTRACT, [
|
|
343
343
|
block,
|
|
@@ -359,8 +359,8 @@ class RpcClientCache {
|
|
|
359
359
|
* @description Access the manager of an implicit contract
|
|
360
360
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-manager-key
|
|
361
361
|
*/
|
|
362
|
-
getManagerKey(
|
|
363
|
-
return __awaiter(this,
|
|
362
|
+
getManagerKey(address_1) {
|
|
363
|
+
return __awaiter(this, arguments, void 0, function* (address, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
364
364
|
this.validateAddress(address);
|
|
365
365
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_MANAGER_KEY, [
|
|
366
366
|
block,
|
|
@@ -382,8 +382,8 @@ class RpcClientCache {
|
|
|
382
382
|
* @description Access the delegate of a contract, if any
|
|
383
383
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-delegate
|
|
384
384
|
*/
|
|
385
|
-
getDelegate(
|
|
386
|
-
return __awaiter(this,
|
|
385
|
+
getDelegate(address_1) {
|
|
386
|
+
return __awaiter(this, arguments, void 0, function* (address, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
387
387
|
this.validateAddress(address);
|
|
388
388
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_DELEGATE, [
|
|
389
389
|
block,
|
|
@@ -406,8 +406,8 @@ class RpcClientCache {
|
|
|
406
406
|
* @description Access the value associated with a key in the big map storage of the contract.
|
|
407
407
|
* @see https://tezos.gitlab.io/active/rpc.html#post-block-id-context-contracts-contract-id-big-map-get
|
|
408
408
|
*/
|
|
409
|
-
getBigMapKey(
|
|
410
|
-
return __awaiter(this,
|
|
409
|
+
getBigMapKey(address_1, key_1) {
|
|
410
|
+
return __awaiter(this, arguments, void 0, function* (address, key, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
411
411
|
this.validateAddress(address);
|
|
412
412
|
const keyUrl = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_BIG_MAP_KEY, [block, address], key);
|
|
413
413
|
if (this.has(keyUrl)) {
|
|
@@ -427,8 +427,8 @@ class RpcClientCache {
|
|
|
427
427
|
* @description Access the value associated with a key in a big map.
|
|
428
428
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-big-maps-big-map-id-script-expr
|
|
429
429
|
*/
|
|
430
|
-
getBigMapExpr(
|
|
431
|
-
return __awaiter(this,
|
|
430
|
+
getBigMapExpr(id_1, expr_1) {
|
|
431
|
+
return __awaiter(this, arguments, void 0, function* (id, expr, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
432
432
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_BIG_MAP_EXPR, [
|
|
433
433
|
block,
|
|
434
434
|
id,
|
|
@@ -450,8 +450,8 @@ class RpcClientCache {
|
|
|
450
450
|
* @description Lists all registered delegates by default with query arguments to filter unneeded values.
|
|
451
451
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-delegates-pkh
|
|
452
452
|
*/
|
|
453
|
-
getAllDelegates(
|
|
454
|
-
return __awaiter(this,
|
|
453
|
+
getAllDelegates() {
|
|
454
|
+
return __awaiter(this, arguments, void 0, function* (args = {}, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
455
455
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_ALL_DELEGATES, [
|
|
456
456
|
block,
|
|
457
457
|
args,
|
|
@@ -472,8 +472,8 @@ class RpcClientCache {
|
|
|
472
472
|
* @description Everything about a delegate
|
|
473
473
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-delegates-pkh
|
|
474
474
|
*/
|
|
475
|
-
getDelegates(
|
|
476
|
-
return __awaiter(this,
|
|
475
|
+
getDelegates(address_1) {
|
|
476
|
+
return __awaiter(this, arguments, void 0, function* (address, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
477
477
|
this.validateAddress(address);
|
|
478
478
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_DELEGATES, [
|
|
479
479
|
block,
|
|
@@ -495,8 +495,8 @@ class RpcClientCache {
|
|
|
495
495
|
* @description Returns the delegate info (e.g. voting power) found in the listings of the current voting period
|
|
496
496
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-delegates-pkh-voting-info
|
|
497
497
|
*/
|
|
498
|
-
getVotingInfo(
|
|
499
|
-
return __awaiter(this,
|
|
498
|
+
getVotingInfo(address_1) {
|
|
499
|
+
return __awaiter(this, arguments, void 0, function* (address, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
500
500
|
this.validateAddress(address);
|
|
501
501
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_VOTING_INFO, [
|
|
502
502
|
block,
|
|
@@ -517,8 +517,8 @@ class RpcClientCache {
|
|
|
517
517
|
* @description All constants
|
|
518
518
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-constants
|
|
519
519
|
*/
|
|
520
|
-
getConstants(
|
|
521
|
-
return __awaiter(this,
|
|
520
|
+
getConstants() {
|
|
521
|
+
return __awaiter(this, arguments, void 0, function* ({ block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
522
522
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_CONSTANTS, [
|
|
523
523
|
block,
|
|
524
524
|
]);
|
|
@@ -540,8 +540,8 @@ class RpcClientCache {
|
|
|
540
540
|
* @example getBlock({ block: 'head~2', version: 1 }) will return an offset of 2 from head blocks and shows { kind: attestation }
|
|
541
541
|
* @example getBlock({ block: 'BL8fTiWcSxWCjiMVnDkbh6EuhqVPZzgWheJ2dqwrxYRm9AephXh~2' }) will return an offset of 2 blocks from given block hash..
|
|
542
542
|
*/
|
|
543
|
-
getBlock(
|
|
544
|
-
return __awaiter(this,
|
|
543
|
+
getBlock() {
|
|
544
|
+
return __awaiter(this, arguments, void 0, function* ({ block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
545
545
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_BLOCK, [block]);
|
|
546
546
|
if (this.has(key)) {
|
|
547
547
|
return this.get(key);
|
|
@@ -558,8 +558,8 @@ class RpcClientCache {
|
|
|
558
558
|
* @description The whole block header
|
|
559
559
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-header
|
|
560
560
|
*/
|
|
561
|
-
getBlockHeader(
|
|
562
|
-
return __awaiter(this,
|
|
561
|
+
getBlockHeader() {
|
|
562
|
+
return __awaiter(this, arguments, void 0, function* ({ block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
563
563
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_BLOCK_HEADER, [
|
|
564
564
|
block,
|
|
565
565
|
]);
|
|
@@ -578,8 +578,8 @@ class RpcClientCache {
|
|
|
578
578
|
* @description All the metadata associated to the block
|
|
579
579
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-metadata
|
|
580
580
|
*/
|
|
581
|
-
getBlockMetadata(
|
|
582
|
-
return __awaiter(this,
|
|
581
|
+
getBlockMetadata() {
|
|
582
|
+
return __awaiter(this, arguments, void 0, function* ({ block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
583
583
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_BLOCK_METADATA, [
|
|
584
584
|
block,
|
|
585
585
|
]);
|
|
@@ -599,8 +599,8 @@ class RpcClientCache {
|
|
|
599
599
|
* @description Retrieves the list of delegates allowed to bake a block.
|
|
600
600
|
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
|
|
601
601
|
*/
|
|
602
|
-
getBakingRights(
|
|
603
|
-
return __awaiter(this,
|
|
602
|
+
getBakingRights() {
|
|
603
|
+
return __awaiter(this, arguments, void 0, function* (args = {}, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
604
604
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_BAKING_RIGHTS, [
|
|
605
605
|
block,
|
|
606
606
|
args,
|
|
@@ -621,8 +621,8 @@ class RpcClientCache {
|
|
|
621
621
|
* @description Retrieves the delegates allowed to attest a block
|
|
622
622
|
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
|
|
623
623
|
*/
|
|
624
|
-
getAttestationRights(
|
|
625
|
-
return __awaiter(this,
|
|
624
|
+
getAttestationRights() {
|
|
625
|
+
return __awaiter(this, arguments, void 0, function* (args = {}, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
626
626
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_ATTESTATION_RIGHTS, [block, args]);
|
|
627
627
|
if (this.has(key)) {
|
|
628
628
|
return this.get(key);
|
|
@@ -639,8 +639,8 @@ class RpcClientCache {
|
|
|
639
639
|
* @description Ballots casted so far during a voting period
|
|
640
640
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-ballot-list
|
|
641
641
|
*/
|
|
642
|
-
getBallotList(
|
|
643
|
-
return __awaiter(this,
|
|
642
|
+
getBallotList() {
|
|
643
|
+
return __awaiter(this, arguments, void 0, function* ({ block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
644
644
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_BALLOT_LIST, [
|
|
645
645
|
block,
|
|
646
646
|
]);
|
|
@@ -659,8 +659,8 @@ class RpcClientCache {
|
|
|
659
659
|
* @description Sum of ballots casted so far during a voting period
|
|
660
660
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-ballots
|
|
661
661
|
*/
|
|
662
|
-
getBallots(
|
|
663
|
-
return __awaiter(this,
|
|
662
|
+
getBallots() {
|
|
663
|
+
return __awaiter(this, arguments, void 0, function* ({ block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
664
664
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_BALLOTS, [block]);
|
|
665
665
|
if (this.has(key)) {
|
|
666
666
|
return this.get(key);
|
|
@@ -677,8 +677,8 @@ class RpcClientCache {
|
|
|
677
677
|
* @description Current proposal under evaluation.
|
|
678
678
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-current-proposal
|
|
679
679
|
*/
|
|
680
|
-
getCurrentProposal(
|
|
681
|
-
return __awaiter(this,
|
|
680
|
+
getCurrentProposal() {
|
|
681
|
+
return __awaiter(this, arguments, void 0, function* ({ block, } = rpc_client_interface_2.defaultRPCOptions) {
|
|
682
682
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_CURRENT_PROPOSAL, [block]);
|
|
683
683
|
if (this.has(key)) {
|
|
684
684
|
return this.get(key);
|
|
@@ -695,8 +695,8 @@ class RpcClientCache {
|
|
|
695
695
|
* @description Current expected quorum.
|
|
696
696
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-current-quorum
|
|
697
697
|
*/
|
|
698
|
-
getCurrentQuorum(
|
|
699
|
-
return __awaiter(this,
|
|
698
|
+
getCurrentQuorum() {
|
|
699
|
+
return __awaiter(this, arguments, void 0, function* ({ block, } = rpc_client_interface_2.defaultRPCOptions) {
|
|
700
700
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_CURRENT_QUORUM, [
|
|
701
701
|
block,
|
|
702
702
|
]);
|
|
@@ -715,8 +715,8 @@ class RpcClientCache {
|
|
|
715
715
|
* @description List of delegates with their voting power
|
|
716
716
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-listings
|
|
717
717
|
*/
|
|
718
|
-
getVotesListings(
|
|
719
|
-
return __awaiter(this,
|
|
718
|
+
getVotesListings() {
|
|
719
|
+
return __awaiter(this, arguments, void 0, function* ({ block, } = rpc_client_interface_2.defaultRPCOptions) {
|
|
720
720
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_VOTES_LISTINGS, [
|
|
721
721
|
block,
|
|
722
722
|
]);
|
|
@@ -735,8 +735,8 @@ class RpcClientCache {
|
|
|
735
735
|
* @description List of proposals with number of supporters
|
|
736
736
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-proposals
|
|
737
737
|
*/
|
|
738
|
-
getProposals(
|
|
739
|
-
return __awaiter(this,
|
|
738
|
+
getProposals() {
|
|
739
|
+
return __awaiter(this, arguments, void 0, function* ({ block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
740
740
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_PROPOSALS, [
|
|
741
741
|
block,
|
|
742
742
|
]);
|
|
@@ -756,8 +756,8 @@ class RpcClientCache {
|
|
|
756
756
|
* @description Forge an operation returning the unsigned bytes
|
|
757
757
|
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
|
|
758
758
|
*/
|
|
759
|
-
forgeOperations(
|
|
760
|
-
return __awaiter(this,
|
|
759
|
+
forgeOperations(data_1) {
|
|
760
|
+
return __awaiter(this, arguments, void 0, function* (data, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
761
761
|
return this.rpcClient.forgeOperations(data, { block });
|
|
762
762
|
});
|
|
763
763
|
}
|
|
@@ -777,8 +777,8 @@ class RpcClientCache {
|
|
|
777
777
|
* @description Simulate the application of the operations with the context of the given block and return the result of each operation application
|
|
778
778
|
* @see https://tezos.gitlab.io/active/rpc.html#post-block-id-helpers-preapply-operations
|
|
779
779
|
*/
|
|
780
|
-
preapplyOperations(
|
|
781
|
-
return __awaiter(this,
|
|
780
|
+
preapplyOperations(ops_1) {
|
|
781
|
+
return __awaiter(this, arguments, void 0, function* (ops, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
782
782
|
return this.rpcClient.preapplyOperations(ops, { block });
|
|
783
783
|
});
|
|
784
784
|
}
|
|
@@ -789,8 +789,8 @@ class RpcClientCache {
|
|
|
789
789
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-entrypoints
|
|
790
790
|
* @version 005_PsBABY5H
|
|
791
791
|
*/
|
|
792
|
-
getEntrypoints(
|
|
793
|
-
return __awaiter(this,
|
|
792
|
+
getEntrypoints(contract_1) {
|
|
793
|
+
return __awaiter(this, arguments, void 0, function* (contract, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
794
794
|
this.validateContract(contract);
|
|
795
795
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_ENTRYPOINTS, [
|
|
796
796
|
block,
|
|
@@ -813,8 +813,8 @@ class RpcClientCache {
|
|
|
813
813
|
* @description Run an operation with the context of the given block and without signature checks and return the operation application result, including the consumed gas.
|
|
814
814
|
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
|
|
815
815
|
*/
|
|
816
|
-
runOperation(
|
|
817
|
-
return __awaiter(this,
|
|
816
|
+
runOperation(op_1) {
|
|
817
|
+
return __awaiter(this, arguments, void 0, function* (op, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
818
818
|
return this.rpcClient.runOperation(op, { block });
|
|
819
819
|
});
|
|
820
820
|
}
|
|
@@ -824,8 +824,8 @@ class RpcClientCache {
|
|
|
824
824
|
* @description Simulate running an operation at some future moment (based on the number of blocks given in the `latency` argument), and return the operation application result.
|
|
825
825
|
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
|
|
826
826
|
*/
|
|
827
|
-
simulateOperation(
|
|
828
|
-
return __awaiter(this,
|
|
827
|
+
simulateOperation(op_1) {
|
|
828
|
+
return __awaiter(this, arguments, void 0, function* (op, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
829
829
|
return this.rpcClient.simulateOperation(op, { block });
|
|
830
830
|
});
|
|
831
831
|
}
|
|
@@ -835,8 +835,8 @@ class RpcClientCache {
|
|
|
835
835
|
* @description Run a Michelson script in the current context
|
|
836
836
|
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
|
|
837
837
|
*/
|
|
838
|
-
runCode(
|
|
839
|
-
return __awaiter(this,
|
|
838
|
+
runCode(code_1) {
|
|
839
|
+
return __awaiter(this, arguments, void 0, function* (code, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
840
840
|
return this.rpcClient.runCode(code, { block });
|
|
841
841
|
});
|
|
842
842
|
}
|
|
@@ -847,9 +847,9 @@ class RpcClientCache {
|
|
|
847
847
|
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
|
|
848
848
|
*/
|
|
849
849
|
runScriptView(_a, _b) {
|
|
850
|
-
var { unparsing_mode = 'Readable' } = _a, rest = __rest(_a, ["unparsing_mode"]);
|
|
851
|
-
var _c = _b === void 0 ? rpc_client_interface_2.defaultRPCOptions : _b, block = _c.block;
|
|
852
850
|
return __awaiter(this, void 0, void 0, function* () {
|
|
851
|
+
var { unparsing_mode = 'Readable' } = _a, rest = __rest(_a, ["unparsing_mode"]);
|
|
852
|
+
var _c = _b === void 0 ? rpc_client_interface_2.defaultRPCOptions : _b, block = _c.block;
|
|
853
853
|
return this.rpcClient.runScriptView(Object.assign({ unparsing_mode }, rest), { block });
|
|
854
854
|
});
|
|
855
855
|
}
|
|
@@ -860,9 +860,9 @@ class RpcClientCache {
|
|
|
860
860
|
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
|
|
861
861
|
*/
|
|
862
862
|
runView(_a, _b) {
|
|
863
|
-
var { unparsing_mode = 'Readable' } = _a, rest = __rest(_a, ["unparsing_mode"]);
|
|
864
|
-
var _c = _b === void 0 ? rpc_client_interface_2.defaultRPCOptions : _b, block = _c.block;
|
|
865
863
|
return __awaiter(this, void 0, void 0, function* () {
|
|
864
|
+
var { unparsing_mode = 'Readable' } = _a, rest = __rest(_a, ["unparsing_mode"]);
|
|
865
|
+
var _c = _b === void 0 ? rpc_client_interface_2.defaultRPCOptions : _b, block = _c.block;
|
|
866
866
|
return this.rpcClient.runView(Object.assign({ unparsing_mode }, rest), { block });
|
|
867
867
|
});
|
|
868
868
|
}
|
|
@@ -890,8 +890,8 @@ class RpcClientCache {
|
|
|
890
890
|
* @example packData({ data: { string: "test" }, type: { prim: "string" } })
|
|
891
891
|
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
|
|
892
892
|
*/
|
|
893
|
-
packData(
|
|
894
|
-
return __awaiter(this,
|
|
893
|
+
packData(data_1) {
|
|
894
|
+
return __awaiter(this, arguments, void 0, function* (data, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
895
895
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.PACK_DATA, [block], data);
|
|
896
896
|
if (this.has(key)) {
|
|
897
897
|
return this.get(key);
|
|
@@ -915,8 +915,8 @@ class RpcClientCache {
|
|
|
915
915
|
* @description Returns the voting period (index, kind, starting position) and related information (position, remaining) of the interrogated block
|
|
916
916
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-current-period
|
|
917
917
|
*/
|
|
918
|
-
getCurrentPeriod(
|
|
919
|
-
return __awaiter(this,
|
|
918
|
+
getCurrentPeriod() {
|
|
919
|
+
return __awaiter(this, arguments, void 0, function* ({ block, } = rpc_client_interface_2.defaultRPCOptions) {
|
|
920
920
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_CURRENT_PERIOD, [
|
|
921
921
|
block,
|
|
922
922
|
]);
|
|
@@ -936,8 +936,8 @@ class RpcClientCache {
|
|
|
936
936
|
* @example getSuccessorPeriod() will default to successor voting period for /main/chains/block/head.
|
|
937
937
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-votes-successor-period
|
|
938
938
|
*/
|
|
939
|
-
getSuccessorPeriod(
|
|
940
|
-
return __awaiter(this,
|
|
939
|
+
getSuccessorPeriod() {
|
|
940
|
+
return __awaiter(this, arguments, void 0, function* ({ block, } = rpc_client_interface_2.defaultRPCOptions) {
|
|
941
941
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_SUCCESSOR_PERIOD, [block]);
|
|
942
942
|
if (this.has(key)) {
|
|
943
943
|
return this.get(key);
|
|
@@ -955,8 +955,8 @@ class RpcClientCache {
|
|
|
955
955
|
* @description Returns the root and a diff of a state starting from an optional offset which is zero by default
|
|
956
956
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-sapling-sapling-state-id-get-diff
|
|
957
957
|
*/
|
|
958
|
-
getSaplingDiffById(
|
|
959
|
-
return __awaiter(this,
|
|
958
|
+
getSaplingDiffById(id_1) {
|
|
959
|
+
return __awaiter(this, arguments, void 0, function* (id, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
960
960
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_SAPLING_DIFF_BY_ID, [block, id]);
|
|
961
961
|
if (this.has(key)) {
|
|
962
962
|
return this.get(key);
|
|
@@ -974,8 +974,8 @@ class RpcClientCache {
|
|
|
974
974
|
* @description Returns the root and a diff of a state starting from an optional offset which is zero by default
|
|
975
975
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-contracts-contract-id-single-sapling-get-diff
|
|
976
976
|
*/
|
|
977
|
-
getSaplingDiffByContract(
|
|
978
|
-
return __awaiter(this,
|
|
977
|
+
getSaplingDiffByContract(contract_1) {
|
|
978
|
+
return __awaiter(this, arguments, void 0, function* (contract, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
979
979
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_SAPLING_DIFF_BY_CONTRACT, [block, contract]);
|
|
980
980
|
if (this.has(key)) {
|
|
981
981
|
return this.get(key);
|
|
@@ -992,8 +992,8 @@ class RpcClientCache {
|
|
|
992
992
|
* @description get current and next protocol
|
|
993
993
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-protocols
|
|
994
994
|
*/
|
|
995
|
-
getProtocols(
|
|
996
|
-
return __awaiter(this,
|
|
995
|
+
getProtocols() {
|
|
996
|
+
return __awaiter(this, arguments, void 0, function* ({ block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
997
997
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_PROTOCOLS, [
|
|
998
998
|
block,
|
|
999
999
|
]);
|
|
@@ -1013,8 +1013,8 @@ class RpcClientCache {
|
|
|
1013
1013
|
* @description Access the used storage space of the contract
|
|
1014
1014
|
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
|
|
1015
1015
|
*/
|
|
1016
|
-
getStorageUsedSpace(
|
|
1017
|
-
return __awaiter(this,
|
|
1016
|
+
getStorageUsedSpace(contract_1) {
|
|
1017
|
+
return __awaiter(this, arguments, void 0, function* (contract, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
1018
1018
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_STORAGE_USED_SPACE, [block, contract]);
|
|
1019
1019
|
if (this.has(key)) {
|
|
1020
1020
|
return this.get(key);
|
|
@@ -1032,8 +1032,8 @@ class RpcClientCache {
|
|
|
1032
1032
|
= * @description Access the paid storage space of the contract
|
|
1033
1033
|
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
|
|
1034
1034
|
*/
|
|
1035
|
-
getStoragePaidSpace(
|
|
1036
|
-
return __awaiter(this,
|
|
1035
|
+
getStoragePaidSpace(contract_1) {
|
|
1036
|
+
return __awaiter(this, arguments, void 0, function* (contract, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
1037
1037
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_STORAGE_PAID_SPACE, [block, contract]);
|
|
1038
1038
|
if (this.has(key)) {
|
|
1039
1039
|
return this.get(key);
|
|
@@ -1053,8 +1053,8 @@ class RpcClientCache {
|
|
|
1053
1053
|
* @example ticket { ticketer: 'address', content_type: { prim: "string" }, content: { string: 'ticket1' } }
|
|
1054
1054
|
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
|
|
1055
1055
|
*/
|
|
1056
|
-
getTicketBalance(
|
|
1057
|
-
return __awaiter(this,
|
|
1056
|
+
getTicketBalance(contract_1, ticket_1) {
|
|
1057
|
+
return __awaiter(this, arguments, void 0, function* (contract, ticket, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
1058
1058
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_TICKET_BALANCE, [block, contract], ticket);
|
|
1059
1059
|
if (this.has(key)) {
|
|
1060
1060
|
return this.get(key);
|
|
@@ -1072,8 +1072,8 @@ class RpcClientCache {
|
|
|
1072
1072
|
* @description Access the complete list of tickets owned by the given contract by scanning the contract's storage.
|
|
1073
1073
|
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/paris-openapi-rc.json
|
|
1074
1074
|
*/
|
|
1075
|
-
getAllTicketBalances(
|
|
1076
|
-
return __awaiter(this,
|
|
1075
|
+
getAllTicketBalances(contract_1) {
|
|
1076
|
+
return __awaiter(this, arguments, void 0, function* (contract, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
1077
1077
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_ALL_TICKET_BALANCES, [block, contract]);
|
|
1078
1078
|
if (this.has(key)) {
|
|
1079
1079
|
return this.get(key);
|
|
@@ -1090,8 +1090,8 @@ class RpcClientCache {
|
|
|
1090
1090
|
* @param options contains generic configuration for rpc calls to specified block (default to head)
|
|
1091
1091
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-adaptive-issuance-launch-cycle
|
|
1092
1092
|
*/
|
|
1093
|
-
getAdaptiveIssuanceLaunchCycle(
|
|
1094
|
-
return __awaiter(this,
|
|
1093
|
+
getAdaptiveIssuanceLaunchCycle() {
|
|
1094
|
+
return __awaiter(this, arguments, void 0, function* ({ block, } = rpc_client_interface_2.defaultRPCOptions) {
|
|
1095
1095
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_ADAPTIVE_ISSUANCE_LAUNCH_CYCLE, [block]);
|
|
1096
1096
|
if (this.has(key)) {
|
|
1097
1097
|
return this.get(key);
|
|
@@ -1108,8 +1108,8 @@ class RpcClientCache {
|
|
|
1108
1108
|
* @param args has 5 optional properties. We support version 1 & 2
|
|
1109
1109
|
* @default args { version: '2', validated: true, refused: true, outdated, true, branchRefused: true, branchDelayed: true, validationPass: undefined }
|
|
1110
1110
|
*/
|
|
1111
|
-
getPendingOperations(
|
|
1112
|
-
return __awaiter(this,
|
|
1111
|
+
getPendingOperations() {
|
|
1112
|
+
return __awaiter(this, arguments, void 0, function* (args = {}) {
|
|
1113
1113
|
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_PENDING_OPERATIONS, [args]);
|
|
1114
1114
|
if (this.has(key)) {
|
|
1115
1115
|
return this.get(key);
|