Table of Contents

Class AzureConfidentialLedgerService

Namespace
NuvTools.Blockchain.Azure
Assembly
NuvTools.Blockchain.Azure.dll

Azure Confidential Ledger implementation of ILedgerService.

public class AzureConfidentialLedgerService : ILedgerService
Inheritance
AzureConfidentialLedgerService
Implements
Inherited Members

Constructors

AzureConfidentialLedgerService(IOptions<BlockchainSection>)

Azure Confidential Ledger implementation of ILedgerService.

public AzureConfidentialLedgerService(IOptions<BlockchainSection> options)

Parameters

options IOptions<BlockchainSection>

Methods

ReadAsync<T>(string, string?, int, int, CancellationToken)

Reads an entry from the ledger.

public Task<LedgerEntry<T>?> ReadAsync<T>(string transactionId, string? collectionId = null, int maxRetries = 10, int delayMilliseconds = 500, CancellationToken cancellationToken = default) where T : class

Parameters

transactionId string

The transaction ID to read.

collectionId string

Optional collection/sub-ledger identifier.

maxRetries int

Maximum retry attempts for pending entries.

delayMilliseconds int

Base delay between retries in milliseconds.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<LedgerEntry<T>>

The ledger entry if found; otherwise, null.

Type Parameters

T

The type of the entry content.

WriteAsync<T>(T, string?, CancellationToken)

Writes an entry to the ledger.

public Task<string> WriteAsync<T>(T entry, string? collectionId = null, CancellationToken cancellationToken = default) where T : class

Parameters

entry T

The entry to write.

collectionId string

Optional collection/sub-ledger identifier.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<string>

The transaction ID of the written entry.

Type Parameters

T

The type of the entry content.