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
otherISigningRepository
SetKeyOrigin(KeyId, RootedKeyPath)
void SetKeyOrigin(KeyId keyId, RootedKeyPath keyOrigin)
Parameters
keyIdKeyIdkeyOriginRootedKeyPath
SetKeyOrigin(TaprootPubKey, RootedKeyPath)
void SetKeyOrigin(TaprootPubKey taprootPubKey, RootedKeyPath keyOrigin)
Parameters
taprootPubKeyTaprootPubKeykeyOriginRootedKeyPath
SetPubKey(KeyId, PubKey)
void SetPubKey(KeyId keyId, PubKey pubkey)
Parameters
keyIdKeyIdpubkeyPubKey
SetScript(ScriptId, Script)
In case of Witness Script, use HashForLookup property as a key.
void SetScript(ScriptId scriptId, Script script)
Parameters
scriptIdScriptIdscriptScript
SetSecret(KeyId, ISecret)
void SetSecret(KeyId keyId, ISecret secret)
Parameters
keyIdKeyIdsecretISecret
SetSecret(TaprootPubKey, BitcoinSecret)
void SetSecret(TaprootPubKey key, BitcoinSecret secret)
Parameters
keyTaprootPubKeysecretBitcoinSecret
SetTaprootSpendInfo(TaprootPubKey, TaprootSpendInfo)
void SetTaprootSpendInfo(TaprootPubKey key, TaprootSpendInfo value)
Parameters
keyTaprootPubKeyvalueTaprootSpendInfo
TryGetKeyOrigin(KeyId, out RootedKeyPath)
Get KeyOrigin info for the public key id.
bool TryGetKeyOrigin(KeyId keyId, out RootedKeyPath keyorigin)
Parameters
keyIdKeyIdkeyoriginRootedKeyPath
Returns
TryGetKeyOrigin(TaprootPubKey, out RootedKeyPath)
bool TryGetKeyOrigin(TaprootPubKey taprootPubKey, out RootedKeyPath keyorigin)
Parameters
taprootPubKeyTaprootPubKeykeyoriginRootedKeyPath
Returns
TryGetPubKey(KeyId, out PubKey)
bool TryGetPubKey(KeyId keyId, out PubKey pubkey)
Parameters
keyIdKeyIdpubkeyPubKey
Returns
TryGetScript(ScriptId, out Script)
In case of Witness Script, use HashForLookup Property as a key.
bool TryGetScript(ScriptId scriptId, out Script script)
Parameters
scriptIdScriptIdscriptScript
Returns
TryGetSecret(KeyId, out ISecret)
bool TryGetSecret(KeyId keyId, out ISecret secret)
Parameters
keyIdKeyIdsecretISecret
Returns
TryGetSecret(TaprootPubKey, out ISecret)
bool TryGetSecret(TaprootPubKey key, out ISecret secret)
Parameters
keyTaprootPubKeysecretISecret
Returns
TryGetTaprootSpendInfo(TaprootPubKey, out TaprootSpendInfo)
bool TryGetTaprootSpendInfo(TaprootPubKey taprootOutput, out TaprootSpendInfo spendInfo)
Parameters
taprootOutputTaprootPubKeyspendInfoTaprootSpendInfo