Why did you (DXS) build Consigliere?
Consigliere is primarily an incredibly powerful BSV indexer (secondarily it is a transaction building SDK). Importantly, Consigliere can index, build and interpret STAS transactions.
We built Consigliere for 3 reasons:
- We need more performance. 3rd party blockchain indexing APIs have proven to be too slow and unreliable. We cannot afford to be held back when seeking 100x, 1,000x growth
- We need more independence. We want the option to run an open source blockchain indexing solution in-house (to eliminate downtime and risk of vendor lock-in)
- We need STAS. Tooling needs to support STAS to power Fiorin wallet and USD trading on DXS
What are the features of Consigliere?
Consigliere consists of a BSV / STAS indexer and a BSV / STAS wallet management suite.
Consigliere’s STAS indexer solves the back-to-genesis problem for STAS tokens as discussed in our STAS Protocol Consideration post. From the article:
To safely integrate STAS, businesses / users must either subscribe to or run their own service that indexes STAS transactions and derives a UTXO subset representing / constituting all the existing authentic tokens of interest. Working with such a UTXO subset instead of a regular whole UTXO set allows avoiding back-to-genesis tracking per each transaction.
Please note, such a STAS indexer is NOT an oracle! No signatures or permissions are needed from the indexer for any action using the STAS protocol. The indexer is nothing more than a service, facilitating data extraction from the public Bitcoin blockchain. This post by Jerry Chan does an excellent job explaining the nuance.
Here’s what Consigliere is doing under the hood:
Subscribe via ZMQ protocol to a BSV node. Scan all transactions originating from the list of issuance transactions of a token of interest up to the current UTXO set and mempool. Index out all STAS transaction outputs related to the given token IDs. From this, maintain each block synchronization of a specific STAS token/s ID/s UTXO subset. The following functionality is included:
- Instant validation of STAS token UTXOs
- Instant STAS token balances by address
- UTXO updates stream by address, token ID or both
- Transaction updates stream by address, token ID or both
BSV & STAS token wallet management
SDK and APIs
- Create private keys
- Build and sign BSV transactions
- Build and sign STAS transactions (FT & NFT):
- Contract: This will create a spendable OP_RETURN UTXO which contains a JSON schema that provides details about a particular token
- Issue (including reissuance): This will spend the contract transaction UTXO and create a new STAS UTXO (or multiple UTXOs)
- Transfer: This spends a STAS UTXO and allocates it to a new destination STAS UTXO
- Split: This spends a STAS UTXO and allocates it to up to 4 different STAS UTXOs
- Merge: This merges 2 STAS inputs
- Swap: Swap token for token, P2PKH for token or token for P2PKH (In Progress)
- RedeemSplit: This spends a STAS UTXO and allocates some of the tokens to a standard P2PKH UTXO and the remainder to a destination STAS UTXO. The P2PKH destination must be the redemption public key hash, immutably hardcoded in the token’s script
- Redeem: This spends a STAS UTXO and creates a standard P2PKH of the full amount. The P2PKH destination must be the redemption public key hash
- Manage UTXOs:
- Automatically service split and merge operations in the background (must be confirmed by the wallet user)
- Broadcast transactions
- OIDC authentication
How does Consigliere work?
Pruned BSV node. 30GB RAM, 4 CPUs. $168 / month
- Stores last 3,000-ish blocks
Consigliere. 8GB RAM, 4 CPUs. $56 / month
Will you (DXS) offer Consigliere as a service?
Yes. To begin we will make Consigliere’s STAS indexer API and WebSocket endpoints public. While Consigliere is in beta the service will be free. Beyond that, we plan to charge for subscriptions. Please get in touch with this guy if you’re interested.
Can I run Consigliere myself?
Yes. The Consigliere suite is open source. We made Consigliere open source for the following reasons:
- Provide a resource for other BSV businesses
- Encourage growth of the STAS token ecosystem
- Expose Consigliere to more eyeballs to make the code more robust
Do I have to index the entire chain?
No. You can specify what you wish to index.
What other STAS tooling / services exist?
Taal / Whatsonchain
Whatsonchain offers a global STAS indexing API here. Until Consigliere, this was the only STAS indexer on the market. Vaionex and Relysia use this API for their services, and intend to release their own versions as well. DXS will use Whatsonchain’s API as a fallback.
Vaionex / Relysia
Relysia is a bitcoin wallet that supports STAS tokens. Think of the Relysia offering as token-wallet-as-a-service. As an example, the Relysia infrastructure and API suite power Centi wallet. Relysia SDK is here. Documentation is here.
The Relysia wallet architecture is very interesting as it relies on 3 party collaboration to build transactions. Here’s how it works currently:
- Client (DXS) would hold the encrypted private keys for users;
- Relysia controls the encryption mechanism;
- Decryption is triggered with an auth token (Google Auth) by the user
Please note that the next generation of Relysia architecture will support creating unsigned bundles from all endpoints allowing clients to choose Metamask-style functionality if required.
From a DXS perspective, we would have integrated Relysia six months ago but unfortunately the product wasn’t quite ready. We made the decision to allocate resources to develop a wallet solution (Fiorin) internally. Here are the benefits:
- We are in control of product delivery. We couldn’t solely rely on a third party to deliver a product so important in our growth roadmap
- We have control over the UI and functionality of Fiorin. This will allow for seamless integration with DXS (most DXS user complaints are wallet issues)
- The STAS ecosystem will have multiple wallet architectures to choose from and users can be in complete control of their private keys using a wallet such as Fiorin