BSV
$54.65
Vol 31.22m
0.19%
BTC
$97023
Vol 41360.87m
-0.1%
BCH
$455.79
Vol 367.48m
-0.16%
LTC
$102.98
Vol 859.75m
1.92%
DOGE
$0.32
Vol 5185.44m
-0.6%
Getting your Trinity Audio player ready...

SHUAllet.js is an open-sourced, simple JavaScript library and non-custodial wallet plugin that supports common Bitcoin SV (BSV) transaction types. The goal of the wallet is to provide developers with streamlined means to execute well-known transactions without having to reimplement those functions from scratch in their own applications.

For example, owning and inscribing ordinals, listing tokens for sale on-chain, and locking coins into the future are all becoming commonly used Bitcoin scripts to the point where they should be as standardized as sending Bitcoin to an address (Pay-To-Public-Key-Hash (P2PKH)). The wallet was written in pure JavaScript, with the only third party library dependency being the bsv-legacy library, a derivative of the decade-old Bitcore library.

Every other script and helper functions are implemented in plain old JavaScript, with a single JS file aptly named SHUAllet_plugin.js that can be included in an HTML page for easy use (no webpack or custom build process necessary). The repository is open-source, so developers can pick and choose which functions they want to include; for example, if they want locking coins, but not Ordinals functions, they can do so. Additionally, the plugin supports bSocial functions (post, like, reply), which can be easily coupled with other transaction output types, such as locking coins, as hodlocker implements.

The last feature added to SHUAllet was a simple browser cache for payment UTXOs so that the wallet does not have to make an external API call each time it transacts. Given the recent stress on the BSV network, caching UTXOs will become extremely important, if not necessary, as services may not provide this feature for free in the future. For example, most BSV applications reach out to a block explorer such as WhatsOnChainBitails, or GorillaPool
to get the up-to-date UTXOs for an address.

However, once the UTXOs are known at some point, this becomes unnecessary in the context of spending in the scope of a single application. Each time the wallet spends BSV, the future state of UTXOs is known based on the raw transaction constructed. This feature is implemented in SHUAllet, improving performance (on initial page load and spends) and giving the user more control and confidence to secure their assets. 

Of course, if funds are sent to or spent outside of the application or domain context, then an external call to fetch the updated UTXOs is necessary, but even this can be streamlined with communication protocols moving forward if needed.

Screenshot post
Source: hodlocker

SHUAllet was built to help other developers build applications that make Bitcoin more valuable, not to capture a moat of users. No dedicated domain exists for SHUAllet; this is an intentional decision as the concept of a wallet transcends the Web 2.0 concept of a domain.

The blockchain exists independently of the Internet; therefore, wallets should be built to align with that concept. SHUAllet does not even have a backend server; it only leverages third-party APIs. As such, other developers have indeed found the library useful, being implemented for LRC-20 minting (hodl, lockmap), LockStream.OG, and treechat.ai (soon). I hope more and more developers find SHUAllet useful and help them express their creativity on-chain.

Watch: Bitcoin wallets for individuals and businesses

Recommended for you

Google unveils ‘Willow’; Bernstein downplays quantum threat to Bitcoin
Google claims that Willow can eliminate common errors associated with quantum computing, while Bernstein analysts noted that Willow’s 105 qubits...
December 18, 2024
WhatsOnChain adds support for 1Sat Ordinals with new API set
WhatsOnChain now supports the 1Sat Ordinals with a set of APIs in beta testing; with this new development, developers can...
December 13, 2024
Advertisement
Advertisement
Advertisement