You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add additional CAIP-19 types and parsing functions to align with proposal (#227)
Added full support for [CAIP-19 Asset
IDs](https://github.com/ChainAgnostic/CAIPs/blob/main/CAIPs/caip-19.md)
including the necessary regex, structs, and parsing functions.
A few notes:
- While the regex of a chain namespace is technically the same as an
asset namespace, the official proposal makes a clear distinction between
the two, and so it's within the spirit of the spec to break these out
into separate properties. The same cannot be said for a chain reference
vs asset reference: these require different regex for validation.
- Previously, `CaipAssetId` required a tokenId (`/${string}`) to be
present. This has been changed to allow for tokenId to be optional (as
dictated by the official proposal) in both the type and its
corresponding regex string
- For completeness, `toCaipAccountId` and `parseCaipAssetId` functions
were added
0 commit comments