Module

Contract.Wallet

A module with Wallet-related functionality.

#withKeyWallet

withKeyWallet :: forall (a :: Type). KeyWallet -> Contract a -> Contract a

#withKeyWalletFromMnemonic

#ownStakePubKeyHash

ownStakePubKeyHash :: Warn (Text "This function returns only one `StakePubKeyHash` even in case multiple `StakePubKeysHash`es are available. Use `ownStakePubKeyHashes` instead") => Contract (Maybe StakePubKeyHash)

#ownPaymentPubKeyHash

ownPaymentPubKeyHash :: Warn (Text "This function returns only one `PaymentPubKeyHash` even in case multiple `PaymentPubKeysHash`es are available. Use `ownPaymentPubKeyHashes` instead") => Contract (Maybe PaymentPubKeyHash)

Gets a wallet PaymentPubKeyHash via getWalletAddresses.

#getWalletBalance

#getWalletUtxos

getWalletUtxos :: Contract (Maybe UtxoMap)

Similar to utxosAt called on own address, except that it uses CIP-30 wallet state and not query layer state. The user should not expect these states to be in sync. When active wallet is KeyWallet, query layer state is used. This function is expected to be more performant than utxosAt when there is a large number of assets.

#getWalletCollateral

getWalletCollateral :: Contract (Maybe (Array TransactionUnspentOutput))

Get the collateral of the browser wallet. This collateral will vary depending on the wallet. E.g. Nami creates a hard-coded 5 Ada collateral. Throws on Promise rejection by wallet, returns Nothing if no collateral is available.

#getWalletAddress

getWalletAddress :: Warn (Text "This function returns only one `Address` even in case multiple `Address`es are available. Use `getWalletAddresses` instead") => Contract (Maybe Address)

Get the first Address of the wallet.

Re-exports from Cardano.Wallet.Key

#KeyWallet

newtype KeyWallet

An interface that wraps PrivateKeys. Used in CTL. Technically, can be implemented with remote calls, e.g. over HTTP, to provide signing services without revealing the private key.

Constructors

Instances

Re-exports from Ctl.Internal.Contract.Wallet

#ownUnregisteredPubStakeKeys

#ownRegisteredPubStakeKeys

#ownPaymentPubKeyHashes

ownPaymentPubKeyHashes :: Contract (Array PaymentPubKeyHash)

Gets all wallet PaymentPubKeyHashes via getWalletAddresses.

#getWalletAddresses

getWalletAddresses :: Contract (Array Address)

Get all Addresses of the browser wallet.

#getUnusedAddresses

#getRewardAddresses

#getChangeAddress

Re-exports from Ctl.Internal.Wallet

#WalletExtension

type WalletExtension = { exts :: Cip30Extensions, name :: String }

#Cip30Extensions

type Cip30Extensions = { cip95 :: Boolean }

#isWalletAvailable

Re-exports from Ctl.Internal.Wallet.KeyFile

#formatStakeKey

formatStakeKey :: PrivateStakeKey -> String

Convert private stake key to cardano-cli envelope format.

#formatPaymentKey

formatPaymentKey :: PrivatePaymentKey -> String

Convert private payment key to cardano-cli envelope format.

Re-exports from Ctl.Internal.Wallet.Spec

#KnownWallet

#walletName

Modules