@cryptoscan/solana-wallet-sdk
v0.0.9
Published
Utility to work with solana wallets
Downloads
290
Readme
@cryptoscan/solana-wallet-sdk
Utility to work with solana wallets
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.