Skip to content

💳 A minimalistic wallet for the Algorand blockchain

License

Notifications You must be signed in to change notification settings

mathieuartu/algo-minimal-wallet

Repository files navigation

💳 AlgoMinimalWallet

Unit tests Lint Build npm version npm bundle size (scoped version)

A simple class to programmaticaly interact with the Algorand blockchain

Installation

npm i algo-minimal-wallet

Usage

import AlgoMinimalWallet from "algo-minimal-wallet"

const amw = new AlgoMinimalWallet({
	algodInfo: {
        server: 'ALGO_NODE_URL',
        port: 'ALGO_NODE_PORT',
        token: 'ALGO_NODE_TOKEN',
    }
	wallet: {
		address: 'YOUR_PUBLIC_ADDRESS',
		mnemonicPhrase: 'YOUR_MNEMONIC_PHRASE',
	},
})

(async () => {
    const balances = await amw.getBalances()
    // balances = { ALGO: 12.3, USDC: 140, ... }
    const { txId: algoSendTransactionId } = await amw.sendAlgo({ to: 'RECIPIENT_ADDRESS', amount: 10 })
    const { txId: asaSendTransactionId } = await amw.sendAsa({ to: 'RECIPIENT_ADDRESS', amount: 100, assetId: 3301 })
})()

MinimalAlgoWallet needs two things to work :

  • Public or private algod node credentials
  • Your public address and mnemonic phrase in order to sign the transactions

About

💳 A minimalistic wallet for the Algorand blockchain

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published