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

Cardano.Wallet.Primitive.AddressDerivation.Shared

Description

Implementation of address derivation for Shared Keys.

Synopsis

Types

newtype SharedKey (depth :: Depth ) key Source #

A cryptographic key for Shared address derivation, with phantom-types to disambiguate derivation paths

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

Constructors

SharedKey

Fields

Instances

Instances details
WalletKey SharedKey Source #
Instance details

Defined in Cardano.Wallet.Primitive.AddressDerivation.Shared

SoftDerivation SharedKey Source #
Instance details

Defined in Cardano.Wallet.Primitive.AddressDerivation.Shared

HardDerivation SharedKey Source #
Instance details

Defined in Cardano.Wallet.Primitive.AddressDerivation.Shared

GetPurpose SharedKey Source #
Instance details

Defined in Cardano.Wallet.Primitive.AddressDerivation.Shared

MkKeyFingerprint SharedKey Address Source #
Instance details

Defined in Cardano.Wallet.Primitive.AddressDerivation.Shared

MkKeyFingerprint SharedKey ( Proxy n, SharedKey ' AddressK XPub ) Source #
Instance details

Defined in Cardano.Wallet.Primitive.AddressDerivation.Shared

PersistPublicKey ( SharedKey depth) Source #
Instance details

Defined in Cardano.Wallet.Primitive.AddressDerivation.Shared

PersistPrivateKey ( SharedKey ' RootK ) Source #
Instance details

Defined in Cardano.Wallet.Primitive.AddressDerivation.Shared

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

Defined in Cardano.Wallet.Primitive.AddressDerivation.SharedKey

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

Defined in Cardano.Wallet.Primitive.AddressDerivation.SharedKey

Generic ( SharedKey depth key) Source #
Instance details

Defined in Cardano.Wallet.Primitive.AddressDerivation.SharedKey

Associated Types

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

Methods

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

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

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

Defined in Cardano.Wallet.Primitive.AddressDerivation.SharedKey

Methods

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

BoundedAddressLength SharedKey Source #
Instance details

Defined in Cardano.Wallet.Primitive.AddressDerivation.Shared

type AddressIndexDerivationType SharedKey Source #
Instance details

Defined in Cardano.Wallet.Primitive.AddressDerivation.Shared

type Rep ( SharedKey depth key) Source #
Instance details

Defined in Cardano.Wallet.Primitive.AddressDerivation.SharedKey

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

Generation and derivation

generateKeyFromSeed Source #

Arguments

:: ( SomeMnemonic , Maybe SomeMnemonic )

The actual seed and its recovery / generation passphrase

-> Passphrase "encryption"
-> SharedKey ' RootK XPrv

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

unsafeGenerateKeyFromSeed Source #

Arguments

:: ( SomeMnemonic , Maybe SomeMnemonic )

The actual seed and its recovery / generation passphrase

-> Passphrase "encryption"
-> SharedKey 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 .

purposeCIP1854 :: Index ' Hardened ' PurposeK Source #

Purpose for shared wallets is a constant set to 1854' (or 0x8000073E) following the original CIP-1854 Multi-signature Wallets.

It indicates that the subtree of this node is used according to this specification.

Hardened derivation is used at this level.

Orphan instances

WalletKey SharedKey Source #
Instance details

SoftDerivation SharedKey Source #
Instance details

HardDerivation SharedKey Source #
Instance details

GetPurpose SharedKey Source #
Instance details

MkKeyFingerprint SharedKey Address Source #
Instance details

MkKeyFingerprint SharedKey ( Proxy n, SharedKey ' AddressK XPub ) Source #
Instance details

PersistPublicKey ( SharedKey depth) Source #
Instance details

PersistPrivateKey ( SharedKey ' RootK ) Source #
Instance details

BoundedAddressLength SharedKey Source #
Instance details