Table of Contents

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

other ISigningRepository

SetKeyOrigin(KeyId, RootedKeyPath)

public void SetKeyOrigin(KeyId keyId, RootedKeyPath keyOrigin)

Parameters

keyId KeyId
keyOrigin RootedKeyPath

SetKeyOrigin(TaprootPubKey, RootedKeyPath)

public void SetKeyOrigin(TaprootPubKey taprootPubKey, RootedKeyPath keyOrigin)

Parameters

taprootPubKey TaprootPubKey
keyOrigin RootedKeyPath

SetPubKey(KeyId, PubKey)

public 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.

public void SetScript(ScriptId scriptId, Script script)

Parameters

scriptId ScriptId
script Script

SetSecret(KeyId, ISecret)

public void SetSecret(KeyId keyId, ISecret secret)

Parameters

keyId KeyId
secret ISecret

SetSecret(TaprootPubKey, BitcoinSecret)

public void SetSecret(TaprootPubKey key, BitcoinSecret secret)

Parameters

key TaprootPubKey
secret BitcoinSecret

SetTaprootSpendInfo(TaprootPubKey, TaprootSpendInfo)

public void SetTaprootSpendInfo(TaprootPubKey key, TaprootSpendInfo value)

Parameters

key TaprootPubKey
value TaprootSpendInfo

TryGetKeyOrigin(KeyId, out RootedKeyPath)

Get KeyOrigin info for the public key id.

public bool TryGetKeyOrigin(KeyId keyId, out RootedKeyPath keyOrigin)

Parameters

keyId KeyId
keyOrigin RootedKeyPath

Returns

bool

TryGetKeyOrigin(TaprootPubKey, out RootedKeyPath)

public bool TryGetKeyOrigin(TaprootPubKey taprootPubKey, out RootedKeyPath keyorigin)

Parameters

taprootPubKey TaprootPubKey
keyorigin RootedKeyPath

Returns

bool

TryGetPubKey(KeyId, out PubKey)

public 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.

public bool TryGetScript(ScriptId scriptId, out Script script)

Parameters

scriptId ScriptId
script Script

Returns

bool

TryGetSecret(KeyId, out ISecret)

public bool TryGetSecret(KeyId keyId, out ISecret key)

Parameters

keyId KeyId
key ISecret

Returns

bool

TryGetSecret(TaprootPubKey, out ISecret)

public bool TryGetSecret(TaprootPubKey key, out ISecret secret)

Parameters

key TaprootPubKey
secret ISecret

Returns

bool

TryGetTaprootSpendInfo(TaprootPubKey, out TaprootSpendInfo)

public bool TryGetTaprootSpendInfo(TaprootPubKey taprootOutput, out TaprootSpendInfo spendInfo)

Parameters

taprootOutput TaprootPubKey
spendInfo TaprootSpendInfo

Returns

bool