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
indexulongThe 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
keyIndexuintThe index of the key to retrieve
typeBasepointTypeThe 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
indexuintThe 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
typeBasepointTypeThe type of basepoint associated with the private key
privKeyPrivKeyThe private key to store securely
StorePerCommitmentSeed(Secret)
Stores the per-commitment seed securely
void StorePerCommitmentSeed(Secret secret)
Parameters
secretSecretThe per-commitment secret to store