Copyright | © 2018-2021 IOHK |
---|---|
License | Apache-2.0 |
Safe Haskell | None |
Language | Haskell2010 |
Definition of
Shared
Keys.
Synopsis
-
newtype
SharedKey
(depth ::
Depth
) key =
SharedKey
{
- getKey :: key
- purposeCIP1854 :: Index ' Hardened ' PurposeK
- constructAddressFromIx :: forall (n :: NetworkDiscriminant ). Typeable n => Role -> ScriptTemplate -> Maybe ScriptTemplate -> Index ' Soft ' ScriptK -> Address
- toNetworkTag :: forall (n :: NetworkDiscriminant ). Typeable n => NetworkTag
- replaceCosignersWithVerKeys :: Role -> ScriptTemplate -> Index ' Soft ' ScriptK -> Script KeyHash
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
Instances
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.
constructAddressFromIx :: forall (n :: NetworkDiscriminant ). Typeable n => Role -> ScriptTemplate -> Maybe ScriptTemplate -> Index ' Soft ' ScriptK -> Address Source #
toNetworkTag :: forall (n :: NetworkDiscriminant ). Typeable n => NetworkTag Source #
Convert 'NetworkDiscriminant type parameter to
NetworkTag
.
replaceCosignersWithVerKeys :: Role -> ScriptTemplate -> Index ' Soft ' ScriptK -> Script KeyHash Source #