@taquito/rpc 23.1.0 → 24.0.0-RC.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 -5
- package/dist/lib/taquito-rpc.js +17 -5
- package/dist/lib/version.js +2 -2
- package/dist/taquito-rpc.es6.js +45 -13
- package/dist/taquito-rpc.es6.js.map +1 -1
- package/dist/taquito-rpc.umd.js +45 -13
- package/dist/taquito-rpc.umd.js.map +1 -1
- package/dist/types/rpc-client-interface.d.ts +4 -3
- package/dist/types/rpc-client-modules/rpc-cache.d.ts +15 -8
- package/dist/types/taquito-rpc.d.ts +9 -2
- package/dist/types/types.d.ts +39 -12
- package/package.json +7 -6
|
@@ -55,4 +55,5 @@ var RPCMethodName;
|
|
|
55
55
|
RPCMethodName["GET_ALL_TICKET_BALANCES"] = "getAllTicketBalances";
|
|
56
56
|
RPCMethodName["GET_ADAPTIVE_ISSUANCE_LAUNCH_CYCLE"] = "getAdaptiveIssuanceLaunchCycle";
|
|
57
57
|
RPCMethodName["GET_PENDING_OPERATIONS"] = "getPendingOperations";
|
|
58
|
+
RPCMethodName["GET_DESTINATION_INDEX"] = "getDestinationIndex";
|
|
58
59
|
})(RPCMethodName || (exports.RPCMethodName = RPCMethodName = {}));
|
|
@@ -1173,11 +1173,11 @@ class RpcClientCache {
|
|
|
1173
1173
|
});
|
|
1174
1174
|
}
|
|
1175
1175
|
/**
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1176
|
+
* @param delegate delegate address which we want to retrieve active staking parameters
|
|
1177
|
+
* @param options contains generic configuration for rpc calls to specified block (default to head)
|
|
1178
|
+
* @description Returns the currently active staking parameters for the given delegate
|
|
1179
|
+
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-delegates-pkh-active-staking-parameters
|
|
1180
|
+
*/
|
|
1181
1181
|
getActiveStakingParameters(delegate_1) {
|
|
1182
1182
|
return __awaiter(this, arguments, void 0, function* (delegate, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
1183
1183
|
this.validateAddress(delegate);
|
|
@@ -1212,5 +1212,24 @@ class RpcClientCache {
|
|
|
1212
1212
|
}
|
|
1213
1213
|
});
|
|
1214
1214
|
}
|
|
1215
|
+
/**
|
|
1216
|
+
* @param destination address to retrieve the index for
|
|
1217
|
+
* @param options contains generic configuration for rpc calls to specified block (default to head)
|
|
1218
|
+
* @description Returns the index assigned to the address if it was indexed by the opcode INDEX_ADDRESS, otherwise returns null
|
|
1219
|
+
* @see https://octez.tezos.com/docs/alpha/rpc.html#get-block-id-context-destination-destination-id-index
|
|
1220
|
+
*/
|
|
1221
|
+
getDestinationIndex(destination_1) {
|
|
1222
|
+
return __awaiter(this, arguments, void 0, function* (destination, { block } = rpc_client_interface_2.defaultRPCOptions) {
|
|
1223
|
+
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), rpc_client_interface_1.RPCMethodName.GET_DESTINATION_INDEX, [block, destination]);
|
|
1224
|
+
if (this.has(key)) {
|
|
1225
|
+
return this.get(key);
|
|
1226
|
+
}
|
|
1227
|
+
else {
|
|
1228
|
+
const response = this.rpcClient.getDestinationIndex(destination, { block });
|
|
1229
|
+
this.put(key, response);
|
|
1230
|
+
return response;
|
|
1231
|
+
}
|
|
1232
|
+
});
|
|
1233
|
+
}
|
|
1215
1234
|
}
|
|
1216
1235
|
exports.RpcClientCache = RpcClientCache;
|
package/dist/lib/taquito-rpc.js
CHANGED
|
@@ -1028,7 +1028,7 @@ class RpcClient {
|
|
|
1028
1028
|
* @description List the prevalidated operations in mempool (accessibility of mempool depends on each rpc endpoint)
|
|
1029
1029
|
* @param args has 5 optional properties
|
|
1030
1030
|
* @default args { version: '2', validated: true, refused: true, outdated, true, branchRefused: true, branchDelayed: true, validationPass: undefined, source: undefined, operationHash: undefined }
|
|
1031
|
-
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/
|
|
1031
|
+
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/tallinn-mempool-openapi-rc.json
|
|
1032
1032
|
*/
|
|
1033
1033
|
getPendingOperations() {
|
|
1034
1034
|
return __awaiter(this, arguments, void 0, function* (args = {}) {
|
|
@@ -1047,11 +1047,10 @@ class RpcClient {
|
|
|
1047
1047
|
*/
|
|
1048
1048
|
getActiveStakingParameters(delegate_1) {
|
|
1049
1049
|
return __awaiter(this, arguments, void 0, function* (delegate, { block } = rpc_client_interface_1.defaultRPCOptions) {
|
|
1050
|
-
|
|
1050
|
+
return yield this.httpBackend.createRequest({
|
|
1051
1051
|
url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/delegates/${delegate}/active_staking_parameters`),
|
|
1052
1052
|
method: 'GET',
|
|
1053
1053
|
});
|
|
1054
|
-
return response;
|
|
1055
1054
|
});
|
|
1056
1055
|
}
|
|
1057
1056
|
/**
|
|
@@ -1062,11 +1061,24 @@ class RpcClient {
|
|
|
1062
1061
|
*/
|
|
1063
1062
|
getPendingStakingParameters(delegate_1) {
|
|
1064
1063
|
return __awaiter(this, arguments, void 0, function* (delegate, { block } = rpc_client_interface_1.defaultRPCOptions) {
|
|
1065
|
-
|
|
1064
|
+
return yield this.httpBackend.createRequest({
|
|
1066
1065
|
url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/delegates/${delegate}/pending_staking_parameters`),
|
|
1067
1066
|
method: 'GET',
|
|
1068
1067
|
});
|
|
1069
|
-
|
|
1068
|
+
});
|
|
1069
|
+
}
|
|
1070
|
+
/**
|
|
1071
|
+
* @param destination address to retrieve the index for
|
|
1072
|
+
* @param options contains generic configuration for rpc calls to specified block (default to head)
|
|
1073
|
+
* @description Returns the index assigned to the address if it was indexed by the opcode INDEX_ADDRESS, otherwise returns null
|
|
1074
|
+
* @see https://octez.tezos.com/docs/alpha/rpc.html#get-block-id-context-destination-destination-id-index
|
|
1075
|
+
*/
|
|
1076
|
+
getDestinationIndex(destination_1) {
|
|
1077
|
+
return __awaiter(this, arguments, void 0, function* (destination, { block } = rpc_client_interface_1.defaultRPCOptions) {
|
|
1078
|
+
return yield this.httpBackend.createRequest({
|
|
1079
|
+
url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/destination/${destination}/index`),
|
|
1080
|
+
method: 'GET',
|
|
1081
|
+
});
|
|
1070
1082
|
});
|
|
1071
1083
|
}
|
|
1072
1084
|
}
|
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": "
|
|
6
|
+
"commitHash": "0e66f21b0164a7add990b5c0d60698086daece99",
|
|
7
|
+
"version": "24.0.0-RC.0"
|
|
8
8
|
};
|
package/dist/taquito-rpc.es6.js
CHANGED
|
@@ -17,7 +17,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
17
17
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
18
18
|
PERFORMANCE OF THIS SOFTWARE.
|
|
19
19
|
***************************************************************************** */
|
|
20
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
20
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
function __rest(s, e) {
|
|
@@ -101,6 +101,7 @@ var RPCMethodName;
|
|
|
101
101
|
RPCMethodName["GET_ALL_TICKET_BALANCES"] = "getAllTicketBalances";
|
|
102
102
|
RPCMethodName["GET_ADAPTIVE_ISSUANCE_LAUNCH_CYCLE"] = "getAdaptiveIssuanceLaunchCycle";
|
|
103
103
|
RPCMethodName["GET_PENDING_OPERATIONS"] = "getPendingOperations";
|
|
104
|
+
RPCMethodName["GET_DESTINATION_INDEX"] = "getDestinationIndex";
|
|
104
105
|
})(RPCMethodName || (RPCMethodName = {}));
|
|
105
106
|
|
|
106
107
|
/**
|
|
@@ -1280,11 +1281,11 @@ class RpcClientCache {
|
|
|
1280
1281
|
});
|
|
1281
1282
|
}
|
|
1282
1283
|
/**
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1284
|
+
* @param delegate delegate address which we want to retrieve active staking parameters
|
|
1285
|
+
* @param options contains generic configuration for rpc calls to specified block (default to head)
|
|
1286
|
+
* @description Returns the currently active staking parameters for the given delegate
|
|
1287
|
+
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-delegates-pkh-active-staking-parameters
|
|
1288
|
+
*/
|
|
1288
1289
|
getActiveStakingParameters(delegate_1) {
|
|
1289
1290
|
return __awaiter(this, arguments, void 0, function* (delegate, { block } = defaultRPCOptions) {
|
|
1290
1291
|
this.validateAddress(delegate);
|
|
@@ -1319,6 +1320,25 @@ class RpcClientCache {
|
|
|
1319
1320
|
}
|
|
1320
1321
|
});
|
|
1321
1322
|
}
|
|
1323
|
+
/**
|
|
1324
|
+
* @param destination address to retrieve the index for
|
|
1325
|
+
* @param options contains generic configuration for rpc calls to specified block (default to head)
|
|
1326
|
+
* @description Returns the index assigned to the address if it was indexed by the opcode INDEX_ADDRESS, otherwise returns null
|
|
1327
|
+
* @see https://octez.tezos.com/docs/alpha/rpc.html#get-block-id-context-destination-destination-id-index
|
|
1328
|
+
*/
|
|
1329
|
+
getDestinationIndex(destination_1) {
|
|
1330
|
+
return __awaiter(this, arguments, void 0, function* (destination, { block } = defaultRPCOptions) {
|
|
1331
|
+
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), RPCMethodName.GET_DESTINATION_INDEX, [block, destination]);
|
|
1332
|
+
if (this.has(key)) {
|
|
1333
|
+
return this.get(key);
|
|
1334
|
+
}
|
|
1335
|
+
else {
|
|
1336
|
+
const response = this.rpcClient.getDestinationIndex(destination, { block });
|
|
1337
|
+
this.put(key, response);
|
|
1338
|
+
return response;
|
|
1339
|
+
}
|
|
1340
|
+
});
|
|
1341
|
+
}
|
|
1322
1342
|
}
|
|
1323
1343
|
|
|
1324
1344
|
var OPERATION_METADATA;
|
|
@@ -1482,8 +1502,8 @@ var OpKind;
|
|
|
1482
1502
|
|
|
1483
1503
|
// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
|
|
1484
1504
|
const VERSION = {
|
|
1485
|
-
"commitHash": "
|
|
1486
|
-
"version": "
|
|
1505
|
+
"commitHash": "0e66f21b0164a7add990b5c0d60698086daece99",
|
|
1506
|
+
"version": "24.0.0-RC.0"
|
|
1487
1507
|
};
|
|
1488
1508
|
|
|
1489
1509
|
/***
|
|
@@ -2457,7 +2477,7 @@ class RpcClient {
|
|
|
2457
2477
|
* @description List the prevalidated operations in mempool (accessibility of mempool depends on each rpc endpoint)
|
|
2458
2478
|
* @param args has 5 optional properties
|
|
2459
2479
|
* @default args { version: '2', validated: true, refused: true, outdated, true, branchRefused: true, branchDelayed: true, validationPass: undefined, source: undefined, operationHash: undefined }
|
|
2460
|
-
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/
|
|
2480
|
+
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/tallinn-mempool-openapi-rc.json
|
|
2461
2481
|
*/
|
|
2462
2482
|
getPendingOperations() {
|
|
2463
2483
|
return __awaiter(this, arguments, void 0, function* (args = {}) {
|
|
@@ -2476,11 +2496,10 @@ class RpcClient {
|
|
|
2476
2496
|
*/
|
|
2477
2497
|
getActiveStakingParameters(delegate_1) {
|
|
2478
2498
|
return __awaiter(this, arguments, void 0, function* (delegate, { block } = defaultRPCOptions) {
|
|
2479
|
-
|
|
2499
|
+
return yield this.httpBackend.createRequest({
|
|
2480
2500
|
url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/delegates/${delegate}/active_staking_parameters`),
|
|
2481
2501
|
method: 'GET',
|
|
2482
2502
|
});
|
|
2483
|
-
return response;
|
|
2484
2503
|
});
|
|
2485
2504
|
}
|
|
2486
2505
|
/**
|
|
@@ -2491,11 +2510,24 @@ class RpcClient {
|
|
|
2491
2510
|
*/
|
|
2492
2511
|
getPendingStakingParameters(delegate_1) {
|
|
2493
2512
|
return __awaiter(this, arguments, void 0, function* (delegate, { block } = defaultRPCOptions) {
|
|
2494
|
-
|
|
2513
|
+
return yield this.httpBackend.createRequest({
|
|
2495
2514
|
url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/delegates/${delegate}/pending_staking_parameters`),
|
|
2496
2515
|
method: 'GET',
|
|
2497
2516
|
});
|
|
2498
|
-
|
|
2517
|
+
});
|
|
2518
|
+
}
|
|
2519
|
+
/**
|
|
2520
|
+
* @param destination address to retrieve the index for
|
|
2521
|
+
* @param options contains generic configuration for rpc calls to specified block (default to head)
|
|
2522
|
+
* @description Returns the index assigned to the address if it was indexed by the opcode INDEX_ADDRESS, otherwise returns null
|
|
2523
|
+
* @see https://octez.tezos.com/docs/alpha/rpc.html#get-block-id-context-destination-destination-id-index
|
|
2524
|
+
*/
|
|
2525
|
+
getDestinationIndex(destination_1) {
|
|
2526
|
+
return __awaiter(this, arguments, void 0, function* (destination, { block } = defaultRPCOptions) {
|
|
2527
|
+
return yield this.httpBackend.createRequest({
|
|
2528
|
+
url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/destination/${destination}/index`),
|
|
2529
|
+
method: 'GET',
|
|
2530
|
+
});
|
|
2499
2531
|
});
|
|
2500
2532
|
}
|
|
2501
2533
|
}
|
|
@@ -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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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/taquito-rpc.umd.js
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
19
19
|
PERFORMANCE OF THIS SOFTWARE.
|
|
20
20
|
***************************************************************************** */
|
|
21
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
21
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
function __rest(s, e) {
|
|
@@ -102,6 +102,7 @@
|
|
|
102
102
|
RPCMethodName["GET_ALL_TICKET_BALANCES"] = "getAllTicketBalances";
|
|
103
103
|
RPCMethodName["GET_ADAPTIVE_ISSUANCE_LAUNCH_CYCLE"] = "getAdaptiveIssuanceLaunchCycle";
|
|
104
104
|
RPCMethodName["GET_PENDING_OPERATIONS"] = "getPendingOperations";
|
|
105
|
+
RPCMethodName["GET_DESTINATION_INDEX"] = "getDestinationIndex";
|
|
105
106
|
})(RPCMethodName || (RPCMethodName = {}));
|
|
106
107
|
|
|
107
108
|
/**
|
|
@@ -1281,11 +1282,11 @@
|
|
|
1281
1282
|
});
|
|
1282
1283
|
}
|
|
1283
1284
|
/**
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1285
|
+
* @param delegate delegate address which we want to retrieve active staking parameters
|
|
1286
|
+
* @param options contains generic configuration for rpc calls to specified block (default to head)
|
|
1287
|
+
* @description Returns the currently active staking parameters for the given delegate
|
|
1288
|
+
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-delegates-pkh-active-staking-parameters
|
|
1289
|
+
*/
|
|
1289
1290
|
getActiveStakingParameters(delegate_1) {
|
|
1290
1291
|
return __awaiter(this, arguments, void 0, function* (delegate, { block } = defaultRPCOptions) {
|
|
1291
1292
|
this.validateAddress(delegate);
|
|
@@ -1320,6 +1321,25 @@
|
|
|
1320
1321
|
}
|
|
1321
1322
|
});
|
|
1322
1323
|
}
|
|
1324
|
+
/**
|
|
1325
|
+
* @param destination address to retrieve the index for
|
|
1326
|
+
* @param options contains generic configuration for rpc calls to specified block (default to head)
|
|
1327
|
+
* @description Returns the index assigned to the address if it was indexed by the opcode INDEX_ADDRESS, otherwise returns null
|
|
1328
|
+
* @see https://octez.tezos.com/docs/alpha/rpc.html#get-block-id-context-destination-destination-id-index
|
|
1329
|
+
*/
|
|
1330
|
+
getDestinationIndex(destination_1) {
|
|
1331
|
+
return __awaiter(this, arguments, void 0, function* (destination, { block } = defaultRPCOptions) {
|
|
1332
|
+
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), RPCMethodName.GET_DESTINATION_INDEX, [block, destination]);
|
|
1333
|
+
if (this.has(key)) {
|
|
1334
|
+
return this.get(key);
|
|
1335
|
+
}
|
|
1336
|
+
else {
|
|
1337
|
+
const response = this.rpcClient.getDestinationIndex(destination, { block });
|
|
1338
|
+
this.put(key, response);
|
|
1339
|
+
return response;
|
|
1340
|
+
}
|
|
1341
|
+
});
|
|
1342
|
+
}
|
|
1323
1343
|
}
|
|
1324
1344
|
|
|
1325
1345
|
exports.OPERATION_METADATA = void 0;
|
|
@@ -1483,8 +1503,8 @@
|
|
|
1483
1503
|
|
|
1484
1504
|
// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
|
|
1485
1505
|
const VERSION = {
|
|
1486
|
-
"commitHash": "
|
|
1487
|
-
"version": "
|
|
1506
|
+
"commitHash": "0e66f21b0164a7add990b5c0d60698086daece99",
|
|
1507
|
+
"version": "24.0.0-RC.0"
|
|
1488
1508
|
};
|
|
1489
1509
|
|
|
1490
1510
|
/***
|
|
@@ -2458,7 +2478,7 @@
|
|
|
2458
2478
|
* @description List the prevalidated operations in mempool (accessibility of mempool depends on each rpc endpoint)
|
|
2459
2479
|
* @param args has 5 optional properties
|
|
2460
2480
|
* @default args { version: '2', validated: true, refused: true, outdated, true, branchRefused: true, branchDelayed: true, validationPass: undefined, source: undefined, operationHash: undefined }
|
|
2461
|
-
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/
|
|
2481
|
+
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/tallinn-mempool-openapi-rc.json
|
|
2462
2482
|
*/
|
|
2463
2483
|
getPendingOperations() {
|
|
2464
2484
|
return __awaiter(this, arguments, void 0, function* (args = {}) {
|
|
@@ -2477,11 +2497,10 @@
|
|
|
2477
2497
|
*/
|
|
2478
2498
|
getActiveStakingParameters(delegate_1) {
|
|
2479
2499
|
return __awaiter(this, arguments, void 0, function* (delegate, { block } = defaultRPCOptions) {
|
|
2480
|
-
|
|
2500
|
+
return yield this.httpBackend.createRequest({
|
|
2481
2501
|
url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/delegates/${delegate}/active_staking_parameters`),
|
|
2482
2502
|
method: 'GET',
|
|
2483
2503
|
});
|
|
2484
|
-
return response;
|
|
2485
2504
|
});
|
|
2486
2505
|
}
|
|
2487
2506
|
/**
|
|
@@ -2492,11 +2511,24 @@
|
|
|
2492
2511
|
*/
|
|
2493
2512
|
getPendingStakingParameters(delegate_1) {
|
|
2494
2513
|
return __awaiter(this, arguments, void 0, function* (delegate, { block } = defaultRPCOptions) {
|
|
2495
|
-
|
|
2514
|
+
return yield this.httpBackend.createRequest({
|
|
2496
2515
|
url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/delegates/${delegate}/pending_staking_parameters`),
|
|
2497
2516
|
method: 'GET',
|
|
2498
2517
|
});
|
|
2499
|
-
|
|
2518
|
+
});
|
|
2519
|
+
}
|
|
2520
|
+
/**
|
|
2521
|
+
* @param destination address to retrieve the index for
|
|
2522
|
+
* @param options contains generic configuration for rpc calls to specified block (default to head)
|
|
2523
|
+
* @description Returns the index assigned to the address if it was indexed by the opcode INDEX_ADDRESS, otherwise returns null
|
|
2524
|
+
* @see https://octez.tezos.com/docs/alpha/rpc.html#get-block-id-context-destination-destination-id-index
|
|
2525
|
+
*/
|
|
2526
|
+
getDestinationIndex(destination_1) {
|
|
2527
|
+
return __awaiter(this, arguments, void 0, function* (destination, { block } = defaultRPCOptions) {
|
|
2528
|
+
return yield this.httpBackend.createRequest({
|
|
2529
|
+
url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/destination/${destination}/index`),
|
|
2530
|
+
method: 'GET',
|
|
2531
|
+
});
|
|
2500
2532
|
});
|
|
2501
2533
|
}
|
|
2502
2534
|
}
|
|
@@ -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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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BakingRightsQueryArguments, BakingRightsResponse, BalanceResponse, UnstakeRequestsResponse, BallotListResponse, BallotsResponse, BigMapResponse, BlockHeaderResponse, BlockMetadata, BlockResponse, ConstantsResponse, ContractResponse, CurrentProposalResponse, CurrentQuorumResponse, DelegateResponse, DelegatesResponse, AttestationRightsQueryArguments, AttestationRightsResponse, EntrypointsResponse, ForgeOperationsParams, ManagerKeyResponse, OperationHash, PackDataParams, PreapplyParams, PreapplyResponse, ProposalsResponse, ProtocolsResponse, RPCRunCodeParam, RPCRunScriptViewParam, RPCRunViewParam, RunCodeResult, RunScriptViewResult, RunViewResult, SaplingDiffResponse, ScriptResponse, StorageResponse, UnparsingMode, VotesListingsResponse, VotingInfoResponse, VotingPeriodBlockResult, TicketTokenParams, AllTicketBalances, PendingOperationsV2, PendingOperationsQueryArguments, RPCSimulateOperationParam, AILaunchCycleResponse, AllDelegatesQueryArguments, ProtocolActivationsResponse, ActiveStakingParametersResponse, PendingStakingParametersResponse } from './types';
|
|
1
|
+
import { BakingRightsQueryArguments, BakingRightsResponse, BalanceResponse, UnstakeRequestsResponse, BallotListResponse, BallotsResponse, BigMapResponse, BlockHeaderResponse, BlockMetadata, BlockResponse, ConstantsResponse, ContractResponse, CurrentProposalResponse, CurrentQuorumResponse, DelegateResponse, DelegatesResponse, AttestationRightsQueryArguments, AttestationRightsResponse, EntrypointsResponse, ForgeOperationsParams, ManagerKeyResponse, OperationHash, PackDataParams, PreapplyParams, PreapplyResponse, ProposalsResponse, ProtocolsResponse, RPCRunCodeParam, RPCRunScriptViewParam, RPCRunViewParam, RunCodeResult, RunScriptViewResult, RunViewResult, SaplingDiffResponse, ScriptResponse, StorageResponse, UnparsingMode, VotesListingsResponse, VotingInfoResponse, VotingPeriodBlockResult, TicketTokenParams, AllTicketBalances, PendingOperationsV2, PendingOperationsQueryArguments, RPCSimulateOperationParam, AILaunchCycleResponse, AllDelegatesQueryArguments, ProtocolActivationsResponse, ActiveStakingParametersResponse, PendingStakingParametersResponse, DestinationIndexResponse } from './types';
|
|
3
2
|
export interface RPCOptions {
|
|
4
3
|
block: string;
|
|
5
4
|
version?: 1 | '1';
|
|
@@ -68,6 +67,7 @@ export interface RpcClientInterface {
|
|
|
68
67
|
getPendingOperations(args: PendingOperationsQueryArguments): Promise<PendingOperationsV2>;
|
|
69
68
|
getActiveStakingParameters(delegate: string, options?: RPCOptions): Promise<ActiveStakingParametersResponse>;
|
|
70
69
|
getPendingStakingParameters(delegate: string, options?: RPCOptions): Promise<PendingStakingParametersResponse>;
|
|
70
|
+
getDestinationIndex(destination: string, options?: RPCOptions): Promise<DestinationIndexResponse>;
|
|
71
71
|
}
|
|
72
72
|
export declare enum RPCMethodName {
|
|
73
73
|
GET_BAKING_RIGHTS = "getBakingRights",
|
|
@@ -119,5 +119,6 @@ export declare enum RPCMethodName {
|
|
|
119
119
|
GET_TICKET_BALANCE = "getTicketBalance",
|
|
120
120
|
GET_ALL_TICKET_BALANCES = "getAllTicketBalances",
|
|
121
121
|
GET_ADAPTIVE_ISSUANCE_LAUNCH_CYCLE = "getAdaptiveIssuanceLaunchCycle",
|
|
122
|
-
GET_PENDING_OPERATIONS = "getPendingOperations"
|
|
122
|
+
GET_PENDING_OPERATIONS = "getPendingOperations",
|
|
123
|
+
GET_DESTINATION_INDEX = "getDestinationIndex"
|
|
123
124
|
}
|
|
@@ -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, BigMapResponse, BlockHeaderResponse, BlockMetadata, BlockResponse, ConstantsResponse, ContractResponse, CurrentProposalResponse, CurrentQuorumResponse, DelegateResponse, DelegatesResponse, VotingInfoResponse, AttestationRightsQueryArguments, AttestationRightsResponse, EntrypointsResponse, ForgeOperationsParams, ManagerKeyResponse, OperationHash, PackDataParams, PreapplyParams, PreapplyResponse, ProposalsResponse, ProtocolsResponse, RPCRunCodeParam, RPCRunScriptViewParam, RPCRunViewParam, RunCodeResult, RunScriptViewResult, RunViewResult, SaplingDiffResponse, ScriptResponse, StorageResponse, UnparsingMode, VotesListingsResponse, VotingPeriodBlockResult, TicketTokenParams, AllTicketBalances, PendingOperationsQueryArguments, PendingOperationsV2, RPCSimulateOperationParam, AILaunchCycleResponse, AllDelegatesQueryArguments, ProtocolActivationsResponse } from '../types';
|
|
3
|
+
import { BakingRightsQueryArguments, BakingRightsResponse, BalanceResponse, UnstakeRequestsResponse, BallotListResponse, BallotsResponse, BigMapResponse, BlockHeaderResponse, BlockMetadata, BlockResponse, ConstantsResponse, ContractResponse, CurrentProposalResponse, CurrentQuorumResponse, DelegateResponse, DelegatesResponse, VotingInfoResponse, AttestationRightsQueryArguments, AttestationRightsResponse, EntrypointsResponse, ForgeOperationsParams, ManagerKeyResponse, OperationHash, PackDataParams, PreapplyParams, PreapplyResponse, ProposalsResponse, ProtocolsResponse, RPCRunCodeParam, RPCRunScriptViewParam, RPCRunViewParam, RunCodeResult, RunScriptViewResult, RunViewResult, SaplingDiffResponse, ScriptResponse, StorageResponse, UnparsingMode, VotesListingsResponse, VotingPeriodBlockResult, TicketTokenParams, AllTicketBalances, PendingOperationsQueryArguments, PendingOperationsV2, RPCSimulateOperationParam, AILaunchCycleResponse, AllDelegatesQueryArguments, ProtocolActivationsResponse, DestinationIndexResponse, PendingStakingParametersResponse, ActiveStakingParametersResponse } from '../types';
|
|
4
4
|
interface CachedDataInterface {
|
|
5
5
|
[key: string]: {
|
|
6
6
|
handle: () => void;
|
|
@@ -444,18 +444,25 @@ export declare class RpcClientCache implements RpcClientInterface {
|
|
|
444
444
|
*/
|
|
445
445
|
getPendingOperations(args?: PendingOperationsQueryArguments): Promise<PendingOperationsV2>;
|
|
446
446
|
/**
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
getActiveStakingParameters(delegate: string, { block }?: RPCOptions): Promise<
|
|
447
|
+
* @param delegate delegate address which we want to retrieve active staking parameters
|
|
448
|
+
* @param options contains generic configuration for rpc calls to specified block (default to head)
|
|
449
|
+
* @description Returns the currently active staking parameters for the given delegate
|
|
450
|
+
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-delegates-pkh-active-staking-parameters
|
|
451
|
+
*/
|
|
452
|
+
getActiveStakingParameters(delegate: string, { block }?: RPCOptions): Promise<ActiveStakingParametersResponse>;
|
|
453
453
|
/**
|
|
454
454
|
* @param delegate delegate address which we want to retrieve pending staking parameters
|
|
455
455
|
* @param options contains generic configuration for rpc calls to specified block (default to head)
|
|
456
456
|
* @description Returns the pending values for the given delegate's staking parameters
|
|
457
457
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-delegates-pkh-pending-staking-parameters
|
|
458
458
|
*/
|
|
459
|
-
getPendingStakingParameters(delegate: string, { block }?: RPCOptions): Promise<
|
|
459
|
+
getPendingStakingParameters(delegate: string, { block }?: RPCOptions): Promise<PendingStakingParametersResponse>;
|
|
460
|
+
/**
|
|
461
|
+
* @param destination address to retrieve the index for
|
|
462
|
+
* @param options contains generic configuration for rpc calls to specified block (default to head)
|
|
463
|
+
* @description Returns the index assigned to the address if it was indexed by the opcode INDEX_ADDRESS, otherwise returns null
|
|
464
|
+
* @see https://octez.tezos.com/docs/alpha/rpc.html#get-block-id-context-destination-destination-id-index
|
|
465
|
+
*/
|
|
466
|
+
getDestinationIndex(destination: string, { block }?: RPCOptions): Promise<DestinationIndexResponse>;
|
|
460
467
|
}
|
|
461
468
|
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, BigMapResponse, BlockHeaderResponse, BlockMetadata, BlockResponse, ConstantsResponse, ContractResponse, CurrentProposalResponse, CurrentQuorumResponse, DelegateResponse, DelegatesResponse, VotingInfoResponse, AttestationRightsQueryArguments, AttestationRightsResponse, EntrypointsResponse, ForgeOperationsParams, ManagerKeyResponse, OperationHash, PackDataParams, PreapplyParams, PreapplyResponse, ProposalsResponse, ProtocolsResponse, RPCRunCodeParam, RPCRunViewParam, RPCRunScriptViewParam, RunCodeResult, RunViewResult, RunScriptViewResult, SaplingDiffResponse, ScriptResponse, StorageResponse, UnparsingMode, VotesListingsResponse, VotingPeriodBlockResult, TicketTokenParams, AllTicketBalances, PendingOperationsQueryArguments, PendingOperationsV2, RPCSimulateOperationParam, AILaunchCycleResponse, AllDelegatesQueryArguments, ProtocolActivationsResponse, ActiveStakingParametersResponse, PendingStakingParametersResponse } from './types';
|
|
8
|
+
import { BakingRightsQueryArguments, BakingRightsResponse, BalanceResponse, UnstakeRequestsResponse, BallotListResponse, BallotsResponse, BigMapResponse, BlockHeaderResponse, BlockMetadata, BlockResponse, ConstantsResponse, ContractResponse, CurrentProposalResponse, CurrentQuorumResponse, DelegateResponse, DelegatesResponse, VotingInfoResponse, AttestationRightsQueryArguments, AttestationRightsResponse, EntrypointsResponse, ForgeOperationsParams, ManagerKeyResponse, OperationHash, PackDataParams, PreapplyParams, PreapplyResponse, ProposalsResponse, ProtocolsResponse, RPCRunCodeParam, RPCRunViewParam, RPCRunScriptViewParam, RunCodeResult, RunViewResult, RunScriptViewResult, SaplingDiffResponse, ScriptResponse, StorageResponse, UnparsingMode, VotesListingsResponse, VotingPeriodBlockResult, TicketTokenParams, AllTicketBalances, PendingOperationsQueryArguments, PendingOperationsV2, RPCSimulateOperationParam, AILaunchCycleResponse, AllDelegatesQueryArguments, ProtocolActivationsResponse, ActiveStakingParametersResponse, PendingStakingParametersResponse, DestinationIndexResponse } 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';
|
|
@@ -446,7 +446,7 @@ export declare class RpcClient implements RpcClientInterface {
|
|
|
446
446
|
* @description List the prevalidated operations in mempool (accessibility of mempool depends on each rpc endpoint)
|
|
447
447
|
* @param args has 5 optional properties
|
|
448
448
|
* @default args { version: '2', validated: true, refused: true, outdated, true, branchRefused: true, branchDelayed: true, validationPass: undefined, source: undefined, operationHash: undefined }
|
|
449
|
-
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/
|
|
449
|
+
* @see https://gitlab.com/tezos/tezos/-/blob/master/docs/api/tallinn-mempool-openapi-rc.json
|
|
450
450
|
*/
|
|
451
451
|
getPendingOperations(args?: PendingOperationsQueryArguments): Promise<PendingOperationsV2>;
|
|
452
452
|
/**
|
|
@@ -463,4 +463,11 @@ export declare class RpcClient implements RpcClientInterface {
|
|
|
463
463
|
* @see https://tezos.gitlab.io/active/rpc.html#get-block-id-context-delegates-pkh-pending-staking-parameters
|
|
464
464
|
*/
|
|
465
465
|
getPendingStakingParameters(delegate: string, { block }?: RPCOptions): Promise<PendingStakingParametersResponse>;
|
|
466
|
+
/**
|
|
467
|
+
* @param destination address to retrieve the index for
|
|
468
|
+
* @param options contains generic configuration for rpc calls to specified block (default to head)
|
|
469
|
+
* @description Returns the index assigned to the address if it was indexed by the opcode INDEX_ADDRESS, otherwise returns null
|
|
470
|
+
* @see https://octez.tezos.com/docs/alpha/rpc.html#get-block-id-context-destination-destination-id-index
|
|
471
|
+
*/
|
|
472
|
+
getDestinationIndex(destination: string, { block }?: RPCOptions): Promise<DestinationIndexResponse>;
|
|
466
473
|
}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -158,6 +158,10 @@ export type PendingConsensusKey = {
|
|
|
158
158
|
cycle: number;
|
|
159
159
|
pkh: string;
|
|
160
160
|
};
|
|
161
|
+
export type ConsensusPower = {
|
|
162
|
+
slots: number;
|
|
163
|
+
baking_power: number;
|
|
164
|
+
};
|
|
161
165
|
export type VotingInfoResponse = {
|
|
162
166
|
voting_power?: string;
|
|
163
167
|
current_ballot?: BallotListResponseEnum;
|
|
@@ -197,9 +201,9 @@ export interface BlockFullHeader {
|
|
|
197
201
|
proof_of_work_nonce: string;
|
|
198
202
|
seed_nonce_hash?: string;
|
|
199
203
|
liquidity_baking_toggle_vote?: LiquidityBakingToggleVotes;
|
|
200
|
-
adaptive_issuance_vote?: AdaptiveIssuanceVote;
|
|
201
204
|
liquidity_baking_escape_vote?: boolean | LiquidityBakingToggleVotes;
|
|
202
205
|
signature: string;
|
|
206
|
+
adaptive_issuance_vote?: AdaptiveIssuanceVote;
|
|
203
207
|
}
|
|
204
208
|
export type InlinedAttestationKindEnum = OpKind.ATTESTATION;
|
|
205
209
|
export type InlinedEndorsementKindEnum = OpKind.ENDORSEMENT;
|
|
@@ -594,7 +598,7 @@ export type OperationContents = OperationContentsAttestation | OperationContents
|
|
|
594
598
|
export interface OperationContentsAndResultMetadataExtended1 {
|
|
595
599
|
balance_updates?: OperationMetadataBalanceUpdates[];
|
|
596
600
|
delegate: string;
|
|
597
|
-
consensus_power:
|
|
601
|
+
consensus_power: ConsensusPower | null;
|
|
598
602
|
consensus_key: string;
|
|
599
603
|
}
|
|
600
604
|
export interface OperationContentsAndResultMetadataExtended0 {
|
|
@@ -609,12 +613,12 @@ export interface OperationContentsAndResultMetadataAttestationsAggregate {
|
|
|
609
613
|
delegate: string;
|
|
610
614
|
consensus_pkh: string;
|
|
611
615
|
}[];
|
|
612
|
-
consensus_power:
|
|
616
|
+
consensus_power: ConsensusPower | null;
|
|
613
617
|
}
|
|
614
618
|
export interface OperationContentsAndResultMetadataPreattestation {
|
|
615
619
|
balance_updates?: OperationMetadataBalanceUpdates[];
|
|
616
620
|
delegate: string;
|
|
617
|
-
consensus_power:
|
|
621
|
+
consensus_power: ConsensusPower | null;
|
|
618
622
|
consensus_key?: string;
|
|
619
623
|
}
|
|
620
624
|
export interface OperationContentsAndResultMetadataPreattestationsAggregate {
|
|
@@ -623,7 +627,7 @@ export interface OperationContentsAndResultMetadataPreattestationsAggregate {
|
|
|
623
627
|
delegate: string;
|
|
624
628
|
consensus_pkh: string;
|
|
625
629
|
}[];
|
|
626
|
-
consensus_power:
|
|
630
|
+
consensus_power: ConsensusPower | null;
|
|
627
631
|
}
|
|
628
632
|
export interface OperationContentsAndResultMetadataPreEndorsement {
|
|
629
633
|
balance_updates?: OperationMetadataBalanceUpdates[];
|
|
@@ -1158,10 +1162,10 @@ export interface BakingRightsQueryArgumentsBase {
|
|
|
1158
1162
|
export interface BakingRightsResponseItem {
|
|
1159
1163
|
level: number;
|
|
1160
1164
|
delegate: string;
|
|
1161
|
-
priority?: number;
|
|
1162
1165
|
round?: number;
|
|
1163
1166
|
estimated_time?: Date;
|
|
1164
1167
|
consensus_key?: string;
|
|
1168
|
+
priority?: number;
|
|
1165
1169
|
}
|
|
1166
1170
|
export type BakingRightsResponse = BakingRightsResponseItem[];
|
|
1167
1171
|
export type AttestationRightsArgumentsDelegate = string | string[];
|
|
@@ -1176,15 +1180,16 @@ export interface AttestationRightsQueryArguments {
|
|
|
1176
1180
|
export interface AttestationRightsResponseItemDelegates {
|
|
1177
1181
|
delegate: string;
|
|
1178
1182
|
first_slot: number;
|
|
1179
|
-
|
|
1183
|
+
attesting_power: number;
|
|
1180
1184
|
consensus_key: string;
|
|
1185
|
+
attestation_power?: number;
|
|
1181
1186
|
}
|
|
1182
1187
|
export interface AttestationRightsResponseItem {
|
|
1183
1188
|
level: number;
|
|
1184
|
-
delegate?: string;
|
|
1185
1189
|
delegates?: AttestationRightsResponseItemDelegates[];
|
|
1186
|
-
slots?: number[];
|
|
1187
1190
|
estimated_time?: Date;
|
|
1191
|
+
delegate?: string;
|
|
1192
|
+
slots?: number[];
|
|
1188
1193
|
}
|
|
1189
1194
|
export type AttestationRightsResponse = AttestationRightsResponseItem[];
|
|
1190
1195
|
export type BallotListResponseEnum = 'nay' | 'yay' | 'pass';
|
|
@@ -1442,6 +1447,10 @@ export interface TicketUpdates {
|
|
|
1442
1447
|
export type TicketReceipt = TicketUpdates;
|
|
1443
1448
|
export type BatchOperationResult = OperationResultTransaction | OperationResultReveal | OperationResultDelegation | OperationResultOrigination | OperationResultIncreasePaidStorage | OperationResultRegisterGlobalConstant | OperationResultTransferTicket | OperationResultSmartRollupAddMessages | OperationResultSmartRollupOriginate | OperationResultUpdateConsensusKey;
|
|
1444
1449
|
export type OperationResult = OperationResultOrigination | OperationResultTransaction | OperationResultReveal | OperationResultDelegation | OperationResultIncreasePaidStorage | OperationResultRegisterGlobalConstant | OperationResultTransferTicket | OperationResultUpdateConsensusKey | OperationResultSmartRollupOriginate | OperationResultSmartRollupAddMessages | OperationResultSetDepositsLimit | OperationResultSmartRollupPublish | OperationResultSmartRollupCement | OperationResultSmartRollupRefute | OperationResultSmartRollupRecoverBond | OperationResultSmartRollupTimeout | OperationResultSmartRollupExecuteOutboxMessage | OperationResultDalPublishCommitment;
|
|
1450
|
+
export interface AddressRegistryDiff {
|
|
1451
|
+
address: string;
|
|
1452
|
+
index: string;
|
|
1453
|
+
}
|
|
1445
1454
|
export interface OperationResultTransaction {
|
|
1446
1455
|
status: OperationResultStatusEnum;
|
|
1447
1456
|
storage?: MichelsonV1Expression;
|
|
@@ -1458,6 +1467,7 @@ export interface OperationResultTransaction {
|
|
|
1458
1467
|
consumed_milligas?: string;
|
|
1459
1468
|
lazy_storage_diff?: LazyStorageDiff[];
|
|
1460
1469
|
ticket_hash?: string;
|
|
1470
|
+
address_registry_diff?: AddressRegistryDiff[];
|
|
1461
1471
|
}
|
|
1462
1472
|
export interface OperationResultReveal {
|
|
1463
1473
|
status: OperationResultStatusEnum;
|
|
@@ -1670,7 +1680,7 @@ export interface OperationContentsAndResultMetadataOrigination {
|
|
|
1670
1680
|
operation_result: OperationResultOrigination;
|
|
1671
1681
|
internal_operation_results?: InternalOperationResult[];
|
|
1672
1682
|
}
|
|
1673
|
-
export type ConstantsResponse = ConstantsResponseCommon & ConstantsResponseProto023 & ConstantsResponseProto022 & ConstantsResponseProto021 & ConstantsResponseProto020 & ConstantsResponseProto019 & ConstantsResponseProto017 & ConstantsResponseProto016 & ConstantsResponseProto015 & ConstantsResponseProto014 & ConstantsResponseProto013 & ConstantsResponseProto012 & ConstantsResponseProto011 & ConstantsResponseProto010 & ConstantsResponseProto009 & ConstantsResponseProto008 & ConstantsResponseProto007 & ConstantsResponseProto006 & ConstantsResponseProto005 & ConstantsResponseProto004 & ConstantsResponseProto003 & ConstantsResponseProto001And002;
|
|
1683
|
+
export type ConstantsResponse = ConstantsResponseCommon & ConstantsResponseProto024 & ConstantsResponseProto023 & ConstantsResponseProto022 & ConstantsResponseProto021 & ConstantsResponseProto020 & ConstantsResponseProto019 & ConstantsResponseProto017 & ConstantsResponseProto016 & ConstantsResponseProto015 & ConstantsResponseProto014 & ConstantsResponseProto013 & ConstantsResponseProto012 & ConstantsResponseProto011 & ConstantsResponseProto010 & ConstantsResponseProto009 & ConstantsResponseProto008 & ConstantsResponseProto007 & ConstantsResponseProto006 & ConstantsResponseProto005 & ConstantsResponseProto004 & ConstantsResponseProto003 & ConstantsResponseProto001And002;
|
|
1674
1684
|
export interface ConstantsResponseCommon {
|
|
1675
1685
|
proof_of_work_nonce_size: number;
|
|
1676
1686
|
nonce_length: number;
|
|
@@ -1698,6 +1708,9 @@ export type Ratio = {
|
|
|
1698
1708
|
numerator: number;
|
|
1699
1709
|
denominator: number;
|
|
1700
1710
|
};
|
|
1711
|
+
export interface ConstantsResponseProto024 extends Omit<ConstantsResponseProto023, 'all_bakers_attest_activation_level'> {
|
|
1712
|
+
all_bakers_attest_activation_threshold: Ratio;
|
|
1713
|
+
}
|
|
1701
1714
|
export type ConstantsResponseProto023 = ConstantsResponseProto022;
|
|
1702
1715
|
export interface ConstantsResponseProto022 extends Omit<ConstantsResponseProto021, 'adaptive_issuance_activation_vote_enable' | 'adaptive_issuance_force_activation' | 'adaptive_issuance_launch_ema_threshold' | 'autostaking_enable' | 'consensus_threshold' | 'issuance_weights' | 'dal_parametric' | 'max_slashing_period' | 'max_slashing_threshold' | 'ns_enable' | 'percentage_of_frozen_deposits_slashed_per_double_attestation'> {
|
|
1703
1716
|
aggregate_attestation: boolean;
|
|
@@ -2037,6 +2050,16 @@ export interface LevelInfo {
|
|
|
2037
2050
|
cycle_position: number;
|
|
2038
2051
|
expected_commitment: boolean;
|
|
2039
2052
|
}
|
|
2053
|
+
export interface Attestations {
|
|
2054
|
+
total_committee_power: number;
|
|
2055
|
+
threshold: number;
|
|
2056
|
+
recorded_power: number;
|
|
2057
|
+
}
|
|
2058
|
+
export interface PreAttestations {
|
|
2059
|
+
total_committee_power: number;
|
|
2060
|
+
threshold: number;
|
|
2061
|
+
recorded_power: number;
|
|
2062
|
+
}
|
|
2040
2063
|
export interface BlockMetadata {
|
|
2041
2064
|
protocol: string;
|
|
2042
2065
|
next_protocol: string;
|
|
@@ -2053,8 +2076,6 @@ export interface BlockMetadata {
|
|
|
2053
2076
|
deactivated?: string[];
|
|
2054
2077
|
balance_updates?: OperationBalanceUpdates;
|
|
2055
2078
|
liquidity_baking_toggle_ema?: number;
|
|
2056
|
-
adaptive_issuance_vote_ema?: number;
|
|
2057
|
-
adaptive_issuance_activation_cycle?: number;
|
|
2058
2079
|
implicit_operations_results?: SuccessfulManagerOperationResult[];
|
|
2059
2080
|
proposer_consensus_key?: string;
|
|
2060
2081
|
baker_consensus_key?: string;
|
|
@@ -2064,6 +2085,11 @@ export interface BlockMetadata {
|
|
|
2064
2085
|
voting_period_kind?: string;
|
|
2065
2086
|
consumed_gas?: string;
|
|
2066
2087
|
liquidity_baking_escape_ema?: number;
|
|
2088
|
+
all_bakers_attest_activation_level?: LevelInfo | null;
|
|
2089
|
+
attestations?: Attestations;
|
|
2090
|
+
preattestations?: PreAttestations;
|
|
2091
|
+
adaptive_issuance_vote_ema?: number;
|
|
2092
|
+
adaptive_issuance_activation_cycle?: number;
|
|
2067
2093
|
}
|
|
2068
2094
|
export interface RPCSimulateOperationParam {
|
|
2069
2095
|
operation: OperationObject;
|
|
@@ -2322,4 +2348,5 @@ export type PendingStakingParametersResponse = Array<{
|
|
|
2322
2348
|
edge_of_baking_over_staking_billionth: number;
|
|
2323
2349
|
};
|
|
2324
2350
|
}>;
|
|
2351
|
+
export type DestinationIndexResponse = string | null;
|
|
2325
2352
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taquito/rpc",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "24.0.0-RC.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,10 +66,11 @@
|
|
|
66
66
|
]
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@taquito/core": "^
|
|
70
|
-
"@taquito/http-utils": "^
|
|
71
|
-
"@taquito/utils": "^
|
|
72
|
-
"bignumber.js": "^9.1.2"
|
|
69
|
+
"@taquito/core": "^24.0.0-RC.0",
|
|
70
|
+
"@taquito/http-utils": "^24.0.0-RC.0",
|
|
71
|
+
"@taquito/utils": "^24.0.0-RC.0",
|
|
72
|
+
"bignumber.js": "^9.1.2",
|
|
73
|
+
"whatwg-url": "^15.1.0"
|
|
73
74
|
},
|
|
74
75
|
"devDependencies": {
|
|
75
76
|
"@types/bluebird": "^3.5.42",
|
|
@@ -99,5 +100,5 @@
|
|
|
99
100
|
"ts-toolbelt": "^9.6.0",
|
|
100
101
|
"typescript": "~5.5.4"
|
|
101
102
|
},
|
|
102
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "784d536e73487529e402a3379be899bc5ac0342c"
|
|
103
104
|
}
|