@taquito/contracts-library 11.0.2 → 11.2.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/rpc-wrapper.js +203 -345
- 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 +317 -0
- package/dist/taquito-contracts-library.es6.js.map +1 -0
- package/dist/taquito-contracts-library.umd.js +313 -492
- package/dist/taquito-contracts-library.umd.js.map +1 -1
- 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/errors.js
CHANGED
|
@@ -1,37 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
3
|
exports.InvalidScriptFormatError = exports.InvalidAddressError = void 0;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var _this = _super.call(this, message) || this;
|
|
21
|
-
Object.setPrototypeOf(_this, InvalidAddressError.prototype);
|
|
22
|
-
return _this;
|
|
4
|
+
class InvalidAddressError extends Error {
|
|
5
|
+
constructor(message) {
|
|
6
|
+
super(message);
|
|
23
7
|
}
|
|
24
|
-
|
|
25
|
-
}(Error));
|
|
8
|
+
}
|
|
26
9
|
exports.InvalidAddressError = InvalidAddressError;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
var _this = _super.call(this, message) || this;
|
|
31
|
-
Object.setPrototypeOf(_this, InvalidScriptFormatError.prototype);
|
|
32
|
-
return _this;
|
|
10
|
+
class InvalidScriptFormatError extends Error {
|
|
11
|
+
constructor(message) {
|
|
12
|
+
super(message);
|
|
33
13
|
}
|
|
34
|
-
|
|
35
|
-
}(Error));
|
|
14
|
+
}
|
|
36
15
|
exports.InvalidScriptFormatError = InvalidScriptFormatError;
|
|
37
16
|
//# sourceMappingURL=errors.js.map
|
package/dist/lib/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":";;;AAAA,MAAa,mBAAoB,SAAQ,KAAK;IAC5C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;CACF;AAJD,kDAIC;AAED,MAAa,wBAAyB,SAAQ,KAAK;IACjD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;CACF;AAJD,4DAIC"}
|
package/dist/lib/rpc-wrapper.js
CHANGED
|
@@ -8,356 +8,214 @@ 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 __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
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
|
-
}
|
|
37
|
-
};
|
|
38
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
12
|
exports.RpcWrapperContractsLibrary = void 0;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
13
|
+
const rpc_1 = require("@taquito/rpc");
|
|
14
|
+
class RpcWrapperContractsLibrary {
|
|
15
|
+
constructor(rpc, contractslibrary) {
|
|
43
16
|
this.rpc = rpc;
|
|
44
17
|
this.contractslibrary = contractslibrary;
|
|
45
18
|
}
|
|
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
|
-
var _b = _a === void 0 ? rpc_1.defaultRPCOptions : _a, block = _b.block;
|
|
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 () {
|
|
19
|
+
getNormalizedScript(address, unparsingMode = { unparsing_mode: 'Readable' }, { block } = rpc_1.defaultRPCOptions) {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const contractData = this.contractslibrary.getContract(address);
|
|
22
|
+
if (contractData) {
|
|
23
|
+
return contractData.script;
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
return this.rpc.getNormalizedScript(address, unparsingMode, { block });
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
getEntrypoints(contract, { block } = rpc_1.defaultRPCOptions) {
|
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
const contractData = this.contractslibrary.getContract(contract);
|
|
33
|
+
if (contractData) {
|
|
34
|
+
return contractData.entrypoints;
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
return this.rpc.getEntrypoints(contract, { block });
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
getBalance(address, { block } = rpc_1.defaultRPCOptions) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
return this.rpc.getBalance(address, { block });
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
getBlockHash({ block } = rpc_1.defaultRPCOptions) {
|
|
47
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
+
return this.rpc.getBlockHash({ block });
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
getLiveBlocks({ block } = rpc_1.defaultRPCOptions) {
|
|
52
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
return this.rpc.getLiveBlocks({ block });
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
getStorage(address, { block } = rpc_1.defaultRPCOptions) {
|
|
57
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
return this.rpc.getStorage(address, { block });
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
getScript(address, { block } = rpc_1.defaultRPCOptions) {
|
|
62
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
return this.rpc.getScript(address, { block });
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
getContract(address, { block } = rpc_1.defaultRPCOptions) {
|
|
67
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
+
return this.rpc.getContract(address, { block });
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
getManagerKey(address, { block } = rpc_1.defaultRPCOptions) {
|
|
72
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
+
return this.rpc.getManagerKey(address, { block });
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
getDelegate(address, { block } = rpc_1.defaultRPCOptions) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
return this.rpc.getDelegate(address, { block });
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
getBigMapKey(address, key, { block } = rpc_1.defaultRPCOptions) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
return this.rpc.getBigMapKey(address, key, { block });
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
getBigMapExpr(id, expr, { block } = rpc_1.defaultRPCOptions) {
|
|
87
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
88
|
+
return this.rpc.getBigMapExpr(id, expr, { block });
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
getDelegates(address, { block } = rpc_1.defaultRPCOptions) {
|
|
92
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
93
|
+
return this.rpc.getDelegates(address, { block });
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
getConstants({ block } = rpc_1.defaultRPCOptions) {
|
|
97
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
98
|
+
return this.rpc.getConstants({ block });
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
getBlock({ block } = rpc_1.defaultRPCOptions) {
|
|
102
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
103
|
+
return this.rpc.getBlock({ block });
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
getBlockHeader({ block } = rpc_1.defaultRPCOptions) {
|
|
107
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
108
|
+
return this.rpc.getBlockHeader({ block });
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
getBlockMetadata({ block } = rpc_1.defaultRPCOptions) {
|
|
112
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
113
|
+
return this.rpc.getBlockMetadata({ block });
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
getBakingRights(args, { block } = rpc_1.defaultRPCOptions) {
|
|
117
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
118
|
+
return this.rpc.getBakingRights(args, { block });
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
getEndorsingRights(args, { block } = rpc_1.defaultRPCOptions) {
|
|
122
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
123
|
+
return this.rpc.getEndorsingRights(args, { block });
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
getBallotList({ block } = rpc_1.defaultRPCOptions) {
|
|
127
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
128
|
+
return this.rpc.getBallotList({ block });
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
getBallots({ block } = rpc_1.defaultRPCOptions) {
|
|
132
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
133
|
+
return this.rpc.getBallots({ block });
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
getCurrentPeriodKind({ block, } = rpc_1.defaultRPCOptions) {
|
|
137
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
138
|
+
return this.rpc.getCurrentPeriodKind({ block });
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
getCurrentProposal({ block, } = rpc_1.defaultRPCOptions) {
|
|
142
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
143
|
+
return this.rpc.getCurrentProposal({ block });
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
getCurrentQuorum({ block } = rpc_1.defaultRPCOptions) {
|
|
147
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
148
|
+
return this.rpc.getCurrentQuorum({ block });
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
getVotesListings({ block, } = rpc_1.defaultRPCOptions) {
|
|
152
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
153
|
+
return this.rpc.getVotesListings({ block });
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
getProposals({ block } = rpc_1.defaultRPCOptions) {
|
|
157
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
158
|
+
return this.rpc.getProposals({ block });
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
forgeOperations(data, { block } = rpc_1.defaultRPCOptions) {
|
|
162
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
163
|
+
return this.rpc.forgeOperations(data, { block });
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
injectOperation(signedOpBytes) {
|
|
167
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
168
|
+
return this.rpc.injectOperation(signedOpBytes);
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
packData(data, { block } = rpc_1.defaultRPCOptions) {
|
|
172
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
173
|
+
return this.rpc.packData(data, { block });
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
preapplyOperations(ops, { block } = rpc_1.defaultRPCOptions) {
|
|
177
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
178
|
+
return this.rpc.preapplyOperations(ops, { block });
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
runOperation(op, { block } = rpc_1.defaultRPCOptions) {
|
|
182
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
183
|
+
return this.rpc.runOperation(op, { block });
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
runCode(code, { block } = rpc_1.defaultRPCOptions) {
|
|
187
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
188
|
+
return this.rpc.runCode(code, { block });
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
getChainId() {
|
|
192
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
193
|
+
return this.rpc.getChainId();
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
getRpcUrl() {
|
|
326
197
|
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
|
-
RpcWrapperContractsLibrary.prototype.getSaplingDiffByContract = function (contract, _a) {
|
|
353
|
-
var _b = _a === void 0 ? rpc_1.defaultRPCOptions : _a, block = _b.block;
|
|
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
|
-
}());
|
|
198
|
+
}
|
|
199
|
+
getCurrentPeriod({ block, } = rpc_1.defaultRPCOptions) {
|
|
200
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
201
|
+
return this.rpc.getCurrentPeriod({ block });
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
getSuccessorPeriod({ block, } = rpc_1.defaultRPCOptions) {
|
|
205
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
206
|
+
return this.rpc.getSuccessorPeriod({ block });
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
getSaplingDiffById(id, { block } = rpc_1.defaultRPCOptions) {
|
|
210
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
211
|
+
return this.rpc.getSaplingDiffById(id, { block });
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
getSaplingDiffByContract(contract, { block } = rpc_1.defaultRPCOptions) {
|
|
215
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
216
|
+
return this.rpc.getSaplingDiffByContract(contract, { block });
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
}
|
|
362
220
|
exports.RpcWrapperContractsLibrary = RpcWrapperContractsLibrary;
|
|
363
221
|
//# sourceMappingURL=rpc-wrapper.js.map
|