@taquito/local-forging 22.0.0-beta.0 → 23.0.0-beta.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 (36) hide show
  1. package/dist/lib/{codec-proto021.js → codec-proto022.js} +71 -23
  2. package/dist/lib/codec.js +5 -12
  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 +13 -7
  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 +521 -201
  18. package/dist/taquito-local-forging.es6.js.map +1 -1
  19. package/dist/taquito-local-forging.umd.js +522 -202
  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/{constants-proto021.d.ts → constants-proto022.d.ts} +1 -0
  23. package/dist/types/constants.d.ts +1 -0
  24. package/dist/types/{decoder-proto021.d.ts → decoder-proto022.d.ts} +1 -1
  25. package/dist/types/{encoder-proto021.d.ts → encoder-proto022.d.ts} +1 -1
  26. package/dist/types/michelson/codec-proto022.d.ts +49 -0
  27. package/dist/types/michelson/codec.d.ts +1 -1
  28. package/dist/types/protocols.d.ts +1 -0
  29. package/dist/types/schema/{operation-proto021.d.ts → operation-proto022.d.ts} +3 -2
  30. package/dist/types/schema/operation.d.ts +10 -0
  31. package/dist/types/taquito-local-forging.d.ts +3 -3
  32. package/dist/types/validator-proto022.d.ts +13 -0
  33. package/package.json +5 -5
  34. package/dist/lib/decoder-proto021.js +0 -62
  35. package/dist/lib/encoder-proto021.js +0 -61
  36. 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
@@ -471,18 +471,11 @@ const depositsLimitDecoder = (value) => {
471
471
  exports.depositsLimitDecoder = depositsLimitDecoder;
472
472
  const signatureV1Encoder = (val) => {
473
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}'.`);
474
+ if (signaturePrefix === utils_1.Prefix.BLSIG) {
475
+ return (0, exports.paddedBytesEncoder)((0, exports.prefixEncoder)(utils_1.Prefix.BLSIG)(val));
476
+ }
477
+ else {
478
+ throw new core_1.ProhibitedActionError('currently we only support encoding of BLSIG signatures');
486
479
  }
487
480
  };
