1.1.0 • Published 5 years ago

@plark/wallettopup v1.1.0

Weekly downloads
-
License
-
Repository
github
Last release
5 years ago

WalletTopUp API Client

npm version

Install

npm i @plark/wallettopup
# or
yarn add @plark/wallettopup

Example

Redeem voucher

import WalletTopUp from '@plark/wallettopup';

const voucher = 'wtubch-7f86204d-c1f6-445d-ba58-b57529090f35';
const myBitcoinAddress = 'my-bitcoin-address!';

function async doSomethingUsefull() {
    const client = new WalletTopUp();
    
    const result = await client.redeem(voucher, myBitcoinAddress);
    
    console.log(result.txid); // Bitcoin TXID: 0ccf60c2f7ba0fba2adec158ba534d69f035974853ae217c9a176907b2b1efb2
}

Make with ❤ by Plark & WalletTopUp teams