Skip to content

cryptoscan-pro/solana-wallet-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@cryptoscan/solana-wallet-sdk

Utility to work with solana wallets

[GitHub]

To install package:

npm install @cryptoscan/solana-wallet-sdk

Usage

import { createWallet, getBalance } from '@cryptoscan/solana-wallet-sdk';

const wallet = createWallet();

console.log('Private key: ' + getPrivateKey(wallet))
console.log('Public key: ' + getPublicKey(wallet))

getBalance(wallet).then((balance) => {
   console.log('Balance: ' + balance);
});

getBalance(wallet, process.env.COIN_ADDRESS).then((balance) => {
   console.log('Coin balance: ' + balance);
});
import { getWallet, getBalance } from '@cryptoscan/solana-wallet-sdk';

const wallet = getWallet(process.env.SECRET_KEY);

getBalance(wallet).then((balance) => {
   console.log('Balance: ' + balance);
});

Docs

  • createWallet(): Keypair
  • getBalance(wallet: Keypair, coinAddress: string): Promise<number>
  • getPrivateKey(wallet: Keypair): string
  • getPublicKey(wallet: Keypair): string
  • makeWallets(path: string, count: number): void

Deploy

To install project

git clone https://github.com/cryptoscan-pro/swap-sdk

To install dependencies:

npm install

To build:

npm build

This project was created using bun init in bun v1.1.0. Bun is a fast all-in-one JavaScript runtime.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published