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

Too many address-related APIs lead to confusion #619

Open
homura opened this issue Jan 19, 2024 · 0 comments
Open

Too many address-related APIs lead to confusion #619

homura opened this issue Jan 19, 2024 · 0 comments
Labels
discussion enhancement New feature or request

Comments

@homura
Copy link
Collaborator

homura commented Jan 19, 2024

There has been a breaking change in the address format in Lumos's address-related API, specifically at CKB2021. This change involved the encoding method and rule. Lumos has added a new method called encodeToAddress to encode a script to a CKB2021 address. Previously, there were multiple address encoding and decoding methods in Lumos. Currently, the following address-related APIs are available in @ckb-lumos/helpers:

Name Status Description
generatePredefinedAddress deprecated Script -> Address(CKB2019 only)
generateSecp256k1Blake160Address deprecated Script -> Address(CKB2019 only)
generateAddress deprecated Script -> Address(CKB2019 only)
scriptToAddress deprecated Script -> Address(CKB2019 only)
generateSecp256k1Blake160MultisigAddress deprecated Script -> Address(CKB2019 only)
encodeToAddress activated Script -> Address(CKB2021 only)
encodeToConfigAddress activated Script -> Address(CKB2021 only)
parseAddress activated Address -> Script
addressToScript activated Address -> Script

Lumos should simplify the address encoding/decoding and reduce developer confusion.

@homura homura added enhancement New feature or request discussion labels Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant