@xoxno/sdk-js 1.0.106 → 1.0.107

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,21 +19,28 @@ export interface StellarBatchSwapBuilderOptions extends StellarBuilderOptions {
19
19
  * resolved from `STELLAR_AGGREGATOR_ROUTER[network]`.
20
20
  */
21
21
  routerAddress?: string;
22
+ /**
23
+ * Total input amount the router will pull from `caller` once at the
24
+ * start of `batch_execute` (i128 decimal string). Per-path
25
+ * allocations are derived inside the router from each path's
26
+ * `splitPpm`. For a quote-derived swap, pass `quote.amountIn`.
27
+ */
28
+ totalIn: string;
22
29
  }
23
30
  /**
24
31
  * Build an unsigned XDR for a direct user → aggregator router swap.
25
32
  *
26
- * The `swap` payload (paths + per-path min-outs + total-min-out) comes
27
- * straight from the quote server; map a
28
- * `StellarAggregatorQuoteResponseDto` to `AggregatorSwapDto` via
29
- * `mapQuoteResponseToAggregatorSwap` before calling this.
33
+ * The `swap` payload (paths + total-min-out) comes straight from the
34
+ * quote server; map a `StellarAggregatorQuoteResponseDto` to
35
+ * `AggregatorSwapDto` via `mapQuoteResponseToAggregatorSwap` before
36
+ * calling this. `opts.totalIn` is the authoritative input amount.
30
37
  */
31
38
  export declare function buildStellarBatchSwapTx(opts: StellarBatchSwapBuilderOptions, swap: AggregatorSwapDto): BuiltStellarTx;
32
39
  /**
33
40
  * Translate a quote-server response into the controller-facing
34
- * `AggregatorSwapDto`. The mapping is purely a key rename plus the
35
- * fallback for single-path quotes that omit `paths` (we wrap the flat
36
- * `hops` list as a single path).
41
+ * `AggregatorSwapDto`. Each path's `splitPpm` comes straight from the
42
+ * server; the single-path fallback (when `paths` is omitted) gets the
43
+ * full 1_000_000 weight.
37
44
  *
38
45
  * Throws if `amountOutMin` is missing — the controller refuses
39
46
  * unbounded swaps so the SDK rejects them at the boundary.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xoxno/sdk-js",
3
- "version": "1.0.106",
3
+ "version": "1.0.107",
4
4
  "description": "The SDK to interact with the XOXNO Protocol!",
5
5
  "type": "module",
6
6
  "exports": {
@@ -94,6 +94,6 @@
94
94
  "@multiversx/sdk-core": "^15.3.2",
95
95
  "@multiversx/sdk-network-providers": "^2.9.3",
96
96
  "@stellar/stellar-sdk": "^15.0.1",
97
- "@xoxno/types": "^1.0.392"
97
+ "@xoxno/types": "^1.0.393"
98
98
  }
99
99
  }