488
481
  const signatureV1Decoder = (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);
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.encoders = 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
+ exports.encoders = {
9
+ [constants_proto022_1.CODEC.SECRET]: (val) => val,
10
+ [constants_proto022_1.CODEC.RAW]: (val) => val,
11
+ [constants_proto022_1.CODEC.TZ1]: codec_proto022_1.tz1Encoder,
12
+ [constants_proto022_1.CODEC.BRANCH]: codec_proto022_1.branchEncoder,
13
+ [constants_proto022_1.CODEC.ZARITH]: codec_proto022_1.zarithEncoder,
14
+ [constants_proto022_1.CODEC.PUBLIC_KEY]: codec_proto022_1.publicKeyEncoder,
15
+ [constants_proto022_1.CODEC.PKH]: codec_proto022_1.publicKeyHashEncoder,
16
+ [constants_proto022_1.CODEC.PKH_ARR]: codec_proto022_1.publicKeyHashesEncoder,
17
+ [constants_proto022_1.CODEC.DELEGATE]: codec_proto022_1.delegateEncoder,
18
+ [constants_proto022_1.CODEC.SCRIPT]: codec_proto022_2.scriptEncoder,
19
+ [constants_proto022_1.CODEC.BALLOT_STATEMENT]: codec_proto022_1.ballotEncoder,
20
+ [constants_proto022_1.CODEC.PROPOSAL]: codec_proto022_1.proposalEncoder,
21
+ [constants_proto022_1.CODEC.PROPOSAL_ARR]: codec_proto022_1.proposalsEncoder,
22
+ [constants_proto022_1.CODEC.INT32]: codec_proto022_1.int32Encoder,
23
+ [constants_proto022_1.CODEC.PARAMETERS]: codec_proto022_1.parametersEncoder,
24
+ [constants_proto022_1.CODEC.ADDRESS]: codec_proto022_1.addressEncoder,
25
+ [constants_proto022_1.CODEC.SMART_ROLLUP_ADDRESS]: codec_proto022_1.smartRollupAddressEncoder,
26
+ [constants_proto022_1.CODEC.SMART_CONTRACT_ADDRESS]: codec_proto022_1.smartContractAddressEncoder,
27
+ [constants_proto022_1.CODEC.SMART_ROLLUP_COMMITMENT_HASH]: codec_proto022_1.smartRollupCommitmentHashEncoder,
28
+ [constants_proto022_1.CODEC.VALUE]: codec_proto022_1.valueParameterEncoder,
29
+ [constants_proto022_1.CODEC.INT16]: codec_proto022_1.int16Encoder,
30
+ [constants_proto022_1.CODEC.BLOCK_PAYLOAD_HASH]: codec_proto022_1.blockPayloadHashEncoder,
31
+ [constants_proto022_1.CODEC.ENTRYPOINT]: codec_proto022_1.entrypointNameEncoder,
32
+ [constants_proto022_1.CODEC.BURN_LIMIT]: codec_proto022_1.burnLimitEncoder,
33
+ [constants_proto022_1.CODEC.DEPOSITS_LIMIT]: codec_proto022_1.depositsLimitEncoder,
34
+ [constants_proto022_1.CODEC.SIGNATURE_PROOF]: codec_proto022_1.signatureProofEncoder,
35
+ [constants_proto022_1.CODEC.PVM_KIND]: codec_proto022_1.pvmKindEncoder,
36
+ [constants_proto022_1.CODEC.PADDED_BYTES]: codec_proto022_1.paddedBytesEncoder,
37
+ [constants_proto022_1.CODEC.SMART_ROLLUP_MESSAGE]: codec_proto022_1.smartRollupMessageEncoder,
38
+ [constants_proto022_1.CODEC.SLOT_HEADER]: codec_proto022_1.slotHeaderEncoder,
39
+ };
40
+ exports.encoders[constants_proto022_1.CODEC.OPERATION] = (0, operation_proto022_1.operationEncoder)(exports.encoders);
41
+ exports.encoders[constants_proto022_1.CODEC.OP_ACTIVATE_ACCOUNT] = (val) => (0, operation_proto022_1.schemaEncoder)(exports.encoders)(operation_proto022_1.ActivationSchema)(val);
42
+ exports.encoders[constants_proto022_1.CODEC.OP_DELEGATION] = (val) => (0, operation_proto022_1.schemaEncoder)(exports.encoders)(operation_proto022_1.DelegationSchema)(val);
43
+ exports.encoders[constants_proto022_1.CODEC.OP_TRANSACTION] = (val) => (0, operation_proto022_1.schemaEncoder)(exports.encoders)(operation_proto022_1.TransactionSchema)(val);
44
+ exports.encoders[constants_proto022_1.CODEC.OP_ORIGINATION] = (val) => (0, operation_proto022_1.schemaEncoder)(exports.encoders)(operation_proto022_1.OriginationSchema)(val);
45
+ exports.encoders[constants_proto022_1.CODEC.OP_BALLOT] = (val) => (0, operation_proto022_1.schemaEncoder)(exports.encoders)(operation_proto022_1.BallotSchema)(val);
46
+ exports.encoders[constants_proto022_1.CODEC.OP_ATTESTATION] = (val) => (0, operation_proto022_1.schemaEncoder)(exports.encoders)(operation_proto022_1.AttestationSchema)(val);
47
+ exports.encoders[constants_proto022_1.CODEC.OP_ATTESTATION_WITH_DAL] = (val) => (0, operation_proto022_1.schemaEncoder)(exports.encoders)(operation_proto022_1.AttestationWithDalSchema)(val);
48
+ exports.encoders[constants_proto022_1.CODEC.OP_SEED_NONCE_REVELATION] = (val) => (0, operation_proto022_1.schemaEncoder)(exports.encoders)(operation_proto022_1.SeedNonceRevelationSchema)(val);
49
+ exports.encoders[constants_proto022_1.CODEC.OP_PROPOSALS] = (val) => (0, operation_proto022_1.schemaEncoder)(exports.encoders)(operation_proto022_1.ProposalsSchema)(val);
50
+ exports.encoders[constants_proto022_1.CODEC.OP_REVEAL] = (val) => (0, operation_proto022_1.schemaEncoder)(exports.encoders)(operation_proto022_1.RevealSchema)(val);
51
+ exports.encoders[constants_proto022_1.CODEC.OP_REGISTER_GLOBAL_CONSTANT] = (val) => (0, operation_proto022_1.schemaEncoder)(exports.encoders)(operation_proto022_1.RegisterGlobalConstantSchema)(val);
52
+ exports.encoders[constants_proto022_1.CODEC.OP_TRANSFER_TICKET] = (val) => (0, operation_proto022_1.schemaEncoder)(exports.encoders)(operation_proto022_1.TransferTicketSchema)(val);
53
+ exports.encoders[constants_proto022_1.CODEC.OP_INCREASE_PAID_STORAGE] = (val) => (0, operation_proto022_1.schemaEncoder)(exports.encoders)(operation_proto022_1.IncreasePaidStorageSchema)(val);
54
+ exports.encoders[constants_proto022_1.CODEC.OP_UPDATE_CONSENSUS_KEY] = (val) => (0, operation_proto022_1.schemaEncoder)(exports.encoders)(operation_proto022_1.UpdateConsensusKeySchema)(val);
55
+ exports.encoders[constants_proto022_1.CODEC.OP_DRAIN_DELEGATE] = (val) => (0, operation_proto022_1.schemaEncoder)(exports.encoders)(operation_proto022_1.DrainDelegateSchema)(val);
56
+ exports.encoders[constants_proto022_1.CODEC.OP_SMART_ROLLUP_ORIGINATE] = (val) => (0, operation_proto022_1.schemaEncoder)(exports.encoders)(operation_proto022_1.SmartRollupOriginateSchema)(val);
57
+ exports.encoders[constants_proto022_1.CODEC.OP_SMART_ROLLUP_ADD_MESSAGES] = (val) => (0, operation_proto022_1.schemaEncoder)(exports.encoders)(operation_proto022_1.SmartRollupAddMessagesSchema)(val);
58
+ exports.encoders[constants_proto022_1.CODEC.OP_SMART_ROLLUP_EXECUTE_OUTBOX_MESSAGE] = (val) => (0, operation_proto022_1.schemaEncoder)(exports.encoders)(operation_proto022_1.SmartRollupExecuteOutboxMessageSchema)(val);
59
+ exports.encoders[constants_proto022_1.CODEC.OP_DAL_PUBLISH_COMMITMENT] = (val) => (0, operation_proto022_1.schemaEncoder)(exports.encoders)(operation_proto022_1.DalPublishCommitmentSchema)(val);
60
+ exports.encoders[constants_proto022_1.CODEC.MANAGER] = (0, operation_proto022_1.schemaEncoder)(exports.encoders)(operation_proto022_1.ManagerOperationSchema);
61
+ exports.encoders[constants_proto022_1.CODEC.OP_SET_DEPOSITS_LIMIT] = (val) => (0, operation_proto022_1.schemaEncoder)(exports.encoders)(operation_proto022_1.SetDepositsLimitSchema)(val);
62
+ exports.encoders[constants_proto022_1.CODEC.OP_FAILING_NOOP] = (val) => (0, operation_proto022_1.schemaEncoder)(exports.encoders)(operation_proto022_1.FailingNoopSchema)(val);
@@ -52,6 +52,7 @@ exports.encoders[constants_1.CODEC.OP_REGISTER_GLOBAL_CONSTANT] = (val) => (0, o
52
52
  exports.encoders[constants_1.CODEC.OP_TRANSFER_TICKET] = (val) => (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.TransferTicketSchema)(val);
53
53
  exports.encoders[constants_1.CODEC.OP_INCREASE_PAID_STORAGE] = (val) => (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.IncreasePaidStorageSchema)(val);
54
54
  exports.encoders[constants_1.CODEC.OP_UPDATE_CONSENSUS_KEY] = (val) => (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.UpdateConsensusKeySchema)(val);
55
+ exports.encoders[constants_1.CODEC.OP_UPDATE_COMPANION_KEY] = (val) => (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.UpdateCompanionKeySchema)(val);
55
56
  exports.encoders[constants_1.CODEC.OP_DRAIN_DELEGATE] = (val) => (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.DrainDelegateSchema)(val);
56
57
  exports.encoders[constants_1.CODEC.OP_SMART_ROLLUP_ORIGINATE] = (val) => (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.SmartRollupOriginateSchema)(val);
57
58
  exports.encoders[constants_1.CODEC.OP_SMART_ROLLUP_ADD_MESSAGES] = (val) => (0, operation_1.schemaEncoder)(exports.encoders)(operation_1.SmartRollupAddMessagesSchema)(val);