Skip to content

Commit

Permalink
Split callsite of writeFileTextEnvelope to separate serialisation fro…
Browse files Browse the repository at this point in the history
…m IO
  • Loading branch information
newhoggy committed Apr 4, 2023
1 parent 62c1a44 commit 93bfd86
Show file tree
Hide file tree
Showing 8 changed files with 86 additions and 56 deletions.
4 changes: 2 additions & 2 deletions cardano-cli/src/Cardano/CLI/Shelley/Run/Address.hs
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ writePaymentKeyFiles
-> ExceptT ShelleyAddressCmdError IO ()
writePaymentKeyFiles (VerificationKeyFile vkeyPath) (SigningKeyFile skeyPath) vkey skey = do
firstExceptT ShelleyAddressCmdWriteFileError $ do
newExceptT $ writeFileTextEnvelope skeyPath (Just skeyDesc) skey
newExceptT $ writeFileTextEnvelope vkeyPath (Just vkeyDesc) vkey
newExceptT $ writeLazyByteStringFile skeyPath $ textEnvelopeToJSON (Just skeyDesc) skey
newExceptT $ writeLazyByteStringFile vkeyPath $ textEnvelopeToJSON (Just vkeyDesc) vkey
where
skeyDesc, vkeyDesc :: TextEnvelopeDescr
skeyDesc = "Payment Signing Key"
Expand Down
33 changes: 21 additions & 12 deletions cardano-cli/src/Cardano/CLI/Shelley/Run/Genesis.hs
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,12 @@ runGenesisKeyGenGenesis (VerificationKeyFile vkeyPath)
let vkey = getVerificationKey skey
firstExceptT ShelleyGenesisCmdGenesisFileError
. newExceptT
$ writeFileTextEnvelope skeyPath (Just skeyDesc) skey
$ writeLazyByteStringFile skeyPath
$ textEnvelopeToJSON (Just skeyDesc) skey
firstExceptT ShelleyGenesisCmdGenesisFileError
. newExceptT
$ writeFileTextEnvelope vkeyPath (Just vkeyDesc) vkey
$ writeLazyByteStringFile vkeyPath
$ textEnvelopeToJSON (Just vkeyDesc) vkey
where
skeyDesc, vkeyDesc :: TextEnvelopeDescr
skeyDesc = "Genesis Signing Key"
Expand All @@ -259,13 +261,16 @@ runGenesisKeyGenDelegate (VerificationKeyFile vkeyPath)
let vkey = getVerificationKey skey
firstExceptT ShelleyGenesisCmdGenesisFileError
. newExceptT
$ writeFileTextEnvelope skeyPath (Just skeyDesc) skey
$ writeLazyByteStringFile skeyPath
$ textEnvelopeToJSON (Just skeyDesc) skey
firstExceptT ShelleyGenesisCmdGenesisFileError
. newExceptT
$ writeFileTextEnvelope vkeyPath (Just vkeyDesc) vkey
$ writeLazyByteStringFile vkeyPath
$ textEnvelopeToJSON (Just vkeyDesc) vkey
firstExceptT ShelleyGenesisCmdGenesisFileError
. newExceptT
$ writeFileTextEnvelope ocertCtrPath (Just certCtrDesc)
$ writeLazyByteStringFile ocertCtrPath
$ textEnvelopeToJSON (Just certCtrDesc)
$ OperationalCertificateIssueCounter
initialCounter
(castVerificationKey vkey) -- Cast to a 'StakePoolKey'
Expand All @@ -288,10 +293,12 @@ runGenesisKeyGenDelegateVRF (VerificationKeyFile vkeyPath)
let vkey = getVerificationKey skey
firstExceptT ShelleyGenesisCmdGenesisFileError
. newExceptT
$ writeFileTextEnvelope skeyPath (Just skeyDesc) skey
$ writeLazyByteStringFile skeyPath
$ textEnvelopeToJSON (Just skeyDesc) skey
firstExceptT ShelleyGenesisCmdGenesisFileError
. newExceptT
$ writeFileTextEnvelope vkeyPath (Just vkeyDesc) vkey
$ writeLazyByteStringFile vkeyPath
$ textEnvelopeToJSON (Just vkeyDesc) vkey
where
skeyDesc, vkeyDesc :: TextEnvelopeDescr
skeyDesc = "VRF Signing Key"
Expand All @@ -306,10 +313,12 @@ runGenesisKeyGenUTxO (VerificationKeyFile vkeyPath)
let vkey = getVerificationKey skey
firstExceptT ShelleyGenesisCmdGenesisFileError
. newExceptT
$ writeFileTextEnvelope skeyPath (Just skeyDesc) skey
$ writeLazyByteStringFile skeyPath
$ textEnvelopeToJSON (Just skeyDesc) skey
firstExceptT ShelleyGenesisCmdGenesisFileError
. newExceptT
$ writeFileTextEnvelope vkeyPath (Just vkeyDesc) vkey
$ writeLazyByteStringFile vkeyPath
$ textEnvelopeToJSON (Just vkeyDesc) vkey
where
skeyDesc, vkeyDesc :: TextEnvelopeDescr
skeyDesc = "Genesis Initial UTxO Signing Key"
Expand Down Expand Up @@ -362,9 +371,9 @@ runGenesisVerKey (VerificationKeyFile vkeyPath) (SigningKeyFile skeyPath) = do

