Module

Ctl.Internal.Wallet.Cip30

#Cip30Wallet

type Cip30Wallet = { connection :: Api, getBalance :: Aff Value, getChangeAddress :: Aff Address, getCollateral :: Aff (Maybe (Array TransactionUnspentOutput)), getNetworkId :: Aff Int, getPubDrepKey :: Aff PublicKey, getRegisteredPubStakeKeys :: Aff (Array PublicKey), getRewardAddresses :: Aff (Array Address), getUnregisteredPubStakeKeys :: Aff (Array PublicKey), getUnusedAddresses :: Aff (Array Address), getUsedAddresses :: Aff (Array Address), getUtxos :: Aff (Maybe (Array TransactionUnspentOutput)), signData :: Address -> RawBytes -> Aff DataSignature, signTx :: Transaction -> Aff Transaction }

A simplified internal view of CIP-30 API that wraps Api from purescript-cip30.

  • We hardcode the collateral amount to 5 ADA
  • We always request all UTxOs in getUtxos
  • We don't support querying of supported CIP-30 extensions
  • We don't support getting wallet icon, name and apiVersion
  • We don't support isEnabled call

Use purescript-cip30 for these: connection field contains the API handle.

#DataSignature

type DataSignature = { key :: CborBytes, signature :: CborBytes }

#mkCip30WalletAff

Modules