Table of Contents

Class PubKeyProvider

Namespace
NBitcoin.Scripting
Assembly
NArk.Abstractions.dll

Public key objects in descriptors.

public abstract class PubKeyProvider : IEquatable<PubKeyProvider>
Inheritance
PubKeyProvider
Implements
Derived
Inherited Members

Methods

Equals(PubKeyProvider)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(PubKeyProvider other)

Parameters

other PubKeyProvider

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Determines whether the specified object is equal to the current object.

public override sealed bool Equals(object obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

GetPubKey(uint, Func<KeyId, Key>)

public PubKey GetPubKey(uint pos, Func<KeyId, Key> privateKeyProvider)

Parameters

pos uint
privateKeyProvider Func<KeyId, Key>

Returns

PubKey

GetPubKey(uint, Func<KeyId, Key>, out RootedKeyPath)

public PubKey GetPubKey(uint pos, Func<KeyId, Key> privateKeyProvider, out RootedKeyPath keyOriginInfo)

Parameters

pos uint
privateKeyProvider Func<KeyId, Key>
keyOriginInfo RootedKeyPath

Returns

PubKey

IsCompressed()

public bool IsCompressed()

Returns

bool

IsRange()

public bool IsRange()

Returns

bool

NewConst(PubKey)

public static PubKeyProvider NewConst(PubKey pk)

Parameters

pk PubKey

Returns

PubKeyProvider

NewConst(PubKey, bool)

public static PubKeyProvider NewConst(PubKey pk, bool xonly)

Parameters

pk PubKey
xonly bool

Returns

PubKeyProvider

NewConst(TaprootFullPubKey)

public static PubKeyProvider NewConst(TaprootFullPubKey pk)

Parameters

pk TaprootFullPubKey

Returns

PubKeyProvider

NewConst(TaprootInternalPubKey)

public static PubKeyProvider NewConst(TaprootInternalPubKey pk)

Parameters

pk TaprootInternalPubKey

Returns

PubKeyProvider

NewConst(TaprootPubKey)

public static PubKeyProvider NewConst(TaprootPubKey pk)

Parameters

pk TaprootPubKey

Returns

PubKeyProvider

NewHD(BitcoinExtPubKey, KeyPath, DeriveType)

public static PubKeyProvider NewHD(BitcoinExtPubKey extPubKey, KeyPath kp, PubKeyProvider.DeriveType t)

Parameters

extPubKey BitcoinExtPubKey
kp KeyPath
t PubKeyProvider.DeriveType

Returns

PubKeyProvider

NewOrigin(RootedKeyPath, PubKeyProvider)

public static PubKeyProvider NewOrigin(RootedKeyPath keyOrigin, PubKeyProvider inner)

Parameters

keyOrigin RootedKeyPath
inner PubKeyProvider

Returns

PubKeyProvider

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

TryGetPubKey(uint, Func<KeyId, Key>, out RootedKeyPath, out PubKey)

public bool TryGetPubKey(uint pos, Func<KeyId, Key> privateKeyProvider, out RootedKeyPath keyOriginInfo, out PubKey pubkey)

Parameters

pos uint

derivation index position in case of xpub.

privateKeyProvider Func<KeyId, Key>

In case of the hardened derivation, You must give private key by this argument so that we can derive the child

keyOriginInfo RootedKeyPath

output keyOriginInfo (optional)

pubkey PubKey

output PubKey

Returns

bool