Table of Contents

Interface ISecretStorageService

Namespace
NLightning.Domain.Protocol.Interfaces
Assembly
NLightning.Domain.dll
public interface ISecretStorageService : IDisposable
Inherited Members

Methods

DeriveOldSecret(ulong)

Derives an old secret from a known higher-level secret

Secret DeriveOldSecret(ulong index)

Parameters

index ulong

The index of the secret

Returns

Secret

GetBasepointPrivateKey(uint, BasepointType)

Retrieves the private key associated with the specified basepoint type and key index

PrivKey GetBasepointPrivateKey(uint keyIndex, BasepointType type)

Parameters

keyIndex uint

The index of the key to retrieve

type BasepointType

The basepoint type for which the private key is required

Returns

PrivKey

The private key associated with the specified basepoint type and key index

GetPerCommitmentSeed()

Retrieves the per-commitment seed

Secret GetPerCommitmentSeed()

Returns

Secret

The per-commitment seed as a Secret

InsertSecret(Secret, ulong)

Inserts a new secret and verifies it against existing secrets

bool InsertSecret(Secret secret, ulong index)

Parameters

secret Secret

The secret to insert

index ulong

The index of the secret

Returns

bool

True if the secret was inserted successfully, false otherwise

LoadFromIndex(uint)

Loads secrets from persistent storage using the specified index

void LoadFromIndex(uint index)

Parameters

index uint

The index of the secrets to load

StoreBasepointPrivateKey(BasepointType, PrivKey)

Stores the private key for the specified basepoint type securely

void StoreBasepointPrivateKey(BasepointType type, PrivKey privKey)

Parameters

type BasepointType

The type of basepoint associated with the private key

privKey PrivKey

The private key to store securely

StorePerCommitmentSeed(Secret)

Stores the per-commitment seed securely

void StorePerCommitmentSeed(Secret secret)

Parameters

secret Secret

The per-commitment secret to store