Stoodkev avatar

Hive - CAIP-2

stoodkev

Published: 29 Jan 2022 › Updated: 29 Jan 2022Hive - CAIP-2

Hive - CAIP-2

image.png

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.

Motivation

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.
mintrawaHive account@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.

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

CAIP-2

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 
bip122:000000000019d6689c085ae165831e93

# Litecoin
bip122:12a765e31ffd4059bada1e25190f6e98

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:beeab0de000000000000000000000000

# Hive testnet
hive:18dcf0a285365fc58b71f18b3d3fec95

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)

Leave Hive - CAIP-2 to:

Written by

Witness. Building Keychain and Hive Multisig.

Read more #hive posts


Best Posts From Stoodkev

We have not curated any of stoodkev's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From Stoodkev