Search Results for

    Show / Hide Table of Contents

    Class HDKey

    Extended (hierarchical deterministic) private key

    Inheritance
    System.Object
    HDKey
    Namespace: Netmavryk.Keys
    Assembly: Netmavryk.dll
    Syntax
    public class HDKey : object

    Constructors

    | Improve this Doc View Source

    HDKey(ECKind)

    Generates a new extended (hierarchical deterministic) private key

    Declaration
    public HDKey(ECKind kind = default(ECKind))
    Parameters
    Type Name Description
    ECKind kind

    Elliptic curve kind

    Properties

    | Improve this Doc View Source

    Address

    Public key hash

    Declaration
    public string Address { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    ChainCode

    32 bytes of entropy added to the private key to enable deriving secure child keys

    Declaration
    public byte[] ChainCode { get; }
    Property Value
    Type Description
    System.Byte[]
    | Improve this Doc View Source

    HDPubKey

    Extended (hierarchical deterministic) public key

    Declaration
    public HDPubKey HDPubKey { get; }
    Property Value
    Type Description
    HDPubKey
    | Improve this Doc View Source

    Key

    Private key

    Declaration
    public Key Key { get; }
    Property Value
    Type Description
    Key
    | Improve this Doc View Source

    PubKey

    Public key

    Declaration
    public PubKey PubKey { get; }
    Property Value
    Type Description
    PubKey

    Methods

    | Improve this Doc View Source

    Derive(HDPath)

    Derives an extended child key at the given path relative to the current key

    Declaration
    public HDKey Derive(HDPath path)
    Parameters
    Type Name Description
    HDPath path

    HD key path

    Returns
    Type Description
    HDKey

    Derived extended child key

    | Improve this Doc View Source

    Derive(Int32, Boolean)

    Derives an extended child key at the given index

    Declaration
    public HDKey Derive(int index, bool hardened = false)
    Parameters
    Type Name Description
    System.Int32 index

    Index of the child key, starting from zero

    System.Boolean hardened

    If true, hardened derivation will be performed

    Returns
    Type Description
    HDKey

    Derived extended child key

    | Improve this Doc View Source

    Derive(String)

    Derives an extended child key at the given path relative to the current key

    Declaration
    public HDKey Derive(string path)
    Parameters
    Type Name Description
    System.String path

    HD key path string, formatted like m/44'/1729'/0/0'

    Returns
    Type Description
    HDKey

    Derived extended child key

    | Improve this Doc View Source

    FromKey(Key, Byte[])

    Creates an extended (hierarchical deterministic) private key from the given private key and chain code

    Declaration
    public static HDKey FromKey(Key key, byte[] chainCode)
    Parameters
    Type Name Description
    Key key

    Private key

    System.Byte[] chainCode

    32 bytes of entropy to be added to the private key

    Returns
    Type Description
    HDKey

    Extended private key

    | Improve this Doc View Source

    FromMnemonic(Mnemonic, String, ECKind)

    Creates an extended (hierarchical deterministic) private key from the given BIP-39 mnemonic

    Declaration
    public static HDKey FromMnemonic(Mnemonic mnemonic, string passphrase = "", ECKind kind = default(ECKind))
    Parameters
    Type Name Description
    Mnemonic mnemonic

    BIP-39 mnemonic sentence

    System.String passphrase

    Passphrase. If not present, an empty string "" is used instead, according to the standard.

    ECKind kind

    Elliptic curve kind

    Returns
    Type Description
    HDKey

    Extended private key

    | Improve this Doc View Source

    FromSeed(Byte[], ECKind)

    Creates an extended (hierarchical deterministic) private key from the given seed bytes

    Declaration
    public static HDKey FromSeed(byte[] seed, ECKind kind = default(ECKind))
    Parameters
    Type Name Description
    System.Byte[] seed

    Seed bytes

    ECKind kind

    Elliptic curve kind

    Returns
    Type Description
    HDKey

    Extended private key

    | Improve this Doc View Source

    Sign(Byte[])

    Signs an array of bytes

    Declaration
    public Signature Sign(byte[] bytes)
    Parameters
    Type Name Description
    System.Byte[] bytes

    Array of bytes to sign

    Returns
    Type Description
    Signature

    Signature object

    | Improve this Doc View Source

    Sign(String)

    Signs a UTF-8 encoded string

    Declaration
    public Signature Sign(string message)
    Parameters
    Type Name Description
    System.String message

    String to sign

    Returns
    Type Description
    Signature

    Signature object

    | Improve this Doc View Source

    SignOperation(Byte[])

    Signs forged operation bytes with 0x03 prefix added

    Declaration
    public Signature SignOperation(byte[] bytes)
    Parameters
    Type Name Description
    System.Byte[] bytes

    Forged operation bytes

    Returns
    Type Description
    Signature

    Signature object

    | Improve this Doc View Source

    Verify(Byte[], Byte[])

    Verifies a signature of the given array of bytes

    Declaration
    public bool Verify(byte[] data, byte[] signature)
    Parameters
    Type Name Description
    System.Byte[] data

    Original data bytes

    System.Byte[] signature

    Signature to verify

    Returns
    Type Description
    System.Boolean

    True if the signature is valid, otherwise false

    | Improve this Doc View Source

    Verify(String, String)

    Verifies a signature of the given message string

    Declaration
    public bool Verify(string message, string signature)
    Parameters
    Type Name Description
    System.String message

    Original message string

    System.String signature

    Signature to verify

    Returns
    Type Description
    System.Boolean

    True if the signature is valid, otherwise false

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © Mavryk Dynamics