Tokens
Money Button API allows you to create and transfer assets in the form of tokens in addition to regular bsv transfers and custom scripts.
Different protocols exist for this in the bsv ecosystem, check which ones we support in the Supported Protocols section.
To see a full example of how to create assets and transfer tokens, check out our Assets Example
Assets Identification
At Money Button we are using the paymail standard as a way to also uniquely identify an asset. When you create an asset, a paymail will be associated with it. This paymail will be used later in our APIs to identify the asset whenever a transfer needs to be made and to show a user's associated tokens balance for that asset.
Assets API
The relevant API endpoints that you'll want to use are:
This endpoints, together with Money Button's button API, will provide you with all that you need to create tokens that will be displayed in user's wallets, which they will then be able to transfer using Money Button wallet and APIs.
Supported protocols
When defining an asset, you'll need to choose which protocol to use. Here's a list of our currently supported protocols:
Protocol identifier | Description |
---|---|
SFP@0.1 | Simple Fabriik Protocol for Tokens |
Use the protocol identifier with the Create Asset API endpoint to choose which protocol your asset will work with. We are trying to provide a seammingless experience for Money Button users whichever protocol an asset will use, but different protocols may provide different features specially to issuers.
Tokens Balances
Money Button API v2 provides a balances endpoint which, in addition to BSV balance, returns assets balances as well.