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
* first draft remediation of CIP-0019
* spelled NA instead of standard N/A
* (1 of 3) repo moved from IOHK to Intersect
Co-authored-by: Ryan Williams <[email protected]>
* (2 of 3) repo moved from IOHK to Intersect
Co-authored-by: Ryan Williams <[email protected]>
* (3 of 3) repo moved from IOHK to Intersect
Co-authored-by: Ryan Williams <[email protected]>
* add external reference: Delegation and Incentives
Co-authored-by: Matthias Benkort <[email protected]>
* update author email address
Co-authored-by: Matthias Benkort <[email protected]>
---------
Co-authored-by: Ryan Williams <[email protected]>
Co-authored-by: Matthias Benkort <[email protected]>
This specification describes the structure of addresses in Cardano, covering both addresses introduced in the Shelley era and the legacy format from the Byron era.
16
18
17
-
# Motivation
19
+
##Motivation: why is this CIP necessary?
18
20
19
21
Document design choices for posterity. Most applications interacting with the Cardano blockchain will likely not have any need for this level of details, however, some might. This CIP is meant to capture this knowledge.
20
22
21
-
# Specification
23
+
##Specification
22
24
23
-
## Introduction
25
+
###Introduction
24
26
25
27
In Cardano, an address is a **sequence of bytes** that conforms to a particular format, which we describe below.
26
28
27
29
However, users will typically come into contact with addresses only after these addresses have been **encoded** into sequences of human-readable characters. In Cardano, the [Bech32][] and [Base58][] encodings are used to encode addresses, as opposed to standard hexadecimal notation (Base16, example `0x8A7B`). These encoded sequence of characters have to be distinguished from the byte sequences that they encode, but lay users will (and should) perceive the encoded form as "the" address.
28
30
29
-
## User-facing Encoding
31
+
###User-facing Encoding
30
32
31
33
By convention, **Shelley** and stake addresses are encoded using **[Bech32][]**, with the exception that Cardano does not impose a length limit on the sequence of characters. The human-readable prefixes are defined in [CIP-0005][]; the most common prefix is `addr`, representing an address on mainnet. Bech32 is the preferred encoding, as its built-in error detection may protect users against accidental misspellings or truncations.
32
34
@@ -44,7 +46,7 @@ Examples of different addresses encoded in different eras:
In Cardano, the sequence of bytes (after decoding with Bech32 or Base58) that represents an address comprises two parts, a one-byte **header** and a **payload** of several bytes. Depending on the header, the interpretation and length of the payload varies.
50
52
@@ -65,7 +67,7 @@ In the header-byte, bits [7;4] indicate the type of addresses being used; we'll
65
67
66
68
See also the more detailed [ABNF grammar in annex].
67
69
68
-
### Network Tag
70
+
####Network Tag
69
71
70
72
Except for [Byron addresses] (type 8 = `1000`), the second half of the header (bits [3;0]) refers to the network tag which can have the following values and semantics. Other values of the network tag are currently reserved for future network types. In the case of [Byron addresses], bits [3;0] have a completely separate definition detailed in the section below.
71
73
@@ -75,7 +77,7 @@ Network Tag (`. . . . n n n n`) | Semantic
75
77
`....0001` | Mainnet
76
78
77
79
78
-
### Shelley Addresses
80
+
####Shelley Addresses
79
81
80
82
There are currently 8 types of Shelley addresses summarized in the table below:
81
83
@@ -96,17 +98,17 @@ Header type (`t t t t . . . .`) | Payment Part | Delegation Part
96
98
97
99
-`Pointer` is detailed in the section below.
98
100
99
-
#### Payment part
101
+
#####Payment part
100
102
101
103
Fundamentally, the first part of a Shelley address indicates the ownership of the funds associated with the address. We call it the **payment part**. Whoever owns the payment parts owns any funds at the address. As a matter of fact, in order to spend from an address, one must provide a witness attesting that the address can be spent. In the case of a `PaymentKeyHash`, it means providing a signature of the transaction body made with the signing key corresponding to the hashed public key (as well as the public key itself for verification). For monetary scripts, it means being able to provide the source script and meet the necessary conditions to validate the script.
102
104
103
-
#### Delegation part
105
+
#####Delegation part
104
106
105
107
The second part of a Shelley address indicates the owner of the stake rights associated with the address. We call it the **delegation part**. Whoever owns the delegation parts owns the stake rights of any funds associated with the address. In most scenarios, the payment part and the delegation part are owned by the same party. Yet it is possible to construct addresses where both parts are owned and managed by separate entities. We call such addresses **mangled addresses** or **hybrid addresses**.
106
108
107
109
Some addresses (types 6 and 7) carry no delegation part whatsoever. Their associated stake can't be delegated. They can be used by parties who want to prove that they are not delegating funds which is typically the case for custodial businesses managing funds on the behalf of other stakeholders. Delegation parts can also be defined in terms of on-chain [pointers].
108
110
109
-
#### Pointers
111
+
#####Pointers
110
112
111
113
In an address, a **chain pointer** refers to a point of the chain containing a stake key registration certificate. A point is identified by 3 coordinates:
Like [Shelley addresses], stake addresses (also known as **reward addresses**) start with a single header byte identifying their type and the network, followed by 28 bytes of payload identifying either a stake key hash or a script hash.
133
135
@@ -140,7 +142,7 @@ Header type (`t t t t . . . .`) | Stake Reference
140
142
141
143
-`ScriptHash` refers to `blake2b-224` hash digests of serialized monetary scripts. How scripts are constructed and serialized is out of the scope of this specification.
142
144
143
-
### Byron Addresses
145
+
####Byron Addresses
144
146
145
147
Before diving in, please acknowledge that a lot of the supported capabilities of Byron addresses have remained largely unused. The initial design showed important trade-offs and rendered it unpractical to sustain the long-term goals of the network. A new format was created when introducing Shelley and Byron addresses were kept only for backward compatibility. Byron addresses are also sometimes called **bootstrap addresses**.
146
148
@@ -174,27 +176,11 @@ Finally, the address type allows for distinguishing different sub-types of Byron
174
176
175
177
A full and more detailed [CDDL specification of Byron addresses] is given in the annex to the CIP.
176
178
177
-
#### Derivation path
179
+
#####Derivation path
178
180
179
181
Historically, Cardano wallets have been storing information about the wallet structure directly within the address. This information comes in the form of two derivation indexes (in the sense of child key derivation as defined in [BIP-0032]) which we call **derivation path**. To protect the wallet's anonymity, the derivation path is stored encrypted using a ChaCha20/Poly1305 authenticated cipher.
## Rationale: how does this CIP achieve its goals?
218
+
219
+
As stated in [Motivation](#motivation-why-is-this-cip-necessary) this CIP is provided for informational purposes regarding a single deliberate design. Further rationale and motivation for this design are available in the [Design Specification for Delegation and Incentives in Cardano - Section 3.2 :: Addresses & Credentials ](https://github.com/intersectmbo/cardano-ledger/releases/latest/download/shelley-delegation.pdf).
- [x] Confirmation by consensus, with no reported dispute since publication, that this document fully descibes how Cardano addresses are universally implemented.
234
+
235
+
### Implementation Plan
236
+
237
+
- [x] Publish this documentation for confirmation that it accurately describes conventionals of universal use.
231
238
232
-
# Copyright
239
+
## Copyright
233
240
234
-
CC-BY-4.0
241
+
This CIP is licensed under [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/legalcode).
235
242
236
243
[ABNF grammar in annex]: https://raw.githubusercontent.com/cardano-foundation/CIPs/master/CIP-0019/CIP-0019-cardano-addresses.abnf
0 commit comments