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
httpHttpClientThe client used for both endpoints.
baseAddressUriThe solver's base address. Optional when
httpalready 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
rfqIdstringThe correlation id.
cancellationTokenCancellationTokenCancels the round trip.
Returns
- Task<RfqStatus<TStatusProfile>>
The status, or
nullwhen the solver has no negotiation under that id.
Type Parameters
TStatusProfileThe 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
requestEvmSendRfqRequestStrict exact-input EVM send request.
cancellationTokenCancellationTokenCancels 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
requestRfqRequest<TRequestProfile>The request payload; strict, so it must carry no extra fields.
cancellationTokenCancellationTokenCancels the round trip.
Returns
Type Parameters
TRequestProfileThe corridor's request-profile shape.
TQuoteProfileThe 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.