xlm-provider

makes it easy to work with a lumen wallet

Usage no npm install needed!

<script type="module">
  import xlmProvider from 'https://cdn.skypack.dev/xlm-provider';
</script>

README

Lumen provider

Makes it easy to work with a bitcoin wallet.

Install

npm i --save xlm-provider

Include

var XlmProvider = require("xlm-provider").default;

or for ES-2015

import XlmProvider from 'xlm-provider'

Initialize

const xlmProvider = new XlmProvider('testnet'); // or mainnet

Usage

Create private key

const privateKey = xlmProvider.createPrivateKey();

Create private key from mnemonic

const privateKey = xlmProvider.createPrivateKeyFromMnemonic(mnemonic);

let mnemonic = 'absurd green cannon quarter call spray upper diet defense convince live assist'
or 
let mnemonic = xlmProvider.generateMnemonic()

Create public key

const publicKey = xlmProvider.createPublicKey(privateKey);

Get balance

const balance = xlmProvider.getBalance(publicKey);

Create transaction

xlmProvider.sendXLM(to, amount, privateKey).then(transaction=>{
    console.log(transaction);
});
to - address of the recipient
amount - amount in btc
privateKey - your private key