CAIPs icon indicating copy to clipboard operation
CAIPs copied to clipboard

CAIP-10 support for account names with `.` or `_`

Open raymondfeng opened this issue 4 years ago • 3 comments

Some blockchains such as NEAR uses names such as abc.near or abc.testnet for account ids. See https://docs.near.org/docs/concepts/account.

ENS is another example, such as abc.eth.

It would be desirable to allow such account ids with CAIP-10.

The required change is to relax the regexp for account_address ( [a-zA-Z0-9]{1,64}). It should allow characters such as . and _.

raymondfeng avatar Aug 21 '21 17:08 raymondfeng

The same is true for CAIP-19 (asset_reference: [-a-zA-Z0-9]{1,64}). The contract address can be a name with . or _.

raymondfeng avatar Aug 21 '21 18:08 raymondfeng

any issues with this regex allowing any symbols? or don't care?

e.g. /[a-zA-Z0-9]{1,64}/.test('test@(*%^(*@%^#(%@test')

mattlockyer avatar Aug 22 '21 14:08 mattlockyer

Hedera would benefit from dots in asset references and account addresses too. Our addresses are three non-negative int64s separated by dots. i.e. 0.0.950.

What needs to be done to advance this, does someone need to propose a PR?

shemnon avatar Oct 11 '21 21:10 shemnon