You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The SLIP0013 reference document should provide an example of the expected values for A, B, C, D for a given set of example URIs and index values. These should include optional values (e.g. is a missing "user" field treated as empty string or null) and so on.
Adding these reference values will make supporting the feature much easier.
Here is some Java code to illustrate:
// See https://github.com/trezor/python-trezor/blob/ca45019918bc4c54f1ace899a9acf397c8f4d92f/tests/test_msg_signidentity.py#L27 for detailsURIidentityUri = URI.create("https://satoshi@bitcoin.org/login");
List<Integer> addressN = IdentityUtils.buildAddressN(identityUri, 0);
// m/2147483661/2637750992/2845082444/3761103859/4005495825assertThat(addressN.size()).isEqualTo(5);
// Remove the hardening to see the underlying valueassertThat(addressN.get(0) & 0x0fffffff).isEqualTo(13); // 2147483661LassertThat(addressN.get(1) & 0x0fffffff).isEqualTo(221831888); // 2637750992LassertThat(addressN.get(2) & 0x0fffffff).isEqualTo(160727884); // 2845082444LassertThat(addressN.get(3) & 0x0fffffff).isEqualTo(3007475); // 3761103859assertThat(addressN.get(4) & 0x0fffffff).isEqualTo(247399441); // 4005495825
The derivation of A,B,C,D should also be specified as little endian for the avoidance of doubt.
The text was updated successfully, but these errors were encountered:
gary-rowe
changed the title
SLIP0013 does not provide a worked examples for HD structure
SLIP0013 does not provide worked examples for HD structure
Feb 13, 2016
The SLIP0013 reference document should provide an example of the expected values for A, B, C, D for a given set of example URIs and index values. These should include optional values (e.g. is a missing "user" field treated as empty string or null) and so on.
Adding these reference values will make supporting the feature much easier.
Here is some Java code to illustrate:
The derivation of A,B,C,D should also be specified as little endian for the avoidance of doubt.
The text was updated successfully, but these errors were encountered: