Closed AMIYA8597 closed 4 months ago
It looks like it's throwing this error while trying to read the private key from .env
here:
const raydiumSwap = new RaydiumSwap(process.env.RPC_URL, process.env.WALLET_PRIVATE_KEY);
Make sure your key is in base58, which looks like this 5Kd3NBUAdUnhyj4E7Ct5oqL8hM2FfGtLhawt4XPP9ZZZkqJE7FB
. This is a random dummy key.
when i run this code i am facing this error
/Users/webskitters/Desktop/raydium-sdk-swap-example-typescript/node_modules/base-x/src/index.js:113 throw new Error('Non-base' + BASE + ' character') ^ Error: Non-base58 character at Object.decode (/Users/webskitters/Desktop/raydium-sdk-swap-example-typescript/node_modules/base-x/src/index.js:113:11) at new RaydiumSwap (/Users/webskitters/Desktop/raydium-sdk-swap-example-typescript/src/RaydiumSwap.ts:33:73) at /Users/webskitters/Desktop/raydium-sdk-swap-example-typescript/src/index.ts:14:23 at Generator.next ()
at /Users/webskitters/Desktop/raydium-sdk-swap-example-typescript/src/index.ts:8:71
at new Promise ()
at __awaiter (/Users/webskitters/Desktop/raydium-sdk-swap-example-typescript/src/index.ts:4:12)
at swap (/Users/webskitters/Desktop/raydium-sdk-swap-example-typescript/src/index.ts:10:25)
at Object. (/Users/webskitters/Desktop/raydium-sdk-swap-example-typescript/src/index.ts:67:1)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
how to solve it ?