Package-level declarations

Types

Link copied to clipboard

JSON canonicalization and digest computation utilities.

Link copied to clipboard
class ExpiringStore<T>(clock: Clock = Clock.systemUTC(), ttlMillis: Long, capacity: Int) : AutoCloseable

Bounded session storage with fixed TTL (reads do not extend secret retention).

Link copied to clipboard

JSON Canonicalization Scheme (JCS), RFC 8785.

Link copied to clipboard

Retry after capacity becomes available; map to HTTP 429 at application boundaries.

Functions

Link copied to clipboard
fun <T, R> List<Result<T>>.combine(transform: (List<T>) -> R): Result<R>

Combines multiple Results into a single Result containing a list of values.

Link copied to clipboard

Decodes this base58btc-encoded string to bytes.

Link copied to clipboard

Base58btc-encodes this byte array.

Link copied to clipboard

Gets the result value or throws a TrustWeaveException.

Link copied to clipboard
inline fun <T> Result<T>.mapError(transform: (Throwable) -> Throwable): Result<T>

Maps the error in a Result using the provided transform function. If the result is a failure, the error is transformed and wrapped in a new Result.

Link copied to clipboard
suspend fun <T, R> List<T>.mapSequential(transform: suspend (T) -> Result<R>): Result<List<R>>

Maps a list of items to Results and combines them sequentially.

Link copied to clipboard

JVM-only extension on ValidationResult for projecting an Invalid result onto the TrustWeave exception hierarchy. Lives here (not in the multiplatform ValidationResult class itself) because TrustWeaveException is still JVM-only.

Link copied to clipboard
inline suspend fun <T> trustweaveCatching(crossinline block: suspend () -> T): Result<T>

Executes a suspend block and automatically converts any exceptions to TrustWeaveException.