0.1.9 • Published 11 months ago

btc-dapp-js v0.1.9

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

Quickstart

Recommend prerequisites for running a local NPM webapp:

Installation

Please link btc-dapp-js at the latest version in your package.json file and then run:

npm i btc-dapp-js

Static Javascript Linkage

A compiled version of this library is generated with each release using webpack. To link it directly from your HTML code, please use (and optionally include the integrity attribute):

<script src="https://cdn.jsdelivr.net/npm/btc-dapp-js@latest/dist/btc-dapp-js.js" crossorigin="anonymous" type="text/javascript"></script>

API Samples

From your React app or JavaScript client-side application, you can retrieve a user's Ordinals address with:

const ordinalsAddr = await Wallets.getWalletAddress(walletProvider, Wallets.ORDINALS_TYPE);

Note that the getWalletAddress parameters are walletProvider and addressType. See wallets.js in src/wallets/ for the full list (e.g., hiro, unisat, xverse).

Then, to initiate spending for the user, your JS app would call:

const txid = await Wallets.sendBtc(walletProvider, destAddr, amountSats, fromAddr);

Testing

TBA

Documentation

All documentation is provided herein in the README.

0.1.9

11 months ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.0

2 years ago