Hive - CAIP-10

in #hive2 years ago

image.png

CAIP

To read about CAIP and the motivations for proposing CAIP-2 and CAIP-10 standards for Hive, please read this post first.

The CAIP-2 regarding Hive namespace definition has been submitted for review in this pull request.

CAIP-10

The scope of this post is to propose an account ID standard matching the Hive usernames.
CAIP 10 is defined as:

CAIP-10 defines a way to identify an account in any blockchain specified by CAIP-2 blockchain id.

The original chain agnostic account ID goes as follow :

account_id:        chain_id + ":" + account_address
chain_id:          [:-a-zA-Z0-9]{5,41}
account_address:   [a-zA-Z0-9]{1,64}

The problem with that definition is that it only includes alphanumeric characters, while some Hive usernames also contain . and/or -.

CAIP-10 for Hive

I've started a draft of a Hive-compatible CAIP-10 here, based on the required template.

Proposed account ID definition is as follow, based on a Hive username regex by @mintrawa (vote for witness). Note that only the account_address changes.

account_id:        chain_id + ":" + account_address
chain_id:          [:-a-zA-Z0-9]{5,41}
account_address:   ^(?=.{3,16}$)[a-z]([0-9a-z]|[0-9a-z\-](?=[0-9a-z])){2,}([\.](?=[a-z][0-9a-z\-][0-9a-z\-])[a-z]([0-9a-z]|[0-9a-z\-](?=[0-9a-z])){1,}){0,}$

The simplicity of Hive username regex is a beauty to behold =p

Using CAIP-94 (CAIP-2 for Hive namespace) and this CAIP, chain agnostic dApps could define Hive accounts as follow :

# @hiveio account on mainnet
hive:beeab0de000000000000000000000000:hiveio

## Accounts with special characters (`-`,`.`)

# @hive.fund account on mainnet
hive:beeab0de000000000000000000000000:hive.fund

# @hive-blockchain account on testnet
hive:18dcf0a285365fc58b71f18b3d3fec95:hive-blockchain

The second and third examples above aren't currently possible because of the limitations of current CAIP-10 (as explained above). This CAIP aims to solve this issue.

Future work

  • Submit for review and follow up
  • Hive AuthProvider on Ceramic
Sort:  

Its real work here. So if users can eventually access account without keychain or metamask, can these form of lite account also be counted as real accounts on the hive blockchain? Or is it probably for accounts that want to game on the hive blockchain?

This is just the definition of a standard for dApps that are chain agnostic.
You could link one or more wallets to your decentralized identity (DID).
For example hive:beeab0de000000000000000000000000:josediccus (Hive) and eip155:1:0xab16a96d359ec26a11e2c2b3d8f8b8942d5bfcdb (Eth mainnet).

Once we have this standard in place and a method to provide Hive Authentication in Ceramic and/or other tools, we can have a Sign in with Hive button, along with Sign in with Eth or Btc, wouldn't it be cool?

Once we have this standard in place and a method to provide Hive Authentication in Ceramic and/or other tools, we can have a Sign in with Hive button, along with Sign in with Eth or Btc, wouldn't it be cool?

Hoooooo this is astonishing, so more external wallet would eventually be able to interact with one's own hive identity here? There are many possibilities to this, adoption for example, and hive have a certain aspect of interacatibility, plus, adoption might skyrocket too as sign ins could become even more easier and all that. My goodness! Forgive me, im a tech noob and all that, I need that explanation to clear my confusion. Great work. Wow.

Voting witness.

Thanks!
So of course, an Eth wallet can't broadcast on Hive, neither can a Hive wallet on Eth. But the point is for storing and retrieving decentralized data that is linked to an identity and can be shared across dApps, such as a profile information.
It's not easy to explain clearly ^^

It's not easy to explain clearly ^^

Haha it isn't, but i've gotten the whole idea, at least. Thanks for the amazing work. This is smooth.

For what we are doing with the SPK network it will mean you will be able to log into the network and post content via Eth/other chains. Of course that doesn't go to Hive, but it is heavily tied into it. Looking to do anchoring on chain to help reference off chain content via minimal on chain transactions.

If you haven't vote for @stoodkev as witness do it, he loves HIVE and it shows in his work as witness

I do love Hive!
Thanks for your support =)

Ciao @stoodkev, volevo farti i complimenti è un iniziativa che mi piace molto!! Sei veramente molto bravo! Ti auguro una bellissima giornata ❤❤❤❤❤❤❤

Wow this is amazing project


The rewards earned on this comment will go directly to the person sharing the post on Twitter as long as they are registered with @poshtoken. Sign up at https://hiveposh.com.

Looks quite complex to me, so glad you are doing that.. :P

That's very good!

Congratulations @stoodkev! Your post has been a top performer on the Hive blockchain and you have been rewarded with the following badge:

Post with the highest payout of the day.

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:

Hive Power Up Month - Feedback from February day 8
Hive Power Up Month challenge - Feedback from February day 3
Our Hive Power delegations to the last Power Up Month challenge Winners

Went over my head, hope you have time to chat sir I am Troy G#9925

Hello buddy.
Is there any error with Hive Keychain because I can't login on Hive Keychain?

That would be intriguing good. More clear and more branding for the profiles.
Thanks for bringing those information to us

Sometimes I have a hard time transferring. Although the Hive key blockchain is a bit of a hassle in this context, . It also plays a savior role.

Today I logged into the hive account for the first time. I did something. but I did not understand much. Now I can get some information from the shares thanks to you. thank you so much.

Wow how complex is everything about the hive chain wow is incredible, I would like to learn much more about it, hehehe I only know how to play the violin hahahaha sald

Wow how complex is everything about the hive chain wow is incredible, I would like to learn much more about it, hehehe I only know how to play the violin hahahaha sald