@taquito/michelson-encoder 17.2.0 → 17.3.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/LICENSE +199 -4
- package/dist/lib/errors.js +2 -2
- package/dist/lib/errors.js.map +1 -1
- package/dist/lib/tokens/or.js +30 -15
- package/dist/lib/tokens/or.js.map +1 -1
- package/dist/lib/tokens/pair.js +3 -3
- package/dist/lib/tokens/pair.js.map +1 -1
- package/dist/lib/version.js +2 -2
- package/dist/taquito-michelson-encoder.es6.js +34 -18
- package/dist/taquito-michelson-encoder.es6.js.map +1 -1
- package/dist/taquito-michelson-encoder.umd.js +34 -18
- package/dist/taquito-michelson-encoder.umd.js.map +1 -1
- package/dist/types/errors.d.ts +1 -1
- package/dist/types/michelson-map.d.ts +1 -1
- package/dist/types/tokens/or.d.ts +14 -7
- package/package.json +4 -4
package/LICENSE
CHANGED
|
@@ -1,7 +1,202 @@
|
|
|
1
|
-
Copyright 2019 ECAD Labs Inc
|
|
2
1
|
|
|
3
|
-
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/dist/lib/errors.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EncodeTicketError = exports.NatValidationError = exports.MutezValidationError = exports.KeyHashValidationError = exports.IntValidationError = exports.BytesValidationError = exports.AddressValidationError = exports.SignatureValidationError = exports.ContractValidationError = exports.KeyValidationError = exports.ChainIDValidationError = exports.
|
|
3
|
+
exports.EncodeTicketError = exports.NatValidationError = exports.MutezValidationError = exports.KeyHashValidationError = exports.IntValidationError = exports.BytesValidationError = exports.AddressValidationError = exports.SignatureValidationError = exports.ContractValidationError = exports.KeyValidationError = exports.ChainIDValidationError = exports.OrValidationError = exports.TokenComparisonError = exports.TokenArgumentValidationError = exports.BigMapValidationError = exports.SetValidationError = exports.MapValidationError = exports.ListValidationError = void 0;
|
|
4
4
|
var list_1 = require("./tokens/list");
|
|
5
5
|
Object.defineProperty(exports, "ListValidationError", { enumerable: true, get: function () { return list_1.ListValidationError; } });
|
|
6
6
|
var map_1 = require("./tokens/map");
|
|
@@ -13,7 +13,7 @@ var pair_1 = require("./tokens/pair");
|
|
|
13
13
|
Object.defineProperty(exports, "TokenArgumentValidationError", { enumerable: true, get: function () { return pair_1.TokenArgumentValidationError; } });
|
|
14
14
|
Object.defineProperty(exports, "TokenComparisonError", { enumerable: true, get: function () { return pair_1.TokenComparisonError; } });
|
|
15
15
|
var or_1 = require("./tokens/or");
|
|
16
|
-
Object.defineProperty(exports, "
|
|
16
|
+
Object.defineProperty(exports, "OrValidationError", { enumerable: true, get: function () { return or_1.OrValidationError; } });
|
|
17
17
|
var chain_id_1 = require("./tokens/chain-id");
|
|
18
18
|
Object.defineProperty(exports, "ChainIDValidationError", { enumerable: true, get: function () { return chain_id_1.ChainIDValidationError; } });
|
|
19
19
|
var key_1 = require("./tokens/key");
|
package/dist/lib/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":";;;AAAA,sCAAoD;AAA3C,2GAAA,mBAAmB,OAAA;AAC5B,oCAAkD;AAAzC,yGAAA,kBAAkB,OAAA;AAC3B,oCAAkD;AAAzC,yGAAA,kBAAkB,OAAA;AAC3B,0CAAwD;AAA/C,+GAAA,qBAAqB,OAAA;AAC9B,sCAAmF;AAA1E,oHAAA,4BAA4B,OAAA;AAAE,4GAAA,oBAAoB,OAAA;AAC3D,
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":";;;AAAA,sCAAoD;AAA3C,2GAAA,mBAAmB,OAAA;AAC5B,oCAAkD;AAAzC,yGAAA,kBAAkB,OAAA;AAC3B,oCAAkD;AAAzC,yGAAA,kBAAkB,OAAA;AAC3B,0CAAwD;AAA/C,+GAAA,qBAAqB,OAAA;AAC9B,sCAAmF;AAA1E,oHAAA,4BAA4B,OAAA;AAAE,4GAAA,oBAAoB,OAAA;AAC3D,kCAAgD;AAAvC,uGAAA,iBAAiB,OAAA;AAC1B,8CAA2D;AAAlD,kHAAA,sBAAsB,OAAA;AAC/B,oCAAkD;AAAzC,yGAAA,kBAAkB,OAAA;AAC3B,8CAA4D;AAAnD,mHAAA,uBAAuB,OAAA;AAChC,gDAA8D;AAArD,qHAAA,wBAAwB,OAAA;AAEjC,uDAAqE;AAA5D,iHAAA,sBAAsB,OAAA;AAC/B,mDAAiE;AAAxD,6GAAA,oBAAoB,OAAA;AAC7B,+CAA6D;AAApD,yGAAA,kBAAkB,OAAA;AAC3B,yDAAsE;AAA7D,kHAAA,sBAAsB,OAAA;AAC/B,mDAAiE;AAAxD,6GAAA,oBAAoB,OAAA;AAC7B,+CAA6D;AAApD,yGAAA,kBAAkB,OAAA;AAE3B,0CAAoD;AAA3C,2GAAA,iBAAiB,OAAA"}
|
package/dist/lib/tokens/or.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OrToken = exports.
|
|
4
|
-
const core_1 = require("@taquito/core");
|
|
3
|
+
exports.OrToken = exports.OrValidationError = void 0;
|
|
5
4
|
const token_1 = require("./token");
|
|
6
5
|
/**
|
|
7
6
|
* @category Error
|
|
8
|
-
* @description Error that indicates a failure when
|
|
7
|
+
* @description Error that indicates a failure happening when parsing encoding/executing an OrToken
|
|
9
8
|
*/
|
|
10
|
-
class
|
|
11
|
-
constructor(message) {
|
|
12
|
-
super(message);
|
|
13
|
-
this.
|
|
14
|
-
this.
|
|
9
|
+
class OrValidationError extends token_1.TokenValidationError {
|
|
10
|
+
constructor(value, token, message) {
|
|
11
|
+
super(value, token, message);
|
|
12
|
+
this.value = value;
|
|
13
|
+
this.token = token;
|
|
14
|
+
this.name = 'OrValidationError';
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
exports.
|
|
17
|
+
exports.OrValidationError = OrValidationError;
|
|
18
18
|
class OrToken extends token_1.ComparableToken {
|
|
19
19
|
constructor(val, idx, fac) {
|
|
20
20
|
super(val, idx, fac);
|
|
@@ -80,7 +80,11 @@ class OrToken extends token_1.ComparableToken {
|
|
|
80
80
|
}
|
|
81
81
|
return newSig;
|
|
82
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* @throws {@link OrValidationError}
|
|
85
|
+
*/
|
|
83
86
|
EncodeObject(args, semantic) {
|
|
87
|
+
this.validateJavascriptObject(args);
|
|
84
88
|
const label = Object.keys(args)[0];
|
|
85
89
|
const leftToken = this.createToken(this.val.args[0], this.idx);
|
|
86
90
|
let keyCount = 1;
|
|
@@ -111,7 +115,18 @@ class OrToken extends token_1.ComparableToken {
|
|
|
111
115
|
}
|
|
112
116
|
}
|
|
113
117
|
/**
|
|
114
|
-
* @throws {@link
|
|
118
|
+
* @throws {@link OrValidationError}
|
|
119
|
+
*/
|
|
120
|
+
validateJavascriptObject(args) {
|
|
121
|
+
if (typeof args !== 'object' ||
|
|
122
|
+
Array.isArray(args) ||
|
|
123
|
+
args === null ||
|
|
124
|
+
Object.keys(args).length !== 1) {
|
|
125
|
+
throw new OrValidationError(args, this, `EncodeObject expects an object with a single key but got: ${JSON.stringify(args)}`);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* @throws {@link OrValidationError}
|
|
115
130
|
*/
|
|
116
131
|
Execute(val, semantics) {
|
|
117
132
|
const leftToken = this.createToken(this.val.args[0], this.idx);
|
|
@@ -139,14 +154,14 @@ class OrToken extends token_1.ComparableToken {
|
|
|
139
154
|
};
|
|
140
155
|
}
|
|
141
156
|
else {
|
|
142
|
-
throw new
|
|
157
|
+
throw new OrValidationError(val, this, `Was expecting Left or Right prim but got: ${JSON.stringify(val.prim)}`);
|
|
143
158
|
}
|
|
144
159
|
}
|
|
145
160
|
traversal(getLeftValue, getRightValue, concat) {
|
|
146
161
|
const leftToken = this.createToken(this.val.args[0], this.idx);
|
|
147
162
|
let keyCount = 1;
|
|
148
163
|
let leftValue;
|
|
149
|
-
if (leftToken instanceof OrToken
|
|
164
|
+
if (leftToken instanceof OrToken) {
|
|
150
165
|
leftValue = getLeftValue(leftToken);
|
|
151
166
|
keyCount = Object.keys(leftToken.ExtractSchema()).length;
|
|
152
167
|
}
|
|
@@ -155,7 +170,7 @@ class OrToken extends token_1.ComparableToken {
|
|
|
155
170
|
}
|
|
156
171
|
const rightToken = this.createToken(this.val.args[1], this.idx + keyCount);
|
|
157
172
|
let rightValue;
|
|
158
|
-
if (rightToken instanceof OrToken
|
|
173
|
+
if (rightToken instanceof OrToken) {
|
|
159
174
|
rightValue = getRightValue(rightToken);
|
|
160
175
|
}
|
|
161
176
|
else {
|
|
@@ -175,14 +190,14 @@ class OrToken extends token_1.ComparableToken {
|
|
|
175
190
|
return {
|
|
176
191
|
__michelsonType: OrToken.prim,
|
|
177
192
|
schema: this.traversal((leftToken) => {
|
|
178
|
-
if (leftToken instanceof OrToken
|
|
193
|
+
if (leftToken instanceof OrToken) {
|
|
179
194
|
return leftToken.generateSchema().schema;
|
|
180
195
|
}
|
|
181
196
|
else {
|
|
182
197
|
return leftToken.generateSchema();
|
|
183
198
|
}
|
|
184
199
|
}, (rightToken) => {
|
|
185
|
-
if (rightToken instanceof OrToken
|
|
200
|
+
if (rightToken instanceof OrToken) {
|
|
186
201
|
return rightToken.generateSchema().schema;
|
|
187
202
|
}
|
|
188
203
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"or.js","sourceRoot":"","sources":["../../../src/tokens/or.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"or.js","sourceRoot":"","sources":["../../../src/tokens/or.ts"],"names":[],"mappings":";;;AACA,mCAOiB;AAEjB;;;GAGG;AACH,MAAa,iBAAkB,SAAQ,4BAAoB;IAEzD,YAAmB,KAAU,EAAS,KAAc,EAAE,OAAe;QACnE,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;QADZ,UAAK,GAAL,KAAK,CAAK;QAAS,UAAK,GAAL,KAAK,CAAS;QADpD,SAAI,GAAG,mBAAmB,CAAC;IAG3B,CAAC;CACF;AALD,8CAKC;AAED,MAAa,OAAQ,SAAQ,uBAAe;IAG1C,YACY,GAAiD,EACjD,GAAW,EACX,GAAiB;QAE3B,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;QAJX,QAAG,GAAH,GAAG,CAA8C;QACjD,QAAG,GAAH,GAAG,CAAQ;QACX,QAAG,GAAH,GAAG,CAAc;IAG7B,CAAC;IAEM,MAAM,CAAC,IAAW;QACvB,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAEpC,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QAC/D,IAAI,QAAQ,GAAG,CAAC,CAAC;QACjB,IAAI,SAAS,YAAY,OAAO,EAAE;YAChC,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC,CAAC,MAAM,CAAC;SAC1D;QAED,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,GA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,EAAE;YAChC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SACnB;QACD,IAAI,CAAC,SAAS,CACZ,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,mBAAmB,CAAC,WAAW,EAAE,MAAM,CAAC,EACjE,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,mBAAmB,CAAC,WAAW,EAAE,MAAM,CAAC,EACnE,CAAC,SAAS,EAAE,UAAU,EAAE,EAAE,CAAC,iCACtB,SAAS,GACT,UAAU,EACb,CACH,CAAC;QACF,OAAO,MAAM,CAAC;IAChB,CAAC;;AA1TH,0BA2TC;AA1TQ,YAAI,GAAS,IAAa,CAAC"}
|
package/dist/lib/tokens/pair.js
CHANGED
|
@@ -146,11 +146,11 @@ class PairToken extends token_1.ComparableToken {
|
|
|
146
146
|
const leftToken = this.createToken(args[0], this.idx);
|
|
147
147
|
let keyCount = 1;
|
|
148
148
|
let leftValue;
|
|
149
|
-
if (leftToken instanceof PairToken) {
|
|
150
|
-
keyCount = Object.keys(leftToken.ExtractSchema()).length;
|
|
151
|
-
}
|
|
152
149
|
if (leftToken instanceof PairToken && !leftToken.hasAnnotations()) {
|
|
153
150
|
leftValue = getLeftValue(leftToken);
|
|
151
|
+
if (leftToken instanceof PairToken) {
|
|
152
|
+
keyCount = Object.keys(leftToken.ExtractSchema()).length;
|
|
153
|
+
}
|
|
154
154
|
}
|
|
155
155
|
else {
|
|
156
156
|
leftValue = { [leftToken.annot()]: getLeftValue(leftToken) };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pair.js","sourceRoot":"","sources":["../../../src/tokens/pair.ts"],"names":[],"mappings":";;;AAAA,mCAA2F;AAC3F,6BAA+B;AAG/B,wCAA6C;AAE7C;;;GAGG;AACH,MAAa,4BAA6B,SAAQ,mBAAY;IAE5D,YAAmB,OAAe;QAChC,KAAK,CAAC,OAAO,CAAC,CAAC;QADE,YAAO,GAAP,OAAO,CAAQ;QAD3B,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0;
|
|
4
4
|
// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
|
|
5
5
|
exports.VERSION = {
|
|
6
|
-
"commitHash": "
|
|
7
|
-
"version": "17.
|
|
6
|
+
"commitHash": "a5b3c864e1537d0fe0a7f8f0b55989ef89311fa2",
|
|
7
|
+
"version": "17.3.0"
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=version.js.map
|
|
@@ -420,13 +420,14 @@ BigMapToken.prim = 'big_map';
|
|
|
420
420
|
|
|
421
421
|
/**
|
|
422
422
|
* @category Error
|
|
423
|
-
* @description Error that indicates a failure when
|
|
423
|
+
* @description Error that indicates a failure happening when parsing encoding/executing an OrToken
|
|
424
424
|
*/
|
|
425
|
-
class
|
|
426
|
-
constructor(message) {
|
|
427
|
-
super(message);
|
|
428
|
-
this.
|
|
429
|
-
this.
|
|
425
|
+
class OrValidationError extends TokenValidationError {
|
|
426
|
+
constructor(value, token, message) {
|
|
427
|
+
super(value, token, message);
|
|
428
|
+
this.value = value;
|
|
429
|
+
this.token = token;
|
|
430
|
+
this.name = 'OrValidationError';
|
|
430
431
|
}
|
|
431
432
|
}
|
|
432
433
|
class OrToken extends ComparableToken {
|
|
@@ -494,7 +495,11 @@ class OrToken extends ComparableToken {
|
|
|
494
495
|
}
|
|
495
496
|
return newSig;
|
|
496
497
|
}
|
|
498
|
+
/**
|
|
499
|
+
* @throws {@link OrValidationError}
|
|
500
|
+
*/
|
|
497
501
|
EncodeObject(args, semantic) {
|
|
502
|
+
this.validateJavascriptObject(args);
|
|
498
503
|
const label = Object.keys(args)[0];
|
|
499
504
|
const leftToken = this.createToken(this.val.args[0], this.idx);
|
|
500
505
|
let keyCount = 1;
|
|
@@ -525,7 +530,18 @@ class OrToken extends ComparableToken {
|
|
|
525
530
|
}
|
|
526
531
|
}
|
|
527
532
|
/**
|
|
528
|
-
* @throws {@link
|
|
533
|
+
* @throws {@link OrValidationError}
|
|
534
|
+
*/
|
|
535
|
+
validateJavascriptObject(args) {
|
|
536
|
+
if (typeof args !== 'object' ||
|
|
537
|
+
Array.isArray(args) ||
|
|
538
|
+
args === null ||
|
|
539
|
+
Object.keys(args).length !== 1) {
|
|
540
|
+
throw new OrValidationError(args, this, `EncodeObject expects an object with a single key but got: ${JSON.stringify(args)}`);
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
/**
|
|
544
|
+
* @throws {@link OrValidationError}
|
|
529
545
|
*/
|
|
530
546
|
Execute(val, semantics) {
|
|
531
547
|
const leftToken = this.createToken(this.val.args[0], this.idx);
|
|
@@ -553,14 +569,14 @@ class OrToken extends ComparableToken {
|
|
|
553
569
|
};
|
|
554
570
|
}
|
|
555
571
|
else {
|
|
556
|
-
throw new
|
|
572
|
+
throw new OrValidationError(val, this, `Was expecting Left or Right prim but got: ${JSON.stringify(val.prim)}`);
|
|
557
573
|
}
|
|
558
574
|
}
|
|
559
575
|
traversal(getLeftValue, getRightValue, concat) {
|
|
560
576
|
const leftToken = this.createToken(this.val.args[0], this.idx);
|
|
561
577
|
let keyCount = 1;
|
|
562
578
|
let leftValue;
|
|
563
|
-
if (leftToken instanceof OrToken
|
|
579
|
+
if (leftToken instanceof OrToken) {
|
|
564
580
|
leftValue = getLeftValue(leftToken);
|
|
565
581
|
keyCount = Object.keys(leftToken.ExtractSchema()).length;
|
|
566
582
|
}
|
|
@@ -569,7 +585,7 @@ class OrToken extends ComparableToken {
|
|
|
569
585
|
}
|
|
570
586
|
const rightToken = this.createToken(this.val.args[1], this.idx + keyCount);
|
|
571
587
|
let rightValue;
|
|
572
|
-
if (rightToken instanceof OrToken
|
|
588
|
+
if (rightToken instanceof OrToken) {
|
|
573
589
|
rightValue = getRightValue(rightToken);
|
|
574
590
|
}
|
|
575
591
|
else {
|
|
@@ -589,14 +605,14 @@ class OrToken extends ComparableToken {
|
|
|
589
605
|
return {
|
|
590
606
|
__michelsonType: OrToken.prim,
|
|
591
607
|
schema: this.traversal((leftToken) => {
|
|
592
|
-
if (leftToken instanceof OrToken
|
|
608
|
+
if (leftToken instanceof OrToken) {
|
|
593
609
|
return leftToken.generateSchema().schema;
|
|
594
610
|
}
|
|
595
611
|
else {
|
|
596
612
|
return leftToken.generateSchema();
|
|
597
613
|
}
|
|
598
614
|
}, (rightToken) => {
|
|
599
|
-
if (rightToken instanceof OrToken
|
|
615
|
+
if (rightToken instanceof OrToken) {
|
|
600
616
|
return rightToken.generateSchema().schema;
|
|
601
617
|
}
|
|
602
618
|
else {
|
|
@@ -812,11 +828,11 @@ class PairToken extends ComparableToken {
|
|
|
812
828
|
const leftToken = this.createToken(args[0], this.idx);
|
|
813
829
|
let keyCount = 1;
|
|
814
830
|
let leftValue;
|
|
815
|
-
if (leftToken instanceof PairToken) {
|
|
816
|
-
keyCount = Object.keys(leftToken.ExtractSchema()).length;
|
|
817
|
-
}
|
|
818
831
|
if (leftToken instanceof PairToken && !leftToken.hasAnnotations()) {
|
|
819
832
|
leftValue = getLeftValue(leftToken);
|
|
833
|
+
if (leftToken instanceof PairToken) {
|
|
834
|
+
keyCount = Object.keys(leftToken.ExtractSchema()).length;
|
|
835
|
+
}
|
|
820
836
|
}
|
|
821
837
|
else {
|
|
822
838
|
leftValue = { [leftToken.annot()]: getLeftValue(leftToken) };
|
|
@@ -4287,8 +4303,8 @@ class EventSchema {
|
|
|
4287
4303
|
|
|
4288
4304
|
// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
|
|
4289
4305
|
const VERSION = {
|
|
4290
|
-
"commitHash": "
|
|
4291
|
-
"version": "17.
|
|
4306
|
+
"commitHash": "a5b3c864e1537d0fe0a7f8f0b55989ef89311fa2",
|
|
4307
|
+
"version": "17.3.0"
|
|
4292
4308
|
};
|
|
4293
4309
|
|
|
4294
4310
|
/**
|
|
@@ -4298,5 +4314,5 @@ const VERSION = {
|
|
|
4298
4314
|
const UnitValue = Symbol();
|
|
4299
4315
|
const SaplingStateValue = {};
|
|
4300
4316
|
|
|
4301
|
-
export { AddressValidationError, BigMapEncodingError, BigMapValidationError, BytesValidationError, ChainIDValidationError, ContractValidationError, EncodeTicketError, EventSchema, IntValidationError, InvalidBigMapDiffError, InvalidBigMapSchemaError, InvalidMapTypeError, InvalidRpcResponseError, InvalidScriptError, KeyHashValidationError, KeyValidationError, ListValidationError, MapTypecheckError, MapValidationError, MichelsonMap, MissingArgumentError, MutezValidationError, NatValidationError,
|
|
4317
|
+
export { AddressValidationError, BigMapEncodingError, BigMapValidationError, BytesValidationError, ChainIDValidationError, ContractValidationError, EncodeTicketError, EventSchema, IntValidationError, InvalidBigMapDiffError, InvalidBigMapSchemaError, InvalidMapTypeError, InvalidRpcResponseError, InvalidScriptError, KeyHashValidationError, KeyValidationError, ListValidationError, MapTypecheckError, MapValidationError, MichelsonMap, MissingArgumentError, MutezValidationError, NatValidationError, OrValidationError, ParameterEncodingError, ParameterSchema, SaplingStateValue, Schema, SetValidationError, SignatureValidationError, StorageEncodingError, Token, TokenArgumentValidationError, TokenComparisonError, UnitValue, VERSION, ViewSchema, deepEqual };
|
|
4302
4318
|
//# sourceMappingURL=taquito-michelson-encoder.es6.js.map
|