firstExceptT ShelleyGenesisCmdGenesisFileError . newExceptT . liftIO $
case vkey of
AGenesisKey vk -> writeFileTextEnvelope vkeyPath Nothing vk
AGenesisDelegateKey vk -> writeFileTextEnvelope vkeyPath Nothing vk
AGenesisUTxOKey vk -> writeFileTextEnvelope vkeyPath Nothing vk
AGenesisKey vk -> writeLazyByteStringFile vkeyPath $ textEnvelopeToJSON Nothing vk
AGenesisDelegateKey vk -> writeLazyByteStringFile vkeyPath $ textEnvelopeToJSON Nothing vk
AGenesisUTxOKey vk -> writeLazyByteStringFile vkeyPath $ textEnvelopeToJSON Nothing vk

data SomeGenesisKey f
= AGenesisKey (f GenesisKey)
Expand Down
11 changes: 7 additions & 4 deletions cardano-cli/src/Cardano/CLI/Shelley/Run/Governance.hs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ runGovernanceMIRCertificatePayStakeAddrs mirPot sAddrs rwdAmts (OutputFile oFp)

firstExceptT ShelleyGovernanceCmdTextEnvWriteError
. newExceptT
$ writeFileTextEnvelope oFp (Just mirCertDesc) mirCert
$ writeLazyByteStringFile oFp $ textEnvelopeToJSON (Just mirCertDesc) mirCert
where
mirCertDesc :: TextEnvelopeDescr
mirCertDesc = "Move Instantaneous Rewards Certificate"
Expand All @@ -111,7 +111,8 @@ runGovernanceMIRCertificateTransfer ll (OutputFile oFp) direction = do

firstExceptT ShelleyGovernanceCmdTextEnvWriteError
. newExceptT
$ writeFileTextEnvelope oFp (Just $ mirCertDesc direction) mirCert
$ writeLazyByteStringFile oFp
$ textEnvelopeToJSON (Just $ mirCertDesc direction) mirCert
where
mirCertDesc :: TransferDirection -> TextEnvelopeDescr
mirCertDesc TransferToTreasury = "MIR Certificate Send To Treasury"
Expand Down Expand Up @@ -139,7 +140,8 @@ runGovernanceGenesisKeyDelegationCertificate genVkOrHashOrFp
$ readVerificationKeyOrHashOrFile AsVrfKey vrfVkOrHashOrFp
firstExceptT ShelleyGovernanceCmdTextEnvWriteError
. newExceptT
$ writeFileTextEnvelope oFp (Just genKeyDelegCertDesc)
$ writeLazyByteStringFile oFp
$ textEnvelopeToJSON (Just genKeyDelegCertDesc)
$ makeGenesisKeyDelegationCertificate genesisVkHash genesisDelVkHash vrfVkHash
where
genKeyDelegCertDesc :: TextEnvelopeDescr
Expand Down Expand Up @@ -175,5 +177,6 @@ runGovernanceUpdateProposal (OutputFile upFile) eNo genVerKeyFiles upPprams mCos
let genKeyHashes = fmap verificationKeyHash genVKeys
upProp = makeShelleyUpdateProposal finalUpPprams genKeyHashes eNo

firstExceptT ShelleyGovernanceCmdTextEnvWriteError . newExceptT $ writeFileTextEnvelope upFile Nothing upProp
firstExceptT ShelleyGovernanceCmdTextEnvWriteError . newExceptT
$ writeLazyByteStringFile upFile $ textEnvelopeToJSON Nothing upProp

32 changes: 18 additions & 14 deletions cardano-cli/src/Cardano/CLI/Shelley/Run/Key.hs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ runGetVerificationKey skf (VerificationKeyFile vkf) = do
withSomeSigningKey ssk $ \sk ->
let vk = getVerificationKey sk in
firstExceptT ShelleyKeyCmdWriteFileError . newExceptT $
writeFileTextEnvelope vkf Nothing vk
writeLazyByteStringFile vkf $ textEnvelopeToJSON Nothing vk


data SomeSigningKey
Expand Down Expand Up @@ -244,8 +244,9 @@ runConvertToNonExtendedKey evkf (VerificationKeyFile vkf) =
writeToDisk
:: Key keyrole
=> FilePath -> VerificationKey keyrole -> ExceptT ShelleyKeyCmdError IO ()
writeToDisk vkf' vk = firstExceptT ShelleyKeyCmdWriteFileError . newExceptT
$ writeFileTextEnvelope vkf' Nothing vk
writeToDisk vkf' vk =
firstExceptT ShelleyKeyCmdWriteFileError . newExceptT
$ writeLazyByteStringFile vkf' $ textEnvelopeToJSON Nothing vk


readExtendedVerificationKeyFile
Expand Down Expand Up @@ -364,7 +365,7 @@ convertByronSigningKey mPwd byronFormat convert
sk' = convert unprotectedSk

firstExceptT ShelleyKeyCmdWriteFileError . newExceptT $
writeFileTextEnvelope skeyPathNew Nothing sk'
writeLazyByteStringFile skeyPathNew $ textEnvelopeToJSON Nothing sk'

convertByronVerificationKey
:: forall keyrole.
Expand All @@ -384,7 +385,7 @@ convertByronVerificationKey convert
vk' = convert vk

firstExceptT ShelleyKeyCmdWriteFileError . newExceptT $
writeFileTextEnvelope vkeyPathNew Nothing vk'
writeLazyByteStringFile vkeyPathNew $ textEnvelopeToJSON Nothing vk'


runConvertByronGenesisVerificationKey
Expand All @@ -404,7 +405,7 @@ runConvertByronGenesisVerificationKey (VerificationKeyBase64 b64ByronVKey)
vk' = convert vk

