Hive - CAIP-2

in #hive2 years ago (edited)

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

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)
Sort:  

very cool and interesting. It's nice to see such work is always happening on blockchain tech. Can you explain more about what is it that you are personally doing? Thanks, :)

What I'm personally doing related to this Ceramic integration, or on Hive in general?
For Ceramic, I'm taking charge of creating the CAIPs for Hive (CAIP2 and CAIP10).
For Hive in general, I'm leading Hive Keychain development and I'm a consensus witness.

This is very good to see,the level of development here is very good to see too

Nice work

Couldn't we do that already? I mean access cross chain profiles, with right standard, anyone can attach their profiles from other chains on Hive account's json_metadata, we just need standard way to access and use that info across the dapps. 🤔

btw, support his (@mintrawa) witness links to your witness

Oops I forgot to change the username after the copy paste ^^".
Fixed.

Yes, we could do that already, but the goal is to make dApps that are not centered on Hive accessible through Hive accounts. That is a good way to extend our reach and it doesn't cost anything.

Congratulations @stoodkev! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s):

You received more than 28000 HP as payout for your posts and comments.
Your next payout target is 29000 HP.
The unit is Hive Power equivalent because your rewards can be split into HP and HBD

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Check out the last post from @hivebuzz:

Feedback from the February 1st Hive Power Up Day
Hive Power Up Month Challenge 2022-01 - Winners List
Be ready for the next Hive Power Up Month!