-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CAIP-10: Account ID Specification #10
Conversation
I would love your feedback on this! 🙏 |
Thanks for this PR! I think this is a great idea. Just 2 comments after a first read:
|
I was also leaning towards having them reversed but my only reason for not doing it is that it would make more sense if the order of CAIP-2 chain_id followed the same pattern Similar example would be the email addresses.
If this pattern would be applied to this CAIP, it would be weirdly ordered
|
I think it would be less weird actually. Hoping to get some more input/signaling from others |
Programmatically speaking it's a very simple change. Example: const parseAccounts = (accounts: string[]) => {
const accountMap = accounts.map((account: string) => {
const params = account.split("@");
return {
address: params[0],
chain: params[1]
};
};
}; Thus this is simply a human readability preference |
I've asked @oed and he also signaled preference to reverse. I'm happy to make this change! 👍 |
Great! Will merge after the change |
Done! 👍 |
That was fast. Just one more thought: do we want to enforce ERC-55? I think this could make sense here as it would enforce uniqueness. |
I think that CAIP-10 is more analogous to CAIP-2 while the ECR-55 requirement would be more analogous to CAIP-3 where it define Account Address specification for CAIP-3 chains requiring CAIP-10 |
Good to merge @ligi ? |
done - thanks for the ping |
Should this specification assert that CRC checked addresses is required? Seems like a good opportunity to start enforcing that. |
This standard should make clear if CRC is optional, disallowed or enforced. |
This is being used here |
GM! I would like to make an extension to CAIP-10 I would love to see ChainID 0 reserved for EOAs, so that we can treat EOAs in a special way. EOAs live on many chains, so requiring chain specification is redundant, and in many cases, costly! If we extend CAIP-10 to treat ChainID 0 as EOAs we can make many processes (e.g. forward resolution of ENS names on L2s) 10x more efficient. WDYT? |
Wouldn't we need to constrain to "chains that use the same address derivation algorithm"? Even Bitcoin and Ethereum, which both use secp256k1, have different address derivation mechanisms so one address won't work for both. |
@GriffGreen I think what you meant to say is to reserve 0 for EOAs in the "eip155" namespace for caip-10? |
Yes, I should have been more clear as Joel said
This would save everyone a lot of work IMO Otherwise, to use EOAs in multiple chains with this standard you have to make many redundant records. |
Proposing a specification for chain-agnostic account id's
Examples