xrpl-dev-portal icon indicating copy to clipboard operation
xrpl-dev-portal copied to clipboard

Added key-derivation JavaScript examples analog to python version

Open AlexanderBuzz opened this issue 2 years ago • 1 comments

I've added the Cryptographic Key Derivation Milestone 1 from the JavaScript code samples bounty proposal. It's inspired by the existing python version and delivers the same output.

AlexanderBuzz avatar Sep 06 '22 22:09 AlexanderBuzz

Output analog to python version, e.g.:

Seed (base58): sp5DoqZTVsmnvFzuuvgU8kt7xyW2a Seed (hex): 0123848AD5018C7304A7FD4D022CE3CE Seed (rippled RFC-1751): REST HAW AD HUED SHIM FLED DINT BULL DOOR FUM TRY FIRE

Ed25519 Secret Key (hex): ED245D5F9F257814A5928F5B8EFBC6E93932DB1515EC0FEEBB1B9C78D74A201A1F Ed25519 Public Key (hex): ED05BE431B72AA5C462056A91BD5690AE0CF0CC8DC72B278F5FFD6AD8B353C1EA0 Ed25519 Public Key (base58 - Account): aKNoywKWp5bvfLvS7WgUKUXvr6rKKg9RUS7sRbyR8MJbCHimtDy5

secp256k1 Secret Key (hex): 00947FA3B1B5C4249B68F2724024B82A8DFA7C050BE564804AD852B8C168DF6B8B secp256k1 Public Key (hex): 02921E3C08C4C8BBD9ED0A3E5F71C5AACC3FF9003F6A3F43F19842574AC2A686CC secp256k1 Public Key (base58 - Account): aBPhiPkBYhYgwuYUqMAs3iFfNX22oRnqV5Hriauib1gGhBzfK362 secp256k1 Public Key (base58 - Validator): n9KeiGDtJz35MHSFxqw8Ze96VVBrxVBkMcvavvVUwXQHn1bLZpNi

AlexanderBuzz avatar Sep 06 '22 22:09 AlexanderBuzz

For reference, this is the updated link to the bounty this is relating to: https://github.com/XRPLBounties/Proposals/blob/main/bounties/0032%20Python%20Code%20Samples.md

JST5000 avatar Sep 27 '22 21:09 JST5000

For reference, this is the updated link to the bounty this is relating to: https://github.com/XRPLBounties/Proposals/blob/main/bounties/0032%20Python%20Code%20Samples.md

Hi, I guess this is the correct one, as this is about the JavaScript examples: https://github.com/XRPLBounties/Proposals/blob/main/bounties/0031%20JavaScript%20Code%20Samples.md

Anyways, I will now claim that Bounty, perhaps someone will trigger that link checker pipeline someday :)

AlexanderBuzz avatar Sep 28 '22 04:09 AlexanderBuzz

Hi, I guess this is the correct one, as this is about the JavaScript examples: https://github.com/XRPLBounties/Proposals/blob/main/bounties/0031%20JavaScript%20Code%20Samples.md

Ah sorry for posting the wrong link!

JST5000 avatar Sep 28 '22 15:09 JST5000

The link check error is benign—the only failure is a known issue that was in the master branch for a little while and has since been fixed by #1522.

mDuo13 avatar Sep 28 '22 19:09 mDuo13

I'm currently unable to run the formatted seed version of this code snippet without running into an error. My guess would be that is because of the regex not recognizing x in the given string, but I could be wrong.

This is fixed now

AlexanderBuzz avatar Oct 12 '22 16:10 AlexanderBuzz

Eh, wrong button...

AlexanderBuzz avatar Oct 12 '22 16:10 AlexanderBuzz

Eh, wrong button...

Hahaha, it happens. I'll check this out now

JST5000 avatar Oct 12 '22 20:10 JST5000

@AlexanderBuzz please submit to claim this bounty here: https://xrpl.typeform.com/xrpl-bounties

JST5000 avatar Oct 13 '22 22:10 JST5000