Consigliere

Why did you (DXS) build Consigliere?

We built Consigliere for 3 reasons:

  1. 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
  2. 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)
  3. We need STAS. Tooling needs to support STAS to power Fiorin wallet and USD trading on DXS

Required reading:

What are the features of Consigliere?

BSV indexer

STAS indexer

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:

APIs

  • Instant validation of STAS token UTXOs
  • Instant STAS token balances by address

Web sockets

  • 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?

  • Stores last 3,000-ish blocks

Consigliere. 8GB RAM, 4 CPUs. $56 / month

  • Subscribes to BSV node messages via ZMQ
  • Writes relevant data to RavenDB

Will you (DXS) offer Consigliere as a service?

Can I run Consigliere myself?

  • 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?

What other STAS tooling / services exist?

Taal / Whatsonchain

Additionally, Taal has released an open source STAS transaction SDK (Javascript).

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

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store