Safe Haskell | None |
---|---|
Language | Haskell98 |
Shelley.Spec.Ledger.Address
Synopsis
- mkVKeyRwdAcnt :: Crypto crypto => Network -> KeyPair 'Staking crypto -> RewardAcnt crypto
- mkRwdAcnt :: Network -> Credential 'Staking crypto -> RewardAcnt crypto
- scriptsToAddr :: Crypto crypto => Network -> (MultiSig crypto, MultiSig crypto) -> Addr crypto
- scriptToCred :: Crypto crypto => MultiSig crypto -> Credential kr crypto
- toAddr :: Crypto crypto => Network -> (KeyPair 'Payment crypto, KeyPair 'Staking crypto) -> Addr crypto
- toCred :: Crypto crypto => KeyPair kr crypto -> Credential kr crypto
- serialiseAddr :: Addr crypto -> ByteString
- deserialiseAddr :: Crypto crypto => ByteString -> Maybe (Addr crypto)
- deserialiseAddrStakeRef :: Crypto crypto => ByteString -> Maybe (StakeReference crypto)
- data Addr crypto
- = Addr Network (PaymentCredential crypto) (StakeReference crypto)
- | AddrBootstrap (BootstrapAddress crypto)
- newtype BootstrapAddress crypto = BootstrapAddress {}
- bootstrapAddressAttrsSize :: BootstrapAddress crypto -> Int
- isBootstrapRedeemer :: Addr crypto -> Bool
- getNetwork :: Addr crypto -> Network
- data RewardAcnt crypto = RewardAcnt {
- getRwdNetwork :: !Network
- getRwdCred :: !(Credential 'Staking crypto)
- serialiseRewardAcnt :: RewardAcnt crypto -> ByteString
- deserialiseRewardAcnt :: Crypto crypto => ByteString -> Maybe (RewardAcnt crypto)
- byron :: Int
- notBaseAddr :: Int
- isEnterpriseAddr :: Int
- stakeCredIsScript :: Int
- getAddr :: Crypto crypto => Get (Addr crypto)
- getKeyHash :: Crypto crypto => Get (Credential kr crypto)
- bootstrapKeyHash :: forall crypto. Crypto crypto => BootstrapAddress crypto -> KeyHash 'Payment crypto
- getPtr :: Get Ptr
- getRewardAcnt :: Crypto crypto => Get (RewardAcnt crypto)
- getScriptHash :: Crypto crypto => Get (Credential kr crypto)
- getVariableLengthNat :: Get Natural
- payCredIsScript :: Int
- putAddr :: Addr crypto -> Put
- putCredential :: Credential kr crypto -> Put
- putPtr :: Ptr -> Put
- putRewardAcnt :: RewardAcnt crypto -> Put
- putVariableLengthNat :: Natural -> Put
- natToWord7s :: Natural -> [Word7]
- word7sToNat :: [Word7] -> Natural
- newtype Word7 = Word7 Word8
- toWord7 :: Word8 -> Word7
Documentation
mkVKeyRwdAcnt :: Crypto crypto => Network -> KeyPair 'Staking crypto -> RewardAcnt crypto Source #
mkRwdAcnt :: Network -> Credential 'Staking crypto -> RewardAcnt crypto Source #
scriptsToAddr :: Crypto crypto => Network -> (MultiSig crypto, MultiSig crypto) -> Addr crypto Source #
Create a base address from a pair of multi-sig scripts (pay and stake)
scriptToCred :: Crypto crypto => MultiSig crypto -> Credential kr crypto Source #
Convert a given multi-sig script to a credential by hashing it and wrapping
into the Credential
data type.
toAddr :: Crypto crypto => Network -> (KeyPair 'Payment crypto, KeyPair 'Staking crypto) -> Addr crypto Source #
serialiseAddr :: Addr crypto -> ByteString Source #
Serialise an address to the external format.
deserialiseAddr :: Crypto crypto => ByteString -> Maybe (Addr crypto) Source #
Deserialise an address from the external format. This will fail if the input data is not in the right format (or if there is trailing data).
deserialiseAddrStakeRef :: Crypto crypto => ByteString -> Maybe (StakeReference crypto) Source #
Deserialise a stake refence from a address. This will fail if this is a Bootstrap address (or malformed).
An address for UTxO.
Constructors
Addr Network (PaymentCredential crypto) (StakeReference crypto) | |
AddrBootstrap (BootstrapAddress crypto) |
Instances
newtype BootstrapAddress crypto Source #
Constructors
BootstrapAddress | |
Fields |
Instances
bootstrapAddressAttrsSize :: BootstrapAddress crypto -> Int Source #
The size of the extra attributes in a bootstrp (ie Byron) address. Used to help enforce that people do not post huge ones on the chain.
isBootstrapRedeemer :: Addr crypto -> Bool Source #
Return True if a given address is a redeemer address from the Byron Era
getNetwork :: Addr crypto -> Network Source #
data RewardAcnt crypto Source #
An account based address for rewards
Constructors
RewardAcnt | |
Fields
|
Instances
serialiseRewardAcnt :: RewardAcnt crypto -> ByteString Source #
Serialise a reward account to the external format.
deserialiseRewardAcnt :: Crypto crypto => ByteString -> Maybe (RewardAcnt crypto) Source #
Deserialise an reward account from the external format. This will fail if the input data is not in the right format (or if there is trailing data).
notBaseAddr :: Int Source #
getKeyHash :: Crypto crypto => Get (Credential kr crypto) Source #
bootstrapKeyHash :: forall crypto. Crypto crypto => BootstrapAddress crypto -> KeyHash 'Payment crypto Source #
getRewardAcnt :: Crypto crypto => Get (RewardAcnt crypto) Source #
getScriptHash :: Crypto crypto => Get (Credential kr crypto) Source #
putCredential :: Credential kr crypto -> Put Source #
putRewardAcnt :: RewardAcnt crypto -> Put Source #
putVariableLengthNat :: Natural -> Put Source #
natToWord7s :: Natural -> [Word7] Source #
word7sToNat :: [Word7] -> Natural Source #