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

feat(sdk-coin-baby): add SDK support for babylon #5382

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MohammedRyaan786
Copy link
Contributor

@MohammedRyaan786 MohammedRyaan786 commented Jan 16, 2025

TICKET: COIN-2761

@MohammedRyaan786 MohammedRyaan786 force-pushed the COIN-2761-sdk-add-sdk-support branch 7 times, most recently from db6ec7e to fa1fed4 Compare January 17, 2025 00:09
Comment on lines +2 to +4
export const accountAddressRegex = /^(bbn)1(['qpzry9x8gf2tvdw0s3jn54khce6mua7l]{38})$/;
export const validatorAddressRegex = /^(bbnvaloper)1(['qpzry9x8gf2tvdw0s3jn54khce6mua7l]{38})$/;
export const contractAddressRegex = /^(bbn)1(['qpzry9x8gf2tvdw0s3jn54khce6mua7l]+)$/;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This regex doesn't seems to be correct. Ideally it should accept all alphanumeric characters in the address body of length 38.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rune and Atom too use the same regex.

The BECH32 algorithm is used to generate addresses. It doesn't use all the alphanumeric characters in order to avoids characters that are visually similar to reduce the chances of transcription errors.

@MohammedRyaan786 MohammedRyaan786 force-pushed the COIN-2761-sdk-add-sdk-support branch from fa1fed4 to 932541b Compare January 17, 2025 20:25
@MohammedRyaan786 MohammedRyaan786 marked this pull request as ready for review January 20, 2025 05:05
@MohammedRyaan786 MohammedRyaan786 requested review from a team as code owners January 20, 2025 05:05
@MohammedRyaan786 MohammedRyaan786 force-pushed the COIN-2761-sdk-add-sdk-support branch from 2a36edd to 3683915 Compare January 21, 2025 06:38
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

Successfully merging this pull request may close these issues.

3 participants