Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V5R1 custom add #9

Open
XopMC opened this issue Sep 20, 2024 · 0 comments
Open

V5R1 custom add #9

XopMC opened this issue Sep 20, 2024 · 0 comments

Comments

@XopMC
Copy link

XopMC commented Sep 20, 2024

Hello!
I am implementing custom support for V5R1 addresses for Ledger.

However, I have encountered some difficulties with specifying constants. As far as I understand, adding 1 bit at the beginning of the Cell when initializing the contract gives a data_header in this format:

const uint8_t v5_data_header[] = {
    0x00, 0x51, 0x80, 0x00, 0x00, 0x00
};

Also, the subwallet_id is filled with zeros here.

These seem to be all the differences I've found from V4R2 (excluding, of course, the contract hash).
Here’s the full list of constants that I use when creating:

const uint8_t v5r1_root_header[] = {
    0x02, 0x01, 0x34, 0x00, 0x07, 0x00, 0x00,
    0x20, 0x83, 0x4B, 0x7B, 0x72, 0xB1, 0x12, 0x14,
    0x7E, 0x1B, 0x2F, 0xB4, 0x57, 0xB8, 0x4E, 0x74,
    0xD1, 0xA3, 0x0F, 0x04, 0xF7, 0x37, 0xD4, 0xF6,
    0x2A, 0x66, 0x8E, 0x95, 0x52, 0xD2, 0xB7, 0x2F
};
const uint8_t v5_data_header[] = {
    0x00, 0x51, 0x80, 0x00, 0x00, 0x00
};
const uint8_t data_tail[] = { 0x40 };
const uint8_t subwallet_id[] = {0x00, 0x00, 0x00, 0x00};

However, the address I get does not match a known V5R1 address.
I would greatly appreciate any advice on what I might be missing.
Thank you!

V5R1.txt
V5R1 source code (need to rename .txt to .fif)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant