@taquito/local-forging 22.0.0-beta.0 → 23.0.0-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.
Files changed (37) hide show
  1. package/dist/lib/{codec-proto021.js → codec-proto022.js} +71 -23
  2. package/dist/lib/codec.js +87 -110
  3. package/dist/lib/{constants-proto021.js → constants-proto022.js} +1 -0
  4. package/dist/lib/constants.js +3 -0
  5. package/dist/lib/decoder-proto022.js +63 -0
  6. package/dist/lib/decoder.js +1 -0
  7. package/dist/lib/encoder-proto022.js +62 -0
  8. package/dist/lib/encoder.js +1 -0
  9. package/dist/lib/michelson/codec-proto022.js +283 -0
  10. package/dist/lib/protocols.js +2 -0
  11. package/dist/lib/schema/operation-proto022.js +238 -0
  12. package/dist/lib/schema/operation.js +11 -1
  13. package/dist/lib/taquito-local-forging.js +14 -8
  14. package/dist/lib/validator-proto022.js +56 -0
  15. package/dist/lib/validator.js +1 -0
  16. package/dist/lib/version.js +2 -2
  17. package/dist/taquito-local-forging.es6.js +606 -302
  18. package/dist/taquito-local-forging.es6.js.map +1 -1
  19. package/dist/taquito-local-forging.umd.js +604 -300
  20. package/dist/taquito-local-forging.umd.js.map +1 -1
  21. package/dist/types/{codec-proto021.d.ts → codec-proto022.d.ts} +3 -1
  22. package/dist/types/codec.d.ts +3 -3
  23. package/dist/types/{constants-proto021.d.ts → constants-proto022.d.ts} +1 -0
  24. package/dist/types/constants.d.ts +1 -0
  25. package/dist/types/{decoder-proto021.d.ts → decoder-proto022.d.ts} +1 -1
  26. package/dist/types/{encoder-proto021.d.ts → encoder-proto022.d.ts} +1 -1
  27. package/dist/types/michelson/codec-proto022.d.ts +49 -0
  28. package/dist/types/michelson/codec.d.ts +1 -1
  29. package/dist/types/protocols.d.ts +1 -0
  30. package/dist/types/schema/{operation-proto021.d.ts → operation-proto022.d.ts} +3 -2
  31. package/dist/types/schema/operation.d.ts +10 -0
  32. package/dist/types/taquito-local-forging.d.ts +3 -3
  33. package/dist/types/validator-proto022.d.ts +13 -0
  34. package/package.json +5 -5
  35. package/dist/lib/decoder-proto021.js +0 -62
  36. package/dist/lib/encoder-proto021.js +0 -61
  37. package/dist/lib/schema/operation-proto021.js +0 -237
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.burnLimitDecoder = exports.burnLimitEncoder = exports.entrypointNameDecoder = exports.entrypointNameEncoder = exports.blockPayloadHashDecoder = exports.blockPayloadHashEncoder = exports.valueParameterDecoder = exports.valueParameterEncoder = exports.parametersEncoder = exports.entrypointEncoder = exports.parametersDecoder = exports.entrypointDecoder = exports.zarithDecoder = exports.zarithEncoder = exports.smartRollupCommitmentHashDecoder = exports.smartContractAddressDecoder = exports.smartRollupAddressDecoder = exports.addressDecoder = exports.smartRollupCommitmentHashEncoder = exports.publicKeyDecoder = exports.smartContractAddressEncoder = exports.smartRollupAddressEncoder = exports.addressEncoder = exports.publicKeyEncoder = exports.publicKeyHashesEncoder = exports.publicKeyHashEncoder = exports.delegateDecoder = exports.boolDecoder = exports.int16Decoder = exports.int16Encoder = exports.int32Decoder = exports.int32Encoder = exports.delegateEncoder = exports.pvmKindDecoder = exports.pvmKindEncoder = exports.ballotDecoder = exports.ballotEncoder = exports.proposalsEncoder = exports.proposalsDecoder = exports.proposalDecoder = exports.proposalEncoder = exports.boolEncoder = exports.tz1Encoder = exports.branchEncoder = exports.publicKeyHashesDecoder = exports.publicKeyHashDecoder = exports.branchDecoder = exports.tz1Decoder = exports.prefixDecoder = exports.prefixEncoder = void 0;
4
- exports.slotHeaderDecoder = exports.slotHeaderEncoder = exports.dalCommitmentDecoder = exports.dalCommitmentEncoder = exports.smartRollupMessageDecoder = exports.smartRollupMessageEncoder = exports.paddedBytesDecoder = exports.paddedBytesEncoder = exports.depositsLimitDecoder = exports.depositsLimitEncoder = void 0;
4
+ exports.slotHeaderDecoder = exports.slotHeaderEncoder = exports.dalCommitmentDecoder = exports.dalCommitmentEncoder = exports.smartRollupMessageDecoder = exports.smartRollupMessageEncoder = exports.paddedBytesDecoder = exports.paddedBytesEncoder = exports.signatureProofDecoder = exports.signatureProofEncoder = exports.depositsLimitDecoder = exports.depositsLimitEncoder = void 0;
5
5
  const utils_1 = require("@taquito/utils");
6
6
  const errors_1 = require("./errors");
7
7
  const bignumber_js_1 = require("bignumber.js");
8
- const constants_proto021_1 = require("./constants-proto021");
9
- const codec_1 = require("./michelson/codec");
8
+ const constants_proto022_1 = require("./constants-proto022");
9
+ const codec_proto022_1 = require("./michelson/codec-proto022");
10
10
  const uint8array_consumer_1 = require("./uint8array-consumer");
11
11
  const utils_2 = require("./utils");
12
12
  const core_1 = require("@taquito/core");
@@ -33,11 +33,14 @@ const publicKeyHashDecoder = (val) => {
33
33
  else if (prefix[0] === 0x02) {
34
34
  return (0, exports.prefixDecoder)(utils_1.Prefix.TZ3)(val);
35
35
  }
36
+ else if (prefix[0] === 0x03) {
37
+ return (0, exports.prefixDecoder)(utils_1.Prefix.TZ4)(val);
38
+ }
36
39
  };
37
40
  exports.publicKeyHashDecoder = publicKeyHashDecoder;
38
41
  const publicKeyHashesDecoder = (val) => {
39
42
  if (!(0, exports.boolDecoder)(val)) {
40
- return undefined;
43
+ return;
41
44
  }
42
45
  const publicKeyHashes = [];
43
46
  val.consume(4);
@@ -224,6 +227,8 @@ const publicKeyEncoder = (val) => {
224
227
  return '01' + (0, exports.prefixEncoder)(utils_1.Prefix.SPPK)(val);
225
228
  case utils_1.Prefix.P2PK:
226
229
  return '02' + (0, exports.prefixEncoder)(utils_1.Prefix.P2PK)(val);
230
+ case utils_1.Prefix.BLPK:
231
+ return '03' + (0, exports.prefixEncoder)(utils_1.Prefix.BLPK)(val);
227
232
  default:
228
233
  throw new utils_1.InvalidPublicKeyError(val, (0, utils_1.invalidDetail)(utils_1.ValidationResult.NO_PREFIX_MATCHED) +
229
234
  ` expecting one of the following '${utils_1.Prefix.EDPK}', '${utils_1.Prefix.SPPK}', '${utils_1.Prefix.P2PK}' or '${utils_1.Prefix.BLPK}'.`);
@@ -270,6 +275,8 @@ const publicKeyDecoder = (val) => {
270
275
  return (0, exports.prefixDecoder)(utils_1.Prefix.SPPK)(val);
271
276
  case 0x02:
272
277
  return (0, exports.prefixDecoder)(utils_1.Prefix.P2PK)(val);
278
+ case 0x03:
279
+ return (0, exports.prefixDecoder)(utils_1.Prefix.BLPK)(val);
273
280
  default:
274
281
  throw new utils_1.InvalidPublicKeyError(val.toString(), (0, utils_1.invalidDetail)(utils_1.ValidationResult.NO_PREFIX_MATCHED));
275
282
  }
@@ -366,13 +373,13 @@ const zarithDecoder = (n) => {
366
373
  exports.zarithDecoder = zarithDecoder;
367
374
  const entrypointDecoder = (value) => {
368
375
  const preamble = (0, utils_2.pad)(value.consume(1)[0], 2);
369
- if (preamble in constants_proto021_1.entrypointMapping) {
370
- return constants_proto021_1.entrypointMapping[preamble];
376
+ if (preamble in constants_proto022_1.entrypointMapping) {
377
+ return constants_proto022_1.entrypointMapping[preamble];
371
378
  }
372
379
  else {
373
- const entry = (0, codec_1.extractRequiredLen)(value, 1);
380
+ const entry = (0, codec_proto022_1.extractRequiredLen)(value, 1);
374
381
  const entrypoint = Buffer.from(entry).toString('utf8');
375
- if (entrypoint.length > constants_proto021_1.ENTRYPOINT_MAX_LENGTH) {
382
+ if (entrypoint.length > constants_proto022_1.ENTRYPOINT_MAX_LENGTH) {
376
383
  throw new errors_1.OversizedEntryPointError(entrypoint);
377
384
  }
378
385
  return entrypoint;
@@ -386,8 +393,8 @@ const parametersDecoder = (val) => {
386
393
  }
387
394
  else {
388
395
  const encodedEntrypoint = (0, exports.entrypointDecoder)(val);
389
- const params = (0, codec_1.extractRequiredLen)(val);
390
- const parameters = (0, codec_1.valueDecoder)(new uint8array_consumer_1.Uint8ArrayConsumer(params));
396
+ const params = (0, codec_proto022_1.extractRequiredLen)(val);
397
+ const parameters = (0, codec_proto022_1.valueDecoder)(new uint8array_consumer_1.Uint8ArrayConsumer(params));
391
398
  return {
392
399
  entrypoint: encodedEntrypoint,
393
400
  value: parameters,
@@ -396,15 +403,15 @@ const parametersDecoder = (val) => {
396
403
  };
397
404
  exports.parametersDecoder = parametersDecoder;
398
405
  const entrypointEncoder = (entrypoint) => {
399
- if (entrypoint in constants_proto021_1.entrypointMappingReverse) {
400
- return `${constants_proto021_1.entrypointMappingReverse[entrypoint]}`;
406
+ if (entrypoint in constants_proto022_1.entrypointMappingReverse) {
407
+ return `${constants_proto022_1.entrypointMappingReverse[entrypoint]}`;
401
408
  }
402
409
  else {
403
- if (entrypoint.length > constants_proto021_1.ENTRYPOINT_MAX_LENGTH) {
410
+ if (entrypoint.length > constants_proto022_1.ENTRYPOINT_MAX_LENGTH) {
404
411
  throw new errors_1.OversizedEntryPointError(entrypoint);
405
412
  }
406
413
  const value = { string: entrypoint };
407
- return `ff${(0, codec_1.valueEncoder)(value).slice(8)}`;
414
+ return `ff${(0, codec_proto022_1.valueEncoder)(value).slice(8)}`;
408
415
  }
409
416
  };
410
417
  exports.entrypointEncoder = entrypointEncoder;
@@ -413,30 +420,30 @@ const parametersEncoder = (val) => {
413
420
  return '00';
414
421
  }
415
422
  const encodedEntrypoint = (0, exports.entrypointEncoder)(val.entrypoint);
416
- const parameters = (0, codec_1.valueEncoder)(val.value);
423
+ const parameters = (0, codec_proto022_1.valueEncoder)(val.value);
417
424
  const length = (0, utils_2.pad)(parameters.length / 2);
418
425
  return `ff${encodedEntrypoint}${length}${parameters}`;
419
426
  };
420
427
  exports.parametersEncoder = parametersEncoder;
421
428
  const valueParameterEncoder = (value) => {
422
- const valueEncoded = (0, codec_1.valueEncoder)(value);
429
+ const valueEncoded = (0, codec_proto022_1.valueEncoder)(value);
423
430
  return `${(0, utils_2.pad)(valueEncoded.length / 2)}${valueEncoded}`;
424
431
  };
425
432
  exports.valueParameterEncoder = valueParameterEncoder;
426
433
  const valueParameterDecoder = (val) => {
427
- const value = (0, codec_1.extractRequiredLen)(val);
428
- return (0, codec_1.valueDecoder)(new uint8array_consumer_1.Uint8ArrayConsumer(value));
434
+ const value = (0, codec_proto022_1.extractRequiredLen)(val);
435
+ return (0, codec_proto022_1.valueDecoder)(new uint8array_consumer_1.Uint8ArrayConsumer(value));
429
436
  };
430
437
  exports.valueParameterDecoder = valueParameterDecoder;
431
438
  exports.blockPayloadHashEncoder = (0, exports.prefixEncoder)(utils_1.Prefix.VH);
432
439
  exports.blockPayloadHashDecoder = (0, exports.prefixDecoder)(utils_1.Prefix.VH);
433
440
  const entrypointNameEncoder = (entrypoint) => {
434
441
  const value = { string: entrypoint };
435
- return `${(0, codec_1.valueEncoder)(value).slice(2)}`;
442
+ return `${(0, codec_proto022_1.valueEncoder)(value).slice(2)}`;
436
443
  };
437
444
  exports.entrypointNameEncoder = entrypointNameEncoder;
438
445
  const entrypointNameDecoder = (val) => {
439
- const entry = (0, codec_1.extractRequiredLen)(val);
446
+ const entry = (0, codec_proto022_1.extractRequiredLen)(val);
440
447
  return Buffer.from(entry).toString('utf8');
441
448
  };
442
449
  exports.entrypointNameDecoder = entrypointNameDecoder;
@@ -462,12 +469,53 @@ const depositsLimitDecoder = (value) => {
462
469
  }
463
470
  };
464
471
  exports.depositsLimitDecoder = depositsLimitDecoder;
472
+ const signatureV1Encoder = (val) => {
473
+ const signaturePrefix = val.substring(0, 5);
474
+ switch (signaturePrefix) {
475
+ case utils_1.Prefix.EDSIG:
476
+ return (0, exports.paddedBytesEncoder)((0, exports.prefixEncoder)(utils_1.Prefix.EDSIG)(val));
477
+ case utils_1.Prefix.SPSIG:
478
+ return (0, exports.paddedBytesEncoder)((0, exports.prefixEncoder)(utils_1.Prefix.SPSIG)(val));
479
+ case utils_1.Prefix.P2SIG:
480
+ return (0, exports.paddedBytesEncoder)((0, exports.prefixEncoder)(utils_1.Prefix.P2SIG)(val));
481
+ case utils_1.Prefix.BLSIG:
482
+ return (0, exports.paddedBytesEncoder)((0, exports.prefixEncoder)(utils_1.Prefix.BLSIG)(val));
483
+ default:
484
+ throw new core_1.InvalidSignatureError(val, (0, utils_1.invalidDetail)(utils_1.ValidationResult.NO_PREFIX_MATCHED) +
485
+ ` expecting one of the following '${utils_1.Prefix.EDSIG}', '${utils_1.Prefix.SPSIG}', '${utils_1.Prefix.P2SIG}' or '${utils_1.Prefix.BLSIG}'.`);
486
+ }
487
+ };
488
+ const signatureV1Decoder = (val) => {
489
+ val.consume(4);
490
+ if (val.length().toString() === '96') {
491
+ return (0, exports.prefixDecoder)(utils_1.Prefix.BLSIG)(val);
492
+ }
493
+ else {
494
+ throw new core_1.ProhibitedActionError('currently we only support decoding of BLSIG signatures');
495
+ }
496
+ };
497
+ const signatureProofEncoder = (val) => {
498
+ if (val) {
499
+ return (0, exports.boolEncoder)(true) + signatureV1Encoder(val);
500
+ }
501
+ else {
502
+ return (0, exports.boolEncoder)(false);
503
+ }
504
+ };
505
+ exports.signatureProofEncoder = signatureProofEncoder;
506
+ const signatureProofDecoder = (value) => {
507
+ const hasProof = (0, exports.boolDecoder)(value);
508
+ if (hasProof) {
509
+ return signatureV1Decoder(value);
510
+ }
511
+ };
512
+ exports.signatureProofDecoder = signatureProofDecoder;
465
513
  const paddedBytesEncoder = (val, paddingLength = 8) => {
466
514
  return `${(0, utils_2.pad)(val.length / 2, paddingLength)}${val}`;
467
515
  };
468
516
  exports.paddedBytesEncoder = paddedBytesEncoder;
469
517
  const paddedBytesDecoder = (val) => {
470
- const value = (0, codec_1.extractRequiredLen)(val);
518
+ const value = (0, codec_proto022_1.extractRequiredLen)(val);
471
519
  return Buffer.from(value).toString('hex');
472
520
  };
473
521
  exports.paddedBytesDecoder = paddedBytesDecoder;
@@ -479,8 +527,8 @@ const smartRollupMessageEncoder = (val) => {
479
527
  };
480
528
  exports.smartRollupMessageEncoder = smartRollupMessageEncoder;
481
529
  const smartRollupMessageDecoder = (val) => {
482
- const valueArray = (0, codec_1.extractRequiredLen)(val);
483
- const ret = (0, codec_1.stripLengthPrefixFromBytes)(new uint8array_consumer_1.Uint8ArrayConsumer(valueArray));
530
+ const valueArray = (0, codec_proto022_1.extractRequiredLen)(val);
531
+ const ret = (0, codec_proto022_1.stripLengthPrefixFromBytes)(new uint8array_consumer_1.Uint8ArrayConsumer(valueArray));
484
532
  return ret.map((value) => Buffer.from(value).toString('hex'));
485
533
  };
486
534
  exports.smartRollupMessageDecoder = smartRollupMessageDecoder;
package/dist/lib/codec.js CHANGED
@@ -12,29 +12,30 @@ const utils_2 = require("./utils");
12
12
  const core_1 = require("@taquito/core");
13
13
  // https://tezos.gitlab.io/shell/p2p_api.html specifies data types and structure for forging
14
14
  const prefixEncoder = (prefix) => (str) => {
15
- return (0, utils_1.buf2hex)(Buffer.from((0, utils_1.b58cdecode)(str, utils_1.prefix[prefix])));
15
+ const [pl] = (0, utils_1.b58DecodeAndCheckPrefix)(str, [prefix]);
16
+ return (0, utils_1.buf2hex)(pl);
16
17
  };
17
18
  exports.prefixEncoder = prefixEncoder;
18
19
  const prefixDecoder = (pre) => (str) => {
19
- const val = str.consume(utils_1.prefixLength[pre]);
20
- return (0, utils_1.b58cencode)(val, utils_1.prefix[pre]);
20
+ const val = str.consume(utils_1.payloadLength[pre]);
21
+ return (0, utils_1.b58Encode)(val, pre);
21
22
  };
22
23
  exports.prefixDecoder = prefixDecoder;
23
- exports.tz1Decoder = (0, exports.prefixDecoder)(utils_1.Prefix.TZ1);
24
- exports.branchDecoder = (0, exports.prefixDecoder)(utils_1.Prefix.B);
24
+ exports.tz1Decoder = (0, exports.prefixDecoder)(utils_1.PrefixV2.Ed25519PublicKeyHash);
25
+ exports.branchDecoder = (0, exports.prefixDecoder)(utils_1.PrefixV2.BlockHash);
25
26
  const publicKeyHashDecoder = (val) => {
26
27
  const prefix = val.consume(1);
27
28
  if (prefix[0] === 0x00) {
28
- return (0, exports.prefixDecoder)(utils_1.Prefix.TZ1)(val);
29
+ return (0, exports.prefixDecoder)(utils_1.PrefixV2.Ed25519PublicKeyHash)(val);
29
30
  }
30
31
  else if (prefix[0] === 0x01) {
31
- return (0, exports.prefixDecoder)(utils_1.Prefix.TZ2)(val);
32
+ return (0, exports.prefixDecoder)(utils_1.PrefixV2.Secp256k1PublicKeyHash)(val);
32
33
  }
33
34
  else if (prefix[0] === 0x02) {
34
- return (0, exports.prefixDecoder)(utils_1.Prefix.TZ3)(val);
35
+ return (0, exports.prefixDecoder)(utils_1.PrefixV2.P256PublicKeyHash)(val);
35
36
  }
36
37
  else if (prefix[0] === 0x03) {
37
- return (0, exports.prefixDecoder)(utils_1.Prefix.TZ4)(val);
38
+ return (0, exports.prefixDecoder)(utils_1.PrefixV2.BLS12_381PublicKeyHash)(val);
38
39
  }
39
40
  };
40
41
  exports.publicKeyHashDecoder = publicKeyHashDecoder;
@@ -50,16 +51,16 @@ const publicKeyHashesDecoder = (val) => {
50
51
  return publicKeyHashes;
51
52
  };
52
53
  exports.publicKeyHashesDecoder = publicKeyHashesDecoder;
53
- exports.branchEncoder = (0, exports.prefixEncoder)(utils_1.Prefix.B);
54
- exports.tz1Encoder = (0, exports.prefixEncoder)(utils_1.Prefix.TZ1);
54
+ exports.branchEncoder = (0, exports.prefixEncoder)(utils_1.PrefixV2.BlockHash);
55
+ exports.tz1Encoder = (0, exports.prefixEncoder)(utils_1.PrefixV2.Ed25519PublicKeyHash);
55
56
  const boolEncoder = (bool) => (bool ? 'ff' : '00');
56
57
  exports.boolEncoder = boolEncoder;
57
58
  const proposalEncoder = (proposal) => {
58
- return (0, exports.prefixEncoder)(utils_1.Prefix.P)(proposal);
59
+ return (0, exports.prefixEncoder)(utils_1.PrefixV2.ProtocolHash)(proposal);
59
60
  };
60
61
  exports.proposalEncoder = proposalEncoder;
61
62
  const proposalDecoder = (proposal) => {
62
- return (0, exports.prefixDecoder)(utils_1.Prefix.P)(proposal);
63
+ return (0, exports.prefixDecoder)(utils_1.PrefixV2.ProtocolHash)(proposal);
63
64
  };
64
65
  exports.proposalDecoder = proposalDecoder;
65
66
  const proposalsDecoder = (proposal) => {
@@ -189,19 +190,11 @@ const delegateDecoder = (val) => {
189
190
  };
190
191
  exports.delegateDecoder = delegateDecoder;
191
192
  const publicKeyHashEncoder = (val) => {
192
- const pubkeyPrefix = val.substring(0, 3);
193
- switch (pubkeyPrefix) {
194
- case utils_1.Prefix.TZ1:
195
- return '00' + (0, exports.prefixEncoder)(utils_1.Prefix.TZ1)(val);
196
- case utils_1.Prefix.TZ2:
197
- return '01' + (0, exports.prefixEncoder)(utils_1.Prefix.TZ2)(val);
198
- case utils_1.Prefix.TZ3:
199
- return '02' + (0, exports.prefixEncoder)(utils_1.Prefix.TZ3)(val);
200
- case utils_1.Prefix.TZ4:
201
- return '03' + (0, exports.prefixEncoder)(utils_1.Prefix.TZ4)(val);
202
- default:
203
- throw new utils_1.InvalidKeyHashError(val, (0, utils_1.invalidDetail)(utils_1.ValidationResult.NO_PREFIX_MATCHED) +
204
- ` expecting one for the following "${utils_1.Prefix.TZ1}", "${utils_1.Prefix.TZ2}", "${utils_1.Prefix.TZ3}" or "${utils_1.Prefix.TZ4}".`);
193
+ try {
194
+ return (0, utils_1.b58DecodePublicKeyHash)(val);
195
+ }
196
+ catch (err) {
197
+ throw new core_1.InvalidKeyHashError(val, err instanceof core_1.ParameterValidationError ? err.result : undefined);
205
198
  }
206
199
  };
207
200
  exports.publicKeyHashEncoder = publicKeyHashEncoder;
@@ -219,75 +212,62 @@ const publicKeyHashesEncoder = (val) => {
219
212
  };
220
213
  exports.publicKeyHashesEncoder = publicKeyHashesEncoder;
221
214
  const publicKeyEncoder = (val) => {
222
- const pubkeyPrefix = val.substring(0, 4);
223
- switch (pubkeyPrefix) {
224
- case utils_1.Prefix.EDPK:
225
- return '00' + (0, exports.prefixEncoder)(utils_1.Prefix.EDPK)(val);
226
- case utils_1.Prefix.SPPK:
227
- return '01' + (0, exports.prefixEncoder)(utils_1.Prefix.SPPK)(val);
228
- case utils_1.Prefix.P2PK:
229
- return '02' + (0, exports.prefixEncoder)(utils_1.Prefix.P2PK)(val);
230
- case utils_1.Prefix.BLPK:
231
- return '03' + (0, exports.prefixEncoder)(utils_1.Prefix.BLPK)(val);
232
- default:
233
- throw new utils_1.InvalidPublicKeyError(val, (0, utils_1.invalidDetail)(utils_1.ValidationResult.NO_PREFIX_MATCHED) +
234
- ` expecting one of the following '${utils_1.Prefix.EDPK}', '${utils_1.Prefix.SPPK}', '${utils_1.Prefix.P2PK}' or '${utils_1.Prefix.BLPK}'.`);
215
+ try {
216
+ return (0, utils_1.b58DecodePublicKey)(val);
217
+ }
218
+ catch (err) {
219
+ throw new utils_1.InvalidPublicKeyError(val, err instanceof core_1.ParameterValidationError ? err.result : undefined);
235
220
  }
236
221
  };
237
222
  exports.publicKeyEncoder = publicKeyEncoder;
238
223
  const addressEncoder = (val) => {
239
- const pubkeyPrefix = val.substring(0, 3);
240
- switch (pubkeyPrefix) {
241
- case utils_1.Prefix.TZ1:
242
- case utils_1.Prefix.TZ2:
243
- case utils_1.Prefix.TZ3:
244
- case utils_1.Prefix.TZ4:
245
- return '00' + (0, exports.publicKeyHashEncoder)(val);
246
- case utils_1.Prefix.KT1:
247
- return '01' + (0, exports.prefixEncoder)(utils_1.Prefix.KT1)(val) + '00';
248
- default:
249
- throw new core_1.InvalidAddressError(val, (0, utils_1.invalidDetail)(utils_1.ValidationResult.NO_PREFIX_MATCHED) +
250
- ` expecting one of the following prefix '${utils_1.Prefix.TZ1}', ${utils_1.Prefix.TZ2}', '${utils_1.Prefix.TZ3}', '${utils_1.Prefix.TZ4}' or '${utils_1.Prefix.KT1}'.`);
251
- }
224
+ return (0, utils_1.b58DecodeAddress)(val);
252
225
  };
253
226
  exports.addressEncoder = addressEncoder;
254
227
  const smartRollupAddressEncoder = (val) => {
255
- if (val.substring(0, 3) !== utils_1.Prefix.SR1) {
256
- throw new errors_1.InvalidSmartRollupAddressError(val, (0, utils_1.invalidDetail)(utils_1.ValidationResult.NO_PREFIX_MATCHED) + ` expecting prefix '${utils_1.Prefix.SR1}'.`);
228
+ try {
229
+ return (0, exports.prefixEncoder)(utils_1.PrefixV2.SmartRollupHash)(val);
257
230
  }
258
- return (0, exports.prefixEncoder)(utils_1.Prefix.SR1)(val);
259
- };
260
- exports.smartRollupAddressEncoder = smartRollupAddressEncoder;
261
- const smartContractAddressEncoder = (val) => {
262
- const prefix = val.substring(0, 3);
263
- if (prefix === utils_1.Prefix.KT1) {
264
- return '01' + (0, exports.prefixEncoder)(utils_1.Prefix.KT1)(val) + '00';
231
+ catch (err) {
232
+ if (err instanceof core_1.ParameterValidationError) {
233
+ throw new errors_1.InvalidSmartRollupAddressError(val);
234
+ }
235
+ else {
236
+ throw err;
237
+ }
265
238
  }
266
- throw new core_1.InvalidContractAddressError(val, (0, utils_1.invalidDetail)(utils_1.ValidationResult.NO_PREFIX_MATCHED) + ` expecting prefix '${utils_1.Prefix.KT1}'.`);
267
239
  };
240
+ exports.smartRollupAddressEncoder = smartRollupAddressEncoder;
241
+ const smartContractAddressEncoder = (val) => (0, utils_1.b58DecodeAddress)(val);
268
242
  exports.smartContractAddressEncoder = smartContractAddressEncoder;
269
243
  const publicKeyDecoder = (val) => {
270
244
  const preamble = val.consume(1);
271
245
  switch (preamble[0]) {
272
246
  case 0x00:
273
- return (0, exports.prefixDecoder)(utils_1.Prefix.EDPK)(val);
247
+ return (0, exports.prefixDecoder)(utils_1.PrefixV2.Ed25519PublicKey)(val);
274
248
  case 0x01:
275
- return (0, exports.prefixDecoder)(utils_1.Prefix.SPPK)(val);
249
+ return (0, exports.prefixDecoder)(utils_1.PrefixV2.Secp256k1PublicKey)(val);
276
250
  case 0x02:
277
- return (0, exports.prefixDecoder)(utils_1.Prefix.P2PK)(val);
251
+ return (0, exports.prefixDecoder)(utils_1.PrefixV2.P256PublicKey)(val);
278
252
  case 0x03:
279
- return (0, exports.prefixDecoder)(utils_1.Prefix.BLPK)(val);
253
+ return (0, exports.prefixDecoder)(utils_1.PrefixV2.BLS12_381PublicKey)(val);
280
254
  default:
281
- throw new utils_1.InvalidPublicKeyError(val.toString(), (0, utils_1.invalidDetail)(utils_1.ValidationResult.NO_PREFIX_MATCHED));
255
+ throw new utils_1.InvalidPublicKeyError(undefined, utils_1.ValidationResult.NO_PREFIX_MATCHED);
282
256
  }
283
257
  };
284
258
  exports.publicKeyDecoder = publicKeyDecoder;
285
259
  const smartRollupCommitmentHashEncoder = (val) => {
286
- const prefix = val.substring(0, 4);
287
- if (prefix === utils_1.Prefix.SRC1) {
288
- return (0, exports.prefixEncoder)(utils_1.Prefix.SRC1)(val);
260
+ try {
261
+ return (0, exports.prefixEncoder)(utils_1.PrefixV2.SmartRollupCommitmentHash)(val);
262
+ }
263
+ catch (err) {
264
+ if (err instanceof core_1.ParameterValidationError) {
265
+ throw new errors_1.InvalidSmartRollupCommitmentHashError(val);
266
+ }
267
+ else {
268
+ throw err;
269
+ }
289
270
  }
290
- throw new errors_1.InvalidSmartRollupCommitmentHashError(val, (0, utils_1.invalidDetail)(utils_1.ValidationResult.NO_PREFIX_MATCHED) + ` expecting prefix '${utils_1.Prefix.SRC1}'`);
291
271
  };
292
272
  exports.smartRollupCommitmentHashEncoder = smartRollupCommitmentHashEncoder;
293
273
  const addressDecoder = (val) => {
@@ -296,7 +276,7 @@ const addressDecoder = (val) => {
296
276
  case 0x00:
297
277
  return (0, exports.publicKeyHashDecoder)(val);
298
278
  case 0x01: {
299
- const address = (0, exports.prefixDecoder)(utils_1.Prefix.KT1)(val);
279
+ const address = (0, exports.prefixDecoder)(utils_1.PrefixV2.ContractHash)(val);
300
280
  val.consume(1);
301
281
  return address;
302
282
  }
@@ -306,29 +286,21 @@ const addressDecoder = (val) => {
306
286
  };
307
287
  exports.addressDecoder = addressDecoder;
308
288
  const smartRollupAddressDecoder = (val) => {
309
- const address = (0, exports.prefixDecoder)(utils_1.Prefix.SR1)(val);
310
- if (address.substring(0, 3) !== utils_1.Prefix.SR1) {
311
- throw new errors_1.InvalidSmartRollupAddressError(address, (0, utils_1.invalidDetail)(utils_1.ValidationResult.NO_PREFIX_MATCHED) + ` expecting prefix '${utils_1.Prefix.SR1}'.`);
312
- }
313
- return address;
289
+ return (0, exports.prefixDecoder)(utils_1.PrefixV2.SmartRollupHash)(val);
314
290
  };
315
291
  exports.smartRollupAddressDecoder = smartRollupAddressDecoder;
316
292
  const smartContractAddressDecoder = (val) => {
317
293
  const preamble = val.consume(1);
318
294
  if (preamble[0] === 0x01) {
319
- const scAddress = (0, exports.prefixDecoder)(utils_1.Prefix.KT1)(val);
295
+ const scAddress = (0, exports.prefixDecoder)(utils_1.PrefixV2.ContractHash)(val);
320
296
  val.consume(1);
321
297
  return scAddress;
322
298
  }
323
- throw new core_1.InvalidContractAddressError(val.toString(), (0, utils_1.invalidDetail)(utils_1.ValidationResult.NO_PREFIX_MATCHED));
299
+ throw new core_1.InvalidContractAddressError(val.toString(), utils_1.ValidationResult.NO_PREFIX_MATCHED);
324
300
  };
325
301
  exports.smartContractAddressDecoder = smartContractAddressDecoder;
326
302
  const smartRollupCommitmentHashDecoder = (val) => {
327
- const address = (0, exports.prefixDecoder)(utils_1.Prefix.SRC1)(val);
328
- if (address.substring(0, 4) !== utils_1.Prefix.SRC1) {
329
- throw new errors_1.InvalidSmartRollupCommitmentHashError(address, (0, utils_1.invalidDetail)(utils_1.ValidationResult.NO_PREFIX_MATCHED) + ` expecting prefix '${utils_1.Prefix.SRC1}'`);
330
- }
331
- return address;
303
+ return (0, exports.prefixDecoder)(utils_1.PrefixV2.SmartRollupCommitmentHash)(val);
332
304
  };
333
305
  exports.smartRollupCommitmentHashDecoder = smartRollupCommitmentHashDecoder;
334
306
  const zarithEncoder = (n) => {
@@ -435,8 +407,8 @@ const valueParameterDecoder = (val) => {
435
407
  return (0, codec_1.valueDecoder)(new uint8array_consumer_1.Uint8ArrayConsumer(value));
436
408
  };
437
409
  exports.valueParameterDecoder = valueParameterDecoder;
438
- exports.blockPayloadHashEncoder = (0, exports.prefixEncoder)(utils_1.Prefix.VH);
439
- exports.blockPayloadHashDecoder = (0, exports.prefixDecoder)(utils_1.Prefix.VH);
410
+ exports.blockPayloadHashEncoder = (0, exports.prefixEncoder)(utils_1.PrefixV2.ValueHash);
411
+ exports.blockPayloadHashDecoder = (0, exports.prefixDecoder)(utils_1.PrefixV2.ValueHash);
440
412
  const entrypointNameEncoder = (entrypoint) => {
441
413
  const value = { string: entrypoint };
442
414
  return `${(0, codec_1.valueEncoder)(value).slice(2)}`;
@@ -470,28 +442,31 @@ const depositsLimitDecoder = (value) => {
470
442
  };
471
443
  exports.depositsLimitDecoder = depositsLimitDecoder;
472
444
  const signatureV1Encoder = (val) => {
473
- const signaturePrefix = val.substring(0, 5);
474
- switch (signaturePrefix) {
475
- case utils_1.Prefix.EDSIG:
476
- return (0, exports.paddedBytesEncoder)((0, exports.prefixEncoder)(utils_1.Prefix.EDSIG)(val));
477
- case utils_1.Prefix.SPSIG:
478
- return (0, exports.paddedBytesEncoder)((0, exports.prefixEncoder)(utils_1.Prefix.SPSIG)(val));
479
- case utils_1.Prefix.P2SIG:
480
- return (0, exports.paddedBytesEncoder)((0, exports.prefixEncoder)(utils_1.Prefix.P2SIG)(val));
481
- case utils_1.Prefix.BLSIG:
482
- return (0, exports.paddedBytesEncoder)((0, exports.prefixEncoder)(utils_1.Prefix.BLSIG)(val));
483
- default:
484
- throw new core_1.InvalidSignatureError(val, (0, utils_1.invalidDetail)(utils_1.ValidationResult.NO_PREFIX_MATCHED) +
485
- ` expecting one of the following '${utils_1.Prefix.EDSIG}', '${utils_1.Prefix.SPSIG}', '${utils_1.Prefix.P2SIG}' or '${utils_1.Prefix.BLSIG}'.`);
445
+ try {
446
+ const [data, pre] = (0, utils_1.b58DecodeAndCheckPrefix)(val, utils_1.signaturePrefixes);
447
+ if (pre === utils_1.PrefixV2.BLS12_381Signature) {
448
+ return (0, exports.paddedBytesEncoder)((0, utils_1.buf2hex)(data));
449
+ }
450
+ else {
451
+ throw new core_1.ProhibitedActionError('we only support encoding of BLSIG signatures from protocol Seoul');
452
+ }
453
+ }
454
+ catch (err) {
455
+ if (err instanceof core_1.ParameterValidationError) {
456
+ throw new core_1.InvalidSignatureError(val, err.result);
457
+ }
458
+ else {
459
+ throw err;
460
+ }
486
461
  }
487
462
  };
488
463
  const signatureV1Decoder = (val) => {
489
464
  val.consume(4);
490
465
  if (val.length().toString() === '96') {
491
- return (0, exports.prefixDecoder)(utils_1.Prefix.BLSIG)(val);
466
+ return (0, exports.prefixDecoder)(utils_1.PrefixV2.BLS12_381Signature)(val);
492
467
  }
493
468
  else {
494
- throw new core_1.ProhibitedActionError('currently we only support decoding of BLSIG signatures');
469
+ throw new core_1.ProhibitedActionError('we only support decoding of BLSIG signatures');
495
470
  }
496
471
  };
497
472
  const signatureProofEncoder = (val) => {
@@ -533,19 +508,21 @@ const smartRollupMessageDecoder = (val) => {
533
508
  };
534
509
  exports.smartRollupMessageDecoder = smartRollupMessageDecoder;
535
510
  const dalCommitmentEncoder = (val) => {
536
- const prefix = val.substring(0, 2);
537
- if (prefix === utils_1.Prefix.SH) {
538
- return (0, exports.prefixEncoder)(utils_1.Prefix.SH)(val);
511
+ try {
512
+ return (0, exports.prefixEncoder)(utils_1.PrefixV2.SlotHeader)(val);
513
+ }
514
+ catch (err) {
515
+ if (err instanceof core_1.ParameterValidationError) {
516
+ throw new errors_1.InvalidDalCommitmentError(val);
517
+ }
518
+ else {
519
+ throw err;
520
+ }
539
521
  }
540
- throw new errors_1.InvalidDalCommitmentError(val, (0, utils_1.invalidDetail)(utils_1.ValidationResult.NO_PREFIX_MATCHED) + ` expecting prefix '${utils_1.Prefix.SH}'`);
541
522
  };
542
523
  exports.dalCommitmentEncoder = dalCommitmentEncoder;
543
524
  const dalCommitmentDecoder = (val) => {
544
- const commitment = (0, exports.prefixDecoder)(utils_1.Prefix.SH)(val);
545
- if (commitment.substring(0, 2) !== utils_1.Prefix.SH) {
546
- throw new errors_1.InvalidDalCommitmentError(commitment, (0, utils_1.invalidDetail)(utils_1.ValidationResult.NO_PREFIX_MATCHED) + ` expecting prefix '${utils_1.Prefix.SH}'`);
547
- }
548
- return commitment;
525
+ return (0, exports.prefixDecoder)(utils_1.PrefixV2.SlotHeader)(val);
549
526
  };
550
527
  exports.dalCommitmentDecoder = dalCommitmentDecoder;
551
528
  const slotHeaderEncoder = (val) => {
@@ -53,6 +53,7 @@ var CODEC;
53
53
  CODEC["BURN_LIMIT"] = "burn_limit";
54
54
  CODEC["OP_INCREASE_PAID_STORAGE"] = "increase_paid_storage";
55
55
  CODEC["OP_UPDATE_CONSENSUS_KEY"] = "update_consensus_key";
56
+ CODEC["SIGNATURE_PROOF"] = "signature_proof";
56
57
  CODEC["OP_DRAIN_DELEGATE"] = "drain_delegate";
57
58
  CODEC["DEPOSITS_LIMIT"] = "deposits_limit";
58
59
  CODEC["OP_SET_DEPOSITS_LIMIT"] = "set_deposits_limit";
@@ -53,6 +53,7 @@ var CODEC;
53
53
  CODEC["BURN_LIMIT"] = "burn_limit";
54
54
  CODEC["OP_INCREASE_PAID_STORAGE"] = "increase_paid_storage";
55
55
  CODEC["OP_UPDATE_CONSENSUS_KEY"] = "update_consensus_key";
56
+ CODEC["OP_UPDATE_COMPANION_KEY"] = "update_companion_key";
56
57
  CODEC["SIGNATURE_PROOF"] = "signature_proof";
57
58
  CODEC["OP_DRAIN_DELEGATE"] = "drain_delegate";
58
59
  CODEC["DEPOSITS_LIMIT"] = "deposits_limit";
@@ -224,6 +225,7 @@ exports.opMapping = {
224
225
  '9b': 'BYTES',
225
226
  '9c': 'NAT',
226
227
  '9d': 'Ticket',
228
+ '9e': 'IS_IMPLICIT_ACCOUNT',
227
229
  };
228
230
  exports.opMappingReverse = (() => {
229
231
  const result = {};
@@ -249,6 +251,7 @@ exports.kindMapping = {
249
251
  0x70: 'set_deposits_limit',
250
252
  0x71: 'increase_paid_storage',
251
253
  0x72: 'update_consensus_key',
254
+ 0x73: 'update_companion_key',
252
255
  0x09: 'drain_delegate',
253
256
  0xc8: 'smart_rollup_originate',
254
257
  0xc9: 'smart_rollup_add_messages',
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.decoders = void 0;
4
+ const codec_proto022_1 = require("./codec-proto022");
5
+ const constants_proto022_1 = require("./constants-proto022");
6
+ const codec_proto022_2 = require("./michelson/codec-proto022");
7
+ const operation_proto022_1 = require("./schema/operation-proto022");
8
+ const utils_1 = require("./utils");
9
+ exports.decoders = {
10
+ [constants_proto022_1.CODEC.SECRET]: (val) => (0, utils_1.toHexString)(val.consume(20)),
11
+ [constants_proto022_1.CODEC.RAW]: (val) => (0, utils_1.toHexString)(val.consume(32)),
12
+ [constants_proto022_1.CODEC.TZ1]: codec_proto022_1.tz1Decoder,
13
+ [constants_proto022_1.CODEC.BRANCH]: codec_proto022_1.branchDecoder,
14
+ [constants_proto022_1.CODEC.ZARITH]: codec_proto022_1.zarithDecoder,
15
+ [constants_proto022_1.CODEC.PUBLIC_KEY]: codec_proto022_1.publicKeyDecoder,
16
+ [constants_proto022_1.CODEC.PKH]: codec_proto022_1.publicKeyHashDecoder,
17
+ [constants_proto022_1.CODEC.PKH_ARR]: codec_proto022_1.publicKeyHashesDecoder,
18
+ [constants_proto022_1.CODEC.DELEGATE]: codec_proto022_1.delegateDecoder,
19
+ [constants_proto022_1.CODEC.INT32]: codec_proto022_1.int32Decoder,
20
+ [constants_proto022_1.CODEC.SCRIPT]: codec_proto022_2.scriptDecoder,
21
+ [constants_proto022_1.CODEC.BALLOT_STATEMENT]: codec_proto022_1.ballotDecoder,
22
+ [constants_proto022_1.CODEC.PROPOSAL]: codec_proto022_1.proposalDecoder,
23
+ [constants_proto022_1.CODEC.PROPOSAL_ARR]: codec_proto022_1.proposalsDecoder,
24
+ [constants_proto022_1.CODEC.PARAMETERS]: codec_proto022_1.parametersDecoder,
25
+ [constants_proto022_1.CODEC.ADDRESS]: codec_proto022_1.addressDecoder,
26
+ [constants_proto022_1.CODEC.SMART_ROLLUP_ADDRESS]: codec_proto022_1.smartRollupAddressDecoder,
27
+ [constants_proto022_1.CODEC.SMART_CONTRACT_ADDRESS]: codec_proto022_1.smartContractAddressDecoder,
28
+ [constants_proto022_1.CODEC.SMART_ROLLUP_COMMITMENT_HASH]: codec_proto022_1.smartRollupCommitmentHashDecoder,
29
+ [constants_proto022_1.CODEC.VALUE]: codec_proto022_1.valueParameterDecoder,
30
+ [constants_proto022_1.CODEC.INT16]: codec_proto022_1.int16Decoder,
31
+ [constants_proto022_1.CODEC.BLOCK_PAYLOAD_HASH]: codec_proto022_1.blockPayloadHashDecoder,
32
+ [constants_proto022_1.CODEC.ENTRYPOINT]: codec_proto022_1.entrypointNameDecoder,
33
+ [constants_proto022_1.CODEC.BURN_LIMIT]: codec_proto022_1.burnLimitDecoder,
34
+ [constants_proto022_1.CODEC.DEPOSITS_LIMIT]: codec_proto022_1.depositsLimitDecoder,
35
+ [constants_proto022_1.CODEC.SIGNATURE_PROOF]: codec_proto022_1.signatureProofDecoder,
36
+ [constants_proto022_1.CODEC.PVM_KIND]: codec_proto022_1.pvmKindDecoder,
37
+ [constants_proto022_1.CODEC.PADDED_BYTES]: codec_proto022_1.paddedBytesDecoder,
38
+ [constants_proto022_1.CODEC.SMART_ROLLUP_MESSAGE]: codec_proto022_1.smartRollupMessageDecoder,
39
+ [constants_proto022_1.CODEC.SLOT_HEADER]: codec_proto022_1.slotHeaderDecoder,
40
+ };
41
+ exports.decoders[constants_proto022_1.CODEC.OPERATION] = (0, operation_proto022_1.operationDecoder)(exports.decoders);
42
+ exports.decoders[constants_proto022_1.CODEC.OP_ACTIVATE_ACCOUNT] = (val) => (0, operation_proto022_1.schemaDecoder)(exports.decoders)(operation_proto022_1.ActivationSchema)(val);
43
+ exports.decoders[constants_proto022_1.CODEC.OP_FAILING_NOOP] = (val) => (0, operation_proto022_1.schemaDecoder)(exports.decoders)(operation_proto022_1.FailingNoopSchema)(val);
44
+ exports.decoders[constants_proto022_1.CODEC.OP_DELEGATION] = (val) => (0, operation_proto022_1.schemaDecoder)(exports.decoders)(operation_proto022_1.DelegationSchema)(val);
45
+ exports.decoders[constants_proto022_1.CODEC.OP_TRANSACTION] = (val) => (0, operation_proto022_1.schemaDecoder)(exports.decoders)(operation_proto022_1.TransactionSchema)(val);
46
+ exports.decoders[constants_proto022_1.CODEC.OP_ORIGINATION] = (val) => (0, operation_proto022_1.schemaDecoder)(exports.decoders)(operation_proto022_1.OriginationSchema)(val);
47
+ exports.decoders[constants_proto022_1.CODEC.OP_BALLOT] = (val) => (0, operation_proto022_1.schemaDecoder)(exports.decoders)(operation_proto022_1.BallotSchema)(val);
48
+ exports.decoders[constants_proto022_1.CODEC.OP_ATTESTATION] = (val) => (0, operation_proto022_1.schemaDecoder)(exports.decoders)(operation_proto022_1.AttestationSchema)(val);
49
+ exports.decoders[constants_proto022_1.CODEC.OP_ATTESTATION_WITH_DAL] = (val) => (0, operation_proto022_1.schemaDecoder)(exports.decoders)(operation_proto022_1.AttestationWithDalSchema)(val);
50
+ exports.decoders[constants_proto022_1.CODEC.OP_SEED_NONCE_REVELATION] = (val) => (0, operation_proto022_1.schemaDecoder)(exports.decoders)(operation_proto022_1.SeedNonceRevelationSchema)(val);
51
+ exports.decoders[constants_proto022_1.CODEC.OP_PROPOSALS] = (val) => (0, operation_proto022_1.schemaDecoder)(exports.decoders)(operation_proto022_1.ProposalsSchema)(val);
52
+ exports.decoders[constants_proto022_1.CODEC.OP_REVEAL] = (val) => (0, operation_proto022_1.schemaDecoder)(exports.decoders)(operation_proto022_1.RevealSchema)(val);
53
+ exports.decoders[constants_proto022_1.CODEC.OP_REGISTER_GLOBAL_CONSTANT] = (val) => (0, operation_proto022_1.schemaDecoder)(exports.decoders)(operation_proto022_1.RegisterGlobalConstantSchema)(val);
54
+ exports.decoders[constants_proto022_1.CODEC.OP_TRANSFER_TICKET] = (val) => (0, operation_proto022_1.schemaDecoder)(exports.decoders)(operation_proto022_1.TransferTicketSchema)(val);
55
+ exports.decoders[constants_proto022_1.CODEC.OP_INCREASE_PAID_STORAGE] = (val) => (0, operation_proto022_1.schemaDecoder)(exports.decoders)(operation_proto022_1.IncreasePaidStorageSchema)(val);
56
+ exports.decoders[constants_proto022_1.CODEC.OP_UPDATE_CONSENSUS_KEY] = (val) => (0, operation_proto022_1.schemaDecoder)(exports.decoders)(operation_proto022_1.UpdateConsensusKeySchema)(val);
57
+ exports.decoders[constants_proto022_1.CODEC.OP_DRAIN_DELEGATE] = (val) => (0, operation_proto022_1.schemaDecoder)(exports.decoders)(operation_proto022_1.DrainDelegateSchema)(val);
58
+ exports.decoders[constants_proto022_1.CODEC.OP_SMART_ROLLUP_ORIGINATE] = (val) => (0, operation_proto022_1.schemaDecoder)(exports.decoders)(operation_proto022_1.SmartRollupOriginateSchema)(val);
59
+ exports.decoders[constants_proto022_1.CODEC.OP_SMART_ROLLUP_ADD_MESSAGES] = (val) => (0, operation_proto022_1.schemaDecoder)(exports.decoders)(operation_proto022_1.SmartRollupAddMessagesSchema)(val);
60
+ exports.decoders[constants_proto022_1.CODEC.OP_SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE] = (val) => (0, operation_proto022_1.schemaDecoder)(exports.decoders)(operation_proto022_1.SmartRollupExecuteOutboxMessageSchema)(val);
61
+ exports.decoders[constants_proto022_1.CODEC.OP_DAL_PUBLISH_COMMITMENT] = (val) => (0, operation_proto022_1.schemaDecoder)(exports.decoders)(operation_proto022_1.DalPublishCommitmentSchema)(val);
62
+ exports.decoders[constants_proto022_1.CODEC.MANAGER] = (0, operation_proto022_1.schemaDecoder)(exports.decoders)(operation_proto022_1.ManagerOperationSchema);
63
+ exports.decoders[constants_proto022_1.CODEC.OP_SET_DEPOSITS_LIMIT] = (val) => (0, operation_proto022_1.schemaDecoder)(exports.decoders)(operation_proto022_1.SetDepositsLimitSchema)(val);
@@ -54,6 +54,7 @@ exports.decoders[constants_1.CODEC.OP_REGISTER_GLOBAL_CONSTANT] = (val) => (0, o
54
54
  exports.decoders[constants_1.CODEC.OP_TRANSFER_TICKET] = (val) => (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.TransferTicketSchema)(val);
55
55
  exports.decoders[constants_1.CODEC.OP_INCREASE_PAID_STORAGE] = (val) => (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.IncreasePaidStorageSchema)(val);
56
56
  exports.decoders[constants_1.CODEC.OP_UPDATE_CONSENSUS_KEY] = (val) => (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.UpdateConsensusKeySchema)(val);
57
+ exports.decoders[constants_1.CODEC.OP_UPDATE_COMPANION_KEY] = (val) => (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.UpdateCompanionKeySchema)(val);
57
58
  exports.decoders[constants_1.CODEC.OP_DRAIN_DELEGATE] = (val) => (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.DrainDelegateSchema)(val);
58
59
  exports.decoders[constants_1.CODEC.OP_SMART_ROLLUP_ORIGINATE] = (val) => (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.SmartRollupOriginateSchema)(val);
59
60
  exports.decoders[constants_1.CODEC.OP_SMART_ROLLUP_ADD_MESSAGES] = (val) => (0, operation_1.schemaDecoder)(exports.decoders)(operation_1.SmartRollupAddMessagesSchema)(val);