cooked-validators-4.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cooked.Wallet

Description

This module defines convenient wrappers for mock chain wallets (around Plutus mock wallets) with an associate API to construct them, manipulate them, and fetch information (such as public/private and staking keys).

Synopsis

Documentation

knownWallets :: [Wallet] Source #

All the wallets corresponding to known Plutus mock wallets. This is a list of 10 wallets which will

  • receive funds in the standard initial distribution of cooked-validators,
  • be pretty-printed as part the final state after running a few transactions.

wallet :: Integer -> Wallet Source #

Wallet corresponding to a given wallet number (or wallet ID) with an offset of 1 to start at 1 instead of 0

walletPKHashToId :: PubKeyHash -> Maybe Int Source #

Retrieves the id of the known wallet that corresponds to a public key hash

walletPKHashToId (walletPKHash (wallet 3)) == Just 3

walletPKHashToWallet :: PubKeyHash -> Maybe Wallet Source #

Retrieves the known wallet that corresponds to a public key hash

walletPK :: Wallet -> PubKey Source #

Retrieves a wallet public key (PK)

walletStakingPK :: Wallet -> Maybe PubKey Source #

Retrieves a wallet's public staking key (PK), if any

walletPKHash :: Wallet -> PubKeyHash Source #

Retrieves a wallet's public key hash

walletStakingPKHash :: Wallet -> Maybe PubKeyHash Source #

Retrieves a wallet's public staking key hash, if any

walletAddress :: Wallet -> Address Source #

Retrieves a wallet's address

walletSK :: Wallet -> PrivateKey Source #

Retrieves a wallet private key (secret key SK)

walletStakingSK :: Wallet -> Maybe PrivateKey Source #

Retrieves a wallet's private staking key (secret key SK), if any

walletCredential :: Wallet -> Credential Source #

Retrieves a wallet credential

Orphan instances

Eq Wallet Source # 
Instance details

Methods

(==) :: Wallet -> Wallet -> Bool #

(/=) :: Wallet -> Wallet -> Bool #

Ord Wallet Source # 
Instance details