-- Provenance (verify before trusting these bytes):
--
--   * release: epic 15 v0.2.0 — the accepted naming contract
--   * release commit: @13231f58833b8feb57f4b0f9b1117bfcfba0c07d@
--     (annotated tag @e9fdbf2afa7d99a42f2476434c1dfb3f90d7a1d5@)
--   * release asset: @singular-docs-0.2.0.tar.gz@
--   * asset sha256:
--     @acbabdf54a271251bd73bf9d84ab2c901107045a7dd77d28a391f22cdd53b0e5@
--   * source inside the archive:
--     @simulator/lifecycle-corpus.json@, @wire@ array, fields
--     @expectedBytes@ / @malformedBytes@ / @redirectedBytes@ / fixtures
--   * extraction: 2026-09-10, mechanically copied from
--     the archive copy whose sha256 was verified against the value above
--   * inventory adopted: 2026-09-17, for the registry-mode corpus of #156.
--     Two rows were renamed and two left the corpus; NO BYTE CHANGED. The
--     adoption is recorded per constant below and the drift check compares
--     the same bytes against the renamed rows.
--
-- The provenance header stays as plain line comments because the drift
-- check (naming/drift/Main.hs, extractRelease) reads this file as text
-- and requires exactly one '--   * release: ' line; a block-Haddock
-- rewrap removes that line and the check exits 2 before comparing.

{- | The four epic-15 wire vectors, vendored byte-for-byte from the
accepted contract so the suite needs no network. These are the
contract's bytes. If the codec disagrees with them, the vectors are
right and the codec is wrong.
-}
module Naming.Wire.Vectors
    ( wd01Id
    , wd02Id
    , wd03Id
    , wr01Id
    , wd01Fixture
    , wd01ExpectedBytes
    , wd01MalformedBytes
    , wd01Shape
    , wd02Attachment
    , wd03Encoded
    , wr01StoredProposal
    , wr01RedirectedProposal
    , wr01ExpectedBytes
    , wr01MalformedBytes
    , wr01RedirectedBytes
    , wr01StoredRefundAddress
    , wr01PresentedRefundAddress
    , wr01Shape
    , wr01ComparisonResult
    ) where

import Data.ByteString (ByteString)
import Data.ByteString qualified as BS
import Data.Word (Word8)

import Naming.Datum
    ( DatumAttachment (..)
    , DatumShape (..)
    , NamingDatum (..)
    , PaymentDestination (..)
    , RetirementQuorum (..)
    , encodeNamingDatum
    )
import Naming.Request
    ( InitialOutput (..)
    , InsertProposal (..)
    , InsertRequestShape (..)
    , RefundComparison (..)
    , Representative (..)
    , withdrawRefundAddress
    )
import Naming.Wire
    ( Address
    , WireData (..)
    , decodeAddress
    )

