@taquito/rpc 16.0.1 → 16.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/opkind.js +5 -0
- package/dist/lib/opkind.js.map +1 -1
- package/dist/lib/rpc-client-interface.js +2 -0
- package/dist/lib/rpc-client-interface.js.map +1 -1
- package/dist/lib/rpc-client-modules/rpc-cache.js +38 -0
- package/dist/lib/rpc-client-modules/rpc-cache.js.map +1 -1
- package/dist/lib/taquito-rpc.js +29 -0
- package/dist/lib/taquito-rpc.js.map +1 -1
- package/dist/lib/types.js +38 -1
- package/dist/lib/types.js.map +1 -1
- package/dist/lib/version.js +2 -2
- package/dist/taquito-rpc.es6.js +115 -4
- package/dist/taquito-rpc.es6.js.map +1 -1
- package/dist/taquito-rpc.umd.js +114 -3
- package/dist/taquito-rpc.umd.js.map +1 -1
- package/dist/types/opkind.d.ts +6 -1
- package/dist/types/rpc-client-interface.d.ts +6 -2
- package/dist/types/rpc-client-modules/rpc-cache.d.ts +15 -1
- package/dist/types/taquito-rpc.d.ts +17 -1
- package/dist/types/types.d.ts +307 -14
- package/package.json +4 -4
package/dist/taquito-rpc.umd.js
CHANGED
|
@@ -88,6 +88,8 @@
|
|
|
88
88
|
RPCMethodName["GET_STORAGE_PAID_SPACE"] = "getStoragePaidSpace";
|
|
89
89
|
RPCMethodName["GET_TICKET_BALANCE"] = "getTicketBalance";
|
|
90
90
|
RPCMethodName["GET_ALL_TICKET_BALANCES"] = "getAllTicketBalances";
|
|
91
|
+
RPCMethodName["GET_PENDING_OPERATIONS"] = "getPendingOperations";
|
|
92
|
+
RPCMethodName["GET_ORIGINATION_PROOF"] = "getOriginationProof";
|
|
91
93
|
})(RPCMethodName || (RPCMethodName = {}));
|
|
92
94
|
|
|
93
95
|
/**
|
|
@@ -1179,6 +1181,44 @@
|
|
|
1179
1181
|
}
|
|
1180
1182
|
});
|
|
1181
1183
|
}
|
|
1184
|
+
/**
|
|
1185
|
+
* @description List the prevalidated operations in mempool (accessibility of mempool depends on each rpc endpoint)
|
|
1186
|
+
* @param args has 5 optional properties. We support version 1 with new encoding as version 0 will be deprecated soon. The rest of the properties is to filter pending operations response
|
|
1187
|
+
* @default args { version: '1', applied: true, refused: true, outdated, true, branchRefused: true, branchDelayed: true, validationPass: undefined }
|
|
1188
|
+
* @see https://tezos.gitlab.io/CHANGES.html?highlight=pending_operations#id4
|
|
1189
|
+
*/
|
|
1190
|
+
getPendingOperations(args = {}) {
|
|
1191
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1192
|
+
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), RPCMethodName.GET_PENDING_OPERATIONS, [args]);
|
|
1193
|
+
if (this.has(key)) {
|
|
1194
|
+
return this.get(key);
|
|
1195
|
+
}
|
|
1196
|
+
else {
|
|
1197
|
+
const response = this.rpcClient.getPendingOperations(args);
|
|
1198
|
+
this.put(key, response);
|
|
1199
|
+
return response;
|
|
1200
|
+
}
|
|
1201
|
+
});
|
|
1202
|
+
}
|
|
1203
|
+
/**
|
|
1204
|
+
*
|
|
1205
|
+
* @param params contains the PVM kind and kernel to generate the origination proof from
|
|
1206
|
+
* @description rpc call to generate the origination proof needed for the smart rollup originate operation
|
|
1207
|
+
* @see https://tezos.gitlab.io/protocols/016_mumbai.html#rpc-changes
|
|
1208
|
+
*/
|
|
1209
|
+
getOriginationProof(params, { block } = defaultRPCOptions) {
|
|
1210
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1211
|
+
const key = this.formatCacheKey(this.rpcClient.getRpcUrl(), RPCMethodName.GET_ORIGINATION_PROOF, [block, params]);
|
|
1212
|
+
if (this.has(key)) {
|
|
1213
|
+
return this.get(key);
|
|
1214
|
+
}
|
|
1215
|
+
else {
|
|
1216
|
+
const response = this.rpcClient.getOriginationProof(params, { block });
|
|
1217
|
+
this.put(key, response);
|
|
1218
|
+
return response;
|
|
1219
|
+
}
|
|
1220
|
+
});
|
|
1221
|
+
}
|
|
1182
1222
|
}
|
|
1183
1223
|
|
|
1184
1224
|
exports.OPERATION_METADATA = void 0;
|
|
@@ -1211,7 +1251,44 @@
|
|
|
1211
1251
|
METADATA_BALANCE_UPDATES_CATEGORY["TX_ROLLUP_REJECTION_REWARDS"] = "tx_rollup_rejection_rewards";
|
|
1212
1252
|
METADATA_BALANCE_UPDATES_CATEGORY["TX_ROLLUP_REJECTION_PUNISHMENTS"] = "tx_rollup_rejection_punishments";
|
|
1213
1253
|
METADATA_BALANCE_UPDATES_CATEGORY["BONDS"] = "bonds";
|
|
1214
|
-
})(exports.METADATA_BALANCE_UPDATES_CATEGORY || (exports.METADATA_BALANCE_UPDATES_CATEGORY = {}));
|
|
1254
|
+
})(exports.METADATA_BALANCE_UPDATES_CATEGORY || (exports.METADATA_BALANCE_UPDATES_CATEGORY = {}));
|
|
1255
|
+
exports.PvmKind = void 0;
|
|
1256
|
+
(function (PvmKind) {
|
|
1257
|
+
PvmKind["WASM2"] = "wasm_2_0_0";
|
|
1258
|
+
PvmKind["ARITH"] = "arith";
|
|
1259
|
+
})(exports.PvmKind || (exports.PvmKind = {}));
|
|
1260
|
+
exports.SmartRollupRefutationOptions = void 0;
|
|
1261
|
+
(function (SmartRollupRefutationOptions) {
|
|
1262
|
+
SmartRollupRefutationOptions["START"] = "start";
|
|
1263
|
+
SmartRollupRefutationOptions["MOVE"] = "move";
|
|
1264
|
+
})(exports.SmartRollupRefutationOptions || (exports.SmartRollupRefutationOptions = {}));
|
|
1265
|
+
exports.SmartRollupInputProofKind = void 0;
|
|
1266
|
+
(function (SmartRollupInputProofKind) {
|
|
1267
|
+
SmartRollupInputProofKind["INBOX_PROOF"] = "inbox_proof";
|
|
1268
|
+
SmartRollupInputProofKind["REVEAL_PROOF"] = "reveal_proof";
|
|
1269
|
+
SmartRollupInputProofKind["FIRST_INPUT"] = "first_input";
|
|
1270
|
+
})(exports.SmartRollupInputProofKind || (exports.SmartRollupInputProofKind = {}));
|
|
1271
|
+
exports.SmartRollupRefuteRevealProofKind = void 0;
|
|
1272
|
+
(function (SmartRollupRefuteRevealProofKind) {
|
|
1273
|
+
SmartRollupRefuteRevealProofKind["RAW_DATA_PROOF"] = "raw_data_proof";
|
|
1274
|
+
SmartRollupRefuteRevealProofKind["METADATA_PROOF"] = "metadata_proof";
|
|
1275
|
+
SmartRollupRefuteRevealProofKind["DAL_PAGE_PROOF"] = "dal_page_proof";
|
|
1276
|
+
})(exports.SmartRollupRefuteRevealProofKind || (exports.SmartRollupRefuteRevealProofKind = {}));
|
|
1277
|
+
exports.SmartRollupRefuteGameStatusOptions = void 0;
|
|
1278
|
+
(function (SmartRollupRefuteGameStatusOptions) {
|
|
1279
|
+
SmartRollupRefuteGameStatusOptions["ONGOING"] = "ongoing";
|
|
1280
|
+
SmartRollupRefuteGameStatusOptions["ENDED"] = "ended";
|
|
1281
|
+
})(exports.SmartRollupRefuteGameStatusOptions || (exports.SmartRollupRefuteGameStatusOptions = {}));
|
|
1282
|
+
exports.SmartRollupRefuteGameEndedPlayerOutcomes = void 0;
|
|
1283
|
+
(function (SmartRollupRefuteGameEndedPlayerOutcomes) {
|
|
1284
|
+
SmartRollupRefuteGameEndedPlayerOutcomes["LOSER"] = "loser";
|
|
1285
|
+
SmartRollupRefuteGameEndedPlayerOutcomes["DRAW"] = "draw";
|
|
1286
|
+
})(exports.SmartRollupRefuteGameEndedPlayerOutcomes || (exports.SmartRollupRefuteGameEndedPlayerOutcomes = {}));
|
|
1287
|
+
exports.SmartRollupRefuteGameEndedReason = void 0;
|
|
1288
|
+
(function (SmartRollupRefuteGameEndedReason) {
|
|
1289
|
+
SmartRollupRefuteGameEndedReason["CONFLICT_RESOLVED"] = "conflict_resolved";
|
|
1290
|
+
SmartRollupRefuteGameEndedReason["TIMEOUT"] = "timeout";
|
|
1291
|
+
})(exports.SmartRollupRefuteGameEndedReason || (exports.SmartRollupRefuteGameEndedReason = {}));
|
|
1215
1292
|
|
|
1216
1293
|
exports.OpKind = void 0;
|
|
1217
1294
|
(function (OpKind) {
|
|
@@ -1250,12 +1327,17 @@
|
|
|
1250
1327
|
OpKind["SMART_ROLLUP_ORIGINATE"] = "smart_rollup_originate";
|
|
1251
1328
|
OpKind["SMART_ROLLUP_ADD_MESSAGES"] = "smart_rollup_add_messages";
|
|
1252
1329
|
OpKind["SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE"] = "smart_rollup_execute_outbox_message";
|
|
1330
|
+
OpKind["SMART_ROLLUP_PUBLISH"] = "smart_rollup_publish";
|
|
1331
|
+
OpKind["SMART_ROLLUP_CEMENT"] = "smart_rollup_cement";
|
|
1332
|
+
OpKind["SMART_ROLLUP_RECOVER_BOND"] = "smart_rollup_recover_bond";
|
|
1333
|
+
OpKind["SMART_ROLLUP_REFUTE"] = "smart_rollup_refute";
|
|
1334
|
+
OpKind["SMART_ROLLUP_TIMEOUT"] = "smart_rollup_timeout";
|
|
1253
1335
|
})(exports.OpKind || (exports.OpKind = {}));
|
|
1254
1336
|
|
|
1255
1337
|
// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
|
|
1256
1338
|
const VERSION = {
|
|
1257
|
-
"commitHash": "
|
|
1258
|
-
"version": "16.0
|
|
1339
|
+
"commitHash": "840f2a29ce4e52826df53e5a1ac879c2deaa433b",
|
|
1340
|
+
"version": "16.1.0"
|
|
1259
1341
|
};
|
|
1260
1342
|
|
|
1261
1343
|
/***
|
|
@@ -2173,6 +2255,35 @@
|
|
|
2173
2255
|
});
|
|
2174
2256
|
});
|
|
2175
2257
|
}
|
|
2258
|
+
/**
|
|
2259
|
+
* @description List the prevalidated operations in mempool (accessibility of mempool depends on each rpc endpoint)
|
|
2260
|
+
* @param args has 5 optional properties. We support version 1 with new encoding as version 0 will be deprecated soon. The rest of the properties is to filter pending operations response
|
|
2261
|
+
* @default args { version: '1', applied: true, refused: true, outdated, true, branchRefused: true, branchDelayed: true, validationPass: undefined }
|
|
2262
|
+
* @see https://tezos.gitlab.io/CHANGES.html?highlight=pending_operations#id4
|
|
2263
|
+
*/
|
|
2264
|
+
getPendingOperations(args = {}) {
|
|
2265
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2266
|
+
return this.httpBackend.createRequest({
|
|
2267
|
+
url: this.createURL(`/chains/${this.chain}/mempool/pending_operations`),
|
|
2268
|
+
method: 'GET',
|
|
2269
|
+
query: args,
|
|
2270
|
+
});
|
|
2271
|
+
});
|
|
2272
|
+
}
|
|
2273
|
+
/**
|
|
2274
|
+
*
|
|
2275
|
+
* @param params contains the PVM kind and kernel to generate the origination proof from
|
|
2276
|
+
* @description rpc call to generate the origination proof needed for a smart rollup originate operation
|
|
2277
|
+
* @see https://tezos.gitlab.io/protocols/016_mumbai.html#rpc-changes
|
|
2278
|
+
*/
|
|
2279
|
+
getOriginationProof(params, { block } = defaultRPCOptions) {
|
|
2280
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2281
|
+
return this.httpBackend.createRequest({
|
|
2282
|
+
url: this.createURL(`/chains/${this.chain}/blocks/${block}/context/smart_rollups/all/origination_proof`),
|
|
2283
|
+
method: 'POST',
|
|
2284
|
+
}, params);
|
|
2285
|
+
});
|
|
2286
|
+
}
|
|
2176
2287
|
}
|
|
2177
2288
|
|
|
2178
2289
|
exports.RpcClient = RpcClient;
|