cardano-wallet-core-2022.7.1: The Wallet Backend for a Cardano node.
Copyright © 2018-2020 IOHK
License Apache-2.0
Safe Haskell None
Language Haskell2010

Cardano.Wallet.Primitive.AddressDerivation.Icarus

Description

Implementation of address derivation for Icarus keys. This uses the Byron derivation for addresses, but on top of the derivation scheme V2.

Synopsis

Types

newtype IcarusKey (depth :: Depth ) key Source #

A cryptographic key for sequential-scheme address derivation, with phantom-types to disambiguate key types.

let rootPrivateKey = IcarusKey 'RootK XPrv
let accountPubKey = IcarusKey 'AccountK XPub
let addressPubKey = IcarusKey 'AddressK XPub

Constructors

IcarusKey

Fields

Instances

Instances details
WalletKey IcarusKey Source #
Instance details

Defined in Cardano.Wallet.Primitive.AddressDerivation.Icarus

SoftDerivation IcarusKey Source #
Instance details

Defined in Cardano.Wallet.Primitive.AddressDerivation.Icarus

HardDerivation IcarusKey Source #
Instance details

Defined in Cardano.Wallet.Primitive.AddressDerivation.Icarus

GetPurpose IcarusKey Source #
Instance details

Defined in Cardano.Wallet.Primitive.AddressDerivation.Icarus

MkKeyFingerprint IcarusKey Address Source #
Instance details

Defined in Cardano.Wallet.Primitive.AddressDerivation.Icarus

PaymentAddress ' Mainnet IcarusKey Source #
Instance details

Defined in Cardano.Wallet.Primitive.AddressDerivation.Icarus

PaymentAddress n IcarusKey => MkKeyFingerprint IcarusKey ( Proxy n, IcarusKey ' AddressK XPub ) Source #
Instance details

Defined in Cardano.Wallet.Primitive.AddressDerivation.Icarus

PersistPublicKey ( IcarusKey depth) Source #
Instance details

Defined in Cardano.Wallet.Primitive.AddressDerivation.Icarus

PersistPrivateKey ( IcarusKey ' RootK ) Source #
Instance details

Defined in Cardano.Wallet.Primitive.AddressDerivation.Icarus

KnownNat pm => PaymentAddress (' Testnet pm) IcarusKey Source #
Instance details

Defined in Cardano.Wallet.Primitive.AddressDerivation.Icarus

Eq key => Eq ( IcarusKey depth key) Source #
Instance details

Defined in Cardano.Wallet.Primitive.AddressDerivation.Icarus

Show key => Show ( IcarusKey depth key) Source #
Instance details

Defined in Cardano.Wallet.Primitive.AddressDerivation.Icarus

Generic ( IcarusKey depth key) Source #
Instance details

Defined in Cardano.Wallet.Primitive.AddressDerivation.Icarus

Associated Types

type Rep ( IcarusKey depth key) :: Type -> Type Source #

Methods

from :: IcarusKey depth key -> Rep ( IcarusKey depth key) x Source #

to :: Rep ( IcarusKey depth key) x -> IcarusKey depth key Source #

NFData key => NFData ( IcarusKey depth key) Source #
Instance details

Defined in Cardano.Wallet.Primitive.AddressDerivation.Icarus

Methods

rnf :: IcarusKey depth key -> () Source #

PaymentAddress n IcarusKey => MaybeLight ( SeqState n IcarusKey ) Source #
Instance details

Defined in Cardano.Wallet.Primitive.AddressDerivation.Icarus

BoundedAddressLength IcarusKey Source #
Instance details

Defined in Cardano.Wallet.Primitive.AddressDerivation.Icarus

IsOurs ( SeqState n IcarusKey ) RewardAccount Source #
Instance details

Defined in Cardano.Wallet.Primitive.AddressDerivation.Icarus

type AddressIndexDerivationType IcarusKey Source #
Instance details

Defined in Cardano.Wallet.Primitive.AddressDerivation.Icarus

type Rep ( IcarusKey depth key) Source #
Instance details

Defined in Cardano.Wallet.Primitive.AddressDerivation.Icarus

type Rep ( IcarusKey depth key) = D1 (' MetaData "IcarusKey" "Cardano.Wallet.Primitive.AddressDerivation.Icarus" "cardano-wallet-core-2022.7.1-AGKhlyz9liLKN3QqZD1gj" ' True ) ( C1 (' MetaCons "IcarusKey" ' PrefixI ' True ) ( S1 (' MetaSel (' Just "getKey") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 key)))

Generation and derivation

generateKeyFromSeed Source #

Arguments

:: SomeMnemonic

The root mnemonic

-> Passphrase "encryption"

Master encryption passphrase

-> IcarusKey ' RootK XPrv

Generate a root key from a corresponding seed. The seed should be at least 16 bytes.

generateKeyFromHardwareLedger Source #

Arguments

:: SomeMnemonic

The root mnemonic

-> Passphrase "encryption"

Master encryption passphrase

-> IcarusKey ' RootK XPrv

Hardware Ledger devices generates keys from mnemonic using a different approach (different from the rest of Cardano).

It is a combination of:

unsafeGenerateKeyFromSeed Source #

Arguments

:: SomeMnemonic

The root mnemonic

-> Passphrase "encryption"

Master encryption passphrase

-> IcarusKey depth XPrv

Generate a new key from seed. Note that the depth is left open so that the caller gets to decide what type of key this is. This is mostly for testing, in practice, seeds are used to represent root keys, and one should use generateKeyFromSeed .