Class FlatSigningRepository
- Namespace
- NBitcoin
- Assembly
- NArk.Abstractions.dll
public class FlatSigningRepository : ISigningRepository
- Inheritance
-
FlatSigningRepository
- Implements
- Inherited Members
- Extension Methods
Constructors
FlatSigningRepository()
public FlatSigningRepository()
Properties
KeyIdToKeyOrigins
public ConcurrentDictionary<KeyId, RootedKeyPath> KeyIdToKeyOrigins { get; }
Property Value
- ConcurrentDictionary<KeyId, RootedKeyPath>
KeyOrigins
public RootedKeyPath[] KeyOrigins { get; }
Property Value
- RootedKeyPath[]
Pubkeys
public ConcurrentDictionary<KeyId, PubKey> Pubkeys { get; }
Property Value
- ConcurrentDictionary<KeyId, PubKey>
Scripts
public ConcurrentDictionary<ScriptId, Script> Scripts { get; }
Property Value
- ConcurrentDictionary<ScriptId, Script>
Secrets
public ConcurrentDictionary<KeyId, ISecret> Secrets { get; }
Property Value
- ConcurrentDictionary<KeyId, ISecret>
SpendInfos
public ConcurrentDictionary<TaprootPubKey, TaprootSpendInfo> SpendInfos { get; }
Property Value
- ConcurrentDictionary<TaprootPubKey, TaprootSpendInfo>
TaprootKeyOrigins
public ConcurrentDictionary<TaprootPubKey, RootedKeyPath> TaprootKeyOrigins { get; }
Property Value
- ConcurrentDictionary<TaprootPubKey, RootedKeyPath>
TaprootKeysToSecret
public ConcurrentDictionary<TaprootPubKey, ISecret> TaprootKeysToSecret { get; }
Property Value
- ConcurrentDictionary<TaprootPubKey, ISecret>
Methods
Merge(ISigningRepository)
Consume the argument and take everything it holds.
This method should at least support consuming FlatSigningRepository.
public void Merge(ISigningRepository other)
Parameters
otherISigningRepository
SetKeyOrigin(KeyId, RootedKeyPath)
public void SetKeyOrigin(KeyId keyId, RootedKeyPath keyOrigin)
Parameters
keyIdKeyIdkeyOriginRootedKeyPath
SetKeyOrigin(TaprootPubKey, RootedKeyPath)
public void SetKeyOrigin(TaprootPubKey taprootPubKey, RootedKeyPath keyOrigin)
Parameters
taprootPubKeyTaprootPubKeykeyOriginRootedKeyPath
SetPubKey(KeyId, PubKey)
public void SetPubKey(KeyId keyId, PubKey pubkey)
Parameters
keyIdKeyIdpubkeyPubKey
SetScript(ScriptId, Script)
In case of Witness Script, use HashForLookup property as a key.
public void SetScript(ScriptId scriptId, Script script)
Parameters
scriptIdScriptIdscriptScript
SetSecret(KeyId, ISecret)
public void SetSecret(KeyId keyId, ISecret secret)
Parameters
keyIdKeyIdsecretISecret
SetSecret(TaprootPubKey, BitcoinSecret)
public void SetSecret(TaprootPubKey key, BitcoinSecret secret)
Parameters
keyTaprootPubKeysecretBitcoinSecret
SetTaprootSpendInfo(TaprootPubKey, TaprootSpendInfo)
public void SetTaprootSpendInfo(TaprootPubKey key, TaprootSpendInfo value)
Parameters
keyTaprootPubKeyvalueTaprootSpendInfo
TryGetKeyOrigin(KeyId, out RootedKeyPath)
Get KeyOrigin info for the public key id.
public bool TryGetKeyOrigin(KeyId keyId, out RootedKeyPath keyOrigin)
Parameters
keyIdKeyIdkeyOriginRootedKeyPath
Returns
TryGetKeyOrigin(TaprootPubKey, out RootedKeyPath)
public bool TryGetKeyOrigin(TaprootPubKey taprootPubKey, out RootedKeyPath keyorigin)
Parameters
taprootPubKeyTaprootPubKeykeyoriginRootedKeyPath
Returns
TryGetPubKey(KeyId, out PubKey)
public 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.
public bool TryGetScript(ScriptId scriptId, out Script script)
Parameters
scriptIdScriptIdscriptScript
Returns
TryGetSecret(KeyId, out ISecret)
public bool TryGetSecret(KeyId keyId, out ISecret key)
Parameters
keyIdKeyIdkeyISecret
Returns
TryGetSecret(TaprootPubKey, out ISecret)
public bool TryGetSecret(TaprootPubKey key, out ISecret secret)
Parameters
keyTaprootPubKeysecretISecret
Returns
TryGetTaprootSpendInfo(TaprootPubKey, out TaprootSpendInfo)
public bool TryGetTaprootSpendInfo(TaprootPubKey taprootOutput, out TaprootSpendInfo spendInfo)
Parameters
taprootOutputTaprootPubKeyspendInfoTaprootSpendInfo