Table of Contents

Class SwapLinkSecret

Namespace
NArk.ArkadeIntents.Composition
Assembly
NArk.ArkadeIntents.dll

The client-owned secret that links otherwise independent swap quotes.

public sealed class SwapLinkSecret
Inheritance
SwapLinkSecret
Inherited Members

Remarks

A composed route reuses the payment hash, never the secret itself, across its quote requests. Keep one instance per payment-method attempt: sharing it between alternative checkout rails lets activity on one route settle another.

Properties

PaymentHash

SHA-256 of the preimage, encoded as 64 lowercase hexadecimal characters.

public string PaymentHash { get; }

Property Value

string

Methods

ExportPreimage()

Returns a defensive copy for a claim or protected persistence.

public byte[] ExportPreimage()

Returns

byte[]

FromPreimage(ReadOnlySpan<byte>)

Loads a route secret from a protected store.

public static SwapLinkSecret FromPreimage(ReadOnlySpan<byte> preimage)

Parameters

preimage ReadOnlySpan<byte>

Exactly 32 bytes. The caller's array is copied.

Returns

SwapLinkSecret

Generate()

Creates an independent random 32-byte route secret.

public static SwapLinkSecret Generate()

Returns

SwapLinkSecret