What will be blockchain ID for internet computer as per CAIP ? A blockchain ID (short “chain ID”) is a string designed to uniquely identify blockchains in a developer-friendly fashion as defined at Blockchain ID Specification | Chain Agnostic Improvement Proposals
I’d use icp:<principal-id>. The blockchain in question would be running on a canister. So, the ICP token would have a chain id of icp:ryjl3-tyaaa-aaaaa-aaaba-cai
Technically a Chain ID is specified in CAIP-2, BUT rather than PR in an example or a modification to CAIP-2, the preferred workflow is for you to PR an /icp namespace into the namespaces repo, which minimally consists of a readme (brief general introduction to the VM/network for total beginners) and a profile for one CAIP.
As for CAIP-2 conventions and rationale, most CAIP-2 profiles are meant to detect forks, and be queryable/confirmable from each node’s info/help command. For this reason they are mostly hashes of genesis blocks or subsets thereof (so that caip10s will remain reasonably short URNs that dont throw errors in common toolchains). I recommend clicking around to read all the caip-2 profiles published to date before starting your PR.
Thanks and feel free to reach out on our discord if you get stumped.
@kpeacock Now that you know the context, please take the conversation forward within dfinity team.
As per the advantages of CAIP need for ICP, CAIP increases visibility leading to more unique users, better wallet integrations and liquidity flow from other chains.
As per the urgency of CAIP for ICP, Wallet Connect v2 is starting from Dec 16. wallet connect v2 is supported by 150+ wallets and CAIP complaint
The hex representation of the IC Root key is 308182301d060d2b0601040182dc7c0503010201060c2b0601040182dc7c05030201036100814c0e6ec71fab583b08bd81373c255c3c371b2e84863c98a4f1e08b74235d14fb5d9c0cd546d9685f913a0c0b2cc5341583bf4b4392e467db96d65b9bb4cb717112f8472e0d5a4d14505ffd7484b01291091c5f87b98883463f98091a0baaae.
How would this work for tokens on the IC chain? We have the OGY token on jwcfb-hyaaa-aaaaj-aac4q-cai. Is that something that would need its own namespace? Or would it just file under the IC namespace.
Taking only the first 32 characters of the hex encoding from the DER encoded root key is probably a bad idea as the DER encoding includes metadata (i.e. about length and the data types) in those bytes (with the actual public key bytes being further back). I would be much more comfortable with the hash of the public key.
I thought including the (truncated) hash of the public key would be a good idea, because it would allow other instances of the IC protocol later on. A human-readable name would also be possible but would need another registry.