nervosnetwork / nervosnetwork/rfcs
Example steps to generate address from public key in C
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 271
- Forks
- 158
- PR merge metrics
- No merged PRs in 30d
Description
I am trying to implement Nervos address generation from public key in C. While following the steps mentioned in RFC, I am unable to generate the correct address. Are there any detailed examples showcasing intermediate values, so I can debug my logic?
I referenced this python demo and js sdk to verify the logic.
Example:
Address format - testnet short address
PK: 038ab113db7fc7af23b104a839c5c2e33e4b6b791d0589c3030f1eb7b819c17b82
args: adf33350760d7d939935c48751886ad55506c741
Desired address(generated from sdk): ckt1qyq2muen2pmq6lvnny6ufp633p4d24gxcaqswv6xlr
How do I generate the address mentioned ^? Since I am implementing it in C, I cannot use libraries from other languages. Is there any demo C implementation logic for the same?
Also are there any recommended C libraries for steps in generating address? (PK -> blake160(PK) -> payload -> address )
TIA
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with RFC 0021 and compare its address-generation steps with the linked Python demo and JS SDK, using the provided public key, args, and expected testnet address. Done would be a detailed C example or documented intermediate values that reproduces the expected address, plus any recommended C libraries.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- blockchain, cryptography
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100