firstExceptT ShelleyKeyCmdWriteFileError . newExceptT $
writeFileTextEnvelope vkeyPathNew Nothing vk'
writeLazyByteStringFile vkeyPathNew $ textEnvelopeToJSON Nothing vk'
where
convert :: Byron.VerificationKey -> VerificationKey GenesisKey
convert (Byron.VerificationKey xvk) =
Expand All @@ -426,16 +427,17 @@ runConvertITNStakeKey (AVerificationKeyFile (VerificationKeyFile vk)) (OutputFil
. first ShelleyKeyCmdItnKeyConvError
$ convertITNVerificationKey bech32publicKey
firstExceptT ShelleyKeyCmdWriteFileError . newExceptT $
writeFileTextEnvelope outFile Nothing vkey
writeLazyByteStringFile outFile $ textEnvelopeToJSON Nothing vkey

runConvertITNStakeKey (ASigningKeyFile (SigningKeyFile sk)) (OutputFile outFile) = do
bech32privateKey <- firstExceptT ShelleyKeyCmdItnKeyConvError . newExceptT $
readFileITNKey sk
skey <- hoistEither
. first ShelleyKeyCmdItnKeyConvError
$ convertITNSigningKey bech32privateKey
firstExceptT ShelleyKeyCmdWriteFileError . newExceptT $
writeFileTextEnvelope outFile Nothing skey
firstExceptT ShelleyKeyCmdWriteFileError . newExceptT
$ writeLazyByteStringFile outFile
$ textEnvelopeToJSON Nothing skey

runConvertITNExtendedToStakeKey :: SomeKeyFile -> OutputFile -> ExceptT ShelleyKeyCmdError IO ()
runConvertITNExtendedToStakeKey (AVerificationKeyFile _) _ = left ShelleyKeyCmdWrongKeyTypeError
Expand All @@ -444,7 +446,8 @@ runConvertITNExtendedToStakeKey (ASigningKeyFile (SigningKeyFile sk)) (OutputFil
skey <- hoistEither . first ShelleyKeyCmdItnKeyConvError
$ convertITNExtendedSigningKey bech32privateKey
firstExceptT ShelleyKeyCmdWriteFileError . newExceptT
$ writeFileTextEnvelope outFile Nothing skey
$ writeLazyByteStringFile outFile
$ textEnvelopeToJSON Nothing skey

runConvertITNBip32ToStakeKey :: SomeKeyFile -> OutputFile -> ExceptT ShelleyKeyCmdError IO ()
runConvertITNBip32ToStakeKey (AVerificationKeyFile _) _ = left ShelleyKeyCmdWrongKeyTypeError
Expand All @@ -453,7 +456,8 @@ runConvertITNBip32ToStakeKey (ASigningKeyFile (SigningKeyFile sk)) (OutputFile o
skey <- hoistEither . first ShelleyKeyCmdItnKeyConvError
$ convertITNBIP32SigningKey bech32privateKey
firstExceptT ShelleyKeyCmdWriteFileError . newExceptT
$ writeFileTextEnvelope outFile Nothing skey
$ writeLazyByteStringFile outFile
$ textEnvelopeToJSON Nothing skey

-- | An error that can occur while converting an Incentivized Testnet (ITN)
-- key.
Expand Down Expand Up @@ -649,8 +653,8 @@ writeSomeCardanoAddressSigningKeyFile
writeSomeCardanoAddressSigningKeyFile outFile skey =
case skey of
ACardanoAddrShelleyPaymentSigningKey sk ->
writeFileTextEnvelope outFile Nothing sk
writeLazyByteStringFile outFile $ textEnvelopeToJSON Nothing sk
ACardanoAddrShelleyStakeSigningKey sk ->
writeFileTextEnvelope outFile Nothing sk
writeLazyByteStringFile outFile $ textEnvelopeToJSON Nothing sk
ACardanoAddrByronSigningKey sk ->
writeFileTextEnvelope outFile Nothing sk
writeLazyByteStringFile outFile $ textEnvelopeToJSON Nothing sk
32 changes: 19 additions & 13 deletions cardano-cli/src/Cardano/CLI/Shelley/Run/Node.hs
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,16 @@ runNodeKeyGenCold (VerificationKeyFile vkeyPath) (SigningKeyFile skeyPath)
let vkey = getVerificationKey skey
firstExceptT ShelleyNodeCmdWriteFileError
. newExceptT
$ writeFileTextEnvelope skeyPath (Just skeyDesc) skey
$ writeLazyByteStringFile skeyPath
$ textEnvelopeToJSON (Just skeyDesc) skey
firstExceptT ShelleyNodeCmdWriteFileError
. newExceptT
$ writeFileTextEnvelope vkeyPath (Just vkeyDesc) vkey
$ writeLazyByteStringFile vkeyPath
$ textEnvelopeToJSON (Just vkeyDesc) vkey
firstExceptT ShelleyNodeCmdWriteFileError
. newExceptT
$ writeFileTextEnvelope ocertCtrPath (Just ocertCtrDesc)
$ writeLazyByteStringFile ocertCtrPath
$ textEnvelopeToJSON (Just ocertCtrDesc)
$ OperationalCertificateIssueCounter initialCounter vkey
where
skeyDesc, vkeyDesc, ocertCtrDesc :: TextEnvelopeDescr
Expand All @@ -108,10 +111,12 @@ runNodeKeyGenKES (VerificationKeyFile vkeyPath) (SigningKeyFile skeyPath) = do
let vkey = getVerificationKey skey
firstExceptT ShelleyNodeCmdWriteFileError
. newExceptT
$ writeFileTextEnvelope skeyPath (Just skeyDesc) skey
$ writeLazyByteStringFile skeyPath
$ textEnvelopeToJSON (Just skeyDesc) skey
firstExceptT ShelleyNodeCmdWriteFileError
. newExceptT
$ writeFileTextEnvelope vkeyPath (Just vkeyDesc) vkey
$ writeLazyByteStringFile vkeyPath
$ textEnvelopeToJSON (Just vkeyDesc) vkey
where
skeyDesc, vkeyDesc :: TextEnvelopeDescr
skeyDesc = "KES Signing Key"
Expand All @@ -127,7 +132,8 @@ runNodeKeyGenVRF (VerificationKeyFile vkeyPath) (SigningKeyFile skeyPath) = do
$ writeFileTextEnvelopeWithOwnerPermissions skeyPath (Just skeyDesc) skey
firstExceptT ShelleyNodeCmdWriteFileError
. newExceptT
$ writeFileTextEnvelope vkeyPath (Just vkeyDesc) vkey
$ writeLazyByteStringFile vkeyPath
$ textEnvelopeToJSON (Just vkeyDesc) vkey
where
skeyDesc, vkeyDesc :: TextEnvelopeDescr
skeyDesc = "VRF Signing Key"
Expand Down Expand Up @@ -161,8 +167,9 @@ runNodeNewCounter coldVerKeyOrFile counter
let ocertIssueCounter =
OperationalCertificateIssueCounter (fromIntegral counter) vkey

firstExceptT ShelleyNodeCmdWriteFileError . newExceptT $
writeFileTextEnvelope ocertCtrPath Nothing ocertIssueCounter
firstExceptT ShelleyNodeCmdWriteFileError . newExceptT
$ writeLazyByteStringFile ocertCtrPath
$ textEnvelopeToJSON Nothing ocertIssueCounter


runNodeIssueOpCert :: VerificationKeyOrFile KesKey
Expand Down Expand Up @@ -210,14 +217,13 @@ runNodeIssueOpCert kesVerKeyOrFile
-- a new cert but without updating the counter.
firstExceptT ShelleyNodeCmdWriteFileError
. newExceptT
$ writeFileTextEnvelope
ocertCtrPath
(Just $ ocertCtrDesc $ getCounter nextOcertCtr)
nextOcertCtr
$ writeLazyByteStringFile ocertCtrPath
$ textEnvelopeToJSON (Just $ ocertCtrDesc $ getCounter nextOcertCtr) nextOcertCtr

firstExceptT ShelleyNodeCmdWriteFileError
. newExceptT
$ writeFileTextEnvelope certFile Nothing ocert
$ writeLazyByteStringFile certFile
$ textEnvelopeToJSON Nothing ocert
where
getCounter :: OperationalCertificateIssueCounter -> Word64
getCounter (OperationalCertificateIssueCounter n _) = n
Expand Down
6 changes: 4 additions & 2 deletions cardano-cli/src/Cardano/CLI/Shelley/Run/Pool.hs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ runStakePoolRegistrationCert

firstExceptT ShelleyPoolCmdWriteFileError
. newExceptT
$ writeFileTextEnvelope outfp (Just registrationCertDesc) registrationCert
$ writeLazyByteStringFile outfp
$ textEnvelopeToJSON (Just registrationCertDesc) registrationCert
where
registrationCertDesc :: TextEnvelopeDescr
registrationCertDesc = "Stake Pool Registration Certificate"
Expand All @@ -156,7 +157,8 @@ runStakePoolRetirementCert stakePoolVerKeyOrFile retireEpoch (OutputFile outfp)

firstExceptT ShelleyPoolCmdWriteFileError
. newExceptT
$ writeFileTextEnvelope outfp (Just retireCertDesc) retireCert
$ writeLazyByteStringFile outfp
$ textEnvelopeToJSON (Just retireCertDesc) retireCert
where
retireCertDesc :: TextEnvelopeDescr
retireCertDesc = "Stake Pool Retirement Certificate"
Expand Down
13 changes: 8 additions & 5 deletions cardano-cli/src/Cardano/CLI/Shelley/Run/StakeAddress.hs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ runStakeAddressKeyGenToFile (VerificationKeyFile vkFp) (SigningKeyFile skFp) = d
let vkey = getVerificationKey skey

firstExceptT ShelleyStakeAddressCmdWriteFileError $ do
newExceptT $ writeFileTextEnvelope skFp (Just skeyDesc) skey
newExceptT $ writeFileTextEnvelope vkFp (Just vkeyDesc) vkey
newExceptT $ writeLazyByteStringFile skFp $ textEnvelopeToJSON (Just skeyDesc) skey
newExceptT $ writeLazyByteStringFile vkFp $ textEnvelopeToJSON (Just vkeyDesc) vkey

runStakeAddressKeyHash
:: VerificationKeyOrFile StakeKey
Expand Down Expand Up @@ -116,7 +116,8 @@ runStakeCredentialRegistrationCert stakeVerifier (OutputFile oFp) = do
let deRegCert = makeStakeAddressRegistrationCertificate sCred
firstExceptT ShelleyStakeAddressCmdWriteFileError
. newExceptT
$ writeFileTextEnvelope oFp (Just regCertDesc) deRegCert
$ writeLazyByteStringFile oFp
$ textEnvelopeToJSON (Just regCertDesc) deRegCert

regCertDesc :: TextEnvelopeDescr
regCertDesc = "Stake Address Registration Certificate"
Expand Down Expand Up @@ -147,7 +148,8 @@ runStakeCredentialDelegationCert stakeVerifier poolVKeyOrHashOrFile (OutputFile
let delegCert = makeStakeAddressDelegationCertificate sCred poolStakeVKeyHash
firstExceptT ShelleyStakeAddressCmdWriteFileError
. newExceptT
$ writeFileTextEnvelope outFp (Just delegCertDesc) delegCert
$ writeLazyByteStringFile outFp
$ textEnvelopeToJSON (Just delegCertDesc) delegCert

delegCertDesc :: TextEnvelopeDescr
delegCertDesc = "Stake Address Delegation Certificate"
Expand All @@ -169,7 +171,8 @@ runStakeCredentialDeRegistrationCert stakeVerifier (OutputFile oFp) = do
let deRegCert = makeStakeAddressDeregistrationCertificate sCred
firstExceptT ShelleyStakeAddressCmdWriteFileError
. newExceptT
$ writeFileTextEnvelope oFp (Just deregCertDesc) deRegCert
$ writeLazyByteStringFile oFp
$ textEnvelopeToJSON (Just deregCertDesc) deRegCert

deregCertDesc :: TextEnvelopeDescr
deregCertDesc = "Stake Address Deregistration Certificate"
Expand Down
11 changes: 7 additions & 4 deletions cardano-cli/src/Cardano/CLI/Shelley/Run/Transaction.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1102,8 +1102,9 @@ runTxSign txOrTxBody witSigningData mnw (TxFile outTxFile) = do
let shelleyKeyWitnesses = map (makeShelleyKeyWitness txbody) sksShelley
tx = makeSignedTransaction (byronWitnesses ++ shelleyKeyWitnesses) txbody

firstExceptT ShelleyTxCmdWriteFileError . newExceptT $
writeFileTextEnvelope outTxFile Nothing tx
firstExceptT ShelleyTxCmdWriteFileError . newExceptT
$ writeLazyByteStringFile outTxFile
$ textEnvelopeToJSON Nothing tx

-- ----------------------------------------------------------------------------
-- Transaction submission
Expand Down Expand Up @@ -1392,7 +1393,8 @@ runTxCreateWitness (TxBodyFile txbodyFilePath) witSignData mbNw (OutputFile oFil
pure $ makeShelleyKeyWitness txbody skShelley

firstExceptT ShelleyTxCmdWriteFileError . newExceptT
$ writeFileTextEnvelope oFile Nothing witness
$ writeLazyByteStringFile oFile
$ textEnvelopeToJSON Nothing witness

runTxSignWitness
:: TxBodyFile
Expand Down Expand Up @@ -1421,7 +1423,8 @@ runTxSignWitness (TxBodyFile txbodyFilePath) witnessFiles (OutputFile oFp) = do
let tx = makeSignedTransaction witnesses txbody
firstExceptT ShelleyTxCmdWriteFileError
. newExceptT
$ writeFileTextEnvelope oFp Nothing tx
$ writeLazyByteStringFile oFp
$ textEnvelopeToJSON Nothing tx

IncompleteCddlFormattedTx (InAnyCardanoEra era anyTx) -> do
let txbody = getTxBody anyTx
Expand Down

0 comments on commit 93bfd86

Please sign in to comment.