Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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
- knownWallets :: [Wallet]
- wallet :: Integer -> Wallet
- walletPKHashToId :: PubKeyHash -> Maybe Int
- walletPKHashToWallet :: PubKeyHash -> Maybe Wallet
- walletPK :: Wallet -> PubKey
- walletStakingPK :: Wallet -> Maybe PubKey
- walletPKHash :: Wallet -> PubKeyHash
- walletStakingPKHash :: Wallet -> Maybe PubKeyHash
- walletAddress :: Wallet -> Address
- walletSK :: Wallet -> PrivateKey
- walletStakingSK :: Wallet -> Maybe PrivateKey
- walletStakingCredential :: Wallet -> Maybe StakingCredential
- walletCredential :: Wallet -> Credential
- type Wallet = MockWallet
- type PrivateKey = XPrv
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
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
type Wallet = MockWallet Source #
type PrivateKey = XPrv Source #