Copyright | (c) 2023 GYELD GMBH |
---|---|
License | Apache 2.0 |
Maintainer | [email protected] |
Stability | develop |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
GeniusYield.Types.TxBody
Description
Synopsis
- data GYTxBody
- txBodyFromApi ∷ TxBody BabbageEra → GYTxBody
- txBodyToApi ∷ GYTxBody → TxBody BabbageEra
- signGYTxBody ∷ ToShelleyWitnessSigningKey a ⇒ GYTxBody → [a] → GYTx
- signTx ∷ ToShelleyWitnessSigningKey a ⇒ GYTxBody → [a] → GYTx
- unsignedTx ∷ GYTxBody → GYTx
- makeSignedTransaction ∷ GYTxWitness → GYTxBody → GYTx
- makeSignedTransaction' ∷ [KeyWitness BabbageEra] → TxBody BabbageEra → GYTx
- appendWitnessGYTx ∷ GYTxWitness → GYTx → GYTx
- signGYTx ∷ ToShelleyWitnessSigningKey a ⇒ GYTx → [a] → GYTx
- txBodyFromHex ∷ String → Maybe GYTxBody
- txBodyFromHexBS ∷ ByteString → Either String GYTxBody
- txBodyFromCBOR ∷ ByteString → Either String GYTxBody
- txBodyToHex ∷ GYTxBody → String
- txBodyToHexBS ∷ GYTxBody → ByteString
- txBodyFee ∷ GYTxBody → Integer
- txBodyFeeValue ∷ GYTxBody → GYValue
- txBodyUTxOs ∷ GYTxBody → GYUTxOs
- txBodyTxIns ∷ GYTxBody → [GYTxOutRef]
- txBodyTxInsReference ∷ GYTxBody → [GYTxOutRef]
- txBodyTxId ∷ GYTxBody → GYTxId
- txBodyToApiTxBodyContent ∷ GYTxBody → TxBodyContent ViewTx BabbageEra
- txBodyMintValue ∷ GYTxBody → GYValue
- txBodyValidityRange ∷ GYTxBody → (Maybe GYSlot, Maybe GYSlot)
- txBodyCollateral ∷ GYTxBody → Set GYTxOutRef
- txBodyCollateralReturnOutput ∷ GYTxBody → TxReturnCollateral CtxTx BabbageEra
- txBodyCollateralReturnOutputValue ∷ GYTxBody → GYValue
- txBodyTotalCollateralLovelace ∷ GYTxBody → Natural
- getTxBody ∷ GYTx → GYTxBody
Transaction body
Transaction body: the part which is then signed.
Conversions
Transaction creation
signGYTxBody ∷ ToShelleyWitnessSigningKey a ⇒ GYTxBody → [a] → GYTx #
Sign a transaction body with (potentially) multiple keys.
signTx ∷ ToShelleyWitnessSigningKey a ⇒ GYTxBody → [a] → GYTx #
Deprecated: Use signGYTxBody.
unsignedTx ∷ GYTxBody → GYTx #
Create an unsigned transaction from the body.
makeSignedTransaction ∷ GYTxWitness → GYTxBody → GYTx #
Make a signed transaction given the transaction body & list of key witnesses, represented in GYTxWitness
.
makeSignedTransaction' ∷ [KeyWitness BabbageEra] → TxBody BabbageEra → GYTx #
Make a signed transaction given the transaction body & list of key witnesses.
appendWitnessGYTx ∷ GYTxWitness → GYTx → GYTx #
Add a key witness(s) to a transaction, represented in GYTxWitness
, which might already have previous key witnesses.
signGYTx ∷ ToShelleyWitnessSigningKey a ⇒ GYTx → [a] → GYTx #
Sign a transaction with (potentially) multiple keys and add your witness(s) among previous key witnesses, if any.
Functions
txBodyToHex ∷ GYTxBody → String #
txBodyFeeValue ∷ GYTxBody → GYValue #
Return the fees as GYValue
.
txBodyUTxOs ∷ GYTxBody → GYUTxOs #
Return utxos created by tx (body).
txBodyTxIns ∷ GYTxBody → [GYTxOutRef] #
Returns the GYTxOutRef
consumed by the tx.
txBodyTxInsReference ∷ GYTxBody → [GYTxOutRef] #
Returns the GYTxOutRef
for the reference inputs present in the tx.
txBodyValidityRange ∷ GYTxBody → (Maybe GYSlot, Maybe GYSlot) #
Returns the validity range of the given GYTxBody
.
txBodyCollateral ∷ GYTxBody → Set GYTxOutRef #
Returns the set of GYTxOutRef
used as collateral in the given GYTxBody
.
txBodyTotalCollateralLovelace ∷ GYTxBody → Natural #
Returns the total collateral for the given transaction body.