warp-id / solana-trading-bot

Solana Trading Bot - Beta
Microsoft Public License
1.3k stars 615 forks source link

Wallet #102

Open ImSan286 opened 2 months ago

ImSan286 commented 2 months ago

Where to add or enter or provide our wallet address?It only asks for private keys.Help me out

FrederikSuijs commented 2 months ago

The private key is unique to your wallet address. So once you provide it, it will be able to read your wallet. No need so seperatly mention your public wallet address.

Disclaimer: I would recommend to always be cautious and don't use your main wallet. Just create a new wallet and supply it with a mimimum amount of funds to test with.

tuncatunc commented 2 months ago

Never use your main wallet for bot!!!!

@ImSan286 you can create a new wallet with solana-keygen new --outfile bot-keypair.json In json file bot-keypair.json, the private key is in array format like [1, 2, 3, ....]

you can use following nodejs script to convert the private key in bot-keypair.json

const fs = require('fs');
const {Keypair} = require('@solana/web3.js');
const bs58 = require('bs58');

// Replace with the path to your keypair.json file
const keypairPath = './bot-keypair.json';

const keypair = Keypair.fromSecretKey(new Uint8Array(JSON.parse(fs.readFileSync(keypairPath, 'utf-8'))));
console.log(bs58.encode(keypair.secretKey));
➜  solana-trading-bot git:(master) ✗ node keyToBase58.js 
<private key in base 58 encoding>
Sully916 commented 2 months ago

having same issue do i type this into command prompt?

tuncatunc commented 2 months ago

Create key.js file and put it in it

Sully916 commented 2 months ago

not allowed to create a new file in the Solana sniper bot directory. were is the javascript code pointing to. Sorry for all the questions im a newb when it comes to coding.