Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wallet #102

Open
ImSan286 opened this issue May 4, 2024 · 5 comments
Open

Wallet #102

ImSan286 opened this issue May 4, 2024 · 5 comments

Comments

@ImSan286
Copy link

ImSan286 commented May 4, 2024

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

@FrederikSuijs
Copy link

FrederikSuijs commented May 6, 2024

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
Copy link

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
Copy link

Sully916 commented May 9, 2024

having same issue do i type this into command prompt?

@tuncatunc
Copy link

Create key.js file and put it in it

@Sully916
Copy link

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.

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

No branches or pull requests

4 participants