privatePaymentKeyFromTextEnvelope . decodeTextEnvelope gives the same result as privatePaymentKeyFromFile.
Stable state
privatePaymentKeyFromFile drops half (?) of a CBOR on the first read and does not do it any more.
So in this code:
let
f key = do
Contract.Wallet.KeyFile.privatePaymentKeyToFile "temp" key
Contract.Wallet.KeyFile.privatePaymentKeyFromFile "temp"
key0 <- f key
key1 <- f key0
key2 <- f key1
...
Bug report
Description
Given the example
Expected behavior
key
is equal tokey'
.Actual behavior
key
is different fromkey'
.Details
privatePaymentKeyFromTextEnvelope
privatePaymentKeyFromTextEnvelope . decodeTextEnvelope
gives the same result asprivatePaymentKeyFromFile
.Stable state
privatePaymentKeyFromFile
drops half (?) of a CBOR on the first read and does not do it any more. So in this code:key0 /= key1
butkey1 = key2 = key3 ... keyn
Revision
https://github.com/Plutonomicon/cardano-transaction-lib/commit/4e3a69c7ea43ed12c6c48dd72361c92dae670c92