Table of Contents

Interface ISigningRepository

Namespace
NBitcoin
Assembly
NArk.Abstractions.dll

Interface for injecting security sensitive stuffs to other objects. This is equivalent to SigningProvider class in bitcoin core. Currently used in OutputDescriptor to safely inject private key information

public interface ISigningRepository
Extension Methods

Methods

Merge(ISigningRepository)

Consume the argument and take everything it holds. This method should at least support consuming FlatSigningRepository.

void Merge(ISigningRepository other)

Parameters

other ISigningRepository

SetKeyOrigin(KeyId, RootedKeyPath)

void SetKeyOrigin(KeyId keyId, RootedKeyPath keyOrigin)

Parameters

keyId KeyId
keyOrigin RootedKeyPath

SetKeyOrigin(TaprootPubKey, RootedKeyPath)

void SetKeyOrigin(TaprootPubKey taprootPubKey, RootedKeyPath keyOrigin)

Parameters

taprootPubKey TaprootPubKey
keyOrigin RootedKeyPath

SetPubKey(KeyId, PubKey)

void SetPubKey(KeyId keyId, PubKey pubkey)

Parameters

keyId KeyId
pubkey PubKey

SetScript(ScriptId, Script)

In case of Witness Script, use HashForLookup property as a key.

void SetScript(ScriptId scriptId, Script script)

Parameters

scriptId ScriptId
script Script

SetSecret(KeyId, ISecret)

void SetSecret(KeyId keyId, ISecret secret)

Parameters

keyId KeyId
secret ISecret

SetSecret(TaprootPubKey, BitcoinSecret)

void SetSecret(TaprootPubKey key, BitcoinSecret secret)

Parameters

key TaprootPubKey
secret BitcoinSecret

SetTaprootSpendInfo(TaprootPubKey, TaprootSpendInfo)

void SetTaprootSpendInfo(TaprootPubKey key, TaprootSpendInfo value)

Parameters

key TaprootPubKey
value TaprootSpendInfo

TryGetKeyOrigin(KeyId, out RootedKeyPath)

Get KeyOrigin info for the public key id.

bool TryGetKeyOrigin(KeyId keyId, out RootedKeyPath keyorigin)

Parameters

keyId KeyId
keyorigin RootedKeyPath

Returns

bool

TryGetKeyOrigin(TaprootPubKey, out RootedKeyPath)

bool TryGetKeyOrigin(TaprootPubKey taprootPubKey, out RootedKeyPath keyorigin)

Parameters

taprootPubKey TaprootPubKey
keyorigin RootedKeyPath

Returns

bool

TryGetPubKey(KeyId, out PubKey)

bool TryGetPubKey(KeyId keyId, out PubKey pubkey)

Parameters

keyId KeyId
pubkey PubKey

Returns

bool

TryGetScript(ScriptId, out Script)

In case of Witness Script, use HashForLookup Property as a key.

bool TryGetScript(ScriptId scriptId, out Script script)

Parameters

scriptId ScriptId
script Script

Returns

bool

TryGetSecret(KeyId, out ISecret)

bool TryGetSecret(KeyId keyId, out ISecret secret)

Parameters

keyId KeyId
secret ISecret

Returns

bool

TryGetSecret(TaprootPubKey, out ISecret)

bool TryGetSecret(TaprootPubKey key, out ISecret secret)

Parameters

key TaprootPubKey
secret ISecret

Returns

bool

TryGetTaprootSpendInfo(TaprootPubKey, out TaprootSpendInfo)

bool TryGetTaprootSpendInfo(TaprootPubKey taprootOutput, out TaprootSpendInfo spendInfo)

Parameters

taprootOutput TaprootPubKey
spendInfo TaprootSpendInfo

Returns

bool