@xoxno/sdk-js wraps the quote endpoint and builds the router call. It does not sign or submit. Server-prepared envelopes (transaction.simulated: true) already include the live source account sequence. When building a transaction locally with the SDK, supply sourceSequence yourself. Wallet signing and submission remain with the integrator.
Functions
The SDK has no default endpoint. Pass
baseUrl explicitly (https://stellar-swap.xoxno.com for the public service).
Swap from a wallet
quote.amountIn as totalIn. It is the gross input, including any input-side fee. The SDK builds this transaction itself, so you do not need to use the transaction.envelopeXdr the server can return when you pass sender. Use that envelope, or this builder, but not both.
Compose with lending
Passswap (or quote.routeXdr) as the strategy steps argument of the lending builders. Keep the payload opaque, and simulate the complete outer transaction. See Execution models.
Known differences from the API
Use@xoxno/sdk-js 1.0.222 or later. Earlier versions typed token entries with fields the service never returned and sent an ignored router parameter.
- Token IDs. Use canonical
C…contract IDs. The service rejectsXLMandCODE:ISSUERforms withinvalid_request. router. The service ignores arouterrequest field and uses the router from/api/v1/config. The SDK no longer sends it.alternatives. The@xoxno/typesresponse type still declares it, but the service no longer returns it.transactions[]. The SDK builds a single-swap transaction. For an LP conversion that returnstransactions[], follow the ordered plan procedure.simulate. Passsimulate: falseto skip server-side simulation when you send asender.

