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

Address.isValidRawAddress missing private and private test network types #802

Open
fboucquez opened this issue Jul 26, 2021 · 1 comment

Comments

@fboucquez
Copy link
Contributor

https://github.com/symbol/symbol-sdk-typescript-javascript/blob/main/src/model/account/Address.ts#L81

misses 'P' and 'V'.

Same here

https://github.com/symbol/symbol-sdk-core-typescript/blob/main/src/core/Address.ts#L72

Note: the static/harcoded chars can be removed. These can be derived from network type numbers...

https://github.com/symbol/catapult-rest/blob/main/catapult-sdk/src/model/address.js#L51

@gimre-xymcity
Copy link
Member

linked line is not checking network types, it checks LAST byte, which due to encoding 24 bytes can have only 4 values

("missing" last byte = 8 bits, meaning, you're loosing one 5-bit base32-value - and means last value will always have 3-of-5 bits set to zero, ergo 4 values)

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

2 participants