0.2.0 • Published 5 years ago

o3-dapi-pay v0.2.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

o3-dapi-pay

Simple Payments Plugin for o3-dapi

Requires o3-dapi-core to operate.

Usage

In a browser - cdn npm.io

<script src="https://cdn.jsdelivr.net/npm/o3-dapi-pay/lib/o3-dapi-pay.min.js"></script>
window.o3dapiPay

Install via npm npm version

npm i --save o3-dapi-pay

or

yarn add o3-dapi-pay
var o3dapiPay = require('o3-dapi-pay');

import o3dapiPay from 'o3-dapi-pay';

Example

import o3dapi from 'o3-dapi-core';
import o3dapiPay from 'o3-dapi-pay';

o3dapi.initPlugins([o3dapiPay]);

o3dapi.PAY.send({
  asset: o3dapi.PAY.ASSETS.USDC,
  toAddress: 'ATphdznMVmtdREtr3nWAq4C5H4A8ioV4Bd',
  amount: '1'
})
.then(result => {
  const {
    asset,
    toAddress,
    amount,
    txid,
  };
  console.log('sent: ', txid);
})
.catch(err => {
  console.error('failed or rejected', err);
});
0.2.0

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.1

5 years ago