@taquito/michelson-encoder 23.0.2 → 23.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/constants.js +11 -0
- package/dist/lib/michelson-map.js +8 -14
- package/dist/lib/schema/parameter.js +1 -8
- package/dist/lib/schema/storage.js +18 -25
- package/dist/lib/schema/view-schema.js +2 -2
- package/dist/lib/taquito-michelson-encoder.js +3 -2
- package/dist/lib/tokens/bigmap.js +0 -12
- package/dist/lib/tokens/bls12-381-fr.js +0 -7
- package/dist/lib/tokens/bls12-381-g1.js +0 -7
- package/dist/lib/tokens/bls12-381-g2.js +0 -7
- package/dist/lib/tokens/chain-id.js +0 -7
- package/dist/lib/tokens/chest-key.js +0 -7
- package/dist/lib/tokens/chest.js +0 -7
- package/dist/lib/tokens/comparable/address.js +0 -7
- package/dist/lib/tokens/comparable/bool.js +0 -7
- package/dist/lib/tokens/comparable/bytes.js +0 -7
- package/dist/lib/tokens/comparable/int.js +0 -7
- package/dist/lib/tokens/comparable/key_hash.js +0 -7
- package/dist/lib/tokens/comparable/mutez.js +0 -7
- package/dist/lib/tokens/comparable/nat.js +0 -7
- package/dist/lib/tokens/comparable/string.js +0 -7
- package/dist/lib/tokens/comparable/timestamp.js +0 -7
- package/dist/lib/tokens/constant.js +0 -7
- package/dist/lib/tokens/contract.js +0 -7
- package/dist/lib/tokens/key.js +10 -29
- package/dist/lib/tokens/lambda.js +0 -12
- package/dist/lib/tokens/list.js +0 -9
- package/dist/lib/tokens/map.js +0 -12
- package/dist/lib/tokens/never.js +0 -7
- package/dist/lib/tokens/operation.js +0 -7
- package/dist/lib/tokens/option.js +0 -7
- package/dist/lib/tokens/or.js +7 -13
- package/dist/lib/tokens/pair.js +3 -10
- package/dist/lib/tokens/sapling-state.js +0 -11
- package/dist/lib/tokens/sapling-transaction-deprecated.js +0 -11
- package/dist/lib/tokens/sapling-transaction.js +0 -11
- package/dist/lib/tokens/set.js +0 -7
- package/dist/lib/tokens/signature.js +0 -7
- package/dist/lib/tokens/ticket-deprecated.js +0 -11
- package/dist/lib/tokens/ticket.js +0 -11
- package/dist/lib/tokens/token.js +1 -1
- package/dist/lib/tokens/unit.js +3 -10
- package/dist/lib/version.js +2 -2
- package/dist/taquito-michelson-encoder.es6.js +63 -374
- package/dist/taquito-michelson-encoder.es6.js.map +1 -1
- package/dist/taquito-michelson-encoder.umd.js +65 -376
- package/dist/taquito-michelson-encoder.umd.js.map +1 -1
- package/dist/types/constants.d.ts +8 -0
- package/dist/types/schema/parameter.d.ts +1 -6
- package/dist/types/schema/storage.d.ts +8 -12
- package/dist/types/schema/view-schema.d.ts +2 -2
- package/dist/types/taquito-michelson-encoder.d.ts +1 -2
- package/dist/types/tokens/bigmap.d.ts +0 -10
- package/dist/types/tokens/bls12-381-fr.d.ts +0 -5
- package/dist/types/tokens/bls12-381-g1.d.ts +0 -5
- package/dist/types/tokens/bls12-381-g2.d.ts +0 -5
- package/dist/types/tokens/chain-id.d.ts +0 -5
- package/dist/types/tokens/chest-key.d.ts +0 -5
- package/dist/types/tokens/chest.d.ts +0 -5
- package/dist/types/tokens/comparable/address.d.ts +0 -5
- package/dist/types/tokens/comparable/bool.d.ts +0 -5
- package/dist/types/tokens/comparable/bytes.d.ts +0 -5
- package/dist/types/tokens/comparable/int.d.ts +0 -5
- package/dist/types/tokens/comparable/key_hash.d.ts +0 -5
- package/dist/types/tokens/comparable/mutez.d.ts +0 -5
- package/dist/types/tokens/comparable/nat.d.ts +0 -5
- package/dist/types/tokens/comparable/string.d.ts +0 -5
- package/dist/types/tokens/comparable/timestamp.d.ts +0 -5
- package/dist/types/tokens/constant.d.ts +0 -5
- package/dist/types/tokens/contract.d.ts +0 -5
- package/dist/types/tokens/key.d.ts +0 -6
- package/dist/types/tokens/lambda.d.ts +0 -10
- package/dist/types/tokens/list.d.ts +0 -7
- package/dist/types/tokens/map.d.ts +0 -10
- package/dist/types/tokens/never.d.ts +0 -5
- package/dist/types/tokens/operation.d.ts +0 -5
- package/dist/types/tokens/option.d.ts +1 -8
- package/dist/types/tokens/or.d.ts +0 -5
- package/dist/types/tokens/pair.d.ts +0 -5
- package/dist/types/tokens/sapling-state.d.ts +0 -9
- package/dist/types/tokens/sapling-transaction-deprecated.d.ts +0 -9
- package/dist/types/tokens/sapling-transaction.d.ts +0 -9
- package/dist/types/tokens/set.d.ts +0 -5
- package/dist/types/tokens/signature.d.ts +0 -5
- package/dist/types/tokens/ticket-deprecated.d.ts +0 -9
- package/dist/types/tokens/ticket.d.ts +0 -9
- package/dist/types/tokens/token.d.ts +1 -6
- package/dist/types/tokens/unit.d.ts +0 -5
- package/package.json +9 -8
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('fast-json-stable-stringify'), require('@taquito/core'), require('bignumber.js'), require('@taquito/utils'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'fast-json-stable-stringify', '@taquito/core', 'bignumber.js', '@taquito/utils', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.taquitoMichelsonEncoder = {}, global.stringify, global.
|
|
5
|
-
})(this, (function (exports, stringify, core, BigNumber, utils,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('fast-json-stable-stringify'), require('@taquito/core'), require('bignumber.js'), require('@taquito/utils'), require('@taquito/signer')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'fast-json-stable-stringify', '@taquito/core', 'bignumber.js', '@taquito/utils', '@taquito/signer'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.taquitoMichelsonEncoder = {}, global.stringify, global.taquitoCore, global.BigNumber, global.taquitoUtils, global.signer));
|
|
5
|
+
})(this, (function (exports, stringify, core, BigNumber, utils, signer) { 'use strict';
|
|
6
6
|
|
|
7
7
|
var _a$1;
|
|
8
8
|
/**
|
|
@@ -100,35 +100,29 @@
|
|
|
100
100
|
if (!this.keySchema) {
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
103
|
-
this.keySchema.Typecheck(key)
|
|
103
|
+
if (!this.keySchema.Typecheck(key)) {
|
|
104
|
+
throw new MapTypecheckError(key, this.keySchema, 'key', 'Type validation failed');
|
|
105
|
+
}
|
|
104
106
|
}
|
|
105
107
|
typecheckValue(value) {
|
|
106
108
|
if (!this.valueSchema) {
|
|
107
109
|
return;
|
|
108
110
|
}
|
|
109
|
-
this.valueSchema.Typecheck(value)
|
|
111
|
+
if (!this.valueSchema.Typecheck(value)) {
|
|
112
|
+
throw new MapTypecheckError(value, this.valueSchema, 'value', 'Type validation failed');
|
|
113
|
+
}
|
|
110
114
|
}
|
|
111
115
|
/**
|
|
112
116
|
* @throws {@link MapTypecheckError} when the argument passed does not match the expected schema for value
|
|
113
117
|
*/
|
|
114
118
|
assertTypecheckValue(value) {
|
|
115
|
-
|
|
116
|
-
this.typecheckValue(value);
|
|
117
|
-
}
|
|
118
|
-
catch (e) {
|
|
119
|
-
throw new MapTypecheckError(value, this.valueSchema, 'value', e);
|
|
120
|
-
}
|
|
119
|
+
this.typecheckValue(value);
|
|
121
120
|
}
|
|
122
121
|
/**
|
|
123
122
|
* @throws {@link MapTypecheckError} when the argument passed does not match the expected schema for key
|
|
124
123
|
*/
|
|
125
124
|
assertTypecheckKey(key) {
|
|
126
|
-
|
|
127
|
-
this.typecheckKey(key);
|
|
128
|
-
}
|
|
129
|
-
catch (e) {
|
|
130
|
-
throw new MapTypecheckError(key, this.keySchema, 'key', e);
|
|
131
|
-
}
|
|
125
|
+
this.typecheckKey(key);
|
|
132
126
|
}
|
|
133
127
|
serializeDeterministically(key) {
|
|
134
128
|
return stringify(key);
|
|
@@ -284,7 +278,7 @@
|
|
|
284
278
|
return this.val;
|
|
285
279
|
}
|
|
286
280
|
ExtractSignature() {
|
|
287
|
-
return [[this.
|
|
281
|
+
return [[this.generateSchema()]];
|
|
288
282
|
}
|
|
289
283
|
}
|
|
290
284
|
Token._fieldNumberingStrategy = 'Latest';
|
|
@@ -319,18 +313,6 @@
|
|
|
319
313
|
get KeySchema() {
|
|
320
314
|
return this.createToken(this.val.args[0], 0);
|
|
321
315
|
}
|
|
322
|
-
/**
|
|
323
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
324
|
-
*
|
|
325
|
-
*/
|
|
326
|
-
ExtractSchema() {
|
|
327
|
-
return {
|
|
328
|
-
big_map: {
|
|
329
|
-
key: this.KeySchema.ExtractSchema(),
|
|
330
|
-
value: this.ValueSchema.ExtractSchema(),
|
|
331
|
-
},
|
|
332
|
-
};
|
|
333
|
-
}
|
|
334
316
|
generateSchema() {
|
|
335
317
|
return {
|
|
336
318
|
__michelsonType: BigMapToken.prim,
|
|
@@ -455,7 +437,7 @@
|
|
|
455
437
|
const leftToken = this.createToken(this.val.args[0], this.getIdxForChildren(), 'Or');
|
|
456
438
|
let keyCount = 1;
|
|
457
439
|
if (leftToken instanceof OrToken) {
|
|
458
|
-
keyCount = Object.keys(leftToken.
|
|
440
|
+
keyCount = Object.keys(leftToken.generateSchema().schema).length;
|
|
459
441
|
}
|
|
460
442
|
const rightToken = this.createToken(this.val.args[1], this.getIdxForChildren() + keyCount, 'Or');
|
|
461
443
|
if (String(leftToken.annot()) === String(label) && !(leftToken instanceof OrToken)) {
|
|
@@ -486,7 +468,7 @@
|
|
|
486
468
|
const leftToken = this.createToken(this.val.args[0], this.getIdxForChildren(), 'Or');
|
|
487
469
|
let keyCount = 1;
|
|
488
470
|
if (leftToken instanceof OrToken) {
|
|
489
|
-
keyCount = Object.keys(leftToken.
|
|
471
|
+
keyCount = Object.keys(leftToken.generateSchema().schema).length;
|
|
490
472
|
}
|
|
491
473
|
const rightToken = this.createToken(this.val.args[1], this.getIdxForChildren() + keyCount, 'Or');
|
|
492
474
|
const newSig = [];
|
|
@@ -517,7 +499,7 @@
|
|
|
517
499
|
const leftToken = this.createToken(this.val.args[0], this.getIdxForChildren(), 'Or');
|
|
518
500
|
let keyCount = 1;
|
|
519
501
|
if (leftToken instanceof OrToken) {
|
|
520
|
-
keyCount = Object.keys(leftToken.
|
|
502
|
+
keyCount = Object.keys(leftToken.generateSchema().schema).length;
|
|
521
503
|
}
|
|
522
504
|
const rightToken = this.createToken(this.val.args[1], this.getIdxForChildren() + keyCount, 'Or');
|
|
523
505
|
if (String(leftToken.annot()) === String(label) && !(leftToken instanceof OrToken)) {
|
|
@@ -560,7 +542,7 @@
|
|
|
560
542
|
const leftToken = this.createToken(this.val.args[0], this.getIdxForChildren(), 'Or');
|
|
561
543
|
let keyCount = 1;
|
|
562
544
|
if (leftToken instanceof OrToken) {
|
|
563
|
-
keyCount = Object.keys(leftToken.
|
|
545
|
+
keyCount = Object.keys(leftToken.generateSchema().schema).length;
|
|
564
546
|
}
|
|
565
547
|
const rightToken = this.createToken(this.val.args[1], this.getIdxForChildren() + keyCount, 'Or');
|
|
566
548
|
if (val.prim === 'Right') {
|
|
@@ -591,7 +573,7 @@
|
|
|
591
573
|
let leftValue;
|
|
592
574
|
if (leftToken instanceof OrToken) {
|
|
593
575
|
leftValue = getLeftValue(leftToken);
|
|
594
|
-
keyCount = Object.keys(leftToken.
|
|
576
|
+
keyCount = Object.keys(leftToken.generateSchema().schema).length;
|
|
595
577
|
}
|
|
596
578
|
else {
|
|
597
579
|
leftValue = { [leftToken.annot()]: getLeftValue(leftToken) };
|
|
@@ -607,13 +589,6 @@
|
|
|
607
589
|
const res = concat(leftValue, rightValue);
|
|
608
590
|
return res;
|
|
609
591
|
}
|
|
610
|
-
/**
|
|
611
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
612
|
-
*
|
|
613
|
-
*/
|
|
614
|
-
ExtractSchema() {
|
|
615
|
-
return this.traversal((leftToken) => leftToken.ExtractSchema(), (rightToken) => rightToken.ExtractSchema(), (leftValue, rightValue) => (Object.assign(Object.assign({}, leftValue), rightValue)));
|
|
616
|
-
}
|
|
617
592
|
generateSchema() {
|
|
618
593
|
return {
|
|
619
594
|
__michelsonType: OrToken.prim,
|
|
@@ -638,7 +613,8 @@
|
|
|
638
613
|
const leftToken = this.createToken(this.val.args[0], this.getIdxForChildren(), 'Or');
|
|
639
614
|
let keyCount = 1;
|
|
640
615
|
if (leftToken instanceof OrToken) {
|
|
641
|
-
|
|
616
|
+
const schema = leftToken.generateSchema();
|
|
617
|
+
keyCount = Object.keys(schema.schema).length;
|
|
642
618
|
}
|
|
643
619
|
const rightToken = this.createToken(this.val.args[1], this.getIdxForChildren() + keyCount, 'Or');
|
|
644
620
|
if (String(leftToken.annot()) === String(label) &&
|
|
@@ -779,7 +755,7 @@
|
|
|
779
755
|
return this.args().map((a) => {
|
|
780
756
|
const tok = this.createToken(a, this.getIdxForChildren() + cnt, 'Pair');
|
|
781
757
|
if (tok instanceof PairToken) {
|
|
782
|
-
cnt += Object.keys(tok.
|
|
758
|
+
cnt += Object.keys(tok.generateSchema()).length;
|
|
783
759
|
}
|
|
784
760
|
else {
|
|
785
761
|
cnt++;
|
|
@@ -798,7 +774,7 @@
|
|
|
798
774
|
const leftToken = this.createToken(args[0], this.getIdxForChildren(), 'Pair');
|
|
799
775
|
let keyCount = 1;
|
|
800
776
|
if (leftToken instanceof OrToken) {
|
|
801
|
-
keyCount = Object.keys(leftToken.
|
|
777
|
+
keyCount = Object.keys(leftToken.generateSchema()).length;
|
|
802
778
|
}
|
|
803
779
|
const rightToken = this.createToken(args[1], this.getIdxForChildren() + keyCount, 'Pair');
|
|
804
780
|
const newSig = [];
|
|
@@ -850,7 +826,7 @@
|
|
|
850
826
|
if (leftToken instanceof PairToken && !leftToken.hasAnnotations()) {
|
|
851
827
|
leftValue = getLeftValue(leftToken);
|
|
852
828
|
if (leftToken instanceof PairToken) {
|
|
853
|
-
keyCount = Object.keys(leftToken.
|
|
829
|
+
keyCount = Object.keys(leftToken.generateSchema()).length;
|
|
854
830
|
}
|
|
855
831
|
}
|
|
856
832
|
else {
|
|
@@ -871,13 +847,6 @@
|
|
|
871
847
|
const args = collapse$1(val, 'Pair');
|
|
872
848
|
return this.traversal((leftToken) => leftToken.Execute(args[0], semantics), (rightToken) => rightToken.Execute(args[1], semantics));
|
|
873
849
|
}
|
|
874
|
-
/**
|
|
875
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
876
|
-
*
|
|
877
|
-
*/
|
|
878
|
-
ExtractSchema() {
|
|
879
|
-
return this.traversal((leftToken) => leftToken.ExtractSchema(), (rightToken) => rightToken.ExtractSchema());
|
|
880
|
-
}
|
|
881
850
|
generateSchema() {
|
|
882
851
|
return {
|
|
883
852
|
__michelsonType: PairToken.prim,
|
|
@@ -988,13 +957,6 @@
|
|
|
988
957
|
}
|
|
989
958
|
return { int: new BigNumber(val).toFixed() };
|
|
990
959
|
}
|
|
991
|
-
/**
|
|
992
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
993
|
-
*
|
|
994
|
-
*/
|
|
995
|
-
ExtractSchema() {
|
|
996
|
-
return NatToken.prim;
|
|
997
|
-
}
|
|
998
960
|
generateSchema() {
|
|
999
961
|
return {
|
|
1000
962
|
__michelsonType: NatToken.prim,
|
|
@@ -1037,13 +999,6 @@
|
|
|
1037
999
|
Execute(val) {
|
|
1038
1000
|
return val[Object.keys(val)[0]];
|
|
1039
1001
|
}
|
|
1040
|
-
/**
|
|
1041
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
1042
|
-
*
|
|
1043
|
-
*/
|
|
1044
|
-
ExtractSchema() {
|
|
1045
|
-
return StringToken.prim;
|
|
1046
|
-
}
|
|
1047
1002
|
generateSchema() {
|
|
1048
1003
|
return {
|
|
1049
1004
|
__michelsonType: StringToken.prim,
|
|
@@ -1145,13 +1100,6 @@
|
|
|
1145
1100
|
}
|
|
1146
1101
|
return utils.encodeAddress(val.bytes);
|
|
1147
1102
|
}
|
|
1148
|
-
/**
|
|
1149
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
1150
|
-
*
|
|
1151
|
-
*/
|
|
1152
|
-
ExtractSchema() {
|
|
1153
|
-
return AddressToken.prim;
|
|
1154
|
-
}
|
|
1155
1103
|
generateSchema() {
|
|
1156
1104
|
return {
|
|
1157
1105
|
__michelsonType: AddressToken.prim,
|
|
@@ -1281,18 +1229,6 @@
|
|
|
1281
1229
|
};
|
|
1282
1230
|
});
|
|
1283
1231
|
}
|
|
1284
|
-
/**
|
|
1285
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
1286
|
-
*
|
|
1287
|
-
*/
|
|
1288
|
-
ExtractSchema() {
|
|
1289
|
-
return {
|
|
1290
|
-
map: {
|
|
1291
|
-
key: this.KeySchema.ExtractSchema(),
|
|
1292
|
-
value: this.ValueSchema.ExtractSchema(),
|
|
1293
|
-
},
|
|
1294
|
-
};
|
|
1295
|
-
}
|
|
1296
1232
|
generateSchema() {
|
|
1297
1233
|
return {
|
|
1298
1234
|
__michelsonType: MapToken.prim,
|
|
@@ -1333,13 +1269,6 @@
|
|
|
1333
1269
|
}
|
|
1334
1270
|
return { prim: val ? 'True' : 'False' };
|
|
1335
1271
|
}
|
|
1336
|
-
/**
|
|
1337
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
1338
|
-
*
|
|
1339
|
-
*/
|
|
1340
|
-
ExtractSchema() {
|
|
1341
|
-
return BoolToken.prim;
|
|
1342
|
-
}
|
|
1343
1272
|
generateSchema() {
|
|
1344
1273
|
return {
|
|
1345
1274
|
__michelsonType: BoolToken.prim,
|
|
@@ -1437,13 +1366,6 @@
|
|
|
1437
1366
|
}
|
|
1438
1367
|
return { string: val };
|
|
1439
1368
|
}
|
|
1440
|
-
/**
|
|
1441
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
1442
|
-
*
|
|
1443
|
-
*/
|
|
1444
|
-
ExtractSchema() {
|
|
1445
|
-
return ContractToken.prim;
|
|
1446
|
-
}
|
|
1447
1369
|
generateSchema() {
|
|
1448
1370
|
const valueSchema = this.createToken(this.val.args[0], 0);
|
|
1449
1371
|
return {
|
|
@@ -1526,15 +1448,6 @@
|
|
|
1526
1448
|
return [...prev, schema.EncodeObject(current)];
|
|
1527
1449
|
}, []);
|
|
1528
1450
|
}
|
|
1529
|
-
/**
|
|
1530
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
1531
|
-
*
|
|
1532
|
-
*/
|
|
1533
|
-
ExtractSchema() {
|
|
1534
|
-
return {
|
|
1535
|
-
[ListToken.prim]: this.valueSchema.ExtractSchema(),
|
|
1536
|
-
};
|
|
1537
|
-
}
|
|
1538
1451
|
generateSchema() {
|
|
1539
1452
|
return {
|
|
1540
1453
|
__michelsonType: ListToken.prim,
|
|
@@ -1573,13 +1486,6 @@
|
|
|
1573
1486
|
Execute(val) {
|
|
1574
1487
|
return new BigNumber(val[Object.keys(val)[0]]);
|
|
1575
1488
|
}
|
|
1576
|
-
/**
|
|
1577
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
1578
|
-
*
|
|
1579
|
-
*/
|
|
1580
|
-
ExtractSchema() {
|
|
1581
|
-
return MutezToken.prim;
|
|
1582
|
-
}
|
|
1583
1489
|
generateSchema() {
|
|
1584
1490
|
return {
|
|
1585
1491
|
__michelsonType: MutezToken.prim,
|
|
@@ -1702,13 +1608,6 @@
|
|
|
1702
1608
|
Execute(val) {
|
|
1703
1609
|
return val.bytes;
|
|
1704
1610
|
}
|
|
1705
|
-
/**
|
|
1706
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
1707
|
-
*
|
|
1708
|
-
*/
|
|
1709
|
-
ExtractSchema() {
|
|
1710
|
-
return BytesToken.prim;
|
|
1711
|
-
}
|
|
1712
1611
|
generateSchema() {
|
|
1713
1612
|
return {
|
|
1714
1613
|
__michelsonType: BytesToken.prim,
|
|
@@ -1774,13 +1673,6 @@
|
|
|
1774
1673
|
}
|
|
1775
1674
|
return { Some: this.schema().Execute(val.args[0], semantics) };
|
|
1776
1675
|
}
|
|
1777
|
-
/**
|
|
1778
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
1779
|
-
*
|
|
1780
|
-
*/
|
|
1781
|
-
ExtractSchema() {
|
|
1782
|
-
return { Some: this.schema().ExtractSchema() };
|
|
1783
|
-
}
|
|
1784
1676
|
generateSchema() {
|
|
1785
1677
|
return {
|
|
1786
1678
|
__michelsonType: OptionToken.prim,
|
|
@@ -1859,13 +1751,6 @@
|
|
|
1859
1751
|
return { string: val };
|
|
1860
1752
|
}
|
|
1861
1753
|
}
|
|
1862
|
-
/**
|
|
1863
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
1864
|
-
*
|
|
1865
|
-
*/
|
|
1866
|
-
ExtractSchema() {
|
|
1867
|
-
return TimestampToken.prim;
|
|
1868
|
-
}
|
|
1869
1754
|
generateSchema() {
|
|
1870
1755
|
return {
|
|
1871
1756
|
__michelsonType: TimestampToken.prim,
|
|
@@ -1912,13 +1797,6 @@
|
|
|
1912
1797
|
Execute(val) {
|
|
1913
1798
|
return new BigNumber(val[Object.keys(val)[0]]);
|
|
1914
1799
|
}
|
|
1915
|
-
/**
|
|
1916
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
1917
|
-
*
|
|
1918
|
-
*/
|
|
1919
|
-
ExtractSchema() {
|
|
1920
|
-
return IntToken.prim;
|
|
1921
|
-
}
|
|
1922
1800
|
generateSchema() {
|
|
1923
1801
|
return {
|
|
1924
1802
|
__michelsonType: IntToken.prim,
|
|
@@ -1978,6 +1856,15 @@
|
|
|
1978
1856
|
}
|
|
1979
1857
|
IntToken.prim = 'int';
|
|
1980
1858
|
|
|
1859
|
+
/**
|
|
1860
|
+
* Symbol representing Unit value in Michelson
|
|
1861
|
+
*/
|
|
1862
|
+
const UnitValue = Symbol();
|
|
1863
|
+
/**
|
|
1864
|
+
* Sapling state placeholder value
|
|
1865
|
+
*/
|
|
1866
|
+
const SaplingStateValue = {};
|
|
1867
|
+
|
|
1981
1868
|
class UnitToken extends ComparableToken {
|
|
1982
1869
|
constructor(val, idx, fac) {
|
|
1983
1870
|
super(val, idx, fac);
|
|
@@ -1998,13 +1885,6 @@
|
|
|
1998
1885
|
Execute(_val) {
|
|
1999
1886
|
return UnitValue;
|
|
2000
1887
|
}
|
|
2001
|
-
/**
|
|
2002
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
2003
|
-
*
|
|
2004
|
-
*/
|
|
2005
|
-
ExtractSchema() {
|
|
2006
|
-
return UnitToken.prim;
|
|
2007
|
-
}
|
|
2008
1888
|
generateSchema() {
|
|
2009
1889
|
return {
|
|
2010
1890
|
__michelsonType: UnitToken.prim,
|
|
@@ -2032,7 +1912,6 @@
|
|
|
2032
1912
|
}
|
|
2033
1913
|
UnitToken.prim = 'unit';
|
|
2034
1914
|
|
|
2035
|
-
const ec = new elliptic.ec('p256');
|
|
2036
1915
|
/**
|
|
2037
1916
|
* @category Error
|
|
2038
1917
|
* @description Error that indicates a failure happening when parsing encoding/executing a Key
|
|
@@ -2084,13 +1963,6 @@
|
|
|
2084
1963
|
}
|
|
2085
1964
|
return { string: val };
|
|
2086
1965
|
}
|
|
2087
|
-
/**
|
|
2088
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
2089
|
-
*
|
|
2090
|
-
*/
|
|
2091
|
-
ExtractSchema() {
|
|
2092
|
-
return KeyToken.prim;
|
|
2093
|
-
}
|
|
2094
1966
|
generateSchema() {
|
|
2095
1967
|
return {
|
|
2096
1968
|
__michelsonType: KeyToken.prim,
|
|
@@ -2106,31 +1978,20 @@
|
|
|
2106
1978
|
type: { prim: KeyToken.prim },
|
|
2107
1979
|
};
|
|
2108
1980
|
}
|
|
2109
|
-
decompressP256PublicKey(compressedKey) {
|
|
2110
|
-
const compressedArray = Array.from(compressedKey);
|
|
2111
|
-
const keyPair = ec.keyFromPublic(compressedArray);
|
|
2112
|
-
const publicKey = keyPair.getPublic();
|
|
2113
|
-
const uncompressedArray = publicKey.encode('array', false);
|
|
2114
|
-
return Buffer.concat([new Uint8Array([0x02]), new Uint8Array(uncompressedArray)]); // add back prefix 0x02
|
|
2115
|
-
}
|
|
2116
1981
|
compare(key1, key2) {
|
|
2117
|
-
const
|
|
2118
|
-
const
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
if (bytes1[0] ===
|
|
2122
|
-
|
|
2123
|
-
}
|
|
2124
|
-
else {
|
|
2125
|
-
|
|
2126
|
-
}
|
|
2127
|
-
if (bytes2[0] === 0x02) {
|
|
2128
|
-
array2 = this.decompressP256PublicKey(bytes2.slice(1)); // remove prefix 0x02
|
|
1982
|
+
const publicKey1 = signer.publicKeyFromString(key1);
|
|
1983
|
+
const publicKey2 = signer.publicKeyFromString(key2);
|
|
1984
|
+
const bytes1 = publicKey1.toProtocol();
|
|
1985
|
+
const bytes2 = publicKey2.toProtocol();
|
|
1986
|
+
if (bytes1[0] === bytes2[0]) {
|
|
1987
|
+
return publicKey1.compare(publicKey2);
|
|
1988
|
+
}
|
|
1989
|
+
else if (bytes1[0] > bytes2[0]) {
|
|
1990
|
+
return 1;
|
|
2129
1991
|
}
|
|
2130
1992
|
else {
|
|
2131
|
-
|
|
1993
|
+
return -1;
|
|
2132
1994
|
}
|
|
2133
|
-
return utils.compareArrays(array1, array2);
|
|
2134
1995
|
}
|
|
2135
1996
|
findAndReturnTokens(tokenToFind, tokens) {
|
|
2136
1997
|
if (KeyToken.prim === tokenToFind) {
|
|
@@ -2192,13 +2053,6 @@
|
|
|
2192
2053
|
}
|
|
2193
2054
|
return { string: val };
|
|
2194
2055
|
}
|
|
2195
|
-
/**
|
|
2196
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
2197
|
-
*
|
|
2198
|
-
*/
|
|
2199
|
-
ExtractSchema() {
|
|
2200
|
-
return KeyHashToken.prim;
|
|
2201
|
-
}
|
|
2202
2056
|
generateSchema() {
|
|
2203
2057
|
return {
|
|
2204
2058
|
__michelsonType: KeyHashToken.prim,
|
|
@@ -2284,13 +2138,6 @@
|
|
|
2284
2138
|
}
|
|
2285
2139
|
return { string: val };
|
|
2286
2140
|
}
|
|
2287
|
-
/**
|
|
2288
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
2289
|
-
*
|
|
2290
|
-
*/
|
|
2291
|
-
ExtractSchema() {
|
|
2292
|
-
return SignatureToken.prim;
|
|
2293
|
-
}
|
|
2294
2141
|
generateSchema() {
|
|
2295
2142
|
return {
|
|
2296
2143
|
__michelsonType: SignatureToken.prim,
|
|
@@ -2346,18 +2193,6 @@
|
|
|
2346
2193
|
}
|
|
2347
2194
|
return val;
|
|
2348
2195
|
}
|
|
2349
|
-
/**
|
|
2350
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
2351
|
-
*
|
|
2352
|
-
*/
|
|
2353
|
-
ExtractSchema() {
|
|
2354
|
-
return {
|
|
2355
|
-
[LambdaToken.prim]: {
|
|
2356
|
-
parameters: this.paramSchema.ExtractSchema(),
|
|
2357
|
-
returns: this.returnSchema.ExtractSchema(),
|
|
2358
|
-
},
|
|
2359
|
-
};
|
|
2360
|
-
}
|
|
2361
2196
|
generateSchema() {
|
|
2362
2197
|
return {
|
|
2363
2198
|
__michelsonType: LambdaToken.prim,
|
|
@@ -2398,13 +2233,6 @@
|
|
|
2398
2233
|
}
|
|
2399
2234
|
return { string: val };
|
|
2400
2235
|
}
|
|
2401
|
-
/**
|
|
2402
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
2403
|
-
*
|
|
2404
|
-
*/
|
|
2405
|
-
ExtractSchema() {
|
|
2406
|
-
return OperationToken.prim;
|
|
2407
|
-
}
|
|
2408
2236
|
generateSchema() {
|
|
2409
2237
|
return {
|
|
2410
2238
|
__michelsonType: OperationToken.prim,
|
|
@@ -2481,13 +2309,6 @@
|
|
|
2481
2309
|
return [...prev, this.KeySchema.EncodeObject(current)];
|
|
2482
2310
|
}, []);
|
|
2483
2311
|
}
|
|
2484
|
-
/**
|
|
2485
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
2486
|
-
*
|
|
2487
|
-
*/
|
|
2488
|
-
ExtractSchema() {
|
|
2489
|
-
return SetToken.prim;
|
|
2490
|
-
}
|
|
2491
2312
|
generateSchema() {
|
|
2492
2313
|
return {
|
|
2493
2314
|
__michelsonType: SetToken.prim,
|
|
@@ -2534,13 +2355,6 @@
|
|
|
2534
2355
|
Execute(val) {
|
|
2535
2356
|
return val[Object.keys(val)[0]];
|
|
2536
2357
|
}
|
|
2537
|
-
/**
|
|
2538
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
2539
|
-
*
|
|
2540
|
-
*/
|
|
2541
|
-
ExtractSchema() {
|
|
2542
|
-
return ChainIDToken.prim;
|
|
2543
|
-
}
|
|
2544
2358
|
generateSchema() {
|
|
2545
2359
|
return {
|
|
2546
2360
|
__michelsonType: ChainIDToken.prim,
|
|
@@ -2641,17 +2455,6 @@
|
|
|
2641
2455
|
amount: amount.Execute(val.args[2], semantics),
|
|
2642
2456
|
};
|
|
2643
2457
|
}
|
|
2644
|
-
/**
|
|
2645
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
2646
|
-
*
|
|
2647
|
-
*/
|
|
2648
|
-
ExtractSchema() {
|
|
2649
|
-
return {
|
|
2650
|
-
ticketer: ContractToken.prim,
|
|
2651
|
-
value: this.valueToken.ExtractSchema(),
|
|
2652
|
-
amount: IntToken.prim,
|
|
2653
|
-
};
|
|
2654
|
-
}
|
|
2655
2458
|
generateSchema() {
|
|
2656
2459
|
return {
|
|
2657
2460
|
__michelsonType: TicketToken.prim,
|
|
@@ -2736,17 +2539,6 @@
|
|
|
2736
2539
|
amount: amount.Execute(val.args[2], semantics),
|
|
2737
2540
|
};
|
|
2738
2541
|
}
|
|
2739
|
-
/**
|
|
2740
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
2741
|
-
*
|
|
2742
|
-
*/
|
|
2743
|
-
ExtractSchema() {
|
|
2744
|
-
return {
|
|
2745
|
-
ticketer: ContractToken.prim,
|
|
2746
|
-
value: this.valueToken.ExtractSchema(),
|
|
2747
|
-
amount: IntToken.prim,
|
|
2748
|
-
};
|
|
2749
|
-
}
|
|
2750
2542
|
generateSchema() {
|
|
2751
2543
|
return {
|
|
2752
2544
|
__michelsonType: TicketDeprecatedToken.prim,
|
|
@@ -2814,13 +2606,6 @@
|
|
|
2814
2606
|
Execute(val) {
|
|
2815
2607
|
throw new NeverTokenError(val, this, `There is no literal value for the type never. Trying to execute ${JSON.stringify(val)}.`);
|
|
2816
2608
|
}
|
|
2817
|
-
/**
|
|
2818
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
2819
|
-
*
|
|
2820
|
-
*/
|
|
2821
|
-
ExtractSchema() {
|
|
2822
|
-
return NeverToken.prim;
|
|
2823
|
-
}
|
|
2824
2609
|
generateSchema() {
|
|
2825
2610
|
return {
|
|
2826
2611
|
__michelsonType: NeverToken.prim,
|
|
@@ -2898,17 +2683,6 @@
|
|
|
2898
2683
|
throw new SaplingStateValidationError(val, this, `Invalid sapling_state. Received: ${JSON.stringify(val)} while expecting: {}`);
|
|
2899
2684
|
}
|
|
2900
2685
|
}
|
|
2901
|
-
/**
|
|
2902
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
2903
|
-
*
|
|
2904
|
-
*/
|
|
2905
|
-
ExtractSchema() {
|
|
2906
|
-
return {
|
|
2907
|
-
[SaplingStateToken.prim]: {
|
|
2908
|
-
'memo-size': Number(this.val.args[0]['int']),
|
|
2909
|
-
},
|
|
2910
|
-
};
|
|
2911
|
-
}
|
|
2912
2686
|
generateSchema() {
|
|
2913
2687
|
return {
|
|
2914
2688
|
__michelsonType: SaplingStateToken.prim,
|
|
@@ -2978,17 +2752,6 @@
|
|
|
2978
2752
|
}
|
|
2979
2753
|
return { bytes: String(val).toString() };
|
|
2980
2754
|
}
|
|
2981
|
-
/**
|
|
2982
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
2983
|
-
*
|
|
2984
|
-
*/
|
|
2985
|
-
ExtractSchema() {
|
|
2986
|
-
return {
|
|
2987
|
-
[SaplingTransactionToken.prim]: {
|
|
2988
|
-
'memo-size': Number(this.val.args[0]['int']),
|
|
2989
|
-
},
|
|
2990
|
-
};
|
|
2991
|
-
}
|
|
2992
2755
|
generateSchema() {
|
|
2993
2756
|
return {
|
|
2994
2757
|
__michelsonType: SaplingTransactionToken.prim,
|
|
@@ -3058,17 +2821,6 @@
|
|
|
3058
2821
|
}
|
|
3059
2822
|
return { bytes: String(val).toString() };
|
|
3060
2823
|
}
|
|
3061
|
-
/**
|
|
3062
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
3063
|
-
*
|
|
3064
|
-
*/
|
|
3065
|
-
ExtractSchema() {
|
|
3066
|
-
return {
|
|
3067
|
-
[SaplingTransactionDeprecatedToken.prim]: {
|
|
3068
|
-
'memo-size': Number(this.val.args[0]['int']),
|
|
3069
|
-
},
|
|
3070
|
-
};
|
|
3071
|
-
}
|
|
3072
2824
|
generateSchema() {
|
|
3073
2825
|
return {
|
|
3074
2826
|
__michelsonType: SaplingTransactionDeprecatedToken.prim,
|
|
@@ -3150,13 +2902,6 @@
|
|
|
3150
2902
|
Execute(val) {
|
|
3151
2903
|
return val.bytes;
|
|
3152
2904
|
}
|
|
3153
|
-
/**
|
|
3154
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
3155
|
-
*
|
|
3156
|
-
*/
|
|
3157
|
-
ExtractSchema() {
|
|
3158
|
-
return Bls12381frToken.prim;
|
|
3159
|
-
}
|
|
3160
2905
|
generateSchema() {
|
|
3161
2906
|
return {
|
|
3162
2907
|
__michelsonType: Bls12381frToken.prim,
|
|
@@ -3228,13 +2973,6 @@
|
|
|
3228
2973
|
Execute(val) {
|
|
3229
2974
|
return val.bytes;
|
|
3230
2975
|
}
|
|
3231
|
-
/**
|
|
3232
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
3233
|
-
*
|
|
3234
|
-
*/
|
|
3235
|
-
ExtractSchema() {
|
|
3236
|
-
return Bls12381g1Token.prim;
|
|
3237
|
-
}
|
|
3238
2976
|
generateSchema() {
|
|
3239
2977
|
return {
|
|
3240
2978
|
__michelsonType: Bls12381g1Token.prim,
|
|
@@ -3306,13 +3044,6 @@
|
|
|
3306
3044
|
Execute(val) {
|
|
3307
3045
|
return val.bytes;
|
|
3308
3046
|
}
|
|
3309
|
-
/**
|
|
3310
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
3311
|
-
*
|
|
3312
|
-
*/
|
|
3313
|
-
ExtractSchema() {
|
|
3314
|
-
return Bls12381g2Token.prim;
|
|
3315
|
-
}
|
|
3316
3047
|
generateSchema() {
|
|
3317
3048
|
return {
|
|
3318
3049
|
__michelsonType: Bls12381g2Token.prim,
|
|
@@ -3384,13 +3115,6 @@
|
|
|
3384
3115
|
Execute(val) {
|
|
3385
3116
|
return val.bytes;
|
|
3386
3117
|
}
|
|
3387
|
-
/**
|
|
3388
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
3389
|
-
*
|
|
3390
|
-
*/
|
|
3391
|
-
ExtractSchema() {
|
|
3392
|
-
return ChestToken.prim;
|
|
3393
|
-
}
|
|
3394
3118
|
generateSchema() {
|
|
3395
3119
|
return {
|
|
3396
3120
|
__michelsonType: ChestToken.prim,
|
|
@@ -3460,13 +3184,6 @@
|
|
|
3460
3184
|
Execute(val) {
|
|
3461
3185
|
return val.bytes;
|
|
3462
3186
|
}
|
|
3463
|
-
/**
|
|
3464
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
3465
|
-
*
|
|
3466
|
-
*/
|
|
3467
|
-
ExtractSchema() {
|
|
3468
|
-
return ChestKeyToken.prim;
|
|
3469
|
-
}
|
|
3470
3187
|
generateSchema() {
|
|
3471
3188
|
return {
|
|
3472
3189
|
__michelsonType: ChestKeyToken.prim,
|
|
@@ -3539,13 +3256,6 @@
|
|
|
3539
3256
|
}
|
|
3540
3257
|
throw new GlobalConstantEncodingError(val, this, `Unable to encode a script containing global constants. Please provide an expanded script to the Michelson-Encoder. The following global constant hash was encountered: ${this.val.args[0]['string']}.`);
|
|
3541
3258
|
}
|
|
3542
|
-
/**
|
|
3543
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
3544
|
-
*
|
|
3545
|
-
*/
|
|
3546
|
-
ExtractSchema() {
|
|
3547
|
-
return GlobalConstantToken.prim;
|
|
3548
|
-
}
|
|
3549
3259
|
generateSchema() {
|
|
3550
3260
|
return {
|
|
3551
3261
|
__michelsonType: GlobalConstantToken.prim,
|
|
@@ -3846,20 +3556,33 @@
|
|
|
3846
3556
|
const storage = this.root.Execute(val, semantics);
|
|
3847
3557
|
return this.removeTopLevelAnnotation(storage);
|
|
3848
3558
|
}
|
|
3559
|
+
/**
|
|
3560
|
+
* @description Validates that a value matches the schema type.
|
|
3561
|
+
* Performs type checking with special handling for BigMap, Ticket, and nested Map tokens.
|
|
3562
|
+
*
|
|
3563
|
+
* @param val - The value to validate against the schema
|
|
3564
|
+
* @returns Returns true if validation passes, false if validation fails
|
|
3565
|
+
*/
|
|
3849
3566
|
Typecheck(val) {
|
|
3850
3567
|
if (this.root instanceof BigMapToken && Number.isInteger(Number(val))) {
|
|
3851
|
-
return;
|
|
3568
|
+
return true;
|
|
3852
3569
|
}
|
|
3853
3570
|
if (this.root instanceof TicketToken && val.ticketer && val.value && val.amount) {
|
|
3854
|
-
return;
|
|
3571
|
+
return true;
|
|
3855
3572
|
}
|
|
3856
3573
|
if (this.root instanceof TicketDeprecatedToken && val.ticketer && val.value && val.amount) {
|
|
3857
|
-
return;
|
|
3574
|
+
return true;
|
|
3858
3575
|
}
|
|
3859
3576
|
if (this.root instanceof MapToken && this.root.ValueSchema instanceof BigMapToken) {
|
|
3860
|
-
return;
|
|
3577
|
+
return true;
|
|
3578
|
+
}
|
|
3579
|
+
try {
|
|
3580
|
+
this.root.EncodeObject(val);
|
|
3581
|
+
return true;
|
|
3582
|
+
}
|
|
3583
|
+
catch (error) {
|
|
3584
|
+
return false;
|
|
3861
3585
|
}
|
|
3862
|
-
this.root.EncodeObject(val);
|
|
3863
3586
|
}
|
|
3864
3587
|
/**
|
|
3865
3588
|
* @throws {@link InvalidBigMapSchemaError}
|
|
@@ -3914,13 +3637,6 @@
|
|
|
3914
3637
|
throw new StorageEncodingError('storage object', ex, this.root, value, semantics);
|
|
3915
3638
|
}
|
|
3916
3639
|
}
|
|
3917
|
-
/**
|
|
3918
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
3919
|
-
*
|
|
3920
|
-
*/
|
|
3921
|
-
ExtractSchema() {
|
|
3922
|
-
return this.removeTopLevelAnnotation(this.root.ExtractSchema());
|
|
3923
|
-
}
|
|
3924
3640
|
/**
|
|
3925
3641
|
* @description Produce a representation of the storage schema.
|
|
3926
3642
|
* Note: Provide guidance on how to write the storage object for the origination operation with Taquito.
|
|
@@ -3928,19 +3644,6 @@
|
|
|
3928
3644
|
generateSchema() {
|
|
3929
3645
|
return this.removeTopLevelAnnotation(this.root.generateSchema());
|
|
3930
3646
|
}
|
|
3931
|
-
/**
|
|
3932
|
-
* @deprecated
|
|
3933
|
-
* @throws {@link InvalidBigMapSchemaError}
|
|
3934
|
-
*/
|
|
3935
|
-
ComputeState(tx, state) {
|
|
3936
|
-
if (!this.bigMap) {
|
|
3937
|
-
throw new InvalidBigMapSchemaError('Big map schema is undefined');
|
|
3938
|
-
}
|
|
3939
|
-
const bigMap = tx.reduce((prev, current) => {
|
|
3940
|
-
return Object.assign(Object.assign({}, prev), this.ExecuteOnBigMapDiff(current.contents[0].metadata.operation_result.big_map_diff));
|
|
3941
|
-
}, {});
|
|
3942
|
-
return Object.assign(Object.assign({}, this.Execute(state)), { [this.bigMap.annot()]: bigMap });
|
|
3943
|
-
}
|
|
3944
3647
|
/**
|
|
3945
3648
|
* @description Look up in top-level pairs of the storage to find a value matching the specified type
|
|
3946
3649
|
*
|
|
@@ -4040,7 +3743,7 @@
|
|
|
4040
3743
|
*/
|
|
4041
3744
|
get hasAnnotation() {
|
|
4042
3745
|
if (this.isMultipleEntryPoint) {
|
|
4043
|
-
return Object.keys(this.
|
|
3746
|
+
return Object.keys(this.generateSchema())[0] !== '0';
|
|
4044
3747
|
}
|
|
4045
3748
|
else {
|
|
4046
3749
|
return true;
|
|
@@ -4091,13 +3794,6 @@
|
|
|
4091
3794
|
throw new ParameterEncodingError('Unable to encode parameter object', this.root, value, ex);
|
|
4092
3795
|
}
|
|
4093
3796
|
}
|
|
4094
|
-
/**
|
|
4095
|
-
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
|
|
4096
|
-
*
|
|
4097
|
-
*/
|
|
4098
|
-
ExtractSchema() {
|
|
4099
|
-
return this.root.ExtractSchema();
|
|
4100
|
-
}
|
|
4101
3797
|
/**
|
|
4102
3798
|
* @description Produce a schema grouping together all the entry points of a contract.
|
|
4103
3799
|
*/
|
|
@@ -4183,14 +3879,14 @@
|
|
|
4183
3879
|
* @description Return the signature of the view parameter
|
|
4184
3880
|
*/
|
|
4185
3881
|
extractArgsSchema() {
|
|
4186
|
-
return this.rootArgsType.
|
|
3882
|
+
return this.rootArgsType.generateSchema();
|
|
4187
3883
|
}
|
|
4188
3884
|
/**
|
|
4189
3885
|
*
|
|
4190
3886
|
* @description Return the format of the view result
|
|
4191
3887
|
*/
|
|
4192
3888
|
extractResultSchema() {
|
|
4193
|
-
return this.rootReturnType.
|
|
3889
|
+
return this.rootReturnType.generateSchema();
|
|
4194
3890
|
}
|
|
4195
3891
|
}
|
|
4196
3892
|
|
|
@@ -4245,17 +3941,10 @@
|
|
|
4245
3941
|
|
|
4246
3942
|
// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
|
|
4247
3943
|
const VERSION = {
|
|
4248
|
-
"commitHash": "
|
|
4249
|
-
"version": "23.0
|
|
3944
|
+
"commitHash": "c77fe4b0989665d8b5cfd15a7cc977499021f6fd",
|
|
3945
|
+
"version": "23.1.0"
|
|
4250
3946
|
};
|
|
4251
3947
|
|
|
4252
|
-
/**
|
|
4253
|
-
* @packageDocumentation
|
|
4254
|
-
* @module @taquito/michelson-encoder
|
|
4255
|
-
*/
|
|
4256
|
-
const UnitValue = Symbol();
|
|
4257
|
-
const SaplingStateValue = {};
|
|
4258
|
-
|
|
4259
3948
|
exports.AddressValidationError = AddressValidationError;
|
|
4260
3949
|
exports.BigMapEncodingError = BigMapEncodingError;
|
|
4261
3950
|
exports.BigMapValidationError = BigMapValidationError;
|