Skip to main content

Front End

The Cash Stack includes Gatsby Starters, Themes, and Plugins for creating a web-based, non-custodial wallet. They include the Capacitor libraries to easily compile those apps into iOS and Android phone apps. The Plugin structure allows developers to quickly build and share extensions to the wallet app.

Gatsby Starter

The fastest way for a business to launch its own white-labeled wallet app, is to fork bch-wallet-starter. This will immediately give you an app that you can start customizing and hacking on. Out-of-the-box, it will have the same features as demo-wallet.fullstack.cash.

Gatsby Theme

The Gatsby Starter is just a wrapper for the Gatsby Theme gatsby-theme-bch-wallet. If you need to hack on some of the lower-level features, forking the Theme might make more sense. Just like the Starter, the Theme includes Capacitor files for generating an Android or iOS app.

Back End Service

The web wallet will need to connect to some back end wallet service. You can run that service yourself, or you can use wallet services provided by the PSF community. The wallet service is selected by navigating to the Configure tab.

Selecting a wallet service

No private information (keys, mnemonics, etc) is ever sent to the back end service. The service simply provides access to the blockchain and indexers, so the web wallet can query data and broadcast transactions.

The list of community-provided wallet services is dynamically loaded from this Gist. To run your own wallet service, you'll need to install the Local Back End.

Gatsby Plugins

Developing new features are much easier to create by embedding them directly in to the Gatsby Starter. However, the easiest way to share these new features is to extract them into a Gatsby Plugin. This turns the feature into a self-contained 'lego block', which can easily be shared with other developers.

Below are some of the most popular Plugins that have been developed for bch-wallet-starter.

TX Plugin

This is a very simple Plugin that is included by default into bch-wallet-starter. It's included to illustrate the basic principles of how Plugins work and how a developer would go about creating one or including them in their Gatsby app. This plugin simply retrieves and displays the transaction history for an address.

Sweep Plugin

'Sweeping' is the act of scanning a paper wallet in order to move the cryptocurrency from the paper wallet to the wallet app. This plugin is used by wallet.fullstack.cash. It supports both BCH and SLP token sweeping.

Sign Plugin

Cryptographically signing a message has a wide range of applications. This plugin allows the web wallet to be able to sign any given string of text.

Post Office

When SLP tokens are sent from one user to another, it requires some BCH to pay the transaction fees. This presents an on-boarding problem: if a new user receives tokens, but no BCH, their tokens are effectively 'stuck' until they acquire enough BCH to pay the transaction fee. The solution to this problem is the SLP Post Office. This concept is best explained in this video, and a second video demonstrating this plugin. This plugin enables the web wallet to work with the Post Office Server.

minimal-slp-wallet

minimal-slp-wallet is a JavaScript library compiled for use in a front end browser app. It provides basic wallet functionality for working with BCH and SLP tokens. It can be configured to operate on either the Web 2 or Web 3 architecture.

minimal-avax-wallet possesses the same functionality and interfaces, but operates on the Avalanche X-Chain blockchain.