Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- skeyToAddr :: SigningKey PaymentKey -> NetworkId -> Address ShelleyAddr
- skeyToAddrInEra :: IsShelleyBasedEra era => SigningKey PaymentKey -> NetworkId -> AddressInEra era
- sKeyToPkh :: SigningKey PaymentKey -> PubKeyHash
- addressInEraToAddressAny :: AddressInEra era -> AddressAny
- pkhToMaybeAddr :: IsShelleyBasedEra era => NetworkId -> PubKeyHash -> Maybe (AddressInEra era)
- addrToMaybePkh :: Address ShelleyAddr -> Maybe PubKeyHash
- addrInEraToPkh :: MonadFail m => AddressInEra e -> m PubKeyHash
- addressInEraToPaymentKeyHash :: AddressInEra era -> Maybe (Hash PaymentKey)
- addressNetworkId :: Address ShelleyAddr -> NetworkId
- dataToScriptData :: ToData a1 => a1 -> ScriptData
- toPlutusAssetClass :: AssetId -> AssetClass
- fromPlutusData :: Data -> ScriptData
- fromPlutusAddress :: NetworkId -> Address -> Maybe (Address ShelleyAddr)
- toPlutusAddress :: Address ShelleyAddr -> Address
- toPlutusCredential :: forall (keyrole :: KeyRole) crypto. Credential keyrole crypto -> Credential
- plutusAssetClassToAssetId :: AssetClass -> AssetId
- addrInEraToPlutusAddress :: AddressInEra era -> Address
- addressToPlutusCredential :: Address ShelleyAddr -> Credential
- fromPlutusV1Script :: CompiledCode (BuiltinData -> BuiltinData -> BuiltinData -> BuiltinUnit) -> Script PlutusScriptV1
- fromPlutusValue :: Value -> Value
- toPlutusValue :: Value -> Value
- fromPlutusV2Script :: CompiledCode (BuiltinData -> BuiltinData -> BuiltinData -> BuiltinUnit) -> Script PlutusScriptV2
- toPlutusTxOutRef :: TxIn -> TxOutRef
- isNullValue :: Value -> Bool
- valueLte :: Value -> Value -> Bool
- isPositiveValue :: Value -> Bool
- filterNegativeQuantity :: Value -> [(AssetId, Quantity)]
- utxoListSum :: [(a, TxOut ctx era)] -> Value
- utxoSum :: UTxO era -> Value
- utxoMapSum :: Map a (TxOut ctx era) -> Value
- txoutListSum :: [TxOut ctx era] -> Value
- calculateTxoutMinLovelaceOrErr :: TxOut CtxTx ConwayEra -> ProtocolParameters -> Coin
- calculateTxoutMinLovelace :: TxOut CtxTx ConwayEra -> ProtocolParameters -> Maybe Coin
- evaluateFee :: HasChainQueryAPI a => Tx ConwayEra -> Kontract a w FrameworkError Integer
- txoutMinLovelace :: (IsCardanoEra era, IsShelleyBasedEra era) => PParams (ShelleyLedgerEra era) -> TxOut CtxUTxO era -> Coin
- queryUtxos :: IsShelleyBasedEra era => LocalNodeConnectInfo -> Set AddressAny -> IO (Either FrameworkError (UTxO era))
- queryTxins :: IsShelleyBasedEra era => LocalNodeConnectInfo -> Set TxIn -> IO (Either FrameworkError (UTxO era))
- queryAddressInEraUtxos :: IsShelleyBasedEra era => LocalNodeConnectInfo -> [AddressInEra ConwayEra] -> IO (Either FrameworkError (UTxO era))
- splitMetadataStrings :: Map Word64 Value -> Map Word64 Value
- readSignKey :: FilePath -> IO (SigningKey PaymentKey)
- getDefaultSignKey :: IO (SigningKey PaymentKey)
- toHexString :: (FromText a1, ToText (Base16 a2)) => a2 -> a1
- unHex :: (Functor f, FromText (f (Base16 b)), ToText a) => a -> f b
- unHexLazy :: ToText a => a -> Maybe ByteString
- getDefaultConnection :: String -> NetworkId -> IO LocalNodeConnectInfo
- timestampToSlot :: SystemStart -> EraHistory -> POSIXTime -> SlotNo
- slotToTimestamp :: SystemStart -> EraHistory -> SlotNo -> POSIXTime
Documentation
skeyToAddr :: SigningKey PaymentKey -> NetworkId -> Address ShelleyAddr #
Create enterprise address from SignKey
skeyToAddrInEra :: IsShelleyBasedEra era => SigningKey PaymentKey -> NetworkId -> AddressInEra era #
Create enterprise address from SignKey
sKeyToPkh :: SigningKey PaymentKey -> PubKeyHash #
addressInEraToAddressAny :: AddressInEra era -> AddressAny #
pkhToMaybeAddr :: IsShelleyBasedEra era => NetworkId -> PubKeyHash -> Maybe (AddressInEra era) #
convert PubKeyhash (plutus tupe) to corresponding Enterprise address (cardano-api type). Note that the transformation Address - Pkh is not symmetrical for all addresses It's symmetrical for Enterprise addresses (because enterprise addresses have no stake Key in it)
addrToMaybePkh :: Address ShelleyAddr -> Maybe PubKeyHash #
Convert Shelley Address (cardano-api type) to corresponding PubKeyHash (plutus type) Note that the transformation Address - Pkh is not symmetrical for all addresses It's symmetrical for Enterprise addresses (because enterprise addresses have no stake Key in it)
addrInEraToPkh :: MonadFail m => AddressInEra e -> m PubKeyHash #
Convert AddressInEra (cardano-api type) data type to corresponding ScriptHash. Note that the transformation Address - Pkh is not symmetrical for all addresses It's symmetrical for Enterprise addresses (because enterprise addresses have no stake Key in it). Returns Nothing if Address is Byron era address or if it's a PublicKey Addresss.
addressInEraToPaymentKeyHash :: AddressInEra era -> Maybe (Hash PaymentKey) #
Convert AddressInEra (cardano-api type) to Hash PaymentKey (cardano-api type).
Will return Nothing
if address is an Byron Address
addressNetworkId :: Address ShelleyAddr -> NetworkId #
Get Network Id from address
dataToScriptData :: ToData a1 => a1 -> ScriptData #
Convert (ToData) (i.e. Plutus data) to Cardano.Api's ScriptData structure
toPlutusAssetClass :: AssetId -> AssetClass #
Create Plutus library AssetClass structure from Cardano.Api's AssetId
fromPlutusData :: Data -> ScriptData #
fromPlutusAddress :: NetworkId -> Address -> Maybe (Address ShelleyAddr) #
Convert Address (plutus type) to Shelley Address (cardano-api type). Address is re-deserialized, which might fail. This is because it's possible to set arbitary byteString as hashes in plutus.
toPlutusAddress :: Address ShelleyAddr -> Address #
Convert Shelley Address (cardano-api type) to Address (plutus type)
toPlutusCredential :: forall (keyrole :: KeyRole) crypto. Credential keyrole crypto -> Credential #
Convert Credential (cardano-api type) to Credential (plutus type)
addrInEraToPlutusAddress :: AddressInEra era -> Address #
Convert AddressInEra (cardano-api type) to Address (plutus type).It calls error
internally if the provided address
is byron address
addressToPlutusCredential :: Address ShelleyAddr -> Credential #
Extract Payment Credential from Shelley Address (cardano-api type) and return Plutus Credential (plutus type)
fromPlutusV1Script :: CompiledCode (BuiltinData -> BuiltinData -> BuiltinData -> BuiltinUnit) -> Script PlutusScriptV1 #
fromPlutusValue :: Value -> Value #
toPlutusValue :: Value -> Value #
fromPlutusV2Script :: CompiledCode (BuiltinData -> BuiltinData -> BuiltinData -> BuiltinUnit) -> Script PlutusScriptV2 #
toPlutusTxOutRef :: TxIn -> TxOutRef #
isNullValue :: Value -> Bool #
isPositiveValue :: Value -> Bool #
filterNegativeQuantity :: Value -> [(AssetId, Quantity)] #
utxoListSum :: [(a, TxOut ctx era)] -> Value #
utxoMapSum :: Map a (TxOut ctx era) -> Value #
txoutListSum :: [TxOut ctx era] -> Value #
evaluateFee :: HasChainQueryAPI a => Tx ConwayEra -> Kontract a w FrameworkError Integer #
txoutMinLovelace :: (IsCardanoEra era, IsShelleyBasedEra era) => PParams (ShelleyLedgerEra era) -> TxOut CtxUTxO era -> Coin #
queryUtxos :: IsShelleyBasedEra era => LocalNodeConnectInfo -> Set AddressAny -> IO (Either FrameworkError (UTxO era)) #
queryTxins :: IsShelleyBasedEra era => LocalNodeConnectInfo -> Set TxIn -> IO (Either FrameworkError (UTxO era)) #
queryAddressInEraUtxos :: IsShelleyBasedEra era => LocalNodeConnectInfo -> [AddressInEra ConwayEra] -> IO (Either FrameworkError (UTxO era)) #
readSignKey :: FilePath -> IO (SigningKey PaymentKey) #
toHexString :: (FromText a1, ToText (Base16 a2)) => a2 -> a1 #
unHexLazy :: ToText a => a -> Maybe ByteString #
getDefaultConnection :: String -> NetworkId -> IO LocalNodeConnectInfo #
If CARDANO_NODE_SOCKET_PATH environment variable is set, return ConnectInfo instance with the path Otherwise CARDANO_HOME or "$HOME.cardano" is used and the socket path becomes "$CARDANO_HOMEnode.socket"
timestampToSlot :: SystemStart -> EraHistory -> POSIXTime -> SlotNo #
slotToTimestamp :: SystemStart -> EraHistory -> SlotNo -> POSIXTime #