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
ulongThe index of the secret
Returns
GetBasepointPrivateKey(uint, BasepointType)
Retrieves the private key associated with the specified basepoint type and key index
PrivKey GetBasepointPrivateKey(uint keyIndex, BasepointType type)
Parameters
keyIndex
uintThe index of the key to retrieve
type
BasepointTypeThe 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
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
uintThe 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
BasepointTypeThe type of basepoint associated with the private key
privKey
PrivKeyThe private key to store securely
StorePerCommitmentSeed(Secret)
Stores the per-commitment seed securely
void StorePerCommitmentSeed(Secret secret)
Parameters
secret
SecretThe per-commitment secret to store