Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Cooked.Wallet
Contents
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
- knownWallets :: [Wallet]
- wallet :: Integer -> Wallet
- walletPKHashToId :: PubKeyHash -> Maybe Int
- walletPKHashToWallet :: PubKeyHash -> Maybe Wallet
- walletPK :: Wallet -> PubKey
- walletStakingPK :: Wallet -> Maybe PubKey
- walletStakingPKHash :: Wallet -> Maybe PubKeyHash
- walletSK :: Wallet -> XPrv
- walletStakingSK :: Wallet -> Maybe XPrv
- type Wallet = MockWallet
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
walletStakingPKHash :: Wallet -> Maybe PubKeyHash Source #
Retrieves a wallet's public staking key hash, if any
walletStakingSK :: Wallet -> Maybe XPrv Source #
Retrieves a wallet's private staking key (secret key SK), if any
type Wallet = MockWallet Source #
A Wallet
is a MockWallet
from plutus-ledger
Orphan instances
Eq Wallet Source # | |
Ord Wallet Source # | |
ToAddress Wallet Source # | |
ToCredential Wallet Source # | |
Methods toCredential :: Wallet -> Credential # | |
ToMaybeStakingCredential Wallet Source # | Retrieves a wallet's staking credential |
Methods toMaybeStakingCredential :: Wallet -> Maybe StakingCredential # | |
ToPubKeyHash Wallet Source # | Retrieves a wallet's public key hash |
Methods toPubKeyHash :: Wallet -> PubKeyHash # |