@taquito/utils 21.0.5 → 22.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.
@@ -10,9 +10,11 @@ var Prefix;
10
10
  Prefix["TZ4"] = "tz4";
11
11
  Prefix["KT"] = "KT";
12
12
  Prefix["KT1"] = "KT1";
13
+ Prefix["EDSK"] = "edsk";
13
14
  Prefix["EDSK2"] = "edsk2";
14
15
  Prefix["SPSK"] = "spsk";
15
16
  Prefix["P2SK"] = "p2sk";
17
+ Prefix["BLSK"] = "BLsk";
16
18
  Prefix["EDPK"] = "edpk";
17
19
  Prefix["SPPK"] = "sppk";
18
20
  Prefix["P2PK"] = "p2pk";
@@ -20,10 +22,11 @@ var Prefix;
20
22
  Prefix["EDESK"] = "edesk";
21
23
  Prefix["SPESK"] = "spesk";
22
24
  Prefix["P2ESK"] = "p2esk";
23
- Prefix["EDSK"] = "edsk";
25
+ Prefix["BLESK"] = "BLesk";
24
26
  Prefix["EDSIG"] = "edsig";
25
27
  Prefix["SPSIG"] = "spsig";
26
28
  Prefix["P2SIG"] = "p2sig";
29
+ Prefix["BLSIG"] = "BLsig";
27
30
  Prefix["SIG"] = "sig";
28
31
  Prefix["NET"] = "Net";
29
32
  Prefix["NCE"] = "nce";
