@airgap/coinlib-core 0.13.8-beta.9 → 0.13.9-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 (150) hide show
  1. package/dependencies/src/@stablelib/binary-1.0.1/packages/binary/binary.d.ts +230 -0
  2. package/dependencies/src/@stablelib/binary-1.0.1/packages/binary/binary.js +471 -0
  3. package/dependencies/src/@stablelib/binary-1.0.1/packages/binary/binary.js.map +1 -0
  4. package/dependencies/src/@stablelib/blake2b-1.0.1/packages/blake2b/blake2b.d.ts +76 -0
  5. package/dependencies/src/@stablelib/blake2b-1.0.1/packages/blake2b/blake2b.js +455 -0
  6. package/dependencies/src/@stablelib/blake2b-1.0.1/packages/blake2b/blake2b.js.map +1 -0
  7. package/dependencies/src/@stablelib/ed25519-1.0.3/packages/ed25519/ed25519.d.ts +27 -0
  8. package/dependencies/src/@stablelib/ed25519-1.0.3/packages/ed25519/ed25519.js +848 -0
  9. package/dependencies/src/@stablelib/ed25519-1.0.3/packages/ed25519/ed25519.js.map +1 -0
  10. package/dependencies/src/@stablelib/hash-1.0.1/packages/hash/hash.d.ts +22 -0
  11. package/dependencies/src/@stablelib/hash-1.0.1/packages/hash/hash.js +14 -0
  12. package/dependencies/src/@stablelib/hash-1.0.1/packages/hash/hash.js.map +1 -0
  13. package/dependencies/src/@stablelib/int-1.0.1/packages/int/int.d.ts +29 -0
  14. package/dependencies/src/@stablelib/int-1.0.1/packages/int/int.js +63 -0
  15. package/dependencies/src/@stablelib/int-1.0.1/packages/int/int.js.map +1 -0
  16. package/dependencies/src/@stablelib/random-1.0.2/packages/random/random.d.ts +36 -0
  17. package/dependencies/src/@stablelib/random-1.0.2/packages/random/random.js +87 -0
  18. package/dependencies/src/@stablelib/random-1.0.2/packages/random/random.js.map +1 -0
  19. package/dependencies/src/@stablelib/random-1.0.2/packages/random/source/browser.d.ts +8 -0
  20. package/dependencies/src/@stablelib/random-1.0.2/packages/random/source/browser.js +33 -0
  21. package/dependencies/src/@stablelib/random-1.0.2/packages/random/source/browser.js.map +1 -0
  22. package/dependencies/src/@stablelib/random-1.0.2/packages/random/source/index.d.ts +11 -0
  23. package/dependencies/src/@stablelib/random-1.0.2/packages/random/source/index.js +5 -0
  24. package/dependencies/src/@stablelib/random-1.0.2/packages/random/source/index.js.map +1 -0
  25. package/dependencies/src/@stablelib/random-1.0.2/packages/random/source/node.d.ts +8 -0
  26. package/dependencies/src/@stablelib/random-1.0.2/packages/random/source/node.js +43 -0
  27. package/dependencies/src/@stablelib/random-1.0.2/packages/random/source/node.js.map +1 -0
  28. package/dependencies/src/@stablelib/random-1.0.2/packages/random/source/system.d.ts +8 -0
  29. package/dependencies/src/@stablelib/random-1.0.2/packages/random/source/system.js +37 -0
  30. package/dependencies/src/@stablelib/random-1.0.2/packages/random/source/system.js.map +1 -0
  31. package/dependencies/src/@stablelib/sha512/packages/sha512/sha512.d.ts +73 -0
  32. package/dependencies/src/@stablelib/sha512/packages/sha512/sha512.js +552 -0
  33. package/dependencies/src/@stablelib/sha512/packages/sha512/sha512.js.map +1 -0
  34. package/dependencies/src/@stablelib/sha512-1.0.1/packages/sha512/sha512.d.ts +73 -0
  35. package/dependencies/src/@stablelib/sha512-1.0.1/packages/sha512/sha512.js +552 -0
  36. package/dependencies/src/@stablelib/sha512-1.0.1/packages/sha512/sha512.js.map +1 -0
  37. package/dependencies/src/@stablelib/wipe-1.0.1/packages/wipe/wipe.d.ts +18 -0
  38. package/dependencies/src/@stablelib/wipe-1.0.1/packages/wipe/wipe.js +29 -0
  39. package/dependencies/src/@stablelib/wipe-1.0.1/packages/wipe/wipe.js.map +1 -0
  40. package/dependencies/src/@taquito/{local-forging-8.0.1-beta.1 → local-forging-15.0.1}/packages/taquito-local-forging/src/codec.d.ts +22 -4
  41. package/dependencies/src/@taquito/{local-forging-8.0.1-beta.1 → local-forging-15.0.1}/packages/taquito-local-forging/src/codec.js +104 -13
  42. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/codec.js.map +1 -0
  43. package/dependencies/src/@taquito/{local-forging-8.0.1-beta.1 → local-forging-15.0.1}/packages/taquito-local-forging/src/constants.d.ts +17 -1
  44. package/dependencies/src/@taquito/{local-forging-8.0.1-beta.1 → local-forging-15.0.1}/packages/taquito-local-forging/src/constants.js +44 -6
  45. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/constants.js.map +1 -0
  46. package/dependencies/src/@taquito/{local-forging-8.0.1-beta.1 → local-forging-15.0.1}/packages/taquito-local-forging/src/decoder.d.ts +1 -1
  47. package/dependencies/src/@taquito/{local-forging-8.0.1-beta.1 → local-forging-15.0.1}/packages/taquito-local-forging/src/decoder.js +30 -0
  48. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/decoder.js.map +1 -0
  49. package/dependencies/src/@taquito/{local-forging-8.0.1-beta.1 → local-forging-15.0.1}/packages/taquito-local-forging/src/encoder.d.ts +0 -0
  50. package/dependencies/src/@taquito/{local-forging-8.0.1-beta.1 → local-forging-15.0.1}/packages/taquito-local-forging/src/encoder.js +28 -0
  51. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/encoder.js.map +1 -0
  52. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/error.d.ts +89 -0
  53. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/error.js +169 -0
  54. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/error.js.map +1 -0
  55. package/dependencies/src/@taquito/{local-forging-8.0.1-beta.1/packages/taquito/src/forger → local-forging-15.0.1/packages/taquito-local-forging/src}/interface.d.ts +1 -1
  56. package/dependencies/src/@taquito/{local-forging-8.0.1-beta.1/packages/taquito/src/forger → local-forging-15.0.1/packages/taquito-local-forging/src}/interface.js +0 -0
  57. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/interface.js.map +1 -0
  58. package/dependencies/src/@taquito/{local-forging-8.0.1-beta.1 → local-forging-15.0.1}/packages/taquito-local-forging/src/michelson/codec.d.ts +6 -5
  59. package/dependencies/src/@taquito/{local-forging-8.0.1-beta.1 → local-forging-15.0.1}/packages/taquito-local-forging/src/michelson/codec.js +62 -19
  60. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/michelson/codec.js.map +1 -0
  61. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/proto14-kathmandu/codec-proto14.d.ts +15 -0
  62. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/proto14-kathmandu/codec-proto14.js +80 -0
  63. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/proto14-kathmandu/codec-proto14.js.map +1 -0
  64. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/proto14-kathmandu/constants-proto14.d.ts +12 -0
  65. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/proto14-kathmandu/constants-proto14.js +184 -0
  66. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/proto14-kathmandu/constants-proto14.js.map +1 -0
  67. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/proto14-kathmandu/decoder-proto14.d.ts +5 -0
  68. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/proto14-kathmandu/decoder-proto14.js +81 -0
  69. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/proto14-kathmandu/decoder-proto14.js.map +1 -0
  70. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/proto14-kathmandu/encoder-proto14.d.ts +4 -0
  71. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/proto14-kathmandu/encoder-proto14.js +76 -0
  72. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/proto14-kathmandu/encoder-proto14.js.map +1 -0
  73. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/proto14-kathmandu/michelson/codec-proto14.d.ts +14 -0
  74. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/proto14-kathmandu/michelson/codec-proto14.js +150 -0
  75. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/proto14-kathmandu/michelson/codec-proto14.js.map +1 -0
  76. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/protocols.d.ts +17 -0
  77. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/protocols.js +41 -0
  78. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/protocols.js.map +1 -0
  79. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/schema/operation.d.ts +150 -0
  80. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/schema/operation.js +217 -0
  81. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/schema/operation.js.map +1 -0
  82. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/taquito-local-forging.d.ts +26 -0
  83. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/taquito-local-forging.js +115 -0
  84. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/taquito-local-forging.js.map +1 -0
  85. package/dependencies/src/@taquito/{local-forging-8.0.1-beta.1 → local-forging-15.0.1}/packages/taquito-local-forging/src/uint8array-consumer.d.ts +0 -0
  86. package/dependencies/src/@taquito/{local-forging-8.0.1-beta.1 → local-forging-15.0.1}/packages/taquito-local-forging/src/uint8array-consumer.js +2 -1
  87. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/uint8array-consumer.js.map +1 -0
  88. package/dependencies/src/@taquito/{local-forging-8.0.1-beta.1 → local-forging-15.0.1}/packages/taquito-local-forging/src/utils.d.ts +0 -0
  89. package/dependencies/src/@taquito/{local-forging-8.0.1-beta.1 → local-forging-15.0.1}/packages/taquito-local-forging/src/utils.js +0 -0
  90. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/utils.js.map +1 -0
  91. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/validator.d.ts +13 -0
  92. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/validator.js +52 -0
  93. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/validator.js.map +1 -0
  94. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/version.d.ts +4 -0
  95. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/version.js +9 -0
  96. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-local-forging/src/version.js.map +1 -0
  97. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-rpc/src/opkind.d.ts +34 -0
  98. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-rpc/src/opkind.js +39 -0
  99. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-rpc/src/opkind.js.map +1 -0
  100. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-rpc/src/types.d.ts +1590 -0
  101. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-rpc/src/types.js +35 -0
  102. package/dependencies/src/@taquito/local-forging-15.0.1/packages/taquito-rpc/src/types.js.map +1 -0
  103. package/dependencies/src/@taquito/{utils-8.0.1-beta.1 → utils-15.0.1}/packages/taquito-utils/src/constants.d.ts +27 -3
  104. package/dependencies/src/@taquito/{utils-8.0.1-beta.1 → utils-15.0.1}/packages/taquito-utils/src/constants.js +40 -1
  105. package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/constants.js.map +1 -0
  106. package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/errors.d.ts +145 -0
  107. package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/errors.js +270 -0
  108. package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/errors.js.map +1 -0
  109. package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/format.d.ts +4 -0
  110. package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/format.js +33 -0
  111. package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/format.js.map +1 -0
  112. package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/taquito-utils.d.ts +163 -0
  113. package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/taquito-utils.js +438 -0
  114. package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/taquito-utils.js.map +1 -0
  115. package/dependencies/src/@taquito/{utils-8.0.1-beta.1 → utils-15.0.1}/packages/taquito-utils/src/validators.d.ts +63 -9
  116. package/dependencies/src/@taquito/{utils-8.0.1-beta.1 → utils-15.0.1}/packages/taquito-utils/src/validators.js +85 -8
  117. package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/validators.js.map +1 -0
  118. package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/verify-signature.d.ts +24 -0
  119. package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/verify-signature.js +126 -0
  120. package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/verify-signature.js.map +1 -0
  121. package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/version.d.ts +4 -0
  122. package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/version.js +9 -0
  123. package/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/version.js.map +1 -0
  124. package/dependencies/src/typedarray-to-buffer-4.0.0/index.js +17 -0
  125. package/package.json +2 -1
  126. package/dependencies/src/@taquito/local-forging-8.0.1-beta.1/packages/taquito/src/forger/interface.js.map +0 -1
  127. package/dependencies/src/@taquito/local-forging-8.0.1-beta.1/packages/taquito-local-forging/src/codec.js.map +0 -1
  128. package/dependencies/src/@taquito/local-forging-8.0.1-beta.1/packages/taquito-local-forging/src/constants.js.map +0 -1
  129. package/dependencies/src/@taquito/local-forging-8.0.1-beta.1/packages/taquito-local-forging/src/decoder.js.map +0 -1
  130. package/dependencies/src/@taquito/local-forging-8.0.1-beta.1/packages/taquito-local-forging/src/encoder.js.map +0 -1
  131. package/dependencies/src/@taquito/local-forging-8.0.1-beta.1/packages/taquito-local-forging/src/michelson/codec.js.map +0 -1
  132. package/dependencies/src/@taquito/local-forging-8.0.1-beta.1/packages/taquito-local-forging/src/schema/operation.d.ts +0 -86
  133. package/dependencies/src/@taquito/local-forging-8.0.1-beta.1/packages/taquito-local-forging/src/schema/operation.js +0 -149
  134. package/dependencies/src/@taquito/local-forging-8.0.1-beta.1/packages/taquito-local-forging/src/schema/operation.js.map +0 -1
  135. package/dependencies/src/@taquito/local-forging-8.0.1-beta.1/packages/taquito-local-forging/src/taquito-local-forging.d.ts +0 -16
  136. package/dependencies/src/@taquito/local-forging-8.0.1-beta.1/packages/taquito-local-forging/src/taquito-local-forging.js +0 -51
  137. package/dependencies/src/@taquito/local-forging-8.0.1-beta.1/packages/taquito-local-forging/src/taquito-local-forging.js.map +0 -1
  138. package/dependencies/src/@taquito/local-forging-8.0.1-beta.1/packages/taquito-local-forging/src/uint8array-consumer.js.map +0 -1
  139. package/dependencies/src/@taquito/local-forging-8.0.1-beta.1/packages/taquito-local-forging/src/utils.js.map +0 -1
  140. package/dependencies/src/@taquito/local-forging-8.0.1-beta.1/packages/taquito-rpc/src/opkind.d.ts +0 -13
  141. package/dependencies/src/@taquito/local-forging-8.0.1-beta.1/packages/taquito-rpc/src/opkind.js +0 -18
  142. package/dependencies/src/@taquito/local-forging-8.0.1-beta.1/packages/taquito-rpc/src/opkind.js.map +0 -1
  143. package/dependencies/src/@taquito/local-forging-8.0.1-beta.1/packages/taquito-rpc/src/types.d.ts +0 -598
  144. package/dependencies/src/@taquito/local-forging-8.0.1-beta.1/packages/taquito-rpc/src/types.js +0 -3
  145. package/dependencies/src/@taquito/local-forging-8.0.1-beta.1/packages/taquito-rpc/src/types.js.map +0 -1
  146. package/dependencies/src/@taquito/utils-8.0.1-beta.1/packages/taquito-utils/src/constants.js.map +0 -1
  147. package/dependencies/src/@taquito/utils-8.0.1-beta.1/packages/taquito-utils/src/taquito-utils.d.ts +0 -83
  148. package/dependencies/src/@taquito/utils-8.0.1-beta.1/packages/taquito-utils/src/taquito-utils.js +0 -245
  149. package/dependencies/src/@taquito/utils-8.0.1-beta.1/packages/taquito-utils/src/taquito-utils.js.map +0 -1
  150. package/dependencies/src/@taquito/utils-8.0.1-beta.1/packages/taquito-utils/src/validators.js.map +0 -1
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.format = void 0;
7
+ var bignumber_1 = __importDefault(require("../../../../../bignumber.js-9.0.0/bignumber"));
8
+ var TZ_DECIMALS = 6;
9
+ var MTZ_DECIMALS = 3;
10
+ function getDecimal(format) {
11
+ switch (format) {
12
+ case 'tz':
13
+ return TZ_DECIMALS;
14
+ case 'mtz':
15
+ return MTZ_DECIMALS;
16
+ case 'mutez':
17
+ default:
18
+ return 0;
19
+ }
20
+ }
21
+ function format(from, to, amount) {
22
+ if (from === void 0) { from = 'mutez'; }
23
+ if (to === void 0) { to = 'mutez'; }
24
+ var bigNum = new bignumber_1.default(amount);
25
+ if (bigNum.isNaN()) {
26
+ return amount;
27
+ }
28
+ return bigNum
29
+ .multipliedBy(Math.pow(10, getDecimal(from)))
30
+ .dividedBy(Math.pow(10, getDecimal(to)));
31
+ }
32
+ exports.format = format;
33
+ //# sourceMappingURL=format.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format.js","sourceRoot":"","sources":["../../../../../../../../src/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/format.ts"],"names":[],"mappings":";;;;;;AAAA,0FAAoE;AAEpE,IAAM,WAAW,GAAG,CAAC,CAAC;AACtB,IAAM,YAAY,GAAG,CAAC,CAAC;AAIvB,SAAS,UAAU,CAAC,MAAc;IAChC,QAAQ,MAAM,EAAE;QACd,KAAK,IAAI;YACP,OAAO,WAAW,CAAC;QACrB,KAAK,KAAK;YACR,OAAO,YAAY,CAAC;QACtB,KAAK,OAAO,CAAC;QACb;YACE,OAAO,CAAC,CAAC;KACZ;AACH,CAAC;AAED,SAAgB,MAAM,CACpB,IAAsB,EACtB,EAAoB,EACpB,MAAmC;IAFnC,qBAAA,EAAA,cAAsB;IACtB,mBAAA,EAAA,YAAoB;IAGpB,IAAM,MAAM,GAAG,IAAI,mBAAS,CAAC,MAAM,CAAC,CAAC;IACrC,IAAI,MAAM,CAAC,KAAK,EAAE,EAAE;QAClB,OAAO,MAAM,CAAC;KACf;IAED,OAAO,MAAM;SACV,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;SAC5C,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAC7C,CAAC;AAbD,wBAaC"}
@@ -0,0 +1,163 @@
1
+ /**
2
+ * @packageDocumentation
3
+ * @module @taquito/utils
4
+ */
5
+ import { Buffer } from '../../../../../buffer-5.6.0/index';
6
+ import BigNumber from '../../../../../bignumber.js-9.0.0/bignumber';
7
+ export * from './validators';
8
+ export { VERSION } from './version';
9
+ export { prefix, Prefix, prefixLength } from './constants';
10
+ export { verifySignature, validatePkAndExtractPrefix } from './verify-signature';
11
+ export * from './errors';
12
+ export { format } from './format';
13
+ /**
14
+ *
15
+ * @description Hash a string using the BLAKE2b algorithm, base58 encode the hash obtained and appends the prefix 'expr' to it
16
+ *
17
+ * @param value Value in hex
18
+ */
19
+ export declare function encodeExpr(value: string): any;
20
+ /**
21
+ *
22
+ * @description Return the operation hash of a signed operation
23
+ * @param value Value in hex of a signed operation
24
+ */
25
+ export declare function encodeOpHash(value: string): any;
26
+ /**
27
+ *
28
+ * @description Base58 encode a string or a Uint8Array and append a prefix to it
29
+ *
30
+ * @param value Value to base58 encode
31
+ * @param prefix prefix to append to the encoded string
32
+ */
33
+ export declare function b58cencode(value: string | Uint8Array, prefix: Uint8Array): any;
34
+ /**
35
+ *
36
+ * @description Base58 decode a string and remove the prefix from it
37
+ *
38
+ * @param value Value to base58 decode
39
+ * @param prefix prefix to remove from the decoded string
40
+ */
41
+ export declare const b58cdecode: (enc: string, prefixArg: Uint8Array) => Uint8Array;
42
+ /**
43
+ *
44
+ * @description Base58 decode a string with predefined prefix
45
+ *
46
+ * @param value Value to base58 decode
47
+ */
48
+ export declare function b58decode(payload: string): string;
49
+ /**
50
+ *
51
+ * @description b58 decode a string without predefined prefix
52
+ * @param value
53
+ * @returns string of bytes
54
+ */
55
+ export declare function b58decodeL2Address(payload: string): string;
56
+ /**
57
+ *
58
+ * @description Base58 encode an address using predefined prefix
59
+ *
60
+ * @param value Address to base58 encode (tz1, tz2, tz3 or KT1)
61
+ */
62
+ export declare function encodePubKey(value: string): any;
63
+ /**
64
+ *
65
+ * @description Base58 encode an address without predefined prefix
66
+ * @param value Address to base58 encode (tz4) hex dec
67
+ * @returns return address
68
+ */
69
+ export declare function encodeL2Address(value: string): any;
70
+ /**
71
+ *
72
+ * @description Base58 encode a key according to its prefix
73
+ *
74
+ * @param value Key to base58 encode
75
+ */
76
+ export declare function encodeKey(value: string): any;
77
+ /**
78
+ *
79
+ * @description Base58 encode a key hash according to its prefix
80
+ *
81
+ * @param value Key hash to base58 encode
82
+ */
83
+ export declare function encodeKeyHash(value: string): any;
84
+ /**
85
+ *
86
+ * @description Convert an hex string to a Uint8Array
87
+ *
88
+ * @param hex Hex string to convert
89
+ */
90
+ export declare const hex2buf: (hex: string) => Uint8Array;
91
+ /**
92
+ *
93
+ * @description Merge 2 buffers together
94
+ *
95
+ * @param b1 First buffer
96
+ * @param b2 Second buffer
97
+ */
98
+ export declare const mergebuf: (b1: Uint8Array, b2: Uint8Array) => Uint8Array;
99
+ /**
100
+ *
101
+ * @description Flatten a michelson json representation to an array
102
+ *
103
+ * @param s michelson json
104
+ */
105
+ export declare const mic2arr: (s: any) => any;
106
+ /**
107
+ *
108
+ * @description Convert a buffer to an hex string
109
+ *
110
+ * @param buffer Buffer to convert
111
+ */
112
+ export declare const buf2hex: (buffer: Buffer) => string;
113
+ /**
114
+ *
115
+ * @description Gets Tezos address (PKH) from Public Key
116
+ *
117
+ * @param publicKey Public Key
118
+ * @returns A string of the Tezos address (PKH) that was derived from the given Public Key
119
+ */
120
+ export declare const getPkhfromPk: (publicKey: string) => string;
121
+ /**
122
+ *
123
+ * @description Convert a string to bytes
124
+ *
125
+ * @param str String to convert
126
+ */
127
+ export declare function char2Bytes(str: string): string;
128
+ /**
129
+ *
130
+ * @description Convert bytes to a string
131
+ *
132
+ * @param str Bytes to convert
133
+ */
134
+ export declare function bytes2Char(hex: string): string;
135
+ /**
136
+ *
137
+ * @description Convert hex string/UintArray/Buffer to bytes
138
+ *
139
+ * @param hex String value to convert to bytes
140
+ */
141
+ export declare function hex2Bytes(hex: string): Buffer;
142
+ /**
143
+ *
144
+ * @description Converts a number or Bignumber to hexadecimal string
145
+ *
146
+ * @param val The value that will be converted to a hexadecimal string value
147
+ */
148
+ export declare function toHexBuf(val: number | BigNumber, bitLength?: number): Buffer;
149
+ /**
150
+ *
151
+ * @description Converts a number or BigNumber to a padded hexadecimal string
152
+ * @param val The value that will be converted into a padded hexadecimal string value
153
+ * @param bitLength The length of bits
154
+ *
155
+ */
156
+ export declare function num2PaddedHex(val: number | BigNumber, bitLength?: number): string;
157
+ /**
158
+ *
159
+ * @description Strips the first 2 characters of a hex string (0x)
160
+ *
161
+ * @param hex string to strip prefix from
162
+ */
163
+ export declare function stripHexPrefix(hex: string): string;
@@ -0,0 +1,438 @@
1
+ "use strict";
2
+ /**
3
+ * @packageDocumentation
4
+ * @module @taquito/utils
5
+ */
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
18
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
19
+ };
20
+ var __importDefault = (this && this.__importDefault) || function (mod) {
21
+ return (mod && mod.__esModule) ? mod : { "default": mod };
22
+ };
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ exports.stripHexPrefix = exports.num2PaddedHex = exports.toHexBuf = exports.hex2Bytes = exports.bytes2Char = exports.char2Bytes = exports.getPkhfromPk = exports.buf2hex = exports.mic2arr = exports.mergebuf = exports.hex2buf = exports.encodeKeyHash = exports.encodeKey = exports.encodeL2Address = exports.encodePubKey = exports.b58decodeL2Address = exports.b58decode = exports.b58cdecode = exports.b58cencode = exports.encodeOpHash = exports.encodeExpr = exports.format = exports.validatePkAndExtractPrefix = exports.verifySignature = exports.prefixLength = exports.Prefix = exports.prefix = exports.VERSION = void 0;
25
+ /*
26
+ * Some code in this file is originally from sotez and eztz
27
+ * Copyright (c) 2018 Andrew Kishino
28
+ * Copyright (c) 2017 Stephen Andrews
29
+ */
30
+ var index_1 = require("../../../../../buffer-5.6.0/index");
31
+ var constants_1 = require("./constants");
32
+ var verify_signature_1 = require("./verify-signature");
33
+ var blake2b_1 = require("../../../../../@stablelib/blake2b-1.0.1/packages/blake2b/blake2b");
34
+ var index_2 = __importDefault(require("../../../../../blakejs-1.1.0/index"));
35
+ var index_3 = __importDefault(require("../../../../../bs58check-2.1.2/index"));
36
+ var errors_1 = require("./errors");
37
+ var bignumber_1 = __importDefault(require("../../../../../bignumber.js-9.0.0/bignumber"));
38
+ __exportStar(require("./validators"), exports);
39
+ var version_1 = require("./version");
40
+ Object.defineProperty(exports, "VERSION", { enumerable: true, get: function () { return version_1.VERSION; } });
41
+ var constants_2 = require("./constants");
42
+ Object.defineProperty(exports, "prefix", { enumerable: true, get: function () { return constants_2.prefix; } });
43
+ Object.defineProperty(exports, "Prefix", { enumerable: true, get: function () { return constants_2.Prefix; } });
44
+ Object.defineProperty(exports, "prefixLength", { enumerable: true, get: function () { return constants_2.prefixLength; } });
45
+ var verify_signature_2 = require("./verify-signature");
46
+ Object.defineProperty(exports, "verifySignature", { enumerable: true, get: function () { return verify_signature_2.verifySignature; } });
47
+ Object.defineProperty(exports, "validatePkAndExtractPrefix", { enumerable: true, get: function () { return verify_signature_2.validatePkAndExtractPrefix; } });
48
+ __exportStar(require("./errors"), exports);
49
+ var format_1 = require("./format");
50
+ Object.defineProperty(exports, "format", { enumerable: true, get: function () { return format_1.format; } });
51
+ /**
52
+ *
53
+ * @description Hash a string using the BLAKE2b algorithm, base58 encode the hash obtained and appends the prefix 'expr' to it
54
+ *
55
+ * @param value Value in hex
56
+ */
57
+ function encodeExpr(value) {
58
+ var blakeHash = index_2.default.blake2b((0, exports.hex2buf)(value), undefined, 32);
59
+ return b58cencode(blakeHash, constants_1.prefix['expr']);
60
+ }
61
+ exports.encodeExpr = encodeExpr;
62
+ /**
63
+ *
64
+ * @description Return the operation hash of a signed operation
65
+ * @param value Value in hex of a signed operation
66
+ */
67
+ function encodeOpHash(value) {
68
+ var blakeHash = index_2.default.blake2b((0, exports.hex2buf)(value), undefined, 32);
69
+ return b58cencode(blakeHash, constants_1.prefix.o);
70
+ }
71
+ exports.encodeOpHash = encodeOpHash;
72
+ /**
73
+ *
74
+ * @description Base58 encode a string or a Uint8Array and append a prefix to it
75
+ *
76
+ * @param value Value to base58 encode
77
+ * @param prefix prefix to append to the encoded string
78
+ */
79
+ function b58cencode(value, prefix) {
80
+ var payloadAr = typeof value === 'string' ? Uint8Array.from(index_1.Buffer.from(value, 'hex')) : value;
81
+ var n = new Uint8Array(prefix.length + payloadAr.length);
82
+ n.set(prefix);
83
+ n.set(payloadAr, prefix.length);
84
+ return index_3.default.encode(index_1.Buffer.from(n.buffer));
85
+ }
86
+ exports.b58cencode = b58cencode;
87
+ /**
88
+ *
89
+ * @description Base58 decode a string and remove the prefix from it
90
+ *
91
+ * @param value Value to base58 decode
92
+ * @param prefix prefix to remove from the decoded string
93
+ */
94
+ var b58cdecode = function (enc, prefixArg) {
95
+ return index_3.default.decode(enc).slice(prefixArg.length);
96
+ };
97
+ exports.b58cdecode = b58cdecode;
98
+ /**
99
+ *
100
+ * @description Base58 decode a string with predefined prefix
101
+ *
102
+ * @param value Value to base58 decode
103
+ */
104
+ function b58decode(payload) {
105
+ var _a, _b;
106
+ var buf = index_3.default.decode(payload);
107
+ var prefixMap = (_a = {},
108
+ _a[constants_1.prefix.tz1.toString()] = '0000',
109
+ _a[constants_1.prefix.tz2.toString()] = '0001',
110
+ _a[constants_1.prefix.tz3.toString()] = '0002',
111
+ _a);
112
+ var rollupPrefMap = (_b = {},
113
+ _b[constants_1.prefix.txr1.toString()] = '02',
114
+ _b);
115
+ var pref = prefixMap[new Uint8Array(buf.slice(0, 3)).toString()];
116
+ var rollupPref = rollupPrefMap[new Uint8Array(buf.slice(0, 4)).toString()];
117
+ if (pref) {
118
+ // tz addresses
119
+ var hex = (0, exports.buf2hex)(buf.slice(3));
120
+ return pref + hex;
121
+ }
122
+ else if (rollupPref) {
123
+ var hex = (0, exports.buf2hex)(buf.slice(4));
124
+ return rollupPref + hex + '00';
125
+ }
126
+ else {
127
+ // other (kt addresses)
128
+ return '01' + (0, exports.buf2hex)(buf.slice(3, 42)) + '00';
129
+ }
130
+ }
131
+ exports.b58decode = b58decode;
132
+ /**
133
+ *
134
+ * @description b58 decode a string without predefined prefix
135
+ * @param value
136
+ * @returns string of bytes
137
+ */
138
+ function b58decodeL2Address(payload) {
139
+ var buf = index_3.default.decode(payload);
140
+ // tz4 address currently
141
+ return (0, exports.buf2hex)(buf.slice(3, 42));
142
+ }
143
+ exports.b58decodeL2Address = b58decodeL2Address;
144
+ /**
145
+ *
146
+ * @description Base58 encode an address using predefined prefix
147
+ *
148
+ * @param value Address to base58 encode (tz1, tz2, tz3 or KT1)
149
+ */
150
+ function encodePubKey(value) {
151
+ if (value.substring(0, 2) === '00') {
152
+ var pref = {
153
+ '0000': constants_1.prefix.tz1,
154
+ '0001': constants_1.prefix.tz2,
155
+ '0002': constants_1.prefix.tz3,
156
+ };
157
+ return b58cencode(value.substring(4), pref[value.substring(0, 4)]);
158
+ }
159
+ else if (value.substring(0, 2) === '02') {
160
+ // 42 also works but the removes the 00 padding at the end
161
+ return b58cencode(value.substring(2, value.length - 2), constants_1.prefix.txr1);
162
+ }
163
+ return b58cencode(value.substring(2, 42), constants_1.prefix.KT);
164
+ }
165
+ exports.encodePubKey = encodePubKey;
166
+ /**
167
+ *
168
+ * @description Base58 encode an address without predefined prefix
169
+ * @param value Address to base58 encode (tz4) hex dec
170
+ * @returns return address
171
+ */
172
+ function encodeL2Address(value) {
173
+ return b58cencode(value, constants_1.prefix.tz4);
174
+ }
175
+ exports.encodeL2Address = encodeL2Address;
176
+ /**
177
+ *
178
+ * @description Base58 encode a key according to its prefix
179
+ *
180
+ * @param value Key to base58 encode
181
+ */
182
+ function encodeKey(value) {
183
+ if (value[0] === '0') {
184
+ var pref = {
185
+ '00': new Uint8Array([13, 15, 37, 217]),
186
+ '01': new Uint8Array([3, 254, 226, 86]),
187
+ '02': new Uint8Array([3, 178, 139, 127]),
188
+ };
189
+ return b58cencode(value.substring(2), pref[value.substring(0, 2)]);
190
+ }
191
+ }
192
+ exports.encodeKey = encodeKey;
193
+ /**
194
+ *
195
+ * @description Base58 encode a key hash according to its prefix
196
+ *
197
+ * @param value Key hash to base58 encode
198
+ */
199
+ function encodeKeyHash(value) {
200
+ if (value[0] === '0') {
201
+ var pref = {
202
+ '00': new Uint8Array([6, 161, 159]),
203
+ '01': new Uint8Array([6, 161, 161]),
204
+ '02': new Uint8Array([6, 161, 164]),
205
+ };
206
+ return b58cencode(value.substring(2), pref[value.substring(0, 2)]);
207
+ }
208
+ }
209
+ exports.encodeKeyHash = encodeKeyHash;
210
+ /**
211
+ *
212
+ * @description Convert an hex string to a Uint8Array
213
+ *
214
+ * @param hex Hex string to convert
215
+ */
216
+ var hex2buf = function (hex) {
217
+ var match = hex.match(/[\da-f]{2}/gi);
218
+ if (match) {
219
+ return new Uint8Array(match.map(function (h) { return parseInt(h, 16); }));
220
+ }
221
+ else {
222
+ throw new errors_1.ValueConversionError(hex, 'Uint8Array');
223
+ }
224
+ };
225
+ exports.hex2buf = hex2buf;
226
+ /**
227
+ *
228
+ * @description Merge 2 buffers together
229
+ *
230
+ * @param b1 First buffer
231
+ * @param b2 Second buffer
232
+ */
233
+ var mergebuf = function (b1, b2) {
234
+ var r = new Uint8Array(b1.length + b2.length);
235
+ r.set(b1);
236
+ r.set(b2, b1.length);
237
+ return r;
238
+ };
239
+ exports.mergebuf = mergebuf;
240
+ /**
241
+ *
242
+ * @description Flatten a michelson json representation to an array
243
+ *
244
+ * @param s michelson json
245
+ */
246
+ var mic2arr = function me2(s) {
247
+ var ret = [];
248
+ if (Object.prototype.hasOwnProperty.call(s, 'prim')) {
249
+ if (s.prim === 'Pair') {
250
+ ret.push(me2(s.args[0]));
251
+ ret = ret.concat(me2(s.args[1]));
252
+ }
253
+ else if (s.prim === 'Elt') {
254
+ ret = {
255
+ key: me2(s.args[0]),
256
+ val: me2(s.args[1]),
257
+ };
258
+ }
259
+ else if (s.prim === 'True') {
260
+ ret = true;
261
+ }
262
+ else if (s.prim === 'False') {
263
+ ret = false;
264
+ }
265
+ }
266
+ else if (Array.isArray(s)) {
267
+ var sc = s.length;
268
+ for (var i = 0; i < sc; i++) {
269
+ var n = me2(s[i]);
270
+ if (typeof n.key !== 'undefined') {
271
+ if (Array.isArray(ret)) {
272
+ ret = {
273
+ keys: [],
274
+ vals: [],
275
+ };
276
+ }
277
+ ret.keys.push(n.key);
278
+ ret.vals.push(n.val);
279
+ }
280
+ else {
281
+ ret.push(n);
282
+ }
283
+ }
284
+ }
285
+ else if (Object.prototype.hasOwnProperty.call(s, 'string')) {
286
+ ret = s.string;
287
+ }
288
+ else if (Object.prototype.hasOwnProperty.call(s, 'int')) {
289
+ ret = parseInt(s.int, 10);
290
+ }
291
+ else {
292
+ ret = s;
293
+ }
294
+ return ret;
295
+ };
296
+ exports.mic2arr = mic2arr;
297
+ /**
298
+ *
299
+ * @description Convert a buffer to an hex string
300
+ *
301
+ * @param buffer Buffer to convert
302
+ */
303
+ var buf2hex = function (buffer) {
304
+ var byteArray = new Uint8Array(buffer);
305
+ var hexParts = [];
306
+ byteArray.forEach(function (byte) {
307
+ var hex = byte.toString(16);
308
+ var paddedHex = "00".concat(hex).slice(-2);
309
+ hexParts.push(paddedHex);
310
+ });
311
+ return hexParts.join('');
312
+ };
313
+ exports.buf2hex = buf2hex;
314
+ /**
315
+ *
316
+ * @description Gets Tezos address (PKH) from Public Key
317
+ *
318
+ * @param publicKey Public Key
319
+ * @returns A string of the Tezos address (PKH) that was derived from the given Public Key
320
+ */
321
+ var getPkhfromPk = function (publicKey) {
322
+ var encodingPrefix;
323
+ var prefixLen;
324
+ var keyPrefix = (0, verify_signature_1.validatePkAndExtractPrefix)(publicKey);
325
+ var decoded = (0, exports.b58cdecode)(publicKey, constants_1.prefix[keyPrefix]);
326
+ switch (keyPrefix) {
327
+ case constants_1.Prefix.EDPK:
328
+ encodingPrefix = constants_1.prefix[constants_1.Prefix.TZ1];
329
+ prefixLen = constants_1.prefixLength[constants_1.Prefix.TZ1];
330
+ break;
331
+ case constants_1.Prefix.SPPK:
332
+ encodingPrefix = constants_1.prefix[constants_1.Prefix.TZ2];
333
+ prefixLen = constants_1.prefixLength[constants_1.Prefix.TZ2];
334
+ break;
335
+ case constants_1.Prefix.P2PK:
336
+ encodingPrefix = constants_1.prefix[constants_1.Prefix.TZ3];
337
+ prefixLen = constants_1.prefixLength[constants_1.Prefix.TZ3];
338
+ break;
339
+ case constants_1.Prefix.BLPK:
340
+ encodingPrefix = constants_1.prefix[constants_1.Prefix.TZ4];
341
+ prefixLen = constants_1.prefixLength[constants_1.Prefix.TZ4];
342
+ }
343
+ var hashed = (0, blake2b_1.hash)(decoded, prefixLen);
344
+ var result = b58cencode(hashed, encodingPrefix);
345
+ return result;
346
+ };
347
+ exports.getPkhfromPk = getPkhfromPk;
348
+ /**
349
+ *
350
+ * @description Convert a string to bytes
351
+ *
352
+ * @param str String to convert
353
+ */
354
+ function char2Bytes(str) {
355
+ return index_1.Buffer.from(str, 'utf8').toString('hex');
356
+ }
357
+ exports.char2Bytes = char2Bytes;
358
+ /**
359
+ *
360
+ * @description Convert bytes to a string
361
+ *
362
+ * @param str Bytes to convert
363
+ */
364
+ function bytes2Char(hex) {
365
+ return index_1.Buffer.from((0, exports.hex2buf)(hex)).toString('utf8');
366
+ }
367
+ exports.bytes2Char = bytes2Char;
368
+ /**
369
+ *
370
+ * @description Convert hex string/UintArray/Buffer to bytes
371
+ *
372
+ * @param hex String value to convert to bytes
373
+ */
374
+ function hex2Bytes(hex) {
375
+ if (!hex.match(/[\da-f]{2}/gi)) {
376
+ throw new errors_1.InvalidHexStringError("The hex string ".concat(hex, " does not have an even number of characters"));
377
+ }
378
+ return index_1.Buffer.from(hex, 'hex');
379
+ }
380
+ exports.hex2Bytes = hex2Bytes;
381
+ /**
382
+ *
383
+ * @description Converts a number or Bignumber to hexadecimal string
384
+ *
385
+ * @param val The value that will be converted to a hexadecimal string value
386
+ */
387
+ function toHexBuf(val, bitLength) {
388
+ if (bitLength === void 0) { bitLength = 8; }
389
+ return index_1.Buffer.from(num2PaddedHex(val, bitLength), 'hex');
390
+ }
391
+ exports.toHexBuf = toHexBuf;
392
+ /**
393
+ *
394
+ * @description Converts a number or BigNumber to a padded hexadecimal string
395
+ * @param val The value that will be converted into a padded hexadecimal string value
396
+ * @param bitLength The length of bits
397
+ *
398
+ */
399
+ function num2PaddedHex(val, bitLength) {
400
+ if (bitLength === void 0) { bitLength = 8; }
401
+ if (new bignumber_1.default(val).isPositive()) {
402
+ var nibbleLength = Math.ceil(bitLength / 4);
403
+ var hex = val.toString(16);
404
+ // check whether nibble (4 bits) length is higher or lowerthan the current hex string length
405
+ var targetLength = hex.length >= nibbleLength ? hex.length : nibbleLength;
406
+ // make sure the hex string target length is even
407
+ targetLength = targetLength % 2 == 0 ? targetLength : targetLength + 1;
408
+ return padHexWithZero(hex, targetLength);
409
+ }
410
+ else {
411
+ var twosCompliment = new bignumber_1.default(2)
412
+ .pow(bitLength)
413
+ .minus(new bignumber_1.default(val).abs());
414
+ return twosCompliment.toString(16);
415
+ }
416
+ }
417
+ exports.num2PaddedHex = num2PaddedHex;
418
+ function padHexWithZero(hex, targetLength) {
419
+ var padString = '0';
420
+ if (hex.length >= targetLength) {
421
+ return hex;
422
+ }
423
+ else {
424
+ var padLength = targetLength - hex.length;
425
+ return padString.repeat(padLength) + hex;
426
+ }
427
+ }
428
+ /**
429
+ *
430
+ * @description Strips the first 2 characters of a hex string (0x)
431
+ *
432
+ * @param hex string to strip prefix from
433
+ */
434
+ function stripHexPrefix(hex) {
435
+ return hex.startsWith('0x') ? hex.slice(2) : hex;
436
+ }
437
+ exports.stripHexPrefix = stripHexPrefix;
438
+ //# sourceMappingURL=taquito-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taquito-utils.js","sourceRoot":"","sources":["../../../../../../../../src/dependencies/src/@taquito/utils-15.0.1/packages/taquito-utils/src/taquito-utils.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;AAEH;;;;GAIG;AAEH,2DAA2D;AAC3D,yCAA2D;AAC3D,uDAAgE;AAChE,4FAAwF;AACxF,6EAAuD;AAC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