kevinheavey / solders

A high-performance Python toolkit for Solana, written in Rust
https://kevinheavey.github.io/solders/
Apache License 2.0
205 stars 23 forks source link

How do I load keypair in my phantom wallet #92

Closed satwikkansal closed 4 months ago

satwikkansal commented 4 months ago
# generate random keypair
keypair = Keypair()
secret = keypair.secret()

Now how do I use this secret to get a private key that I can import into my Phantom wallet?

I tried using b58encode but it doesn't work, I'm sure I'm missing something silly but not sure what

kevinheavey commented 4 months ago

I'm not sure what phantom wants but based on these docs my guess is either str(keypair) or str(secret)

satwikkansal commented 4 months ago

Thanks, str(keypair) works!