@@ -54,6 +57,7 @@ exports.prefix = {
54
57
  [Prefix.EDSK2]: new Uint8Array([13, 15, 58, 7]),
55
58
  [Prefix.SPSK]: new Uint8Array([17, 162, 224, 201]),
56
59
  [Prefix.P2SK]: new Uint8Array([16, 81, 238, 189]),
60
+ [Prefix.BLSK]: new Uint8Array([3, 150, 192, 40]),
57
61
  [Prefix.EDPK]: new Uint8Array([13, 15, 37, 217]),
58
62
  [Prefix.SPPK]: new Uint8Array([3, 254, 226, 86]),
59
63
  [Prefix.P2PK]: new Uint8Array([3, 178, 139, 127]),
@@ -61,9 +65,11 @@ exports.prefix = {
61
65
  [Prefix.EDESK]: new Uint8Array([7, 90, 60, 179, 41]),
62
66
  [Prefix.SPESK]: new Uint8Array([0x09, 0xed, 0xf1, 0xae, 0x96]),
63
67
  [Prefix.P2ESK]: new Uint8Array([0x09, 0x30, 0x39, 0x73, 0xab]),
68
+ [Prefix.BLESK]: new Uint8Array([2, 5, 30, 53, 25]),
64
69
  [Prefix.EDSIG]: new Uint8Array([9, 245, 205, 134, 18]),
65
70
  [Prefix.SPSIG]: new Uint8Array([13, 115, 101, 19, 63]),
66
71
  [Prefix.P2SIG]: new Uint8Array([54, 240, 44, 52]),
72
+ [Prefix.BLSIG]: new Uint8Array([40, 171, 64, 207]),
67
73
  [Prefix.SIG]: new Uint8Array([4, 130, 43]),
68
74
  [Prefix.NET]: new Uint8Array([87, 82, 0]),
69
75
  [Prefix.NCE]: new Uint8Array([69, 220, 169]),
@@ -94,11 +100,11 @@ exports.prefixLength = {
94
100
  [Prefix.EDPK]: 32,
95
101
  [Prefix.SPPK]: 33,
96
102
  [Prefix.P2PK]: 33,
97
- //working with value in comment for base58.ml line 445 but not consistent with the three above
98
103
  [Prefix.BLPK]: 48,
99
104
  [Prefix.EDSIG]: 64,
100
105
  [Prefix.SPSIG]: 64,
101
106
  [Prefix.P2SIG]: 64,
107
+ [Prefix.BLSIG]: 96,
102
108
  [Prefix.SIG]: 64,
103
109
  [Prefix.NET]: 4,
104
110
  [Prefix.B]: 32,
@@ -119,6 +119,7 @@ function b58decode(payload) {
119
119
  [constants_1.prefix.tz1.toString()]: '0000',
120
120
  [constants_1.prefix.tz2.toString()]: '0001',
121
121
  [constants_1.prefix.tz3.toString()]: '0002',
122
+ [constants_1.prefix.tz4.toString()]: '0003',
122
123
  };
123
124
  const pref = prefixMap[new Uint8Array(buf.slice(0, 3)).toString()];
124
125
  if (pref) {
@@ -136,6 +137,7 @@ function b58decode(payload) {
136
137
  * @description b58 decode a string without predefined prefix
137
138
  * @param value
138
139
  * @returns string of bytes
140
+ * @deprecated use b58decode instead
139
141
  */
140
142
  function b58decodeL2Address(payload) {
141
143
  const buf = bs58check_1.default.decode(payload);
@@ -155,6 +157,7 @@ function encodePubKey(value) {
155
157
  '0000': constants_1.prefix.tz1,
156
158
  '0001': constants_1.prefix.tz2,
157
159
  '0002': constants_1.prefix.tz3,
160
+ '0003': constants_1.prefix.tz4,
158
161
  };
159
162
  return b58cencode(value.substring(4), pref[value.substring(0, 4)]);
160
163
  }
@@ -175,6 +178,7 @@ function encodeAddress(value) {
175
178
  '0000': constants_1.prefix.tz1,
176
179
  '0001': constants_1.prefix.tz2,
177
180
  '0002': constants_1.prefix.tz3,
181
+ '0003': constants_1.prefix.tz4,
178
182
  };
179
183
  return b58cencode(value.substring(4), pref[value.substring(0, 4)]);
180
184
  }
@@ -185,6 +189,7 @@ function encodeAddress(value) {
185
189
  * @description Base58 encode an address without predefined prefix
186
190
  * @param value Address to base58 encode (tz4) hex dec
187
191
  * @returns return address
192
+ * @deprecated use encodeAddress instead
188
193
  */
189
194
  function encodeL2Address(value) {
190
195
  return b58cencode(value, constants_1.prefix.tz4);
@@ -217,6 +222,7 @@ function encodeKeyHash(value) {
217
222
  '00': new Uint8Array([6, 161, 159]),
218
223
  '01': new Uint8Array([6, 161, 161]),
219
224
  '02': new Uint8Array([6, 161, 164]),
225
+ '03': new Uint8Array([6, 161, 167]),
220
226
  };
221
227
  return b58cencode(value.substring(2), pref[value.substring(0, 2)]);
222
228
  }
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
4
  // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
5
5
  exports.VERSION = {
6
- "commitHash": "e6ffa3acf4671ff5b05a0784ea773fc17da95088",
7
- "version": "21.0.5"
6
+ "commitHash": "6936d6bc71e6a805f6d5568b60b1a0f6595a375d",
7
+ "version": "22.0.0-RC.0"
8
8
  };
@@ -18,9 +18,11 @@ var Prefix;
18
18
  Prefix["TZ4"] = "tz4";
19
19
  Prefix["KT"] = "KT";
20
20
  Prefix["KT1"] = "KT1";
21
+ Prefix["EDSK"] = "edsk";
21
22
  Prefix["EDSK2"] = "edsk2";
22
23
  Prefix["SPSK"] = "spsk";
23
24
  Prefix["P2SK"] = "p2sk";
25
+ Prefix["BLSK"] = "BLsk";
24
26
  Prefix["EDPK"] = "edpk";
25
27
  Prefix["SPPK"] = "sppk";
26
28
  Prefix["P2PK"] = "p2pk";
@@ -28,10 +30,11 @@ var Prefix;
28
30
  Prefix["EDESK"] = "edesk";
29
31
  Prefix["SPESK"] = "spesk";
30
32
  Prefix["P2ESK"] = "p2esk";
31
- Prefix["EDSK"] = "edsk";
33
+ Prefix["BLESK"] = "BLesk";
32
34
  Prefix["EDSIG"] = "edsig";
33
35
  Prefix["SPSIG"] = "spsig";
34
36
  Prefix["P2SIG"] = "p2sig";
37
+ Prefix["BLSIG"] = "BLsig";
35
38
  Prefix["SIG"] = "sig";
36
39
  Prefix["NET"] = "Net";
37
40
  Prefix["NCE"] = "nce";
@@ -62,6 +65,7 @@ const prefix = {
62
65
  [Prefix.EDSK2]: new Uint8Array([13, 15, 58, 7]),
63
66
  [Prefix.SPSK]: new Uint8Array([17, 162, 224, 201]),
64
67
  [Prefix.P2SK]: new Uint8Array([16, 81, 238, 189]),
68
+ [Prefix.BLSK]: new Uint8Array([3, 150, 192, 40]),
65
69
  [Prefix.EDPK]: new Uint8Array([13, 15, 37, 217]),
66
70
  [Prefix.SPPK]: new Uint8Array([3, 254, 226, 86]),
67
71
  [Prefix.P2PK]: new Uint8Array([3, 178, 139, 127]),
@@ -69,9 +73,11 @@ const prefix = {
69
73
  [Prefix.EDESK]: new Uint8Array([7, 90, 60, 179, 41]),
70
74
  [Prefix.SPESK]: new Uint8Array([0x09, 0xed, 0xf1, 0xae, 0x96]),
71
75
  [Prefix.P2ESK]: new Uint8Array([0x09, 0x30, 0x39, 0x73, 0xab]),
76
+ [Prefix.BLESK]: new Uint8Array([2, 5, 30, 53, 25]),
72
77
  [Prefix.EDSIG]: new Uint8Array([9, 245, 205, 134, 18]),
73
78
  [Prefix.SPSIG]: new Uint8Array([13, 115, 101, 19, 63]),
74
79
  [Prefix.P2SIG]: new Uint8Array([54, 240, 44, 52]),
80
+ [Prefix.BLSIG]: new Uint8Array([40, 171, 64, 207]),
75
81
  [Prefix.SIG]: new Uint8Array([4, 130, 43]),
76
82
  [Prefix.NET]: new Uint8Array([87, 82, 0]),
77
83
  [Prefix.NCE]: new Uint8Array([69, 220, 169]),
@@ -102,11 +108,11 @@ const prefixLength = {
102
108
  [Prefix.EDPK]: 32,
103
109
  [Prefix.SPPK]: 33,
104
110
  [Prefix.P2PK]: 33,
105
- //working with value in comment for base58.ml line 445 but not consistent with the three above
106
111
  [Prefix.BLPK]: 48,
107
112
  [Prefix.EDSIG]: 64,
108
113
  [Prefix.SPSIG]: 64,
109
114
  [Prefix.P2SIG]: 64,
115
+ [Prefix.BLSIG]: 96,
110
116
  [Prefix.SIG]: 64,
111
117
  [Prefix.NET]: 4,
112
118
  [Prefix.B]: 32,
@@ -496,8 +502,8 @@ function validateSmartRollupAddress(value) {
496
502
 
497
503
  // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
498
504
  const VERSION = {
499
- "commitHash": "e6ffa3acf4671ff5b05a0784ea773fc17da95088",
500
- "version": "21.0.5"
505
+ "commitHash": "6936d6bc71e6a805f6d5568b60b1a0f6595a375d",
506
+ "version": "22.0.0-RC.0"
501
507
  };
502
508
 
503
509
  const TZ_DECIMALS = 6;
@@ -585,6 +591,7 @@ function b58decode(payload) {
585
591
  [prefix.tz1.toString()]: '0000',
586
592
  [prefix.tz2.toString()]: '0001',
587
593
  [prefix.tz3.toString()]: '0002',
594
+ [prefix.tz4.toString()]: '0003',
588
595
  };
589
596
  const pref = prefixMap[new Uint8Array(buf.slice(0, 3)).toString()];
590
597
  if (pref) {
@@ -602,6 +609,7 @@ function b58decode(payload) {
602
609
  * @description b58 decode a string without predefined prefix
603
610
  * @param value
604
611
  * @returns string of bytes
612
+ * @deprecated use b58decode instead
605
613
  */
606
614
  function b58decodeL2Address(payload) {
607
615
  const buf = bs58check.decode(payload);
@@ -621,6 +629,7 @@ function encodePubKey(value) {
621
629
  '0000': prefix.tz1,
622
630
  '0001': prefix.tz2,
623
631
  '0002': prefix.tz3,
632
+ '0003': prefix.tz4,
624
633
  };
625
634
  return b58cencode(value.substring(4), pref[value.substring(0, 4)]);
626
635
  }
@@ -641,6 +650,7 @@ function encodeAddress(value) {
641
650
  '0000': prefix.tz1,
642
651
  '0001': prefix.tz2,
643
652
  '0002': prefix.tz3,
653
+ '0003': prefix.tz4,
644
654
  };
645
655
  return b58cencode(value.substring(4), pref[value.substring(0, 4)]);
646
656
  }
@@ -651,6 +661,7 @@ function encodeAddress(value) {
651
661
  * @description Base58 encode an address without predefined prefix
652
662
  * @param value Address to base58 encode (tz4) hex dec
653
663
  * @returns return address
664
+ * @deprecated use encodeAddress instead
654
665
  */
655
666
  function encodeL2Address(value) {
656
667
  return b58cencode(value, prefix.tz4);
@@ -683,6 +694,7 @@ function encodeKeyHash(value) {
683
694
  '00': new Uint8Array([6, 161, 159]),
684
695
  '01': new Uint8Array([6, 161, 161]),
685
696
  '02': new Uint8Array([6, 161, 164]),
697
+ '03': new Uint8Array([6, 161, 167]),
686
698
  };
687
699
  return b58cencode(value.substring(2), pref[value.substring(0, 2)]);
688
700
  }
@@ -1 +1 @@
1
- {"version":3,"file":"taquito-utils.es6.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -13,9 +13,11 @@
13
13
  Prefix["TZ4"] = "tz4";
14
14
  Prefix["KT"] = "KT";
15
15
  Prefix["KT1"] = "KT1";
16
+ Prefix["EDSK"] = "edsk";
16
17
  Prefix["EDSK2"] = "edsk2";
17
18
  Prefix["SPSK"] = "spsk";
18
19
  Prefix["P2SK"] = "p2sk";
20
+ Prefix["BLSK"] = "BLsk";
19
21
  Prefix["EDPK"] = "edpk";
20
22
  Prefix["SPPK"] = "sppk";
21
23
  Prefix["P2PK"] = "p2pk";
@@ -23,10 +25,11 @@
23
25
  Prefix["EDESK"] = "edesk";
24
26
  Prefix["SPESK"] = "spesk";
25
27
  Prefix["P2ESK"] = "p2esk";
26
- Prefix["EDSK"] = "edsk";
28
+ Prefix["BLESK"] = "BLesk";
27
29
  Prefix["EDSIG"] = "edsig";
28
30
  Prefix["SPSIG"] = "spsig";
29
31
  Prefix["P2SIG"] = "p2sig";
32
+ Prefix["BLSIG"] = "BLsig";
30
33
  Prefix["SIG"] = "sig";
31
34
  Prefix["NET"] = "Net";
32
35
  Prefix["NCE"] = "nce";
@@ -57,6 +60,7 @@
57
60
  [exports.Prefix.EDSK2]: new Uint8Array([13, 15, 58, 7]),
58
61
  [exports.Prefix.SPSK]: new Uint8Array([17, 162, 224, 201]),
59
62
  [exports.Prefix.P2SK]: new Uint8Array([16, 81, 238, 189]),
63
+ [exports.Prefix.BLSK]: new Uint8Array([3, 150, 192, 40]),
60
64
  [exports.Prefix.EDPK]: new Uint8Array([13, 15, 37, 217]),
61
65
  [exports.Prefix.SPPK]: new Uint8Array([3, 254, 226, 86]),
62
66
  [exports.Prefix.P2PK]: new Uint8Array([3, 178, 139, 127]),
@@ -64,9 +68,11 @@
64
68
  [exports.Prefix.EDESK]: new Uint8Array([7, 90, 60, 179, 41]),
65
69
  [exports.Prefix.SPESK]: new Uint8Array([0x09, 0xed, 0xf1, 0xae, 0x96]),
66
70
  [exports.Prefix.P2ESK]: new Uint8Array([0x09, 0x30, 0x39, 0x73, 0xab]),
71
+ [exports.Prefix.BLESK]: new Uint8Array([2, 5, 30, 53, 25]),
67
72
  [exports.Prefix.EDSIG]: new Uint8Array([9, 245, 205, 134, 18]),
68
73
  [exports.Prefix.SPSIG]: new Uint8Array([13, 115, 101, 19, 63]),
69
74
  [exports.Prefix.P2SIG]: new Uint8Array([54, 240, 44, 52]),
75
+ [exports.Prefix.BLSIG]: new Uint8Array([40, 171, 64, 207]),
70
76
  [exports.Prefix.SIG]: new Uint8Array([4, 130, 43]),
71
77
  [exports.Prefix.NET]: new Uint8Array([87, 82, 0]),
72
78
  [exports.Prefix.NCE]: new Uint8Array([69, 220, 169]),
@@ -97,11 +103,11 @@
97
103
  [exports.Prefix.EDPK]: 32,
98
104
  [exports.Prefix.SPPK]: 33,
99
105
  [exports.Prefix.P2PK]: 33,
100
- //working with value in comment for base58.ml line 445 but not consistent with the three above
101
106
  [exports.Prefix.BLPK]: 48,
102
107
  [exports.Prefix.EDSIG]: 64,
103
108
  [exports.Prefix.SPSIG]: 64,
104
109
  [exports.Prefix.P2SIG]: 64,
110
+ [exports.Prefix.BLSIG]: 96,
105
111
  [exports.Prefix.SIG]: 64,
106
112
  [exports.Prefix.NET]: 4,
107
113
  [exports.Prefix.B]: 32,
@@ -491,8 +497,8 @@
491
497
 
492
498
  // IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
493
499
  const VERSION = {
494
- "commitHash": "e6ffa3acf4671ff5b05a0784ea773fc17da95088",
495
- "version": "21.0.5"
500
+ "commitHash": "6936d6bc71e6a805f6d5568b60b1a0f6595a375d",
501
+ "version": "22.0.0-RC.0"
496
502
  };
497
503
 
498
504
  const TZ_DECIMALS = 6;
@@ -580,6 +586,7 @@
580
586
  [prefix.tz1.toString()]: '0000',
581
587
  [prefix.tz2.toString()]: '0001',
582
588
  [prefix.tz3.toString()]: '0002',
589
+ [prefix.tz4.toString()]: '0003',
583
590
  };
584
591
  const pref = prefixMap[new Uint8Array(buf.slice(0, 3)).toString()];
585
592
  if (pref) {
@@ -597,6 +604,7 @@
597
604
  * @description b58 decode a string without predefined prefix
598
605
  * @param value
599
606
  * @returns string of bytes
607
+ * @deprecated use b58decode instead
600
608
  */
601
609
  function b58decodeL2Address(payload) {
602
610
  const buf = bs58check.decode(payload);
@@ -616,6 +624,7 @@
616
624
  '0000': prefix.tz1,
617
625
  '0001': prefix.tz2,
618
626
  '0002': prefix.tz3,
627
+ '0003': prefix.tz4,
619
628
  };
620
629
  return b58cencode(value.substring(4), pref[value.substring(0, 4)]);
621
630
  }
@@ -636,6 +645,7 @@
636
645
  '0000': prefix.tz1,
637
646
  '0001': prefix.tz2,
638
647
  '0002': prefix.tz3,
648
+ '0003': prefix.tz4,
639
649
  };
640
650
  return b58cencode(value.substring(4), pref[value.substring(0, 4)]);
641
651
  }
@@ -646,6 +656,7 @@
646
656
  * @description Base58 encode an address without predefined prefix
647
657
  * @param value Address to base58 encode (tz4) hex dec
648
658
  * @returns return address
659
+ * @deprecated use encodeAddress instead
649
660
  */
650
661
  function encodeL2Address(value) {
651
662
  return b58cencode(value, prefix.tz4);
@@ -678,6 +689,7 @@
678
689
  '00': new Uint8Array([6, 161, 159]),
679
690
  '01': new Uint8Array([6, 161, 161]),
680
691
  '02': new Uint8Array([6, 161, 164]),
692
+ '03': new Uint8Array([6, 161, 167]),
681
693
  };
682
694
  return b58cencode(value.substring(2), pref[value.substring(0, 2)]);
683
695
  }
@@ -1 +1 @@
1
- {"version":3,"file":"taquito-utils.umd.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,41 +1,44 @@
1
1
  export declare enum Prefix {
2
- TZ1 = "tz1",
3
- TZ2 = "tz2",
4
- TZ3 = "tz3",
5
- TZ4 = "tz4",
2
+ TZ1 = "tz1",// ed25519_public_key_hash
3
+ TZ2 = "tz2",// secp256k1_public_key_hash
4
+ TZ3 = "tz3",// p256_public_key_hash
5
+ TZ4 = "tz4",// bls12_381_public_key_hash
6
6
  KT = "KT",
7
7
  KT1 = "KT1",
8
- EDSK2 = "edsk2",
9
- SPSK = "spsk",
10
- P2SK = "p2sk",
11
- EDPK = "edpk",
12
- SPPK = "sppk",
13
- P2PK = "p2pk",
14
- BLPK = "BLpk",
15
- EDESK = "edesk",
16
- SPESK = "spesk",
17
- P2ESK = "p2esk",
18
- EDSK = "edsk",
19
- EDSIG = "edsig",
20
- SPSIG = "spsig",
21
- P2SIG = "p2sig",
22
- SIG = "sig",
23
- NET = "Net",
8
+ EDSK = "edsk",// ed25519_secret_key
9
+ EDSK2 = "edsk2",// ed25519_seed
10
+ SPSK = "spsk",// secp256k1_secret_key
11
+ P2SK = "p2sk",// p256_secret_key
12
+ BLSK = "BLsk",// bls12_381_secret_key
13
+ EDPK = "edpk",// ed25519_public_key
14
+ SPPK = "sppk",// secp256k1_public_key
15
+ P2PK = "p2pk",// p256_public_key
16
+ BLPK = "BLpk",// bls12_381_public_key
17
+ EDESK = "edesk",// ed25519_encrypted_seed
18
+ SPESK = "spesk",// secp256k1_encrypted_secret_key
19
+ P2ESK = "p2esk",// p256_encrypted_secret_key
20
+ BLESK = "BLesk",// bls12_381_encrypted_secret_key
21
+ EDSIG = "edsig",// ed25519_signature
22
+ SPSIG = "spsig",// secp256k1_signature
23
+ P2SIG = "p2sig",// p256_signature
24
+ BLSIG = "BLsig",// bls12_381_signature
25
+ SIG = "sig",// generic_signature
26
+ NET = "Net",// chain_id
24
27
  NCE = "nce",
25
- B = "B",
26
- O = "o",
27
- LO = "Lo",
28
- LLO = "LLo",
29
- P = "P",
30
- CO = "Co",
31
- ID = "id",
28
+ B = "B",// block_hash
29
+ O = "o",// operation_hash
30
+ LO = "Lo",// operation_list_hash
31
+ LLO = "LLo",// operation_list_list_hash
32
+ P = "P",// protocol_hash
33
+ CO = "Co",// context_hash
34
+ ID = "id",// cryptobox_public_key_hash
32
35
  EXPR = "expr",
33
36
  TZ = "TZ",
34
37
  VH = "vh",// block_payload_hash
35
38
  SASK = "sask",// sapling_spending_key
36
39
  ZET1 = "zet1",// sapling_address
37
- SR1 = "sr1",
38
- SRC1 = "src1",
40
+ SR1 = "sr1",// smart_rollup_address
41
+ SRC1 = "src1",// smart_rollup_commitment
39
42
  SH = "sh"
40
43
  }
41
44
  export declare const prefix: {
@@ -49,6 +52,7 @@ export declare const prefix: {
49
52
  edsk2: Uint8Array;
50
53
  spsk: Uint8Array;
51
54
  p2sk: Uint8Array;
55
+ BLsk: Uint8Array;
52
56
  edpk: Uint8Array;
53
57
  sppk: Uint8Array;
54
58
  p2pk: Uint8Array;
@@ -56,9 +60,11 @@ export declare const prefix: {
56
60
  edesk: Uint8Array;
57
61
  spesk: Uint8Array;
58
62
  p2esk: Uint8Array;
63
+ BLesk: Uint8Array;
59
64
  edsig: Uint8Array;
60
65
  spsig: Uint8Array;
61
66
  p2sig: Uint8Array;
67
+ BLsig: Uint8Array;
62
68
  sig: Uint8Array;
63
69
  Net: Uint8Array;
64
70
  nce: Uint8Array;
@@ -51,6 +51,7 @@ export declare function b58decode(payload: string): string;
51
51
  * @description b58 decode a string without predefined prefix
52
52
  * @param value
53
53
  * @returns string of bytes
54
+ * @deprecated use b58decode instead
54
55
  */
55
56
  export declare function b58decodeL2Address(payload: string): string;
56
57
  /**
@@ -73,6 +74,7 @@ export declare function encodeAddress(value: string): string;
73
74
  * @description Base58 encode an address without predefined prefix
74
75
  * @param value Address to base58 encode (tz4) hex dec
75
76
  * @returns return address
77
+ * @deprecated use encodeAddress instead
76
78
  */
77
79
  export declare function encodeL2Address(value: string): string;
78
80
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taquito/utils",
3
- "version": "21.0.5",
3
+ "version": "22.0.0-RC.0",
4
4
  "description": "converts michelson data and types into convenient JS/TS objects",
5
5
  "keywords": [
6
6
  "tezos",
@@ -64,7 +64,7 @@
64
64
  "dependencies": {
65
65
  "@stablelib/blake2b": "^1.0.1",
66
66
  "@stablelib/ed25519": "^1.0.3",
67
- "@taquito/core": "^21.0.5",
67
+ "@taquito/core": "^22.0.0-RC.0",
68
68
  "@types/bs58check": "^2.1.2",
69
69
  "bignumber.js": "^9.1.2",
70
70
  "blakejs": "^1.2.1",
@@ -101,5 +101,5 @@
101
101
  "ts-toolbelt": "^9.6.0",
102
102
  "typescript": "~5.5.4"
103
103
  },
104
- "gitHead": "e2bb40c0569637beafd536de2520244fb6cd5541"
104
+ "gitHead": "a5501829190e16f53bb3ce8f8b8143d8c0f01834"
105
105
  }