Skip to content

Commit

Permalink
editorial
Browse files Browse the repository at this point in the history
  • Loading branch information
bumblefudge committed Sep 1, 2023
1 parent a89f7f8 commit e926da1
Showing 1 changed file with 28 additions and 7 deletions.
35 changes: 28 additions & 7 deletions monero/caip10.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,31 @@ requires: ["CAIP-10"]

## Rationale

CAIP-10 defines a way to identify an account in a blockchain. Monero chains use UTXO model and [Monero addresses][] are functionally similar to accounts in other namespaces.
CAIP-10 defines a common URI scheme for identifying actors in a pseudonymous cryptographic system.
Monero chains use the UTXO accounting model and [Monero addresses][] are functionally similar to accounts in other UTXO-based namespaces, where CAIP-10 identifiers represent **payee identifiers** (of which a given actor has many and can self-generate arbitrarily more) rather than **actor identifiers**.

## Semantics

Monero has several types of addresses: [standard address](https://monerodocs.org/public-address/standard-address/), [subaddress](https://monerodocs.org/public-address/subaddress/) and [integrated address](https://monerodocs.org/public-address/integrated-address/). Any address contains network and address type identifiers, public spend key, public view key, a checksum, and may contain additional data depending on the address type. [base58-monero][] encoding is used to encode address into a string.

CAIP-10 "accounts" should not be confused with [Monero accounts][], which are used in Monero wallets for grouping related addresses and transactions.
Monero wallets can generate and pay out to several different types of payee addresses:
1. [standard address](https://monerodocs.org/public-address/standard-address/) for fully-public contexts,
1. [subaddress](https://monerodocs.org/public-address/subaddress/) for limiting linkability to a specific interactive context, and
1. [integrated address](https://monerodocs.org/public-address/integrated-address/) which encrypt transaction-specific metadata to a shared secret to enable automation and programmable metadata per context.

Each of these above addresses contains:
- network identifiers, which map to [CAIP-2][] `chainId`s,
- address type identifiers encoding which of the above it is,
- a public spend key,
- a public view key,
- optionally, additional type-specific data (such as a transaction-bound metadata for an integrated address), and
- a checksum derived from the above.

Note that the [base58-monero][] encoding is used to encode address into a string.
The alphabet is identical to that used by [base58btc-alphabet][], but padding is used to normalize encoded length to multiples of 11 characters.
Note that decoding base58-monero with a standard base58 library can create breaking inconsistencies between the binary produced and the originally-encoded byte array if such padding was used when encoding.
Decoding the base58 properly and parsing the address type identifier are required for processing the checksum and thus validating the address.

Monero CAIP-10 URIs should not be referred to as "accounts" to avoid confusion with "[Monero accounts][]", which is a term of art used in Monero wallet user interfaces for grouping related addresses and transactions into logical units.
Referring to Monero CAIP-10 URIs as encoding "addresses" or "payees" avoids this confusion, as well as potential false equivalences with namespaces built around atomic-account transaction models, as there is a one-to-many relation of wallets to addresses assumed in the Monero actor model.

## Syntax

Expand Down Expand Up @@ -52,18 +70,21 @@ monero:00000000000000000000000000000000:86MD1PNx3vmKUQjLvxNnmUfGQoHXAg8x56Nq97Kr

## Additional Considerations

In the future new types of Monero addresses will be introduced. They will likely be longer and may exceed the 128 character limit set in [CAIP-10][] specification.
In the future, new types of Monero addresses will be introduced.
They will likely be longer and may exceed the 128 character limit set in the [CAIP-10][] specification.

## References

- [CAIP-10][]
- [Monero addresses][]
- [Address documentation][Monero Addresses] from Monero core developer documentation
- [Account documentation][Monero Accounts] from Monero core developer documentation

[CAIP-10]: https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md
[Monero addresses]: https://www.getmonero.org/resources/moneropedia/address.html
[Monero accounts]: https://www.getmonero.org/resources/moneropedia/account.html
[base58-monero]: https://monerodocs.org/cryptography/base58/
[Monero CAIP-2]: https://github.com/ChainAgnostic/namespaces/blob/main/monero/caip2.md
[base58btc]: https://datatracker.ietf.org/doc/html/draft-msporny-base58-02
[base58btc-alphabet]: https://datatracker.ietf.org/doc/html/draft-msporny-base58-02#section-21

## Copyright

Expand Down

0 comments on commit e926da1

Please sign in to comment.