@taquito/rpc 22.0.0-beta.0 → 22.0.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.
- package/dist/lib/rpc-client-interface.js +1 -0
- package/dist/lib/rpc-client-modules/rpc-cache.js +24 -0
- package/dist/lib/taquito-rpc.js +20 -1
- package/dist/lib/version.js +2 -2
- package/dist/taquito-rpc.es6.js +48 -4
- package/dist/taquito-rpc.es6.js.map +1 -1
- package/dist/taquito-rpc.umd.js +47 -3
- package/dist/taquito-rpc.umd.js.map +1 -1
- package/dist/types/rpc-client-interface.d.ts +4 -2
- package/dist/types/rpc-client-modules/rpc-cache.d.ts +8 -2
- package/dist/types/taquito-rpc.d.ts +9 -3
- package/dist/types/types.d.ts +9 -8
- package/package.json +5 -5
|
@@ -41,6 +41,7 @@ var RPCMethodName;
|
|
|
41
41
|
RPCMethodName["GET_PROPOSALS"] = "getProposals";
|
|
42
42
|
RPCMethodName["GET_PROTOCOLS"] = "getProtocols";
|
|
43
43
|
RPCMethodName["GET_SAPLING_DIFF_BY_CONTRACT"] = "getSaplingDiffByContract";
|
|
44
|
+
RPCMethodName["GET_PROTOCOL_ACTIVATIONS"] = "getProtocolActivations";
|
|
44
45
|
RPCMethodName["GET_SAPLING_DIFF_BY_ID"] = "getSaplingDiffById";
|
|
45
46
|
RPCMethodName["GET_SCRIPT"] = "getScript";
|
|
46
47
|
RPCMethodName["GET_STORAGE"] = "getStorage";
|
|
@@ -1067,6 +1067,30 @@ class RpcClientCache {
|
|
|
1067
1067
|
}
|
|
1068
1068
|
});
|
|
1069
1069
|
}
|
|
1070
|
+
/**
|
|
1071
|
+
* @param options contains generic configuration for rpc calls to specified block (default to head)
|
|
1072
|
+
* @description get current and next protocol
|
|
1073
|
+
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-protocols
|
|
1074
|
+
*/
|
|
1075
|
+
getProtocolActivations() {
|
|
1076
|
+
return __awaiter(this, arguments, void 0, function* (protocol = '') {
|
|
1077
|
+
if (protocol) {
|
|
1078
|
+
const protocolValidation = (0, utils_1.validateProtocol)(protocol);
|
|
1079
|
+
if (protocolValidation !== utils_1.ValidationResult.VALID) {
|
|
1080
|
+
throw new Error(`Invalid protocol hash "${protocol}" ${(0, utils_1.invalidDetail)(protocolValidation)}`);
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_PROTOCOL_ACTIVATIONS, [protocol]);
|
|
1084
|
+
if (this.has(key)) {
|
|
1085
|
+
return this.get(key);
|
|
1086
|
+
}
|
|
1087
|
+
else {
|
|
1088
|
+
const response = this.rpcClient.getProtocolActivations(protocol);
|
|
1089
|
+
this.put(key, response);
|
|
1090
|
+
return response;
|
|
1091
|
+
}
|
|
1092
|
+
});
|
|
1093
|
+
}
|
|
1070
1094
|
/**
|
|
1071
1095
|
* @param contract address of the contract we want to retrieve storage information of
|
|
1072
1096
|
* @param options contains generic configuration for rpc calls to specified block (default to head)
|
package/dist/lib/taquito-rpc.js
CHANGED
|
@@ -969,6 +969,25 @@ class RpcClient {
|
|
|
969
969
|
});
|
|
970
970
|
});
|
|
971
971
|
}
|
|
972
|
+
/**
|
|
973
|
+
* @param options contains generic configuration for rpc calls to specified block (default to head)
|
|
974
|
+
* @description get current and next protocol
|
|
975
|
+
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-protocols
|
|
976
|
+
*/
|
|
977
|
+
getProtocolActivations() {
|
|
978
|
+
return __awaiter(this, arguments, void 0, function* (protocol = '') {
|
|
979
|
+
if (protocol) {
|
|
980
|
+
const protocolValidation = (0, utils_2.validateProtocol)(protocol);
|
|
981
|
+
if (protocolValidation !== utils_2.ValidationResult.VALID) {
|
|
982
|
+
throw new Error(`Invalid protocol hash "${protocol}" ${(0, utils_2.invalidDetail)(protocolValidation)}`);
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
return this.httpBackend.createRequest({
|
|
986
|
+
url: this.createURL(`/chains/${this.chain}/protocols/${protocol}`),
|
|
987
|
+
method: 'GET',
|
|
988
|
+
});
|
|
989
|
+
});
|
|
990
|
+
}
|
|
972
991
|
/**
|
|
973
992
|
* @param contract address of the contract we want to retrieve storage information of
|
|
974
993
|
* @param options contains generic configuration for rpc calls to specified block (default to head)
|
|
@@ -1044,7 +1063,7 @@ class RpcClient {
|
|
|
1044
1063
|
* @description List the prevalidated operations in mempool (accessibility of mempool depends on each rpc endpoint)
|
|
1045
1064
|
* @param args has 5 optional properties
|
|
1046
1065
|
* @default args { version: '2', validated: true, refused: true, outdated, true, branchRefused: true, branchDelayed: true, validationPass: undefined, source: undefined, operationHash: undefined }
|
|
1047
|
-
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/
|
|
1066
|
+
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/rio-mempool-openapi.json
|
|
1048
1067
|
*/
|
|
1049
1068
|
getPendingOperations() {
|
|
1050
1069
|
return __awaiter(this, arguments, void 0, function* (args = {}) {
|
package/dist/lib/version.js
CHANGED
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.VERSION = void 0;
|
|
4
4
|
// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
|
|
5
5
|
exports.VERSION = {
|
|
6
|
-
"commitHash": "
|
|
7
|
-
"version": "22.0.0
|
|
6
|
+
"commitHash": "6a2c52b9e48b299dfc856149c1fa3388e77180ad",
|
|
7
|
+
"version": "22.0.0"
|
|
8
8
|
};
|
package/dist/taquito-rpc.es6.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpBackend, HttpResponseError, STATUS_CODE } from '@taquito/http-utils';
|
|
2
2
|
import BigNumber from 'bignumber.js';
|
|
3
|
-
import { validateAddress, ValidationResult, invalidDetail, validateContractAddress } from '@taquito/utils';
|
|
3
|
+
import { validateAddress, ValidationResult, invalidDetail, validateContractAddress, validateProtocol } from '@taquito/utils';
|
|
4
4
|
import { InvalidAddressError, InvalidContractAddressError } from '@taquito/core';
|
|
5
5
|
|
|
6
6
|
/******************************************************************************
|
|
@@ -87,6 +87,7 @@ var RPCMethodName;
|
|
|
87
87
|
RPCMethodName["GET_PROPOSALS"] = "getProposals";
|
|
88
88
|
RPCMethodName["GET_PROTOCOLS"] = "getProtocols";
|
|
89
89
|
RPCMethodName["GET_SAPLING_DIFF_BY_CONTRACT"] = "getSaplingDiffByContract";
|
|
90
|
+
RPCMethodName["GET_PROTOCOL_ACTIVATIONS"] = "getProtocolActivations";
|
|
90
91
|
RPCMethodName["GET_SAPLING_DIFF_BY_ID"] = "getSaplingDiffById";
|
|
91
92
|
RPCMethodName["GET_SCRIPT"] = "getScript";
|
|
92
93
|
RPCMethodName["GET_STORAGE"] = "getStorage";
|
|
@@ -1172,6 +1173,30 @@ class RpcClientCache {
|
|
|
1172
1173
|
}
|
|
1173
1174
|
});
|
|
1174
1175
|
}
|
|
1176
|
+
/**
|
|
1177
|
+
* @param options contains generic configuration for rpc calls to specified block (default to head)
|
|
1178
|
+
* @description get current and next protocol
|
|
1179
|
+
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-protocols
|
|
1180
|
+
*/
|
|
1181
|
+
getProtocolActivations() {
|
|
1182
|
+
return __awaiter(this, arguments, void 0, function* (protocol = '') {
|
|
1183
|
+
if (protocol) {
|
|
1184
|
+
const protocolValidation = validateProtocol(protocol);
|
|
1185
|
+
if (protocolValidation !== ValidationResult.VALID) {
|
|
1186
|
+
throw new Error(`Invalid protocol hash "${protocol}" ${invalidDetail(protocolValidation)}`);
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), RPCMethodName.GET_PROTOCOL_ACTIVATIONS, [protocol]);
|
|
1190
|
+
if (this.has(key)) {
|
|
1191
|
+
return this.get(key);
|
|
1192
|
+
}
|
|
1193
|
+
else {
|
|
1194
|
+
const response = this.rpcClient.getProtocolActivations(protocol);
|
|
1195
|
+
this.put(key, response);
|
|
1196
|
+
return response;
|
|
1197
|
+
}
|
|
1198
|
+
});
|
|
1199
|
+
}
|
|
1175
1200
|
/**
|
|
1176
1201
|
* @param contract address of the contract we want to retrieve storage information of
|
|
1177
1202
|
* @param options contains generic configuration for rpc calls to specified block (default to head)
|
|
@@ -1408,8 +1433,8 @@ var OpKind;
|
|
|
1408
1433
|
|
|
1409
1434
|
// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
|
|
1410
1435
|
const VERSION = {
|
|
1411
|
-
"commitHash": "
|
|
1412
|
-
"version": "22.0.0
|
|
1436
|
+
"commitHash": "6a2c52b9e48b299dfc856149c1fa3388e77180ad",
|
|
1437
|
+
"version": "22.0.0"
|
|
1413
1438
|
};
|
|
1414
1439
|
|
|
1415
1440
|
/***
|
|
@@ -2324,6 +2349,25 @@ class RpcClient {
|
|
|
2324
2349
|
});
|
|
2325
2350
|
});
|
|
2326
2351
|
}
|
|
2352
|
+
/**
|
|
2353
|
+
* @param options contains generic configuration for rpc calls to specified block (default to head)
|
|
2354
|
+
* @description get current and next protocol
|
|
2355
|
+
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-protocols
|
|
2356
|
+
*/
|
|
2357
|
+
getProtocolActivations() {
|
|
2358
|
+
return __awaiter(this, arguments, void 0, function* (protocol = '') {
|
|
2359
|
+
if (protocol) {
|
|
2360
|
+
const protocolValidation = validateProtocol(protocol);
|
|
2361
|
+
if (protocolValidation !== ValidationResult.VALID) {
|
|
2362
|
+
throw new Error(`Invalid protocol hash "${protocol}" ${invalidDetail(protocolValidation)}`);
|
|
2363
|
+
}
|
|
2364
|
+
}
|
|
2365
|
+
return this.httpBackend.createRequest({
|
|
2366
|
+
url: this.createURL(`/chains/${this.chain}/protocols/${protocol}`),
|
|
2367
|
+
method: 'GET',
|
|
2368
|
+
});
|
|
2369
|
+
});
|
|
2370
|
+
}
|
|
2327
2371
|
/**
|
|
2328
2372
|
* @param contract address of the contract we want to retrieve storage information of
|
|
2329
2373
|
* @param options contains generic configuration for rpc calls to specified block (default to head)
|
|
@@ -2399,7 +2443,7 @@ class RpcClient {
|
|
|
2399
2443
|
* @description List the prevalidated operations in mempool (accessibility of mempool depends on each rpc endpoint)
|
|
2400
2444
|
* @param args has 5 optional properties
|
|
2401
2445
|
* @default args { version: '2', validated: true, refused: true, outdated, true, branchRefused: true, branchDelayed: true, validationPass: undefined, source: undefined, operationHash: undefined }
|
|
2402
|
-
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/
|
|
2446
|
+
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/rio-mempool-openapi.json
|
|
2403
2447
|
*/
|
|
2404
2448
|
getPendingOperations() {
|
|
2405
2449
|
return __awaiter(this, arguments, void 0, function* (args = {}) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taquito-rpc.es6.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"taquito-rpc.es6.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ist/taquito-rpc.umd.js
CHANGED
|
@@ -88,6 +88,7 @@
|
|
|
88
88
|
RPCMethodName["GET_PROPOSALS"] = "getProposals";
|
|
89
89
|
RPCMethodName["GET_PROTOCOLS"] = "getProtocols";
|
|
90
90
|
RPCMethodName["GET_SAPLING_DIFF_BY_CONTRACT"] = "getSaplingDiffByContract";
|
|
91
|
+
RPCMethodName["GET_PROTOCOL_ACTIVATIONS"] = "getProtocolActivations";
|
|
91
92
|
RPCMethodName["GET_SAPLING_DIFF_BY_ID"] = "getSaplingDiffById";
|
|
92
93
|
RPCMethodName["GET_SCRIPT"] = "getScript";
|
|
93
94
|
RPCMethodName["GET_STORAGE"] = "getStorage";
|
|
@@ -1173,6 +1174,30 @@
|
|
|
1173
1174
|
}
|
|
1174
1175
|
});
|
|
1175
1176
|
}
|
|
1177
|
+
/**
|
|
1178
|
+
* @param options contains generic configuration for rpc calls to specified block (default to head)
|
|
1179
|
+
* @description get current and next protocol
|
|
1180
|
+
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-protocols
|
|
1181
|
+
*/
|
|
1182
|
+
getProtocolActivations() {
|
|
1183
|
+
return __awaiter(this, arguments, void 0, function* (protocol = '') {
|
|
1184
|
+
if (protocol) {
|
|
1185
|
+
const protocolValidation = utils.validateProtocol(protocol);
|
|
1186
|
+
if (protocolValidation !== utils.ValidationResult.VALID) {
|
|
1187
|
+
throw new Error(`Invalid protocol hash "${protocol}" ${utils.invalidDetail(protocolValidation)}`);
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), RPCMethodName.GET_PROTOCOL_ACTIVATIONS, [protocol]);
|
|
1191
|
+
if (this.has(key)) {
|
|
1192
|
+
return this.get(key);
|
|
1193
|
+
}
|
|
1194
|
+
else {
|
|
1195
|
+
const response = this.rpcClient.getProtocolActivations(protocol);
|
|
1196
|
+
this.put(key, response);
|
|
1197
|
+
return response;
|
|
1198
|
+
}
|
|
1199
|
+
});
|
|
1200
|
+
}
|
|
1176
1201
|
/**
|
|
1177
1202
|
* @param contract address of the contract we want to retrieve storage information of
|
|
1178
1203
|
* @param options contains generic configuration for rpc calls to specified block (default to head)
|
|
@@ -1409,8 +1434,8 @@
|
|
|
1409
1434
|
|
|
1410
1435
|
// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
|
|
1411
1436
|
const VERSION = {
|
|
1412
|
-
"commitHash": "
|
|
1413
|
-
"version": "22.0.0
|
|
1437
|
+
"commitHash": "6a2c52b9e48b299dfc856149c1fa3388e77180ad",
|
|
1438
|
+
"version": "22.0.0"
|
|
1414
1439
|
};
|
|
1415
1440
|
|
|
1416
1441
|
/***
|
|
@@ -2325,6 +2350,25 @@
|
|
|
2325
2350
|
});
|
|
2326
2351
|
});
|
|
2327
2352
|
}
|
|
2353
|
+
/**
|
|
2354
|
+
* @param options contains generic configuration for rpc calls to specified block (default to head)
|
|
2355
|
+
* @description get current and next protocol
|
|
2356
|
+
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-protocols
|
|
2357
|
+
*/
|
|
2358
|
+
getProtocolActivations() {
|
|
2359
|
+
return __awaiter(this, arguments, void 0, function* (protocol = '') {
|
|
2360
|
+
if (protocol) {
|
|
2361
|
+
const protocolValidation = utils.validateProtocol(protocol);
|
|
2362
|
+
if (protocolValidation !== utils.ValidationResult.VALID) {
|
|
2363
|
+
throw new Error(`Invalid protocol hash "${protocol}" ${utils.invalidDetail(protocolValidation)}`);
|
|
2364
|
+
}
|
|
2365
|
+
}
|
|
2366
|
+
return this.httpBackend.createRequest({
|
|
2367
|
+
url: this.createURL(`/chains/${this.chain}/protocols/${protocol}`),
|
|
2368
|
+
method: 'GET',
|
|
2369
|
+
});
|
|
2370
|
+
});
|
|
2371
|
+
}
|
|
2328
2372
|
/**
|
|
2329
2373
|
* @param contract address of the contract we want to retrieve storage information of
|
|
2330
2374
|
* @param options contains generic configuration for rpc calls to specified block (default to head)
|
|
@@ -2400,7 +2444,7 @@
|
|
|
2400
2444
|
* @description List the prevalidated operations in mempool (accessibility of mempool depends on each rpc endpoint)
|
|
2401
2445
|
* @param args has 5 optional properties
|
|
2402
2446
|
* @default args { version: '2', validated: true, refused: true, outdated, true, branchRefused: true, branchDelayed: true, validationPass: undefined, source: undefined, operationHash: undefined }
|
|
2403
|
-
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/
|
|
2447
|
+
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/rio-mempool-openapi.json
|
|
2404
2448
|
*/
|
|
2405
2449
|
getPendingOperations() {
|
|
2406
2450
|
return __awaiter(this, arguments, void 0, function* (args = {}) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taquito-rpc.umd.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"taquito-rpc.umd.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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otListResponse, BallotsResponse, BigMapGetResponse, BigMapKey, BigMapResponse, BlockHeaderResponse, BlockMetadata, BlockResponse, ConstantsResponse, ContractResponse, CurrentProposalResponse, CurrentQuorumResponse, DelegateResponse, DelegatesResponse, AttestationRightsQueryArguments, AttestationRightsResponse, EntrypointsResponse, ForgeOperationsParams, ManagerKeyResponse, OperationHash, PackDataParams, PreapplyParams, PreapplyResponse, ProposalsResponse, ProtocolsResponse, RPCRunCodeParam, RPCRunOperationParam, RPCRunScriptViewParam, RPCRunViewParam, RunCodeResult, RunScriptViewResult, RunViewResult, SaplingDiffResponse, ScriptResponse, StorageResponse, UnparsingMode, VotesListingsResponse, VotingInfoResponse, VotingPeriodBlockResult, TicketTokenParams, AllTicketBalances,
|
|
2
|
+
import { BakingRightsQueryArguments, BakingRightsResponse, BalanceResponse, UnstakeRequestsResponse, BallotListResponse, BallotsResponse, BigMapGetResponse, BigMapKey, BigMapResponse, BlockHeaderResponse, BlockMetadata, BlockResponse, ConstantsResponse, ContractResponse, CurrentProposalResponse, CurrentQuorumResponse, DelegateResponse, DelegatesResponse, AttestationRightsQueryArguments, AttestationRightsResponse, EntrypointsResponse, ForgeOperationsParams, ManagerKeyResponse, OperationHash, PackDataParams, PreapplyParams, PreapplyResponse, ProposalsResponse, ProtocolsResponse, RPCRunCodeParam, RPCRunOperationParam, RPCRunScriptViewParam, RPCRunViewParam, RunCodeResult, RunScriptViewResult, RunViewResult, SaplingDiffResponse, ScriptResponse, StorageResponse, UnparsingMode, VotesListingsResponse, VotingInfoResponse, VotingPeriodBlockResult, TicketTokenParams, AllTicketBalances, PendingOperationsV2, PendingOperationsQueryArguments, RPCSimulateOperationParam, AILaunchCycleResponse, AllDelegatesQueryArguments, ProtocolActivationsResponse } from './types';
|
|
3
3
|
export interface RPCOptions {
|
|
4
4
|
block: string;
|
|
5
5
|
version?: 1 | '1';
|
|
@@ -61,12 +61,13 @@ export interface RpcClientInterface {
|
|
|
61
61
|
getSaplingDiffById(id: string, options?: RPCOptions): Promise<SaplingDiffResponse>;
|
|
62
62
|
getSaplingDiffByContract(contract: string, options?: RPCOptions): Promise<SaplingDiffResponse>;
|
|
63
63
|
getProtocols(options?: RPCOptions): Promise<ProtocolsResponse>;
|
|
64
|
+
getProtocolActivations(protocol?: string): Promise<ProtocolActivationsResponse>;
|
|
64
65
|
getStorageUsedSpace(contract: string, options?: RPCOptions): Promise<string>;
|
|
65
66
|
getStoragePaidSpace(contract: string, options?: RPCOptions): Promise<string>;
|
|
66
67
|
getTicketBalance(contract: string, ticket: TicketTokenParams, options?: RPCOptions): Promise<string>;
|
|
67
68
|
getAllTicketBalances(contract: string, options?: RPCOptions): Promise<AllTicketBalances>;
|
|
68
69
|
getAdaptiveIssuanceLaunchCycle(options?: RPCOptions): Promise<AILaunchCycleResponse>;
|
|
69
|
-
getPendingOperations(args: PendingOperationsQueryArguments): Promise<
|
|
70
|
+
getPendingOperations(args: PendingOperationsQueryArguments): Promise<PendingOperationsV2>;
|
|
70
71
|
}
|
|
71
72
|
export declare enum RPCMethodName {
|
|
72
73
|
GET_BAKING_RIGHTS = "getBakingRights",
|
|
@@ -105,6 +106,7 @@ export declare enum RPCMethodName {
|
|
|
105
106
|
GET_PROPOSALS = "getProposals",
|
|
106
107
|
GET_PROTOCOLS = "getProtocols",
|
|
107
108
|
GET_SAPLING_DIFF_BY_CONTRACT = "getSaplingDiffByContract",
|
|
109
|
+
GET_PROTOCOL_ACTIVATIONS = "getProtocolActivations",
|
|
108
110
|
GET_SAPLING_DIFF_BY_ID = "getSaplingDiffById",
|
|
109
111
|
GET_SCRIPT = "getScript",
|
|
110
112
|
GET_STORAGE = "getStorage",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import BigNumber from 'bignumber.js';
|
|
2
2
|
import { RpcClientInterface, RPCOptions } from '../rpc-client-interface';
|
|
3
|
-
import { BakingRightsQueryArguments, BakingRightsResponse, BalanceResponse, UnstakeRequestsResponse, BallotListResponse, BallotsResponse, BigMapGetResponse, BigMapKey, BigMapResponse, BlockHeaderResponse, BlockMetadata, BlockResponse, ConstantsResponse, ContractResponse, CurrentProposalResponse, CurrentQuorumResponse, DelegateResponse, DelegatesResponse, VotingInfoResponse, AttestationRightsQueryArguments, AttestationRightsResponse, EntrypointsResponse, ForgeOperationsParams, ManagerKeyResponse, OperationHash, PackDataParams, PreapplyParams, PreapplyResponse, ProposalsResponse, ProtocolsResponse, RPCRunCodeParam, RPCRunOperationParam, RPCRunScriptViewParam, RPCRunViewParam, RunCodeResult, RunScriptViewResult, RunViewResult, SaplingDiffResponse, ScriptResponse, StorageResponse, UnparsingMode, VotesListingsResponse, VotingPeriodBlockResult, TicketTokenParams, AllTicketBalances, PendingOperationsQueryArguments,
|
|
3
|
+
import { BakingRightsQueryArguments, BakingRightsResponse, BalanceResponse, UnstakeRequestsResponse, BallotListResponse, BallotsResponse, BigMapGetResponse, BigMapKey, BigMapResponse, BlockHeaderResponse, BlockMetadata, BlockResponse, ConstantsResponse, ContractResponse, CurrentProposalResponse, CurrentQuorumResponse, DelegateResponse, DelegatesResponse, VotingInfoResponse, AttestationRightsQueryArguments, AttestationRightsResponse, EntrypointsResponse, ForgeOperationsParams, ManagerKeyResponse, OperationHash, PackDataParams, PreapplyParams, PreapplyResponse, ProposalsResponse, ProtocolsResponse, RPCRunCodeParam, RPCRunOperationParam, RPCRunScriptViewParam, RPCRunViewParam, RunCodeResult, RunScriptViewResult, RunViewResult, SaplingDiffResponse, ScriptResponse, StorageResponse, UnparsingMode, VotesListingsResponse, VotingPeriodBlockResult, TicketTokenParams, AllTicketBalances, PendingOperationsQueryArguments, PendingOperationsV2, RPCSimulateOperationParam, AILaunchCycleResponse, AllDelegatesQueryArguments, ProtocolActivationsResponse } from '../types';
|
|
4
4
|
interface CachedDataInterface {
|
|
5
5
|
[key: string]: {
|
|
6
6
|
handle: () => void;
|
|
@@ -409,6 +409,12 @@ export declare class RpcClientCache implements RpcClientInterface {
|
|
|
409
409
|
getProtocols({ block }?: {
|
|
410
410
|
block: string;
|
|
411
411
|
}): Promise<ProtocolsResponse>;
|
|
412
|
+
/**
|
|
413
|
+
* @param options contains generic configuration for rpc calls to specified block (default to head)
|
|
414
|
+
* @description get current and next protocol
|
|
415
|
+
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-protocols
|
|
416
|
+
*/
|
|
417
|
+
getProtocolActivations(protocol?: string): Promise<ProtocolActivationsResponse>;
|
|
412
418
|
/**
|
|
413
419
|
* @param contract address of the contract we want to retrieve storage information of
|
|
414
420
|
* @param options contains generic configuration for rpc calls to specified block (default to head)
|
|
@@ -454,6 +460,6 @@ export declare class RpcClientCache implements RpcClientInterface {
|
|
|
454
460
|
* @param args has 5 optional properties
|
|
455
461
|
* @default args { version: '2', validated: true, refused: true, outdated, true, branchRefused: true, branchDelayed: true, validationPass: undefined }
|
|
456
462
|
*/
|
|
457
|
-
getPendingOperations(args?: PendingOperationsQueryArguments): Promise<
|
|
463
|
+
getPendingOperations(args?: PendingOperationsQueryArguments): Promise<PendingOperationsV2>;
|
|
458
464
|
}
|
|
459
465
|
export {};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { HttpBackend } from '@taquito/http-utils';
|
|
6
6
|
import BigNumber from 'bignumber.js';
|
|
7
7
|
import { RpcClientInterface, RPCOptions } from './rpc-client-interface';
|
|
8
|
-
import { BakingRightsQueryArguments, BakingRightsResponse, BalanceResponse, UnstakeRequestsResponse, BallotListResponse, BallotsResponse, BigMapGetResponse, BigMapKey, BigMapResponse, BlockHeaderResponse, BlockMetadata, BlockResponse, ConstantsResponse, ContractResponse, CurrentProposalResponse, CurrentQuorumResponse, DelegateResponse, DelegatesResponse, VotingInfoResponse, AttestationRightsQueryArguments, AttestationRightsResponse, EntrypointsResponse, ForgeOperationsParams, ManagerKeyResponse, OperationHash, PackDataParams, PreapplyParams, PreapplyResponse, ProposalsResponse, ProtocolsResponse, RPCRunCodeParam, RPCRunOperationParam, RPCRunViewParam, RPCRunScriptViewParam, RunCodeResult, RunViewResult, RunScriptViewResult, SaplingDiffResponse, ScriptResponse, StorageResponse, UnparsingMode, VotesListingsResponse, VotingPeriodBlockResult, TicketTokenParams, AllTicketBalances, PendingOperationsQueryArguments,
|
|
8
|
+
import { BakingRightsQueryArguments, BakingRightsResponse, BalanceResponse, UnstakeRequestsResponse, BallotListResponse, BallotsResponse, BigMapGetResponse, BigMapKey, BigMapResponse, BlockHeaderResponse, BlockMetadata, BlockResponse, ConstantsResponse, ContractResponse, CurrentProposalResponse, CurrentQuorumResponse, DelegateResponse, DelegatesResponse, VotingInfoResponse, AttestationRightsQueryArguments, AttestationRightsResponse, EntrypointsResponse, ForgeOperationsParams, ManagerKeyResponse, OperationHash, PackDataParams, PreapplyParams, PreapplyResponse, ProposalsResponse, ProtocolsResponse, RPCRunCodeParam, RPCRunOperationParam, RPCRunViewParam, RPCRunScriptViewParam, RunCodeResult, RunViewResult, RunScriptViewResult, SaplingDiffResponse, ScriptResponse, StorageResponse, UnparsingMode, VotesListingsResponse, VotingPeriodBlockResult, TicketTokenParams, AllTicketBalances, PendingOperationsQueryArguments, PendingOperationsV2, RPCSimulateOperationParam, AILaunchCycleResponse, AllDelegatesQueryArguments, ProtocolActivationsResponse } from './types';
|
|
9
9
|
export { castToBigNumber } from './utils/utils';
|
|
10
10
|
export { RPCOptions, defaultChain, defaultRPCOptions, RpcClientInterface, } from './rpc-client-interface';
|
|
11
11
|
export { RpcClientCache } from './rpc-client-modules/rpc-cache';
|
|
@@ -408,6 +408,12 @@ export declare class RpcClient implements RpcClientInterface {
|
|
|
408
408
|
getProtocols({ block }?: {
|
|
409
409
|
block: string;
|
|
410
410
|
}): Promise<ProtocolsResponse>;
|
|
411
|
+
/**
|
|
412
|
+
* @param options contains generic configuration for rpc calls to specified block (default to head)
|
|
413
|
+
* @description get current and next protocol
|
|
414
|
+
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-protocols
|
|
415
|
+
*/
|
|
416
|
+
getProtocolActivations(protocol?: string): Promise<ProtocolActivationsResponse>;
|
|
411
417
|
/**
|
|
412
418
|
* @param contract address of the contract we want to retrieve storage information of
|
|
413
419
|
* @param options contains generic configuration for rpc calls to specified block (default to head)
|
|
@@ -458,7 +464,7 @@ export declare class RpcClient implements RpcClientInterface {
|
|
|
458
464
|
* @description List the prevalidated operations in mempool (accessibility of mempool depends on each rpc endpoint)
|
|
459
465
|
* @param args has 5 optional properties
|
|
460
466
|
* @default args { version: '2', validated: true, refused: true, outdated, true, branchRefused: true, branchDelayed: true, validationPass: undefined, source: undefined, operationHash: undefined }
|
|
461
|
-
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/
|
|
467
|
+
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/rio-mempool-openapi.json
|
|
462
468
|
*/
|
|
463
|
-
getPendingOperations(args?: PendingOperationsQueryArguments): Promise<
|
|
469
|
+
getPendingOperations(args?: PendingOperationsQueryArguments): Promise<PendingOperationsV2>;
|
|
464
470
|
}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1990,6 +1990,15 @@ export type ProtocolsResponse = {
|
|
|
1990
1990
|
protocol: string;
|
|
1991
1991
|
next_protocol: string;
|
|
1992
1992
|
};
|
|
1993
|
+
export type ProtocolActivationsResponse = ProtocolActivation[] | ProtocolActivation;
|
|
1994
|
+
export type ProtocolActivation = {
|
|
1995
|
+
protocol: string;
|
|
1996
|
+
proto_level: number;
|
|
1997
|
+
activation_block: {
|
|
1998
|
+
block_hash: string;
|
|
1999
|
+
level: number;
|
|
2000
|
+
};
|
|
2001
|
+
};
|
|
1993
2002
|
export type Next = {
|
|
1994
2003
|
next: number;
|
|
1995
2004
|
} | {
|
|
@@ -2015,14 +2024,6 @@ export interface PendingOperationsQueryArguments {
|
|
|
2015
2024
|
type FailedProcessedOperation = Pick<OperationEntry, 'hash' | 'protocol' | 'branch' | 'contents' | 'signature'> & {
|
|
2016
2025
|
error: TezosGenericOperationError[];
|
|
2017
2026
|
};
|
|
2018
|
-
export interface PendingOperationsV1 {
|
|
2019
|
-
applied: Pick<OperationEntry, 'hash' | 'branch' | 'contents' | 'signature'>[];
|
|
2020
|
-
refused: FailedProcessedOperation[];
|
|
2021
|
-
outdated: FailedProcessedOperation[];
|
|
2022
|
-
branch_refused: FailedProcessedOperation[];
|
|
2023
|
-
branch_delayed: FailedProcessedOperation[];
|
|
2024
|
-
unprocessed: Pick<OperationEntry, 'hash' | 'protocol' | 'branch' | 'contents' | 'signature'>[];
|
|
2025
|
-
}
|
|
2026
2027
|
export interface PendingOperationsV2 {
|
|
2027
2028
|
validated: Pick<OperationEntry, 'hash' | 'branch' | 'contents' | 'signature'>[];
|
|
2028
2029
|
refused: FailedProcessedOperation[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taquito/rpc",
|
|
3
|
-
"version": "22.0.0
|
|
3
|
+
"version": "22.0.0",
|
|
4
4
|
"description": "Provides low level methods, and types to invoke RPC calls from a Nomadic Tezos RPC node",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"tezos",
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
]
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@taquito/core": "^22.0.0
|
|
70
|
-
"@taquito/http-utils": "^22.0.0
|
|
71
|
-
"@taquito/utils": "^22.0.0
|
|
69
|
+
"@taquito/core": "^22.0.0",
|
|
70
|
+
"@taquito/http-utils": "^22.0.0",
|
|
71
|
+
"@taquito/utils": "^22.0.0",
|
|
72
72
|
"bignumber.js": "^9.1.2"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
@@ -98,5 +98,5 @@
|
|
|
98
98
|
"ts-toolbelt": "^9.6.0",
|
|
99
99
|
"typescript": "~5.5.4"
|
|
100
100
|
},
|
|
101
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "134ec228acbee03b4f40b80c89d78c718557569b"
|
|
102
102
|
}
|