{- | The corpus row ids these bytes correspond to.

Registry mode (#156) renamed the wire corpus. The BYTES did not move — every
value below is the byte the v0.2.0 contract pinned, unchanged — so what is
adopted here is the inventory, not the contract's content:

  * @WD01-four-field-roundtrip@      -> @WD01-fixture-datum-roundtrip@
  * @WD03-two-destinations-refused@  -> @WD02-two-destinations-refused@

@WD02-datum-hash-refused@ and @WR01-insert-request-refund-roundtrip@ have no
row in the registry-mode corpus: the attachment rule and the witness-request
roundtrip became statements (@inline_datum_only@,
@witness_request_wire_roundtrip@) rather than exported rows. Their vendored
bytes stay, and the byte-exact suite keeps exercising them; they are simply
no longer comparable against a live row, which 'vendoredPairs' records.
-}
wd01Id :: String
wd01Id :: String
wd01Id = String
"WD01-fixture-datum-roundtrip"

{- | Retired from the live corpus; see the note above. Kept for the byte-exact
suite, which still covers it.
-}
wd02Id :: String
wd02Id :: String
wd02Id = String
"WD02-datum-hash-refused"

{- | Carries the two-destination refusal, which the registry-mode corpus
publishes under the @WD02@ number.
-}
wd03Id :: String
wd03Id :: String
wd03Id = String
"WD02-two-destinations-refused"

-- | Retired from the live corpus; see the note above.
wr01Id :: String
wr01Id :: String
wr01Id = String
"WR01-insert-request-refund-roundtrip"

-- | The contract's @quorumKeyHash@: the 28 bytes @start..start+27@.
quorumKeyHash :: Word8 -> ByteString
quorumKeyHash :: Word8 -> ByteString
quorumKeyHash Word8
start = [Word8] -> ByteString
BS.pack [Word8
start .. Word8
start Word8 -> Word8 -> Word8
forall a. Num a => a -> a -> a
+ Word8
27]

{- | The contract's enterprise payment-key address on network 1 with
payment hash @quorumKeyHash start@ — bytes @61 start … start+27@.
-}
enterpriseAddress :: Word8 -> Address
enterpriseAddress :: Word8 -> Address
enterpriseAddress Word8
start = case ByteString -> Maybe Address
decodeAddress (Word8 -> ByteString -> ByteString
BS.cons Word8
0x61 (Word8 -> ByteString
quorumKeyHash Word8
start)) of
    Just Address
a -> Address
a
    Maybe Address
Nothing -> String -> Address
forall a. HasCallStack => String -> a
error String
"Vectors.enterpriseAddress: canonical address refused"

-- | @WD01@'s fixture, the contract's canonical four-field datum.
wd01Fixture :: NamingDatum
wd01Fixture :: NamingDatum
wd01Fixture =
    NamingDatum
        { controlAddress :: Address
controlAddress = Word8 -> Address
enterpriseAddress Word8
1
        , paymentDestination :: PaymentDestination
paymentDestination = Address -> PaymentDestination
SomeDestination (Word8 -> Address
enterpriseAddress Word8
85)
        , nextControlCommitment :: ByteString
nextControlCommitment = ByteString
wd01Digest
        , retirementQuorum :: RetirementQuorum
retirementQuorum =
            RetirementQuorum
                { quorumMembers :: [ByteString]
quorumMembers = (Word8 -> ByteString) -> [Word8] -> [ByteString]
forall a b. (a -> b) -> [a] -> [b]
map Word8 -> ByteString
quorumKeyHash [Word8
1, Word8
29, Word8
57]
                , quorumThreshold :: Integer
quorumThreshold = Integer
2
                }
        }

-- | The 32-byte @nextControlCommitment@ digest the contract pins.
wd01Digest :: ByteString
wd01Digest :: ByteString
wd01Digest =
    [Word8] -> ByteString
BS.pack
        [ Word8
0xc2
        , Word8
0xdb
        , Word8
0x4c
        , Word8
0xf7
        , Word8
0x4e
        , Word8
0xaf
        , Word8
0x41
        , Word8
0xd0
        , Word8
0x5f
        , Word8
0xf3
        , Word8
0xf0
        , Word8
0xd2
        , Word8
0xba
        , Word8
0x19
        , Word8
0x0c
        , Word8
0x48
        , Word8
0x2d
        , Word8
0xbd
        , Word8
0x28
        , Word8
0x5e
        , Word8
0x56
        , Word8
0x15
        , Word8
0xab
        , Word8
0x68
        , Word8
0x85
        , Word8
0xc0
        , Word8
0x52
        , Word8
0x86
        , Word8
0xc4
        , Word8
0xc2
        , Word8
0x3c
        , Word8
0xbe
        ]

{- | @WD01@ @expectedBytes@: encoding the fixture must produce exactly
these 205 bytes.
-}
wd01ExpectedBytes :: ByteString
wd01ExpectedBytes :: ByteString
wd01ExpectedBytes =
    [Word8] -> ByteString
BS.pack
        [ Word8
0xd8
        , Word8
0x79
        , Word8
0x9f
        , Word8
0xd8
        , Word8
0x79
        , Word8
0x9f
        , Word8
0x58
        , Word8
0x1d
        , Word8
0x61
        , Word8
0x01
        , Word8
0x02
        , Word8
0x03
        , Word8
0x04
        , Word8
0x05
        , Word8
0x06
        , Word8
0x07
        , Word8
0x08
        , Word8
0x09
        , Word8
0x0a
        , Word8
0x0b
        , Word8
0x0c
        , Word8
0x0d
        , Word8
0x0e
        , Word8
0x0f
        , Word8
0x10
        , Word8
0x11
        , Word8
0x12
        , Word8
0x13
        , Word8
0x14
        , Word8
0x15
        , Word8
0x16
        , Word8
0x17
        , Word8
0x18
        , Word8
0x19
        , Word8
0x1a
        , Word8
0x1b
        , Word8
0x1c
        , Word8
0xd8
        , Word8
0x7a
        , Word8
0x9f
        , Word8
0x58
        , Word8
0x1d
        , Word8
0x61
        , Word8
0x55
        , Word8
0x56
        , Word8
0x57
        , Word8
0x58
        , Word8
0x59
        , Word8
0x5a
        , Word8
0x5b
        , Word8
0x5c
        , Word8
0x5d
        , Word8
0x5e
        , Word8
0x5f
        , Word8
0x60
        , Word8
0x61
        , Word8
0x62
        , Word8
0x63
        , Word8
0x64
        , Word8
0x65
        , Word8
0x66
        , Word8
0x67
        , Word8
0x68
        , Word8
0x69
        , Word8
0x6a
        , Word8
0x6b
        , Word8
0x6c
        , Word8
0x6d
        , Word8
0x6e
        , Word8
0x6f
        , Word8
0x70
        , Word8
0xff
        , Word8
0x58
        , Word8
0x20
        , Word8
0xc2
        , Word8
0xdb
        , Word8
0x4c
        , Word8
0xf7
        , Word8
0x4e
        , Word8
0xaf
        , Word8
0x41
        , Word8
0xd0
        , Word8
0x5f
        , Word8
0xf3
        , Word8
0xf0
        , Word8
0xd2
        , Word8
0xba
        , Word8
0x19
        , Word8
0x0c
        , Word8
0x48
        , Word8
0x2d
        , Word8
0xbd
        , Word8
0x28
        , Word8
0x5e
        , Word8
0x56
        , Word8
0x15
        , Word8
0xab
        , Word8
0x68
        , Word8
0x85
        , Word8
0xc0
        , Word8
0x52
        , Word8
0x86
        , Word8
0xc4
        , Word8
0xc2
        , Word8
0x3c
        , Word8
0xbe
        , Word8
0xd8
        , Word8
0x79
        , Word8
0x9f
        , Word8
0x02
        , Word8
0x9f
        , Word8
0x58
        , Word8
0x1c
        , Word8
0x01
        , Word8
0x02
        , Word8
0x03
        , Word8
0x04
        , Word8
0x05
        , Word8
0x06
        , Word8
0x07
        , Word8
0x08
        , Word8
0x09
        , Word8
0x0a
        , Word8
0x0b
        , Word8
0x0c
        , Word8
0x0d
        , Word8
0x0e
        , Word8
0x0f
        , Word8
0x10
        , Word8
0x11
        , Word8
0x12
        , Word8
0x13
        , Word8
0x14
        , Word8
0x15
        , Word8
0x16
        , Word8
0x17
        , Word8
0x18
        , Word8
0x19
        , Word8
0x1a
        , Word8
0x1b
        , Word8
0x1c
        , Word8
0x58
        , Word8
0x1c
        , Word8
0x1d
        , Word8
0x1e
        , Word8
0x1f
        , Word8
0x20
        , Word8
0x21
        , Word8
0x22
        , Word8
0x23
        , Word8
0x24
        , Word8
0x25
        , Word8
0x26
        , Word8
0x27
        , Word8
0x28
        , Word8
0x29
        , Word8
0x2a
        , Word8
0x2b
        , Word8
0x2c
        , Word8
0x2d
        , Word8
0x2e
        , Word8
0x2f
        , Word8
0x30
        , Word8
0x31
        , Word8
0x32
        , Word8
0x33
        , Word8
0x34
        , Word8
0x35
        , Word8
0x36
        , Word8
0x37
        , Word8
0x38
        , Word8
0x58
        , Word8
0x1c
        , Word8
0x39
        , Word8
0x3a
        , Word8
0x3b
        , Word8
0x3c
        , Word8
0x3d
        , Word8
0x3e
        , Word8
0x3f
        , Word8
0x40
        , Word8
0x41
        , Word8
0x42
        , Word8
0x43
        , Word8
0x44
        , Word8
0x45
        , Word8
0x46
        , Word8
0x47
        , Word8
0x48
        , Word8
0x49
        , Word8
0x4a
        , Word8
0x4b
        , Word8
0x4c
        , Word8
0x4d
        , Word8
0x4e
        , Word8
0x4f
        , Word8
0x50
        , Word8
0x51
        , Word8
0x52
        , Word8
0x53
        , Word8
0x54
        , Word8
0xff
        , Word8
0xff
        , Word8
0xff
        , Word8
0xff
        ]

{- | @WD01@ @malformedBytes@: the expected bytes truncated by one byte;
decoding must produce nothing (@malformedResult: null@).
-}
wd01MalformedBytes :: ByteString
wd01MalformedBytes :: ByteString
wd01MalformedBytes =
    [Word8] -> ByteString
BS.pack
        [ Word8
0xd8
        , Word8
0x79
        , Word8
0x9f
        , Word8
0xd8
        , Word8
0x79
        , Word8
0x9f
        , Word8
0x58
        , Word8
0x1d
        , Word8
0x61
        , Word8
0x01
        , Word8
0x02
        , Word8
0x03
        , Word8
0x04
        , Word8
0x05
        , Word8
0x06
        , Word8
0x07
        , Word8
0x08
        , Word8
0x09
        , Word8
0x0a
        , Word8
0x0b
        , Word8
0x0c
        , Word8
0x0d
        , Word8
0x0e
        , Word8
0x0f
        , Word8
0x10
        , Word8
0x11
        , Word8
0x12
        , Word8
0x13
        , Word8
0x14
        , Word8
0x15
        , Word8
0x16
        , Word8
0x17
        , Word8
0x18
        , Word8
0x19
        , Word8
0x1a
        , Word8
0x1b
        , Word8
0x1c
        , Word8
0xd8
        , Word8
0x7a
        , Word8
0x9f
        , Word8
0x58
        , Word8
0x1d
        , Word8
0x61
        , Word8
0x55
        , Word8
0x56
        , Word8
0x57
        , Word8
0x58
        , Word8
0x59
        , Word8
0x5a
        , Word8
0x5b
        , Word8
0x5c
        , Word8
0x5d
        , Word8
0x5e
        , Word8
0x5f
        , Word8
0x60
        , Word8
0x61
        , Word8
0x62
        , Word8
0x63
        , Word8
0x64
        , Word8
0x65
        , Word8
0x66
        , Word8
0x67
        , Word8
0x68
        , Word8
0x69
        , Word8
0x6a
        , Word8
0x6b
        , Word8
0x6c
        , Word8
0x6d
        , Word8
0x6e
        , Word8
0x6f
        , Word8
0x70
        , Word8
0xff
        , Word8
0x58
        , Word8
0x20
        , Word8
0xc2
        , Word8
0xdb
        , Word8
0x4c
        , Word8
0xf7
        , Word8
0x4e
        , Word8
0xaf
        , Word8
0x41
        , Word8
0xd0
        , Word8
0x5f
        , Word8
0xf3
        , Word8
0xf0
        , Word8
0xd2
        , Word8
0xba
        , Word8
0x19
        , Word8
0x0c
        , Word8
0x48
        , Word8
0x2d
        , Word8
0xbd
        , Word8
0x28
        , Word8
0x5e
        , Word8
0x56
        , Word8
0x15
        , Word8
0xab
        , Word8
0x68
        , Word8
0x85
        , Word8
0xc0
        , Word8
0x52
        , Word8
0x86
        , Word8
0xc4
        , Word8
0xc2
        , Word8
0x3c
        , Word8
0xbe
        , Word8
0xd8
        , Word8
0x79
        , Word8
0x9f
        , Word8
0x02
        , Word8
0x9f
        , Word8
0x58
        , Word8
0x1c
        , Word8
0x01
        , Word8
0x02
        , Word8
0x03
        , Word8
0x04
        , Word8
0x05
        , Word8
0x06
        , Word8
0x07
        , Word8
0x08
        , Word8
0x09
        , Word8
0x0a
        , Word8
0x0b
        , Word8
0x0c
        , Word8
0x0d
        , Word8
0x0e
        , Word8
0x0f
        , Word8
0x10
        , Word8
0x11
        , Word8
0x12
        , Word8
0x13
        , Word8
0x14
        , Word8
0x15
        , Word8
0x16
        , Word8
0x17
        , Word8
0x18
        , Word8
0x19
        , Word8
0x1a
        , Word8
0x1b
        , Word8
0x1c
        , Word8
0x58
        , Word8
0x1c
        , Word8
0x1d
        , Word8
0x1e
        , Word8
0x1f
        , Word8
0x20
        , Word8
0x21
        , Word8
0x22
        , Word8
0x23
        , Word8
0x24
        , Word8
0x25
        , Word8
0x26
        , Word8
0x27
        , Word8
0x28
        , Word8
0x29
        , Word8
0x2a
        , Word8
0x2b
        , Word8
0x2c
        , Word8
0x2d
        , Word8
0x2e
        , Word8
0x2f
        , Word8
0x30
        , Word8
0x31
        , Word8
0x32
        , Word8
0x33
        , Word8
0x34
        , Word8
0x35
        , Word8
0x36
        , Word8
0x37
        , Word8
0x38
        , Word8
0x58
        , Word8
0x1c
        , Word8
0x39
        , Word8
0x3a
        , Word8
0x3b
        , Word8
0x3c
        , Word8
0x3d
        , Word8
0x3e
        , Word8
0x3f
        , Word8
0x40
        , Word8
0x41
        , Word8
0x42
        , Word8
0x43
        , Word8
0x44
        , Word8
0x45
        , Word8
0x46
        , Word8
0x47
        , Word8
0x48
        , Word8
0x49
        , Word8
0x4a
        , Word8
0x4b
        , Word8
0x4c
        , Word8
0x4d
        , Word8
0x4e
        , Word8
0x4f
        , Word8
0x50
        , Word8
0x51
        , Word8
0x52
        , Word8
0x53
        , Word8
0x54
        , Word8
0xff
        , Word8
0xff
        , Word8
0xff
        ]

-- | @WD01@ @shape@: @{arity: 4, innerIndex: 0, outerIndex: 0}@.
wd01Shape :: DatumShape
wd01Shape :: DatumShape
wd01Shape =
    DatumShape{shapeArity :: Int
shapeArity = Int
4, shapeInnerIndex :: Int
shapeInnerIndex = Int
0, shapeOuterIndex :: Int
shapeOuterIndex = Int
0}

{- | @WD02@'s attachment: a datum hash instead of an inline datum —
refused (@result: null@).
-}
wd02Attachment :: DatumAttachment
wd02Attachment :: DatumAttachment
wd02Attachment = ByteString -> DatumAttachment
AttachedDatumHash ([Word8] -> ByteString
BS.pack [Word8
0x01, Word8
0x02, Word8
0x03])

{- | @WD03@'s @encoded@ datum: the canonical datum with the payment
destination replaced by @constr(1,[bytes, bytes])@ — two destination
addresses (bytes @61 55…@ and @61 71…@), refused (@result: null@).
-}
wd03Encoded :: WireData
wd03Encoded :: WireData
wd03Encoded = case NamingDatum -> WireData
encodeNamingDatum NamingDatum
wd01Fixture of
    Constr Int
0 [Constr Int
0 [WireData
control, WireData
_destination, WireData
commitment, WireData
quorum]] ->
        Int -> [WireData] -> WireData
Constr
            Int
0
            [ Int -> [WireData] -> WireData
Constr
                Int
0
                [ WireData
control
                , Int -> [WireData] -> WireData
Constr
                    Int
1
                    [ ByteString -> WireData
WBytes (Word8 -> ByteString
destinationBytes Word8
85)
                    , ByteString -> WireData
WBytes (Word8 -> ByteString
destinationBytes Word8
113)
                    ]
                , WireData
commitment
                , WireData
quorum
                ]
            ]
    WireData
_ -> String -> WireData
forall a. HasCallStack => String -> a
error String
"Vectors.wd03Encoded: WD01 fixture lost its canonical shape"
  where
    destinationBytes :: Word8 -> ByteString
destinationBytes Word8
start = Word8 -> ByteString -> ByteString
BS.cons Word8
0x61 (Word8 -> ByteString
quorumKeyHash Word8
start)

-- | The @WR01@ stored proposal: refund address 60.
wr01StoredProposal :: InsertProposal
wr01StoredProposal :: InsertProposal
wr01StoredProposal =
    InsertProposal
        { registry :: Integer
registry = Integer
1
        , key :: Integer
key = Integer
42
        , applicationPolicy :: Integer
applicationPolicy = Integer
7
        , refundAddress :: Integer
refundAddress = Integer
60
        , initial :: InitialOutput
initial =
            InitialOutput
                { initialRepresentative :: Representative
initialRepresentative =
                    Representative
                        { representativeRegistry :: Integer
representativeRegistry = Integer
1
                        , representativeKey :: Integer
representativeKey = Integer
42
                        , representativePolicy :: Integer
representativePolicy = Integer
8
                        , representativeAssetScope :: Integer
representativeAssetScope = Integer
0
                        }
                , initialQuantity :: Integer
initialQuantity = Integer
1
                , initialDestination :: Integer
initialDestination = Integer
50
                , initialDatum :: Integer
initialDatum = Integer
100
                , initialValue :: Integer
initialValue = Integer
20
                }
        , scope :: [Integer]
scope = [Integer
0]
        }

-- | @WR01@'s redirected proposal: same proposal, refund address 61.
wr01RedirectedProposal :: InsertProposal
wr01RedirectedProposal :: InsertProposal
wr01RedirectedProposal = InsertProposal
wr01StoredProposal{refundAddress = 61}

{- | @WR01@ @expectedBytes@: serialising the stored proposal's commitment
must produce exactly these 36 bytes.
-}
wr01ExpectedBytes :: ByteString
wr01ExpectedBytes :: ByteString
wr01ExpectedBytes =
    [Word8] -> ByteString
BS.pack
        [ Word8
0xd8
        , Word8
0x79
        , Word8
0x9f
        , Word8
0xd8
        , Word8
0x79
        , Word8
0x9f
        , Word8
0x01
        , Word8
0x18
        , Word8
0x2a
        , Word8
0x07
        , Word8
0x18
        , Word8
0x3c
        , Word8
0xd8
        , Word8
0x79
        , Word8
0x9f
        , Word8
0xd8
        , Word8
0x79
        , Word8
0x9f
        , Word8
0x01
        , Word8
0x18
        , Word8
0x2a
        , Word8
0x08
        , Word8
0x00
        , Word8
0xff
        , Word8
0x01
        , Word8
0x18
        , Word8
0x32
        , Word8
0x18
        , Word8
0x64
        , Word8
0x14
        , Word8
0xff
        , Word8
0x9f
        , Word8
0x00
        , Word8
0xff
        , Word8
0xff
        , Word8
0xff
        ]

-- | @WR01@ @malformedBytes@: truncated; decoding must produce nothing.
wr01MalformedBytes :: ByteString
wr01MalformedBytes :: ByteString
wr01MalformedBytes =
    [Word8] -> ByteString
BS.pack
        [ Word8
0xd8
        , Word8
0x79
        , Word8
0x9f
        , Word8
0xd8
        , Word8
0x79
        , Word8
0x9f
        , Word8
0x01
        , Word8
0x18
        , Word8
0x2a
        , Word8
0x07
        , Word8
0x18
        , Word8
0x3c
        , Word8
0xd8
        , Word8
0x79
        , Word8
0x9f
        , Word8
0xd8
        , Word8
0x79
        , Word8
0x9f
        , Word8
0x01
        , Word8
0x18
        , Word8
0x2a
        , Word8
0x08
        , Word8
0x00
        , Word8
0xff
        , Word8
0x01
        , Word8
0x18
        , Word8
0x32
        , Word8
0x18
        , Word8
0x64
        , Word8
0x14
        , Word8
0xff
        , Word8
0x9f
        , Word8
0x00
        , Word8
0xff
        , Word8
0xff
        ]

{- | @WR01@ @redirectedBytes@: the commitment serialisation with the
refund address redirected to 61.
-}
wr01RedirectedBytes :: ByteString
wr01RedirectedBytes :: ByteString
wr01RedirectedBytes =
    [Word8] -> ByteString
BS.pack
        [ Word8
0xd8
        , Word8
0x79
        , Word8
0x9f
        , Word8
0xd8
        , Word8
0x79
        , Word8
0x9f
        , Word8
0x01
        , Word8
0x18
        , Word8
0x2a
        , Word8
0x07
        , Word8
0x18
        , Word8
0x3d
        , Word8
0xd8
        , Word8
0x79
        , Word8
0x9f
        , Word8
0xd8
        , Word8
0x79
        , Word8
0x9f
        , Word8
0x01
        , Word8
0x18
        , Word8
0x2a
        , Word8
0x08
        , Word8
0x00
        , Word8
0xff
        , Word8
0x01
        , Word8
0x18
        , Word8
0x32
        , Word8
0x18
        , Word8
0x64
        , Word8
0x14
        , Word8
0xff
        , Word8
0x9f
        , Word8
0x00
        , Word8
0xff
        , Word8
0xff
        , Word8
0xff
        ]

-- | @WR01@ @storedRefundAddress@.
wr01StoredRefundAddress :: Integer
wr01StoredRefundAddress :: Integer
wr01StoredRefundAddress = Integer
60

-- | @WR01@ @presentedRefundAddress@.
wr01PresentedRefundAddress :: Integer
wr01PresentedRefundAddress :: Integer
wr01PresentedRefundAddress = Integer
61

{- | @WR01@ @shape@: @{commitmentIndex: 0, commitmentArity: 1,
proposalIndex: 0, proposalArity: 6}@.
-}
wr01Shape :: InsertRequestShape
wr01Shape :: InsertRequestShape
wr01Shape =
    InsertRequestShape
        { commitmentIndex :: Int
commitmentIndex = Int
0
        , commitmentArity :: Int
commitmentArity = Int
1
        , proposalIndex :: Int
proposalIndex = Int
0
        , proposalArity :: Int
proposalArity = Int
6
        }

{- | @WR01@ @comparisonResult@: @{accepted: false,
reason: "withdraw-refund-address"}@.
-}
wr01ComparisonResult :: RefundComparison
wr01ComparisonResult :: RefundComparison
wr01ComparisonResult = RefundReason -> RefundComparison
RefundRefused RefundReason
withdrawRefundAddress