ADDRESS = %b0000 | NETWORK-TAG | KEY-HASH    | KEY-HASH       ; type 00, Base Shelley address
        \ %b0001 | NETWORK-TAG | SCRIPT-HASH | KEY-HASH       ; type 01, Base Shelley address
        \ %b0010 | NETWORK-TAG | KEY-HASH    | SCRIPT-HASH    ; type 02, Base Shelley address
        \ %b0011 | NETWORK-TAG | SCRIPT-HASH | SCRIPT-HASH    ; type 03, Base Shelley address
        \ %b0100 | NETWORK-TAG | KEY-HASH    | POINTER        ; type 04, Pointer Shelley address
        \ %b0101 | NETWORK-TAG | SCRIPT-HASH | POINTER        ; type 05, Pointer Shelley address
        \ %b0110 | NETWORK-TAG | KEY-HASH                     ; type 06, Payment Shelley address
        \ %b0111 | NETWORK-TAG | SCRIPT-HASH                  ; type 07, Payment Shelley address
        \ %b1110 | NETWORK-TAG | KEY-HASH                     ; type 08, Stake Shelley address
        \ %b1111 | NETWORK-TAG | SCRIPT-HASH                  ; type 09, Stake Shelley address
        \ %b1000 | BYRON-PAYLOAD                              ; type 10, Byron / Bootstrap address

NETWORK-TAG  = %b0000 ; Testnet
             \ %b0001 ; Mainnet

POINTER = VARIABLE-LENGTH-UINT ; slot number
        | VARIABLE-LENGTH-UINT ; transaction index
        | VARIABLE-LENGTH-UINT ; output index

VARIABLE-LENGTH-UINT = (%b1 | UINT7 | VARIABLE-LENGTH-UINT)
                     / (%b0 | UINT7)
UINT7 = 7BIT

KEY-HASH = 28OCTET

SCRIPT-HASH= 28OCTET

BYRON-PAYLOAD = *OCTET ; see 'Byron Addresses' section or cddl specification.
