jdh7190 / SHUAllet.js

MIT License
9 stars 3 forks source link

SHUAllet.js

image

Introduction

SHUAllet.js is a simple browser wallet plug-in that supports common Bitcoin transaction functions.

The wallet has two private keys, one for payments (localStorage.walletKey), one for ownership of NFTs (localStorage.ownerKey).

Setup

To use in your web application or site, simply include the scripts as follows:

<html>
    <head>
        <script src="https://github.com/jdh7190/SHUAllet.js/raw/main/scripts/bsv.browser.min.js"></script>
        <script src="https://github.com/jdh7190/SHUAllet.js/raw/main/scripts/message.js"></script>
        <script src="https://github.com/jdh7190/SHUAllet.js/raw/main/scripts/SHUAllet_plugin.js"></script>
    </head>
</html>
<script>

</script>

Note that bsv.browser.min.js and message.js are required, as SHUAllet.js is built atop of the bsv legacy library 1.5.6, and Bitcoin Signed Messages.

All JS files are combined in SHUAllet_plugin.js for easy, single JS file inclusion, but are isolated across other scripts logically for organization.

Inspect index.html to view the order in which script files should be included if done separately.

Functions

SHUAllet.js supports commonly supported functions such as:

1 Sat Ordinals

BSocial

Locks: