Hive - CAIP-2


What's CAIP ?

According to their Github:

Chain Agnostic Improvement Proposals (CAIPs) describe standards for blockchain projects that are not specific to a single chain.


I've recently stumbled upon an interesting project called Ceramic Network:

Ceramic is a decentralized, open source platform for creating, hosting, and sharing streams of data.

Among other things, they allow the creation of decentralized databases, where users are identified by their decentralized ID (DID). This DID can be linked to different accounts on different chains, as long as they have defined CAIP-2 (blockchain) and CAIP-10 (accounts) standards.

Once we define standards for Hive, we can then submit a Hive AuthProvider for Ceramic.
@mintrawa has already started working on it. Support his witness here.
Once this is all done, users on chain agnostic dApps would be able to access the same decentralized profile, whether using Metamask or Keychain for instance. This can especially be interesting for lite accounts on Hive.

@theycallmedan and the @spknetwork have already shown interest on the technology.


The scope of this post is to propose a blockchain reference standard for the Hive namespace based on CAIP-2.
CAIP 2 is defined as:

CAIP-2 defines a way to identify a blockchain (e.g. Ethereum Mainnet, Görli, Bitcoin, Cosmos Hub) in a human readably, developer friendly and transaction-friendly way.

Basically each type of blockchain can define a standard for developers to follow in order to identify a given blockchain in the ecosystem, following the syntax hereunder:

chain_id:    namespace + ":" + reference
namespace:   [-a-z0-9]{3,8}
reference:   [-a-zA-Z0-9]{1,32}

Example of implementation for BTC-like (CAIP-4)

# Bitcoin mainnet 

# Litecoin

CAIP-2 for Hive

I've started a draft here based on the required template.

I propose using hive as namespace, and the chainId (truncated to 32 chars to respect CAIP-2 standard) as reference:

# Hive mainnet

# Hive testnet

This post aims to serve as a discussion before submitting a Pull Request to CAIP.

Future work

  • Submit for review
  • Work on CAIP-10 standard (related to blockchain accounts)
3 columns
2 columns
1 column