Skip to content
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.

bad secret key size #2

Open
giti12x opened this issue May 9, 2023 · 4 comments
Open

bad secret key size #2

giti12x opened this issue May 9, 2023 · 4 comments

Comments

@giti12x
Copy link

giti12x commented May 9, 2023

Hey when i want to use a script i get "bad secret key size"
but i pasted the right secret key in the config.ts
it looked like this "[185,123,156,123,...,]"

What am i doing wrong?

@bircher044
Copy link

Did you find what was wrong?

@dexbotsdev
Copy link

dexbotsdev commented Dec 31, 2023

Hello to use the Array Keys from solrwallet type of wallets
you have to use below code

const pk= [185,123,156,123,...,]. // Note this is without quotes.
const wallet = Keypair.fromSecretKey(Uint8Array.from(pk));

@pythonenjoyer6
Copy link

can you add some explanation? since when is private key series of 3 integers separated with commas?(I understand it tho)

@Act0r1
Copy link

Act0r1 commented Jul 15, 2024

here also some error, i put my private key like ljhdsfhsdf899 and etc that i took from fantom, but i always get this error:
warning package.json: No license field
$ node js/src/subNewAmmPool.js
bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)
/Users/bro/monitor/raydium-sdk-V1-demo/node_modules/@solana/web3.js/lib/index.cjs.js:8786
throw new Error('bad secret key size');

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants