@@ -54,106 +54,85 @@ void main() {
5454 expect (actualED25519PrivateKey, expectedED25519PrivateKey);
5555 });
5656
57- test ("Should [return ED25519PrivateKey] constructed from mnemonic and derivation path (m/44'/60 '/)" , () async {
57+ test ("Should [return ED25519PrivateKey] constructed from mnemonic and derivation path (m/44'/501 '/)" , () async {
5858 // Act
59- LegacyDerivationPath actualLegacyDerivationPath = LegacyDerivationPath .parse ("m/44'/60 '/" );
59+ LegacyDerivationPath actualLegacyDerivationPath = LegacyDerivationPath .parse ("m/44'/501 '/" );
6060 ED25519PrivateKey actualED25519PrivateKey = await actualED25519Derivator.derivePath (actualMnemonic, actualLegacyDerivationPath);
6161
6262 // Assert
6363 ED25519PrivateKey expectedED25519PrivateKey = ED25519PrivateKey (
6464 metadata: Bip32KeyMetadata (
6565 depth: 2 ,
66- shiftedIndex: 2147483708 ,
67- chainCode: base64Decode ('AlYCSjYOCo//7XisF+s9f+4uREPjJlQ3lZVRypceTI0 =' ),
68- fingerprint: BigInt .parse ('4278372777 ' ),
66+ shiftedIndex: 2147484149 ,
67+ chainCode: base64Decode ('N8hqS/GQMbS0QaVEk75FmKA6yPFRa2XC5x+MWTMYSsg =' ),
68+ fingerprint: BigInt .parse ('4036075356 ' ),
6969 parentFingerprint: BigInt .parse ('2330465125' ),
7070 masterFingerprint: BigInt .parse ('3578578273' ),
7171 ),
72- edPrivateKey: EDPrivateKey .fromBytes (base64Decode ('dZiZCf9yd0YSUxbInwyamtkndKTTRj6j+G6xmj928vY =' )),
72+ edPrivateKey: EDPrivateKey .fromBytes (base64Decode ('/TWsTCOLvsuX0xrFMzD3yXZSjCQViIGf6hWaevc1vOY =' )),
7373 );
7474
7575 expect (actualED25519PrivateKey, expectedED25519PrivateKey);
7676 });
7777
78- test ("Should [return ED25519PrivateKey] constructed from mnemonic and derivation path (m/44'/60 '/0'/)" , () async {
78+ test ("Should [return ED25519PrivateKey] constructed from mnemonic and derivation path (m/44'/501 '/0'/)" , () async {
7979 // Act
80- LegacyDerivationPath actualLegacyDerivationPath = LegacyDerivationPath .parse ("m/44'/60 '/0'/" );
80+ LegacyDerivationPath actualLegacyDerivationPath = LegacyDerivationPath .parse ("m/44'/501 '/0'/" );
8181 ED25519PrivateKey actualED25519PrivateKey = await actualED25519Derivator.derivePath (actualMnemonic, actualLegacyDerivationPath);
8282
8383 // Assert
8484 ED25519PrivateKey expectedED25519PrivateKey = ED25519PrivateKey (
8585 metadata: Bip32KeyMetadata (
8686 depth: 3 ,
8787 shiftedIndex: 2147483648 ,
88- chainCode: base64Decode ('XJIq3dw+4wLO363ghHmYr8iBf0sSpDC1SsJGbG6BMxM =' ),
89- fingerprint: BigInt .parse ('4237045580 ' ),
90- parentFingerprint: BigInt .parse ('4278372777 ' ),
88+ chainCode: base64Decode ('LxPIxnNe9YXF9o6sstwDQavHXPdE7WUF2cKUqxS+MTc =' ),
89+ fingerprint: BigInt .parse ('753771646 ' ),
90+ parentFingerprint: BigInt .parse ('4036075356 ' ),
9191 masterFingerprint: BigInt .parse ('3578578273' ),
9292 ),
93- edPrivateKey: EDPrivateKey .fromBytes (base64Decode ('dnfNSsX9wTWBvMXva/SUqWt3iRaK+oH68fM9Feg/SIs =' )),
93+ edPrivateKey: EDPrivateKey .fromBytes (base64Decode ('T3WAkMPu1mLHuRW+Dra0RFDDclbr6L6zJw6wPkpPJYA =' )),
9494 );
9595
9696 expect (actualED25519PrivateKey, expectedED25519PrivateKey);
9797 });
9898
99- test ("Should [return ED25519PrivateKey] constructed from mnemonic and derivation path (m/44'/60 '/0'/0'/)" , () async {
99+ test ("Should [return ED25519PrivateKey] constructed from mnemonic and derivation path (m/44'/501 '/0'/0'/)" , () async {
100100 // Act
101- LegacyDerivationPath actualLegacyDerivationPath = LegacyDerivationPath .parse ("m/44'/60 '/0'/0'/" );
101+ LegacyDerivationPath actualLegacyDerivationPath = LegacyDerivationPath .parse ("m/44'/501 '/0'/0'/" );
102102 ED25519PrivateKey actualED25519PrivateKey = await actualED25519Derivator.derivePath (actualMnemonic, actualLegacyDerivationPath);
103103
104104 // Assert
105105 ED25519PrivateKey expectedED25519PrivateKey = ED25519PrivateKey (
106106 metadata: Bip32KeyMetadata (
107107 depth: 4 ,
108108 shiftedIndex: 2147483648 ,
109- chainCode: base64Decode ('7VKKNJkj9ZEp7SX+GveAvvcZhi+8NJNrSG98+BNgjxY =' ),
110- fingerprint: BigInt .parse ('2130523803 ' ),
111- parentFingerprint: BigInt .parse ('4237045580 ' ),
109+ chainCode: base64Decode ('bJz0NEJLEZUTTobbklJ8hYb9gCS+4J7UGPMtDyO+IDY =' ),
110+ fingerprint: BigInt .parse ('635615273 ' ),
111+ parentFingerprint: BigInt .parse ('753771646 ' ),
112112 masterFingerprint: BigInt .parse ('3578578273' ),
113113 ),
114- edPrivateKey: EDPrivateKey .fromBytes (base64Decode ('Dy1S7AO7gPWC+vO7mV/cwTi9sjJ56abeYtD8s3qRTAk =' )),
114+ edPrivateKey: EDPrivateKey .fromBytes (base64Decode ('iGjr84MoC1+WAY4cnAFqETc5KjMEtZ7CfAYvxkd877M =' )),
115115 );
116116
117117 expect (actualED25519PrivateKey, expectedED25519PrivateKey);
118118 });
119119
120- test ("Should [return ED25519PrivateKey] constructed from mnemonic and derivation path (m/44'/60'/0 '/0'/0' )" , () async {
120+ test ("Should [return ED25519PrivateKey] constructed from mnemonic and derivation path (m/44'/501'/1 '/0'/)" , () async {
121121 // Act
122- LegacyDerivationPath actualLegacyDerivationPath = LegacyDerivationPath .parse ("m/44'/60'/0 '/0'/0' " );
122+ LegacyDerivationPath actualLegacyDerivationPath = LegacyDerivationPath .parse ("m/44'/501'/1 '/0'/" );
123123 ED25519PrivateKey actualED25519PrivateKey = await actualED25519Derivator.derivePath (actualMnemonic, actualLegacyDerivationPath);
124124
125125 // Assert
126126 ED25519PrivateKey expectedED25519PrivateKey = ED25519PrivateKey (
127127 metadata: Bip32KeyMetadata (
128- depth: 5 ,
128+ depth: 4 ,
129129 shiftedIndex: 2147483648 ,
130- chainCode: base64Decode ('hz6ve3vISMyVDK7ZD0zQoV2v4K1ota1QJ9kY1xakFR4 =' ),
131- fingerprint: BigInt .parse ('3808761756 ' ),
132- parentFingerprint: BigInt .parse ('2130523803 ' ),
130+ chainCode: base64Decode ('pdvuHGZNYfgdrW/BAMpsBlNcM2xCYGKsT7j4ZymApJA =' ),
131+ fingerprint: BigInt .parse ('1931527399 ' ),
132+ parentFingerprint: BigInt .parse ('429089605 ' ),
133133 masterFingerprint: BigInt .parse ('3578578273' ),
134134 ),
135- edPrivateKey: EDPrivateKey .fromBytes (base64Decode ('fbrqtRb364ZjYonX89pDhtlKE+4jFrxmpHGU2kmQaGs=' )),
136- );
137-
138- expect (actualED25519PrivateKey, expectedED25519PrivateKey);
139- });
140-
141- test ("Should [return ED25519PrivateKey] constructed from mnemonic and derivation path (m/44'/60'/0'/0'/1')" , () async {
142- // Act
143- LegacyDerivationPath actualLegacyDerivationPath = LegacyDerivationPath .parse ("m/44'/60'/0'/0'/1'" );
144- ED25519PrivateKey actualED25519PrivateKey = await actualED25519Derivator.derivePath (actualMnemonic, actualLegacyDerivationPath);
145-
146- // Assert
147- ED25519PrivateKey expectedED25519PrivateKey = ED25519PrivateKey (
148- metadata: Bip32KeyMetadata (
149- depth: 5 ,
150- shiftedIndex: 2147483649 ,
151- chainCode: base64Decode ('l1JlMYKoERbLwsNQIZbHugLvqyxktb1J+O+zU5jue+k=' ),
152- fingerprint: BigInt .parse ('2573384385' ),
153- parentFingerprint: BigInt .parse ('2130523803' ),
154- masterFingerprint: BigInt .parse ('3578578273' ),
155- ),
156- edPrivateKey: EDPrivateKey .fromBytes (base64Decode ('AVPH3U7LPhJ6E3PFI9S+Ek+vUM59I5RBk5uRG1nMIBw=' )),
135+ edPrivateKey: EDPrivateKey .fromBytes (base64Decode ('2fcDuvPOTai9vU+A3d9xto81C5nkpEtawFntHXhyrts=' )),
157136 );
158137
159138 expect (actualED25519PrivateKey, expectedED25519PrivateKey);
@@ -215,19 +194,19 @@ void main() {
215194 expect (actualDerivedED25519PrivateKey, expectedDerivedED25519PrivateKey);
216195 });
217196
218- test ("Should [return ED25519PrivateKey] derived from ED25519PrivateKey (m/44'/ -> m/44'/60 '/)" , () async {
197+ test ("Should [return ED25519PrivateKey] derived from ED25519PrivateKey (m/44'/ -> m/44'/501 '/)" , () async {
219198 // Arrange
220- LegacyDerivationPathElement actualDerivationPathElement = LegacyDerivationPathElement .parse ("60 '" );
199+ LegacyDerivationPathElement actualDerivationPathElement = LegacyDerivationPathElement .parse ("501 '" );
221200 ED25519PrivateKey actualED25519PrivateKey = ED25519PrivateKey (
222201 metadata: Bip32KeyMetadata (
223202 depth: 1 ,
224203 shiftedIndex: 2147483692 ,
225- chainCode: base64Decode ('oVTP3c7E2KeoquJttMLqsSV7zyzEbvACvVcFTjW2Cz4 =' ),
204+ chainCode: base64Decode ('N8hqS/GQMbS0QaVEk75FmKA6yPFRa2XC5x+MWTMYSsg =' ),
226205 fingerprint: BigInt .parse ('2330465125' ),
227206 parentFingerprint: BigInt .parse ('3578578273' ),
228207 masterFingerprint: BigInt .parse ('3578578273' ),
229208 ),
230- edPrivateKey: EDPrivateKey .fromBytes (base64Decode ('MinQRVP+LSjLX9pmmkDLcm01pJP8IVaKrlVAGlNXUbs =' )),
209+ edPrivateKey: EDPrivateKey .fromBytes (base64Decode ('/TWsTCOLvsuX0xrFMzD3yXZSjCQViIGf6hWaevc1vOY =' )),
231210 );
232211
233212 // Act
@@ -237,19 +216,19 @@ void main() {
237216 ED25519PrivateKey expectedDerivedED25519PrivateKey = ED25519PrivateKey (
238217 metadata: Bip32KeyMetadata (
239218 depth: 2 ,
240- shiftedIndex: 2147483708 ,
241- chainCode: base64Decode ('AlYCSjYOCo//7XisF+s9f+4uREPjJlQ3lZVRypceTI0 =' ),
242- fingerprint: BigInt .parse ('4278372777 ' ),
219+ shiftedIndex: 2147484149 ,
220+ chainCode: base64Decode ('nVpoaXRJzBmqw/3/DHi9EjRrEWOUiEilp5fbkw8aaTk =' ),
221+ fingerprint: BigInt .parse ('3862087306 ' ),
243222 parentFingerprint: BigInt .parse ('2330465125' ),
244223 masterFingerprint: BigInt .parse ('3578578273' ),
245224 ),
246- edPrivateKey: EDPrivateKey .fromBytes (base64Decode ('dZiZCf9yd0YSUxbInwyamtkndKTTRj6j+G6xmj928vY =' )),
225+ edPrivateKey: EDPrivateKey .fromBytes (base64Decode ('/Fcp11uAxg7VyMEvkW5IPYuGDrk2bcxS8tZ8QvZgqaQ =' )),
247226 );
248227
249228 expect (actualDerivedED25519PrivateKey, expectedDerivedED25519PrivateKey);
250229 });
251230
252- test ("Should [return ED25519PrivateKey] derived from ED25519PrivateKey (m/44'/60 '/ -> m/44'/60 '/0'/)" , () async {
231+ test ("Should [return ED25519PrivateKey] derived from ED25519PrivateKey (m/44'/501 '/ -> m/44'/501 '/0'/)" , () async {
253232 // Arrange
254233 LegacyDerivationPathElement actualDerivationPathElement = LegacyDerivationPathElement .parse ("0'" );
255234 ED25519PrivateKey actualED25519PrivateKey = ED25519PrivateKey (
@@ -283,7 +262,7 @@ void main() {
283262 expect (actualDerivedED25519PrivateKey, expectedDerivedED25519PrivateKey);
284263 });
285264
286- test ("Should [return ED25519PrivateKey] derived from ED25519PrivateKey (m/44'/60 '/0'/ -> m/44'/60 '/0'/0'/)" , () async {
265+ test ("Should [return ED25519PrivateKey] derived from ED25519PrivateKey (m/44'/501 '/0'/ -> m/44'/501 '/0'/0'/)" , () async {
287266 // Arrange
288267 LegacyDerivationPathElement actualDerivationPathElement = LegacyDerivationPathElement .parse ("0'" );
289268 ED25519PrivateKey actualED25519PrivateKey = ED25519PrivateKey (
@@ -317,7 +296,7 @@ void main() {
317296 expect (actualDerivedED25519PrivateKey, expectedDerivedED25519PrivateKey);
318297 });
319298
320- test ("Should [return ED25519PrivateKey] derived from ED25519PrivateKey (m/44'/60 '/0'/0'/ -> m/44'/60 '/0'/0'/0'/)" , () async {
299+ test ("Should [return ED25519PrivateKey] derived from ED25519PrivateKey (m/44'/501 '/0'/0'/ -> m/44'/501 '/0'/0'/0'/)" , () async {
321300 // Arrange
322301 LegacyDerivationPathElement actualDerivationPathElement = LegacyDerivationPathElement .parse ("0'" );
323302 ED25519PrivateKey actualED25519PrivateKey = ED25519PrivateKey (
0 commit comments