Skip to content

thaddeusdiamond/doge-dapp-js

Repository files navigation

doge-dapp-js

A library for convenient functions to use in Doginals dApps

Quickstart

Recommend prerequisites for running a local NPM webapp:

Installation

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

npm i doge-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/doge-dapp-js@latest/dist/doge-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.DOGINALS_TYPE);

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

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

const txid = await Wallets.sendDoge(walletProvider, destAddr, dogeAmount, fromAddr);

Testing

TBA

Documentation

All documentation is provided herein in the README.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published