Skip to content

Instantly share code, notes, and snippets.

View r-n-o's full-sized avatar
🔑
BUIDL

Arnaud r-n-o

🔑
BUIDL
View GitHub Profile
@r-n-o
r-n-o / README.md
Last active August 12, 2024 16:36
Passkeys, React Native, and Turnkey

Passkeys, React Native, and Turnkey

Back to the basics: what are passkeys again?

Passkeys are cryptographic key pairs generated and stored on secure hardware. Typically this is your Mac's secure enclave, your Android phone's Titan M2 chip, or a security key plugged in via USB.

  • Registration ("sign up") creates a new key pair
  • Authentication ("sign in") uses that key pair to sign a message with the private key

Why passkeys are different: they sync!

@r-n-o
r-n-o / _README.md
Last active June 6, 2023 17:48
Bitcoin Address Derivation from Public Key

Bitcoin Address Derivation from Public Key

This gist shows how to derive a Bitcoin address using bitcoinjs-lib.

Context

Turnkey doesn't support Bitcoin address derivation yet, but it does give raw public keys. This means Bitcoin addresses can be derived on the client side. This code sample is provided as courtesy and should not be considered authoritative or production ready.

Any address derivation logic is critical because sending cryptocurrency to an address derived incorrectly can lead to permanent loss of funds. At minimum, any address derivation logic should be tested to make sure funds land on the derived deposit address correctly and that funds can be transferred back out without issues.

@r-n-o
r-n-o / _README.md
Last active May 30, 2023 21:16
HDWallet derivation

HDWallet derivation

This small script is proof that CB wallet does what I think it does, and using the standard derivation paths from BIP44.

And no. There are no assets associated with this seed phrase. Sorry.