@taquito/contracts-library 11.1.0 → 12.0.0-beta-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/errors.js +8 -29
- package/dist/lib/errors.js.map +1 -1
- package/dist/lib/read-provider-wrapper.js +87 -0
- package/dist/lib/read-provider-wrapper.js.map +1 -0
- package/dist/lib/rpc-wrapper.js +223 -344
- package/dist/lib/rpc-wrapper.js.map +1 -1
- package/dist/lib/taquito-contracts-library.js +24 -38
- package/dist/lib/taquito-contracts-library.js.map +1 -1
- package/dist/lib/version.js +2 -4
- package/dist/lib/version.js.map +1 -1
- package/dist/taquito-contracts-library.es6.js +183 -0
- package/dist/taquito-contracts-library.es6.js.map +1 -0
- package/dist/taquito-contracts-library.umd.js +180 -492
- package/dist/taquito-contracts-library.umd.js.map +1 -1
- package/dist/types/read-provider-wrapper.d.ts +33 -0
- package/dist/types/rpc-wrapper.d.ts +7 -2
- package/package.json +24 -25
- package/dist/taquito-contracts-library.es5.js +0 -496
- package/dist/taquito-contracts-library.es5.js.map +0 -1
package/dist/lib/rpc-wrapper.js
CHANGED
|
@@ -8,356 +8,235 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
11
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
12
|
+
var t = {};
|
|
13
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
14
|
+
t[p] = s[p];
|
|
15
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
16
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
17
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
18
|
+
t[p[i]] = s[p[i]];
|
|
19
|
+
}
|
|
20
|
+
return t;
|
|
37
21
|
};
|
|
38
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
23
|
exports.RpcWrapperContractsLibrary = void 0;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
24
|
+
const rpc_1 = require("@taquito/rpc");
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated RpcWrapperContractsLibrary has been deprecated in favor of ReadWrapperContractsLibrary
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
class RpcWrapperContractsLibrary {
|
|
30
|
+
constructor(rpc, contractslibrary) {
|
|
43
31
|
this.rpc = rpc;
|
|
44
32
|
this.contractslibrary = contractslibrary;
|
|
45
33
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
90
|
-
return
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
});
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
130
|
-
return
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
});
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
170
|
-
return
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
});
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
210
|
-
return
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
226
|
-
return __generator(this, function (_c) {
|
|
227
|
-
return [2 /*return*/, this.rpc.getBallots({ block: block })];
|
|
228
|
-
});
|
|
229
|
-
});
|
|
230
|
-
};
|
|
231
|
-
RpcWrapperContractsLibrary.prototype.getCurrentPeriodKind = function (_a) {
|
|
232
|
-
var _b = _a === void 0 ? rpc_1.defaultRPCOptions : _a, block = _b.block;
|
|
233
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
234
|
-
return __generator(this, function (_c) {
|
|
235
|
-
return [2 /*return*/, this.rpc.getCurrentPeriodKind({ block: block })];
|
|
236
|
-
});
|
|
237
|
-
});
|
|
238
|
-
};
|
|
239
|
-
RpcWrapperContractsLibrary.prototype.getCurrentProposal = function (_a) {
|
|
240
|
-
var _b = _a === void 0 ? rpc_1.defaultRPCOptions : _a, block = _b.block;
|
|
241
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
242
|
-
return __generator(this, function (_c) {
|
|
243
|
-
return [2 /*return*/, this.rpc.getCurrentProposal({ block: block })];
|
|
244
|
-
});
|
|
245
|
-
});
|
|
246
|
-
};
|
|
247
|
-
RpcWrapperContractsLibrary.prototype.getCurrentQuorum = function (_a) {
|
|
248
|
-
var _b = _a === void 0 ? rpc_1.defaultRPCOptions : _a, block = _b.block;
|
|
249
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
250
|
-
return __generator(this, function (_c) {
|
|
251
|
-
return [2 /*return*/, this.rpc.getCurrentQuorum({ block: block })];
|
|
252
|
-
});
|
|
253
|
-
});
|
|
254
|
-
};
|
|
255
|
-
RpcWrapperContractsLibrary.prototype.getVotesListings = function (_a) {
|
|
256
|
-
var _b = _a === void 0 ? rpc_1.defaultRPCOptions : _a, block = _b.block;
|
|
257
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
258
|
-
return __generator(this, function (_c) {
|
|
259
|
-
return [2 /*return*/, this.rpc.getVotesListings({ block: block })];
|
|
260
|
-
});
|
|
261
|
-
});
|
|
262
|
-
};
|
|
263
|
-
RpcWrapperContractsLibrary.prototype.getProposals = function (_a) {
|
|
264
|
-
var _b = _a === void 0 ? rpc_1.defaultRPCOptions : _a, block = _b.block;
|
|
265
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
266
|
-
return __generator(this, function (_c) {
|
|
267
|
-
return [2 /*return*/, this.rpc.getProposals({ block: block })];
|
|
268
|
-
});
|
|
269
|
-
});
|
|
270
|
-
};
|
|
271
|
-
RpcWrapperContractsLibrary.prototype.forgeOperations = function (data, _a) {
|
|
272
|
-
var _b = _a === void 0 ? rpc_1.defaultRPCOptions : _a, block = _b.block;
|
|
273
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
274
|
-
return __generator(this, function (_c) {
|
|
275
|
-
return [2 /*return*/, this.rpc.forgeOperations(data, { block: block })];
|
|
276
|
-
});
|
|
277
|
-
});
|
|
278
|
-
};
|
|
279
|
-
RpcWrapperContractsLibrary.prototype.injectOperation = function (signedOpBytes) {
|
|
280
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
281
|
-
return __generator(this, function (_a) {
|
|
282
|
-
return [2 /*return*/, this.rpc.injectOperation(signedOpBytes)];
|
|
283
|
-
});
|
|
284
|
-
});
|
|
285
|
-
};
|
|
286
|
-
RpcWrapperContractsLibrary.prototype.packData = function (data, _a) {
|
|
287
|
-
var _b = _a === void 0 ? rpc_1.defaultRPCOptions : _a, block = _b.block;
|
|
288
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
289
|
-
return __generator(this, function (_c) {
|
|
290
|
-
return [2 /*return*/, this.rpc.packData(data, { block: block })];
|
|
291
|
-
});
|
|
292
|
-
});
|
|
293
|
-
};
|
|
294
|
-
RpcWrapperContractsLibrary.prototype.preapplyOperations = function (ops, _a) {
|
|
295
|
-
var _b = _a === void 0 ? rpc_1.defaultRPCOptions : _a, block = _b.block;
|
|
296
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
297
|
-
return __generator(this, function (_c) {
|
|
298
|
-
return [2 /*return*/, this.rpc.preapplyOperations(ops, { block: block })];
|
|
299
|
-
});
|
|
300
|
-
});
|
|
301
|
-
};
|
|
302
|
-
RpcWrapperContractsLibrary.prototype.runOperation = function (op, _a) {
|
|
303
|
-
var _b = _a === void 0 ? rpc_1.defaultRPCOptions : _a, block = _b.block;
|
|
304
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
305
|
-
return __generator(this, function (_c) {
|
|
306
|
-
return [2 /*return*/, this.rpc.runOperation(op, { block: block })];
|
|
307
|
-
});
|
|
308
|
-
});
|
|
309
|
-
};
|
|
310
|
-
RpcWrapperContractsLibrary.prototype.runCode = function (code, _a) {
|
|
311
|
-
var _b = _a === void 0 ? rpc_1.defaultRPCOptions : _a, block = _b.block;
|
|
312
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
313
|
-
return __generator(this, function (_c) {
|
|
314
|
-
return [2 /*return*/, this.rpc.runCode(code, { block: block })];
|
|
315
|
-
});
|
|
316
|
-
});
|
|
317
|
-
};
|
|
318
|
-
RpcWrapperContractsLibrary.prototype.getChainId = function () {
|
|
319
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
320
|
-
return __generator(this, function (_a) {
|
|
321
|
-
return [2 /*return*/, this.rpc.getChainId()];
|
|
322
|
-
});
|
|
323
|
-
});
|
|
324
|
-
};
|
|
325
|
-
RpcWrapperContractsLibrary.prototype.getRpcUrl = function () {
|
|
34
|
+
getNormalizedScript(address, unparsingMode = { unparsing_mode: 'Readable' }, { block } = rpc_1.defaultRPCOptions) {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
const contractData = this.contractslibrary.getContract(address);
|
|
37
|
+
if (contractData) {
|
|
38
|
+
return contractData.script;
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
return this.rpc.getNormalizedScript(address, unparsingMode, { block });
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
getEntrypoints(contract, { block } = rpc_1.defaultRPCOptions) {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
const contractData = this.contractslibrary.getContract(contract);
|
|
48
|
+
if (contractData) {
|
|
49
|
+
return contractData.entrypoints;
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
return this.rpc.getEntrypoints(contract, { block });
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
getBalance(address, { block } = rpc_1.defaultRPCOptions) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
return this.rpc.getBalance(address, { block });
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
getBlockHash({ block } = rpc_1.defaultRPCOptions) {
|
|
62
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
return this.rpc.getBlockHash({ block });
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
getLiveBlocks({ block } = rpc_1.defaultRPCOptions) {
|
|
67
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
return this.rpc.getLiveBlocks({ block });
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
getStorage(address, { block } = rpc_1.defaultRPCOptions) {
|
|
72
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
+
return this.rpc.getStorage(address, { block });
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
getScript(address, { block } = rpc_1.defaultRPCOptions) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
return this.rpc.getScript(address, { block });
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
getContract(address, { block } = rpc_1.defaultRPCOptions) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
return this.rpc.getContract(address, { block });
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
getManagerKey(address, { block } = rpc_1.defaultRPCOptions) {
|
|
87
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
88
|
+
return this.rpc.getManagerKey(address, { block });
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
getDelegate(address, { block } = rpc_1.defaultRPCOptions) {
|
|
92
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
93
|
+
return this.rpc.getDelegate(address, { block });
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
getBigMapKey(address, key, { block } = rpc_1.defaultRPCOptions) {
|
|
97
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
98
|
+
return this.rpc.getBigMapKey(address, key, { block });
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
getBigMapExpr(id, expr, { block } = rpc_1.defaultRPCOptions) {
|
|
102
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
103
|
+
return this.rpc.getBigMapExpr(id, expr, { block });
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
getDelegates(address, { block } = rpc_1.defaultRPCOptions) {
|
|
107
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
108
|
+
return this.rpc.getDelegates(address, { block });
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
getConstants({ block } = rpc_1.defaultRPCOptions) {
|
|
112
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
113
|
+
return this.rpc.getConstants({ block });
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
getBlock({ block } = rpc_1.defaultRPCOptions) {
|
|
117
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
118
|
+
return this.rpc.getBlock({ block });
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
getBlockHeader({ block } = rpc_1.defaultRPCOptions) {
|
|
122
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
123
|
+
return this.rpc.getBlockHeader({ block });
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
getBlockMetadata({ block } = rpc_1.defaultRPCOptions) {
|
|
127
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
128
|
+
return this.rpc.getBlockMetadata({ block });
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
getBakingRights(args, { block } = rpc_1.defaultRPCOptions) {
|
|
132
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
133
|
+
return this.rpc.getBakingRights(args, { block });
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
getEndorsingRights(args, { block } = rpc_1.defaultRPCOptions) {
|
|
137
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
138
|
+
return this.rpc.getEndorsingRights(args, { block });
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
getBallotList({ block } = rpc_1.defaultRPCOptions) {
|
|
142
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
143
|
+
return this.rpc.getBallotList({ block });
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
getBallots({ block } = rpc_1.defaultRPCOptions) {
|
|
147
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
148
|
+
return this.rpc.getBallots({ block });
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
getCurrentProposal({ block, } = rpc_1.defaultRPCOptions) {
|
|
152
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
153
|
+
return this.rpc.getCurrentProposal({ block });
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
getCurrentQuorum({ block } = rpc_1.defaultRPCOptions) {
|
|
157
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
158
|
+
return this.rpc.getCurrentQuorum({ block });
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
getVotesListings({ block, } = rpc_1.defaultRPCOptions) {
|
|
162
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
163
|
+
return this.rpc.getVotesListings({ block });
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
getProposals({ block } = rpc_1.defaultRPCOptions) {
|
|
167
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
168
|
+
return this.rpc.getProposals({ block });
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
forgeOperations(data, { block } = rpc_1.defaultRPCOptions) {
|
|
172
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
173
|
+
return this.rpc.forgeOperations(data, { block });
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
injectOperation(signedOpBytes) {
|
|
177
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
178
|
+
return this.rpc.injectOperation(signedOpBytes);
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
packData(data, { block } = rpc_1.defaultRPCOptions) {
|
|
182
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
183
|
+
return this.rpc.packData(data, { block });
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
preapplyOperations(ops, { block } = rpc_1.defaultRPCOptions) {
|
|
187
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
188
|
+
return this.rpc.preapplyOperations(ops, { block });
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
runOperation(op, { block } = rpc_1.defaultRPCOptions) {
|
|
192
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
193
|
+
return this.rpc.runOperation(op, { block });
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
runCode(code, { block } = rpc_1.defaultRPCOptions) {
|
|
197
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
198
|
+
return this.rpc.runCode(code, { block });
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
runView(_a, { block } = rpc_1.defaultRPCOptions) {
|
|
202
|
+
var { unparsing_mode = 'Readable' } = _a, rest = __rest(_a, ["unparsing_mode"]);
|
|
203
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
204
|
+
return this.rpc.runView(Object.assign({ unparsing_mode }, rest), { block });
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
getChainId() {
|
|
208
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
209
|
+
return this.rpc.getChainId();
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
getRpcUrl() {
|
|
326
213
|
return this.rpc.getRpcUrl();
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
355
|
-
return __generator(this, function (_c) {
|
|
356
|
-
return [2 /*return*/, this.rpc.getSaplingDiffByContract(contract, { block: block })];
|
|
357
|
-
});
|
|
358
|
-
});
|
|
359
|
-
};
|
|
360
|
-
return RpcWrapperContractsLibrary;
|
|
361
|
-
}());
|
|
214
|
+
}
|
|
215
|
+
getCurrentPeriod({ block, } = rpc_1.defaultRPCOptions) {
|
|
216
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
217
|
+
return this.rpc.getCurrentPeriod({ block });
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
getSuccessorPeriod({ block, } = rpc_1.defaultRPCOptions) {
|
|
221
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
222
|
+
return this.rpc.getSuccessorPeriod({ block });
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
getSaplingDiffById(id, { block } = rpc_1.defaultRPCOptions) {
|
|
226
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
227
|
+
return this.rpc.getSaplingDiffById(id, { block });
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
getSaplingDiffByContract(contract, { block } = rpc_1.defaultRPCOptions) {
|
|
231
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
232
|
+
return this.rpc.getSaplingDiffByContract(contract, { block });
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
getProtocols({ block } = rpc_1.defaultRPCOptions) {
|
|
236
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
237
|
+
return this.rpc.getProtocols({ block });
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
}
|
|
362
241
|
exports.RpcWrapperContractsLibrary = RpcWrapperContractsLibrary;
|
|
363
242
|
//# sourceMappingURL=rpc-wrapper.js.map
|