@taquito/michelson-encoder 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/michelson-map.js +67 -224
- package/dist/lib/michelson-map.js.map +1 -1
- package/dist/lib/schema/error.js +21 -0
- package/dist/lib/schema/error.js.map +1 -0
- package/dist/lib/schema/parameter.js +45 -48
- package/dist/lib/schema/parameter.js.map +1 -1
- package/dist/lib/schema/storage.js +83 -84
- package/dist/lib/schema/storage.js.map +1 -1
- package/dist/lib/schema/view-schema.js +84 -0
- package/dist/lib/schema/view-schema.js.map +1 -0
- package/dist/lib/taquito-michelson-encoder.js +6 -1
- package/dist/lib/taquito-michelson-encoder.js.map +1 -1
- package/dist/lib/tokens/bigmap.js +63 -81
- package/dist/lib/tokens/bigmap.js.map +1 -1
- package/dist/lib/tokens/bls12-381-fr.js +46 -56
- package/dist/lib/tokens/bls12-381-fr.js.map +1 -1
- package/dist/lib/tokens/bls12-381-g1.js +46 -56
- package/dist/lib/tokens/bls12-381-g1.js.map +1 -1
- package/dist/lib/tokens/bls12-381-g2.js +46 -56
- package/dist/lib/tokens/bls12-381-g2.js.map +1 -1
- package/dist/lib/tokens/chain-id.js +46 -58
- package/dist/lib/tokens/chain-id.js.map +1 -1
- package/dist/lib/tokens/chest-key.js +44 -54
- package/dist/lib/tokens/chest-key.js.map +1 -1
- package/dist/lib/tokens/chest.js +44 -54
- package/dist/lib/tokens/chest.js.map +1 -1
- package/dist/lib/tokens/comparable/address.js +53 -66
- package/dist/lib/tokens/comparable/address.js.map +1 -1
- package/dist/lib/tokens/comparable/bool.js +36 -43
- package/dist/lib/tokens/comparable/bool.js.map +1 -1
- package/dist/lib/tokens/comparable/bytes.js +48 -60
- package/dist/lib/tokens/comparable/bytes.js.map +1 -1
- package/dist/lib/tokens/comparable/int.js +52 -63
- package/dist/lib/tokens/comparable/int.js.map +1 -1
- package/dist/lib/tokens/comparable/key_hash.js +47 -59
- package/dist/lib/tokens/comparable/key_hash.js.map +1 -1
- package/dist/lib/tokens/comparable/mutez.js +52 -63
- package/dist/lib/tokens/comparable/mutez.js.map +1 -1
- package/dist/lib/tokens/comparable/nat.js +54 -65
- package/dist/lib/tokens/comparable/nat.js.map +1 -1
- package/dist/lib/tokens/comparable/string.js +35 -44
- package/dist/lib/tokens/comparable/string.js.map +1 -1
- package/dist/lib/tokens/comparable/timestamp.js +38 -44
- package/dist/lib/tokens/comparable/timestamp.js.map +1 -1
- package/dist/lib/tokens/constant.js +48 -59
- package/dist/lib/tokens/constant.js.map +1 -1
- package/dist/lib/tokens/contract.js +45 -52
- package/dist/lib/tokens/contract.js.map +1 -1
- package/dist/lib/tokens/createToken.js +7 -7
- package/dist/lib/tokens/createToken.js.map +1 -1
- package/dist/lib/tokens/key.js +58 -68
- package/dist/lib/tokens/key.js.map +1 -1
- package/dist/lib/tokens/lambda.js +44 -45
- package/dist/lib/tokens/lambda.js.map +1 -1
- package/dist/lib/tokens/list.js +57 -86
- package/dist/lib/tokens/list.js.map +1 -1
- package/dist/lib/tokens/map.js +61 -79
- package/dist/lib/tokens/map.js.map +1 -1
- package/dist/lib/tokens/never.js +39 -49
- package/dist/lib/tokens/never.js.map +1 -1
- package/dist/lib/tokens/operation.js +30 -41
- package/dist/lib/tokens/operation.js.map +1 -1
- package/dist/lib/tokens/option.js +58 -91
- package/dist/lib/tokens/option.js.map +1 -1
- package/dist/lib/tokens/or.js +113 -167
- package/dist/lib/tokens/or.js.map +1 -1
- package/dist/lib/tokens/pair.js +97 -150
- package/dist/lib/tokens/pair.js.map +1 -1
- package/dist/lib/tokens/sapling-state.js +47 -56
- package/dist/lib/tokens/sapling-state.js.map +1 -1
- package/dist/lib/tokens/sapling-transaction.js +48 -57
- package/dist/lib/tokens/sapling-transaction.js.map +1 -1
- package/dist/lib/tokens/set.js +52 -89
- package/dist/lib/tokens/set.js.map +1 -1
- package/dist/lib/tokens/signature.js +46 -56
- package/dist/lib/tokens/signature.js.map +1 -1
- package/dist/lib/tokens/ticket.js +57 -60
- package/dist/lib/tokens/ticket.js.map +1 -1
- package/dist/lib/tokens/token.js +28 -51
- package/dist/lib/tokens/token.js.map +1 -1
- package/dist/lib/tokens/tokens.js +33 -33
- package/dist/lib/tokens/tokens.js.map +1 -1
- package/dist/lib/tokens/unit.js +36 -43
- package/dist/lib/tokens/unit.js.map +1 -1
- package/dist/lib/version.js +2 -4
- package/dist/lib/version.js.map +1 -1
- package/dist/taquito-michelson-encoder.es6.js +3333 -0
- package/dist/taquito-michelson-encoder.es6.js.map +1 -0
- package/dist/taquito-michelson-encoder.umd.js +3320 -3314
- package/dist/taquito-michelson-encoder.umd.js.map +1 -1
- package/dist/types/michelson-map.d.ts +3 -4
- package/dist/types/schema/error.d.ts +11 -0
- package/dist/types/schema/parameter.d.ts +9 -0
- package/dist/types/schema/storage.d.ts +11 -0
- package/dist/types/schema/types.d.ts +84 -0
- package/dist/types/schema/view-schema.d.ts +48 -0
- package/dist/types/taquito-michelson-encoder.d.ts +4 -0
- package/dist/types/tokens/bigmap.d.ts +7 -1
- package/dist/types/tokens/bls12-381-fr.d.ts +8 -2
- package/dist/types/tokens/bls12-381-g1.d.ts +8 -2
- package/dist/types/tokens/bls12-381-g2.d.ts +8 -2
- package/dist/types/tokens/chain-id.d.ts +9 -3
- package/dist/types/tokens/chest-key.d.ts +8 -2
- package/dist/types/tokens/chest.d.ts +8 -2
- package/dist/types/tokens/comparable/address.d.ts +8 -2
- package/dist/types/tokens/comparable/bool.d.ts +8 -2
- package/dist/types/tokens/comparable/bytes.d.ts +9 -3
- package/dist/types/tokens/comparable/int.d.ts +9 -3
- package/dist/types/tokens/comparable/key_hash.d.ts +10 -4
- package/dist/types/tokens/comparable/mutez.d.ts +9 -3
- package/dist/types/tokens/comparable/nat.d.ts +11 -4
- package/dist/types/tokens/comparable/string.d.ts +9 -3
- package/dist/types/tokens/comparable/timestamp.d.ts +9 -3
- package/dist/types/tokens/constant.d.ts +8 -2
- package/dist/types/tokens/contract.d.ts +9 -3
- package/dist/types/tokens/createToken.d.ts +1 -1
- package/dist/types/tokens/key.d.ts +11 -5
- package/dist/types/tokens/lambda.d.ts +10 -2
- package/dist/types/tokens/list.d.ts +9 -2
- package/dist/types/tokens/map.d.ts +7 -1
- package/dist/types/tokens/never.d.ts +8 -2
- package/dist/types/tokens/operation.d.ts +8 -2
- package/dist/types/tokens/option.d.ts +8 -1
- package/dist/types/tokens/or.d.ts +7 -1
- package/dist/types/tokens/pair.d.ts +7 -1
- package/dist/types/tokens/sapling-state.d.ts +8 -2
- package/dist/types/tokens/sapling-transaction.d.ts +8 -2
- package/dist/types/tokens/set.d.ts +8 -2
- package/dist/types/tokens/signature.d.ts +9 -3
- package/dist/types/tokens/ticket.d.ts +11 -5
- package/dist/types/tokens/token.d.ts +7 -2
- package/dist/types/tokens/unit.d.ts +9 -3
- package/package.json +23 -23
- package/dist/taquito-michelson-encoder.es5.js +0 -3331
- package/dist/taquito-michelson-encoder.es5.js.map +0 -1
|
@@ -1,89 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
3
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
4
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
5
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
6
|
-
function step(op) {
|
|
7
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
8
|
-
while (_) try {
|
|
9
|
-
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;
|
|
10
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
11
|
-
switch (op[0]) {
|
|
12
|
-
case 0: case 1: t = op; break;
|
|
13
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
14
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
15
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
16
|
-
default:
|
|
17
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
18
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
19
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
20
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
21
|
-
if (t[2]) _.ops.pop();
|
|
22
|
-
_.trys.pop(); continue;
|
|
23
|
-
}
|
|
24
|
-
op = body.call(thisArg, _);
|
|
25
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
26
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
var __values = (this && this.__values) || function(o) {
|
|
30
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
31
|
-
if (m) return m.call(o);
|
|
32
|
-
if (o && typeof o.length === "number") return {
|
|
33
|
-
next: function () {
|
|
34
|
-
if (o && i >= o.length) o = void 0;
|
|
35
|
-
return { value: o && o[i++], done: !o };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
39
|
-
};
|
|
40
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
41
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
42
|
-
if (!m) return o;
|
|
43
|
-
var i = m.call(o), r, ar = [], e;
|
|
44
|
-
try {
|
|
45
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
46
|
-
}
|
|
47
|
-
catch (error) { e = { error: error }; }
|
|
48
|
-
finally {
|
|
49
|
-
try {
|
|
50
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
51
|
-
}
|
|
52
|
-
finally { if (e) throw e.error; }
|
|
53
|
-
}
|
|
54
|
-
return ar;
|
|
55
|
-
};
|
|
56
2
|
var _a;
|
|
57
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58
4
|
exports.MichelsonMap = exports.MapTypecheckError = void 0;
|
|
59
|
-
|
|
60
|
-
|
|
5
|
+
const storage_1 = require("./schema/storage");
|
|
6
|
+
const fast_json_stable_stringify_1 = require("fast-json-stable-stringify");
|
|
61
7
|
// Retrieve a unique symbol associated with the key from the environment
|
|
62
8
|
// Used in order to identify all object that are of type MichelsonMap even if they come from different module
|
|
63
|
-
|
|
64
|
-
|
|
9
|
+
const michelsonMapTypeSymbol = Symbol.for('taquito-michelson-map-type-symbol');
|
|
10
|
+
const isMapType = (value) => {
|
|
65
11
|
return 'args' in value && Array.isArray(value.args) && value.args.length === 2;
|
|
66
12
|
};
|
|
67
|
-
|
|
68
|
-
|
|
13
|
+
class MapTypecheckError extends Error {
|
|
14
|
+
constructor(value, type, errorType) {
|
|
15
|
+
super(`${errorType} not compliant with underlying michelson type`);
|
|
69
16
|
this.value = value;
|
|
70
17
|
this.type = type;
|
|
71
18
|
this.name = 'MapTypecheckError';
|
|
72
|
-
this.message = errorType + " not compliant with underlying michelson type";
|
|
73
19
|
}
|
|
74
|
-
|
|
75
|
-
}());
|
|
20
|
+
}
|
|
76
21
|
exports.MapTypecheckError = MapTypecheckError;
|
|
77
22
|
/**
|
|
78
23
|
* @description Michelson Map is an abstraction over the michelson native map. It supports complex Pair as key
|
|
79
24
|
*/
|
|
80
|
-
|
|
25
|
+
class MichelsonMap {
|
|
81
26
|
/**
|
|
82
27
|
* @param mapType If specified key and value will be type-checked before being added to the map
|
|
83
28
|
*
|
|
84
29
|
* @example new MichelsonMap({ prim: "map", args: [{prim: "string"}, {prim: "int"}]})
|
|
85
30
|
*/
|
|
86
|
-
|
|
31
|
+
constructor(mapType) {
|
|
87
32
|
this.valueMap = new Map();
|
|
88
33
|
this.keyMap = new Map();
|
|
89
34
|
this[_a] = true;
|
|
@@ -94,159 +39,73 @@ var MichelsonMap = /** @class */ (function () {
|
|
|
94
39
|
// Used to check if an object is a michelson map.
|
|
95
40
|
// Using instanceof was not working for project that had multiple instance of taquito dependencies
|
|
96
41
|
// as the class constructor is different
|
|
97
|
-
|
|
42
|
+
static isMichelsonMap(obj) {
|
|
98
43
|
return obj && obj[michelsonMapTypeSymbol] === true;
|
|
99
|
-
}
|
|
100
|
-
|
|
44
|
+
}
|
|
45
|
+
setType(mapType) {
|
|
101
46
|
if (!isMapType(mapType)) {
|
|
102
47
|
throw new Error('mapType is not a valid michelson map type');
|
|
103
48
|
}
|
|
104
49
|
this.keySchema = new storage_1.Schema(mapType.args[0]);
|
|
105
50
|
this.valueSchema = new storage_1.Schema(mapType.args[1]);
|
|
106
|
-
}
|
|
107
|
-
|
|
51
|
+
}
|
|
52
|
+
removeType() {
|
|
108
53
|
this.keySchema = undefined;
|
|
109
54
|
this.valueSchema = undefined;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
Object.keys(obj).forEach(
|
|
55
|
+
}
|
|
56
|
+
static fromLiteral(obj, mapType) {
|
|
57
|
+
const map = new MichelsonMap(mapType);
|
|
58
|
+
Object.keys(obj).forEach((key) => {
|
|
114
59
|
map.set(key, obj[key]);
|
|
115
60
|
});
|
|
116
61
|
return map;
|
|
117
|
-
}
|
|
118
|
-
|
|
62
|
+
}
|
|
63
|
+
typecheckKey(key) {
|
|
119
64
|
if (this.keySchema) {
|
|
120
65
|
return this.keySchema.Typecheck(key);
|
|
121
66
|
}
|
|
122
67
|
return true;
|
|
123
|
-
}
|
|
124
|
-
|
|
68
|
+
}
|
|
69
|
+
typecheckValue(value) {
|
|
125
70
|
if (this.valueSchema) {
|
|
126
71
|
return this.valueSchema.Typecheck(value);
|
|
127
72
|
}
|
|
128
73
|
return true;
|
|
129
|
-
}
|
|
130
|
-
|
|
74
|
+
}
|
|
75
|
+
assertTypecheckValue(value) {
|
|
131
76
|
if (!this.typecheckValue(value)) {
|
|
132
77
|
throw new MapTypecheckError(value, this.valueSchema, 'value');
|
|
133
78
|
}
|
|
134
|
-
}
|
|
135
|
-
|
|
79
|
+
}
|
|
80
|
+
assertTypecheckKey(key) {
|
|
136
81
|
if (!this.typecheckKey(key)) {
|
|
137
82
|
throw new MapTypecheckError(key, this.keySchema, 'key');
|
|
138
83
|
}
|
|
139
|
-
}
|
|
140
|
-
|
|
84
|
+
}
|
|
85
|
+
serializeDeterministically(key) {
|
|
141
86
|
return fast_json_stable_stringify_1.default(key);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
_c = _b.next();
|
|
161
|
-
return [3 /*break*/, 1];
|
|
162
|
-
case 4: return [3 /*break*/, 7];
|
|
163
|
-
case 5:
|
|
164
|
-
e_1_1 = _f.sent();
|
|
165
|
-
e_1 = { error: e_1_1 };
|
|
166
|
-
return [3 /*break*/, 7];
|
|
167
|
-
case 6:
|
|
168
|
-
try {
|
|
169
|
-
if (_c && !_c.done && (_e = _b.return)) _e.call(_b);
|
|
170
|
-
}
|
|
171
|
-
finally { if (e_1) throw e_1.error; }
|
|
172
|
-
return [7 /*endfinally*/];
|
|
173
|
-
case 7: return [2 /*return*/];
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
};
|
|
177
|
-
MichelsonMap.prototype.values = function () {
|
|
178
|
-
var _b, _c, _d, value, e_2_1;
|
|
179
|
-
var e_2, _e;
|
|
180
|
-
return __generator(this, function (_f) {
|
|
181
|
-
switch (_f.label) {
|
|
182
|
-
case 0:
|
|
183
|
-
_f.trys.push([0, 5, 6, 7]);
|
|
184
|
-
_b = __values(this.entries()), _c = _b.next();
|
|
185
|
-
_f.label = 1;
|
|
186
|
-
case 1:
|
|
187
|
-
if (!!_c.done) return [3 /*break*/, 4];
|
|
188
|
-
_d = __read(_c.value, 2), value = _d[1];
|
|
189
|
-
return [4 /*yield*/, value];
|
|
190
|
-
case 2:
|
|
191
|
-
_f.sent();
|
|
192
|
-
_f.label = 3;
|
|
193
|
-
case 3:
|
|
194
|
-
_c = _b.next();
|
|
195
|
-
return [3 /*break*/, 1];
|
|
196
|
-
case 4: return [3 /*break*/, 7];
|
|
197
|
-
case 5:
|
|
198
|
-
e_2_1 = _f.sent();
|
|
199
|
-
e_2 = { error: e_2_1 };
|
|
200
|
-
return [3 /*break*/, 7];
|
|
201
|
-
case 6:
|
|
202
|
-
try {
|
|
203
|
-
if (_c && !_c.done && (_e = _b.return)) _e.call(_b);
|
|
204
|
-
}
|
|
205
|
-
finally { if (e_2) throw e_2.error; }
|
|
206
|
-
return [7 /*endfinally*/];
|
|
207
|
-
case 7: return [2 /*return*/];
|
|
208
|
-
}
|
|
209
|
-
});
|
|
210
|
-
};
|
|
211
|
-
MichelsonMap.prototype.entries = function () {
|
|
212
|
-
var _b, _c, key, e_3_1;
|
|
213
|
-
var e_3, _d;
|
|
214
|
-
return __generator(this, function (_e) {
|
|
215
|
-
switch (_e.label) {
|
|
216
|
-
case 0:
|
|
217
|
-
_e.trys.push([0, 5, 6, 7]);
|
|
218
|
-
_b = __values(this.valueMap.keys()), _c = _b.next();
|
|
219
|
-
_e.label = 1;
|
|
220
|
-
case 1:
|
|
221
|
-
if (!!_c.done) return [3 /*break*/, 4];
|
|
222
|
-
key = _c.value;
|
|
223
|
-
return [4 /*yield*/, [this.keyMap.get(key), this.valueMap.get(key)]];
|
|
224
|
-
case 2:
|
|
225
|
-
_e.sent();
|
|
226
|
-
_e.label = 3;
|
|
227
|
-
case 3:
|
|
228
|
-
_c = _b.next();
|
|
229
|
-
return [3 /*break*/, 1];
|
|
230
|
-
case 4: return [3 /*break*/, 7];
|
|
231
|
-
case 5:
|
|
232
|
-
e_3_1 = _e.sent();
|
|
233
|
-
e_3 = { error: e_3_1 };
|
|
234
|
-
return [3 /*break*/, 7];
|
|
235
|
-
case 6:
|
|
236
|
-
try {
|
|
237
|
-
if (_c && !_c.done && (_d = _b.return)) _d.call(_b);
|
|
238
|
-
}
|
|
239
|
-
finally { if (e_3) throw e_3.error; }
|
|
240
|
-
return [7 /*endfinally*/];
|
|
241
|
-
case 7: return [2 /*return*/];
|
|
242
|
-
}
|
|
243
|
-
});
|
|
244
|
-
};
|
|
245
|
-
MichelsonMap.prototype.get = function (key) {
|
|
87
|
+
}
|
|
88
|
+
*keys() {
|
|
89
|
+
for (const [key] of this.entries()) {
|
|
90
|
+
yield key;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
*values() {
|
|
94
|
+
for (const [, value] of this.entries()) {
|
|
95
|
+
yield value;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
*entries() {
|
|
99
|
+
for (const key of this.valueMap.keys()) {
|
|
100
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
101
|
+
yield [this.keyMap.get(key), this.valueMap.get(key)];
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
get(key) {
|
|
246
105
|
this.assertTypecheckKey(key);
|
|
247
|
-
|
|
106
|
+
const strKey = this.serializeDeterministically(key);
|
|
248
107
|
return this.valueMap.get(strKey);
|
|
249
|
-
}
|
|
108
|
+
}
|
|
250
109
|
/**
|
|
251
110
|
*
|
|
252
111
|
* @description Set a key and a value in the MichelsonMap. If the key already exists, override the current value.
|
|
@@ -261,52 +120,36 @@ var MichelsonMap = /** @class */ (function () {
|
|
|
261
120
|
*
|
|
262
121
|
* You will get two unique entries in the MichelsonMap. These values will both be evaluated as falsy by the MichelsonEncoder and ultimately rejected by the Tezos RPC.
|
|
263
122
|
*/
|
|
264
|
-
|
|
123
|
+
set(key, value) {
|
|
265
124
|
this.assertTypecheckKey(key);
|
|
266
125
|
this.assertTypecheckValue(value);
|
|
267
|
-
|
|
126
|
+
const strKey = this.serializeDeterministically(key);
|
|
268
127
|
this.keyMap.set(strKey, key);
|
|
269
128
|
this.valueMap.set(strKey, value);
|
|
270
|
-
}
|
|
271
|
-
|
|
129
|
+
}
|
|
130
|
+
delete(key) {
|
|
272
131
|
this.assertTypecheckKey(key);
|
|
273
132
|
this.keyMap.delete(this.serializeDeterministically(key));
|
|
274
133
|
this.valueMap.delete(this.serializeDeterministically(key));
|
|
275
|
-
}
|
|
276
|
-
|
|
134
|
+
}
|
|
135
|
+
has(key) {
|
|
277
136
|
this.assertTypecheckKey(key);
|
|
278
|
-
|
|
137
|
+
const strKey = this.serializeDeterministically(key);
|
|
279
138
|
return this.keyMap.has(strKey) && this.valueMap.has(strKey);
|
|
280
|
-
}
|
|
281
|
-
|
|
139
|
+
}
|
|
140
|
+
clear() {
|
|
282
141
|
this.keyMap.clear();
|
|
283
142
|
this.valueMap.clear();
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
});
|
|
292
|
-
MichelsonMap.prototype.forEach = function (cb) {
|
|
293
|
-
var e_4, _b;
|
|
294
|
-
try {
|
|
295
|
-
for (var _c = __values(this.entries()), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
296
|
-
var _e = __read(_d.value, 2), key = _e[0], value = _e[1];
|
|
297
|
-
cb(value, key, this);
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
301
|
-
finally {
|
|
302
|
-
try {
|
|
303
|
-
if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
|
|
304
|
-
}
|
|
305
|
-
finally { if (e_4) throw e_4.error; }
|
|
143
|
+
}
|
|
144
|
+
get size() {
|
|
145
|
+
return this.keyMap.size;
|
|
146
|
+
}
|
|
147
|
+
forEach(cb) {
|
|
148
|
+
for (const [key, value] of this.entries()) {
|
|
149
|
+
cb(value, key, this);
|
|
306
150
|
}
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
}());
|
|
151
|
+
}
|
|
152
|
+
}
|
|
310
153
|
exports.MichelsonMap = MichelsonMap;
|
|
311
154
|
_a = michelsonMapTypeSymbol;
|
|
312
155
|
//# sourceMappingURL=michelson-map.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"michelson-map.js","sourceRoot":"","sources":["../../src/michelson-map.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"michelson-map.js","sourceRoot":"","sources":["../../src/michelson-map.ts"],"names":[],"mappings":";;;;AACA,8CAA0C;AAC1C,2EAAmD;AAEnD,wEAAwE;AACxE,6GAA6G;AAC7G,MAAM,sBAAsB,GAAG,MAAM,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;AAI/E,MAAM,SAAS,GAAG,CAChB,KAA4B,EACgE,EAAE;IAC9F,OAAO,MAAM,IAAI,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC;AACjF,CAAC,CAAC;AAEF,MAAa,iBAAkB,SAAQ,KAAK;IAG1C,YAA4B,KAAU,EAAkB,IAAS,EAAE,SAA0B;QAC3F,KAAK,CAAC,GAAG,SAAS,+CAA+C,CAAC,CAAC;QADzC,UAAK,GAAL,KAAK,CAAK;QAAkB,SAAI,GAAJ,IAAI,CAAK;QAFjE,SAAI,GAAG,mBAAmB,CAAC;IAI3B,CAAC;CACF;AAND,8CAMC;AAED;;GAEG;AACH,MAAa,YAAY;IAgBvB;;;;OAIG;IACH,YAAY,OAA+B;QApBnC,aAAQ,GAAG,IAAI,GAAG,EAAa,C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CAAC;IACxB,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;IAC1B,CAAC;IAED,OAAO,CAAC,EAAuD;QAC7D,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE;YACzC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;SACtB;IACH,CAAC;CACF;AA9JD,oCA8JC;KA1JS,sBAAsB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InvalidScriptError = exports.ViewEncodingError = void 0;
|
|
4
|
+
class ViewEncodingError extends Error {
|
|
5
|
+
constructor(smartContractViewName, originalError) {
|
|
6
|
+
super(`Unable to encode the parameter of the view: ${smartContractViewName}.`);
|
|
7
|
+
this.smartContractViewName = smartContractViewName;
|
|
8
|
+
this.originalError = originalError;
|
|
9
|
+
this.name = 'ViewEncodingError';
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.ViewEncodingError = ViewEncodingError;
|
|
13
|
+
class InvalidScriptError extends Error {
|
|
14
|
+
constructor(message) {
|
|
15
|
+
super(message);
|
|
16
|
+
this.message = message;
|
|
17
|
+
this.name = 'InvalidScriptError';
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.InvalidScriptError = InvalidScriptError;
|
|
21
|
+
//# sourceMappingURL=error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../../src/schema/error.ts"],"names":[],"mappings":";;;AAAA,MAAa,iBAAkB,SAAQ,KAAK;IAG1C,YAAmB,qBAA6B,EAAS,aAAkB;QACzE,KAAK,CAAC,+CAA+C,qBAAqB,GAAG,CAAC,CAAC;QAD9D,0BAAqB,GAArB,qBAAqB,CAAQ;QAAS,kBAAa,GAAb,aAAa,CAAK;QAF3E,SAAI,GAAG,mBAAmB,CAAC;IAI3B,CAAC;CACF;AAND,8CAMC;AAED,MAAa,kBAAmB,SAAQ,KAAK;IAE3C,YAAmB,OAAe;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC;QADE,YAAO,GAAP,OAAO,CAAQ;QADlC,SAAI,GAAG,oBAAoB,CAAC;IAG5B,CAAC;CACF;AALD,gDAKC"}
|
|
@@ -1,55 +1,43 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ParameterSchema = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
const createToken_1 = require("../tokens/createToken");
|
|
5
|
+
const token_1 = require("../tokens/token");
|
|
6
|
+
const or_1 = require("../tokens/or");
|
|
7
|
+
const option_1 = require("../tokens/option");
|
|
8
8
|
/**
|
|
9
9
|
* @warn Our current smart contract abstraction feature is currently in preview. It's API is not final, and it may not cover every use case (yet). We will greatly appreciate any feedback on this feature.
|
|
10
10
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
class ParameterSchema {
|
|
12
|
+
constructor(val) {
|
|
13
13
|
this.root = createToken_1.createToken(val, 0);
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
static fromRPCResponse(val) {
|
|
16
|
+
const parameter = val &&
|
|
17
17
|
val.script &&
|
|
18
18
|
Array.isArray(val.script.code) &&
|
|
19
|
-
val.script.code.find(
|
|
19
|
+
val.script.code.find((x) => x.prim === 'parameter');
|
|
20
20
|
if (!parameter || !Array.isArray(parameter.args)) {
|
|
21
21
|
throw new Error('Invalid rpc response passed as arguments');
|
|
22
22
|
}
|
|
23
23
|
return new ParameterSchema(parameter.args[0]);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
if (this.isMultipleEntryPoint) {
|
|
36
|
-
return Object.keys(this.ExtractSchema())[0] !== '0';
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
return true;
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
enumerable: false,
|
|
43
|
-
configurable: true
|
|
44
|
-
});
|
|
45
|
-
ParameterSchema.prototype.Execute = function (val, semantics) {
|
|
46
|
-
return this.root.Execute(val, semantics);
|
|
47
|
-
};
|
|
48
|
-
ParameterSchema.prototype.Encode = function () {
|
|
49
|
-
var args = [];
|
|
50
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
51
|
-
args[_i] = arguments[_i];
|
|
24
|
+
}
|
|
25
|
+
get isMultipleEntryPoint() {
|
|
26
|
+
return (this.root instanceof or_1.OrToken ||
|
|
27
|
+
(this.root instanceof option_1.OptionToken && this.root.subToken() instanceof or_1.OrToken));
|
|
28
|
+
}
|
|
29
|
+
get hasAnnotation() {
|
|
30
|
+
if (this.isMultipleEntryPoint) {
|
|
31
|
+
return Object.keys(this.ExtractSchema())[0] !== '0';
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
return true;
|
|
52
35
|
}
|
|
36
|
+
}
|
|
37
|
+
Execute(val, semantics) {
|
|
38
|
+
return this.root.Execute(val, semantics);
|
|
39
|
+
}
|
|
40
|
+
Encode(...args) {
|
|
53
41
|
try {
|
|
54
42
|
return this.root.Encode(args.reverse());
|
|
55
43
|
}
|
|
@@ -57,10 +45,10 @@ var ParameterSchema = /** @class */ (function () {
|
|
|
57
45
|
if (ex instanceof token_1.TokenValidationError) {
|
|
58
46
|
throw ex;
|
|
59
47
|
}
|
|
60
|
-
throw new Error(
|
|
48
|
+
throw new Error(`Unable to encode parameter. ${ex}`);
|
|
61
49
|
}
|
|
62
|
-
}
|
|
63
|
-
|
|
50
|
+
}
|
|
51
|
+
EncodeObject(_value) {
|
|
64
52
|
try {
|
|
65
53
|
return this.root.EncodeObject(_value);
|
|
66
54
|
}
|
|
@@ -68,16 +56,25 @@ var ParameterSchema = /** @class */ (function () {
|
|
|
68
56
|
if (ex instanceof token_1.TokenValidationError) {
|
|
69
57
|
throw ex;
|
|
70
58
|
}
|
|
71
|
-
throw new Error(
|
|
59
|
+
throw new Error(`Unable to encode parameter object. ${ex}`);
|
|
72
60
|
}
|
|
73
|
-
}
|
|
74
|
-
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
64
|
+
*
|
|
65
|
+
*/
|
|
66
|
+
ExtractSchema() {
|
|
75
67
|
return this.root.ExtractSchema();
|
|
76
|
-
}
|
|
77
|
-
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* @description Produce a schema grouping together all the entry points of a contract.
|
|
71
|
+
*/
|
|
72
|
+
generateSchema() {
|
|
73
|
+
return this.root.generateSchema();
|
|
74
|
+
}
|
|
75
|
+
ExtractSignatures() {
|
|
78
76
|
return this.root.ExtractSignature();
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
}());
|
|
77
|
+
}
|
|
78
|
+
}
|
|
82
79
|
exports.ParameterSchema = ParameterSchema;
|
|
83
80
|
//# sourceMappingURL=parameter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parameter.js","sourceRoot":"","sources":["../../../src/schema/parameter.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"parameter.js","sourceRoot":"","sources":["../../../src/schema/parameter.ts"],"names":[],"mappings":";;;AAAA,uDAAoD;AACpD,2CAAwE;AACxE,qCAAuC;AACvC,6CAA+C;AAI/C;;GAEG;AACH,MAAa,eAAe;IA+B1B,YAAY,GAA0B;QACpC,IAAI,CAAC,IAAI,GAAG,yBAAW,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IAClC,CAAC;IA9BD,MAAM,CAAC,eAAe,CAAC,GAA+B;QACpD,MAAM,SAAS,GACb,GA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