Skip to content

SIPSolver

SIP Protocol API Reference v0.7.0


SIP Protocol API Reference / SIPSolver

Defined in: @sip-protocol/types/dist/index.d.ts:471

SIP Solver interface - what solvers must implement

Solvers receive intents with hidden sender/amount information and must fulfill output requirements based only on public data.

readonly info: Solver

Defined in: @sip-protocol/types/dist/index.d.ts:473

Solver information


readonly capabilities: SolverCapabilities

Defined in: @sip-protocol/types/dist/index.d.ts:475

Solver capabilities

canHandle(intent): Promise<boolean>

Defined in: @sip-protocol/types/dist/index.d.ts:482

Evaluate if solver can fulfill an intent

SolverVisibleIntent

Visible portion of the shielded intent

Promise<boolean>

true if solver can potentially fulfill, false otherwise


generateQuote(intent): Promise<SolverQuote | null>

Defined in: @sip-protocol/types/dist/index.d.ts:494

Generate a quote for fulfilling an intent

Solvers only see public fields - they cannot determine:

  • Who is sending
  • Exact input amount
  • Recipient’s real identity

SolverVisibleIntent

Visible portion of the shielded intent

Promise<SolverQuote | null>

Quote if solver can fulfill, null otherwise


fulfill(intent, quote): Promise<FulfillmentResult>

Defined in: @sip-protocol/types/dist/index.d.ts:502

Fulfill an intent after user accepts quote

ShieldedIntent

Full shielded intent (still privacy-preserving)

SolverQuote

The accepted quote

Promise<FulfillmentResult>

Fulfillment result with proof


optional cancel(intentId): Promise<boolean>

Defined in: @sip-protocol/types/dist/index.d.ts:509

Cancel a pending fulfillment

string

Intent to cancel

Promise<boolean>

true if cancelled, false if already fulfilled


optional getStatus(intentId): Promise<FulfillmentStatus | null>

Defined in: @sip-protocol/types/dist/index.d.ts:516

Get status of a fulfillment

string

Intent to check

Promise<FulfillmentStatus | null>

Current status or null if not found