raydium-io / raydium-sdk-V1-demo

119 stars 55 forks source link

Bad secret key size #24

Open pythonenjoyer6 opened 3 months ago

pythonenjoyer6 commented 3 months ago

throw new Error('bad secret key size') I know this issue has been already answered but I need further help. My private key has 88 characters and has both numbers and letter which doesn't seem to be the case in the last post(idk I don't understand this, I just need to somehow paste the key for it to work)

GENERATIONART commented 2 months ago

you need to decode the secret key to a uint8 array.. you can use this.. const owner2 = Keypair.fromSecretKey(bs58.decode(xxxxx))