Table of Contents

Class HttpRfqTransport

Namespace
NArk.ArkadeIntents.Rfq
Assembly
NArk.ArkadeIntents.dll

The HTTP transport: POST /v1/swap for quotes, GET /v1/rfq/{rfq_id} for status.

public sealed class HttpRfqTransport : IRfqTransport
Inheritance
HttpRfqTransport
Implements
Inherited Members

Remarks

The payload is the contract and the HTTP envelope is not, so replies are dispatched on the body's type rather than the status code — a refusal is a refusal whether it arrives as 400 or 422. Unknown members are ignored throughout, per the tolerant-responses rule.

Constructors

HttpRfqTransport(HttpClient, Uri?)

Creates a transport pointed at one solver.

public HttpRfqTransport(HttpClient http, Uri? baseAddress = null)

Parameters

http HttpClient

The client used for both endpoints.

baseAddress Uri

The solver's base address. Optional when http already carries a BaseAddress.

Methods

GetStatusAsync<TStatusProfile>(string, CancellationToken)

Ask the solver where a negotiation stands.

public Task<RfqStatus<TStatusProfile>?> GetStatusAsync<TStatusProfile>(string rfqId, CancellationToken cancellationToken = default)

Parameters

rfqId string

The correlation id.

cancellationToken CancellationToken

Cancels the round trip.

Returns

Task<RfqStatus<TStatusProfile>>

The status, or null when the solver has no negotiation under that id.

Type Parameters

TStatusProfile

The corridor's status-profile shape.

Remarks

Best-effort by design — never the money path. A funded swap is observable on-chain whether or not the solver answers.

RequestEvmSendQuoteAsync(EvmSendRfqRequest, CancellationToken)

Asks for an Arkade-to-ERC20 quote using its current numeric-sats wire shape.

public Task<RfqQuote<EvmSendQuoteProfile>> RequestEvmSendQuoteAsync(EvmSendRfqRequest request, CancellationToken cancellationToken = default)

Parameters

request EvmSendRfqRequest

Strict exact-input EVM send request.

cancellationToken CancellationToken

Cancels the round trip.

Returns

Task<RfqQuote<EvmSendQuoteProfile>>

The solver's binding terms.

RequestQuoteAsync<TRequestProfile, TQuoteProfile>(RfqRequest<TRequestProfile>, CancellationToken)

Ask for a quote and return the solver's binding terms.

public Task<RfqQuote<TQuoteProfile>> RequestQuoteAsync<TRequestProfile, TQuoteProfile>(RfqRequest<TRequestProfile> request, CancellationToken cancellationToken = default)

Parameters

request RfqRequest<TRequestProfile>

The request payload; strict, so it must carry no extra fields.

cancellationToken CancellationToken

Cancels the round trip.

Returns

Task<RfqQuote<TQuoteProfile>>

The solver's quote for request.

Type Parameters

TRequestProfile

The corridor's request-profile shape.

TQuoteProfile

The corridor's quote-profile shape.

Exceptions

RfqRefusedException

The solver declined, with a reason from the closed set.

InvalidOperationException

The reply was neither a quote nor a refusal, or answered a different negotiation.