@xoxno/sdk-js 1.0.106 → 1.0.108

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,35 @@ 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;
29
+ /**
30
+ * Referral identifier embedded into the BatchSwap. Defaults to `0`
31
+ * (no referral / no fee — matches rs-aggregator MVX semantics).
32
+ * Non-zero IDs MUST be registered on-chain via `add_referral` or the
33
+ * router reverts at execution.
34
+ */
35
+ referralId?: number | string;
22
36
  }
23
37
  /**
24
38
  * Build an unsigned XDR for a direct user → aggregator router swap.
25
39
  *
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.
40
+ * The `swap` payload (paths + total-min-out) comes straight from the
41
+ * quote server; map a `StellarAggregatorQuoteResponseDto` to
42
+ * `AggregatorSwapDto` via `mapQuoteResponseToAggregatorSwap` before
43
+ * calling this. `opts.totalIn` is the authoritative input amount.
30
44
  */
31
45
  export declare function buildStellarBatchSwapTx(opts: StellarBatchSwapBuilderOptions, swap: AggregatorSwapDto): BuiltStellarTx;
32
46
  /**
33
47
  * 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).
48
+ * `AggregatorSwapDto`. Each path's `splitPpm` comes straight from the
49
+ * server; the single-path fallback (when `paths` is omitted) gets the
50
+ * full 1_000_000 weight.
37
51
  *
38
52
  * Throws if `amountOutMin` is missing — the controller refuses
39
53
  * 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.108",
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
  }