Deprecated. see Icarus
Material for deriving HD random scheme keys, which can be used for making addresses.
Instances15HasNetworkDiscriminant, PaymentAddress, GenMasterKey, HardDerivation, Functor, Eq, …
HasNetworkDiscriminant ByronDefined in cardano-addresses-4.0.2 · Cardano.Address.Style.ByronPaymentAddress ByronDefined in cardano-addresses-4.0.2 · Cardano.Address.Style.ByronGenMasterKey ByronDefined in cardano-addresses-4.0.2 · Cardano.Address.Style.ByronKey Derivation
Example:
Generating a root key from SomeMnemonic
>>> :set -XOverloadedStrings >>> :set -XTypeApplications >>> :set -XDataKinds >>> :set -XFlexibleContexts >>> import Cardano.Mnemonic ( mkSomeMnemonic ) >>> import Cardano.Address ( base58 ) >>> import Cardano.Address.Derivation ( toXPub ) >>> import qualified Cardano.Address.Style.Byron as Byron >>> let (Right mw) = mkSomeMnemonic @'[12] ["moon","fox","ostrich","quick","cactus","raven","wasp","intact","first","ring","crumble","error"] >>> let rootK = Byron.genMasterKeyFromMnemonic mw :: Byron 'RootK XPrvDeriving child keys
Both
accIxandaddIxassume values from 0 to 4294967295 (ie. 0xFFFFFFFF) In case of account one can get this bound vialet accIxMin = minBound(Index 'WholeDomain 'AccountK) let accIxMax = maxBound(Index 'WholeDomain 'AccountK) >>> let Just accIx = wholeDomainIndex 0x80000000 >>> let acctK = Byron.deriveAccountPrivateKey rootK accIx >>> let Just addIx = wholeDomainIndex 0x80000014 >>> let addrK = Byron.deriveAddressPrivateKey acctK addIx >>> base58 $ Byron.paymentAddress Byron.byronMainnet (toXPub $ addrK)DdzFFzCqrhsq3KjLtT51mESbZ4RepiHPzLqEhamexVFTJpGbCXmh7qSxnHvaL88QmtVTD1E1sjx8Z1ZNDhYmcBV38ZjDST9kYVxSkhcwHardDerivation ByronDefined in cardano-addresses-4.0.2 · Cardano.Address.Style.ByronFunctor (Byron depth)Defined in cardano-addresses-4.0.2 · Cardano.Address.Style.Byron(Eq key, Eq (DerivationPath depth)) => Eq (Byron depth key)Defined in cardano-addresses-4.0.2 · Cardano.Address.Style.Byron(Show key, Show (DerivationPath depth)) => Show (Byron depth key)Defined in cardano-addresses-4.0.2 · Cardano.Address.Style.ByronGeneric (Byron depth key)Defined in cardano-addresses-4.0.2 · Cardano.Address.Style.Byron(NFData key, NFData (DerivationPath depth)) => NFData (Byron depth key)Defined in cardano-addresses-4.0.2 · Cardano.Address.Style.Byrontype Rep (Byron depth key) = D1 ('MetaDataDefined in cardano-addresses-4.0.2 · Cardano.Address.Style.Byron"Byron"
"Cardano.Address.Style.Byron"
"cardano-addresses-4.0.2-IfBlVg9kl2D9r65sjHkHQ2"
'False) (C1 ('MetaCons"Byron"
'PrefixI 'True) (S1 ('MetaSel ('Just"getKey"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 key) :*: (S1 ('MetaSel ('Just"derivationPath"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (DerivationPath depth)) :*: S1 ('MetaSel ('Just"payloadPassphrase"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ScrubbedBytes))))type NetworkDiscriminant Byron = (AddressDiscrimination, NetworkTag)Defined in cardano-addresses-4.0.2 · Cardano.Address.Style.Byrontype SecondFactor Byron = ()Defined in cardano-addresses-4.0.2 · Cardano.Address.Style.Byrontype AccountIndexDerivationType Byron = 'WholeDomainDefined in cardano-addresses-4.0.2 · Cardano.Address.Style.Byrontype AddressIndexDerivationType Byron = 'WholeDomainDefined in cardano-addresses-4.0.2 · Cardano.Address.Style.Byrontype WithRole Byron = ()Defined in cardano-addresses-4.0.2 · Cardano.Address.Style.Byron