@xoxno/types 1.0.478 → 1.0.480
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.
|
@@ -21,11 +21,12 @@ export declare class SwapHopDto {
|
|
|
21
21
|
/**
|
|
22
22
|
* One path in a (possibly multi-path) aggregator swap.
|
|
23
23
|
*
|
|
24
|
-
* `splitPpm` is parts-per-million of the
|
|
25
|
-
* to
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
24
|
+
* `splitPpm` is parts-per-million of the balance of this path's *starting*
|
|
25
|
+
* token allocated to the path. Paths that start from the same token form one
|
|
26
|
+
* group whose weights may not exceed 1_000_000; when a group routes its whole
|
|
27
|
+
* balance, the encoder lets the final leg sweep the remainder so ppm rounding
|
|
28
|
+
* strands nothing. Within a path, output of hop N feeds hop N+1 directly. The
|
|
29
|
+
* single `totalMinOut` guard at the payload level is the final slippage gate.
|
|
29
30
|
*/
|
|
30
31
|
export declare class SwapPathDto {
|
|
31
32
|
hops: SwapHopDto[];
|
|
@@ -46,9 +47,11 @@ export declare class StrategyPayloadDto {
|
|
|
46
47
|
totalMinOut: string;
|
|
47
48
|
}
|
|
48
49
|
/**
|
|
49
|
-
* Opaque strategy swap payload as returned by the quote server. `routeXdr`
|
|
50
|
-
*
|
|
51
|
-
*
|
|
50
|
+
* Opaque strategy swap payload as returned by the quote server. `routeXdr` is
|
|
51
|
+
* the base64 ScVal XDR of the router's compact wire form — an address registry,
|
|
52
|
+
* an amount registry, and a packed instruction stream that `StrategyPayloadDto`
|
|
53
|
+
* is lowered into. Callers pass the decoded bytes to `execute_strategy` or to a
|
|
54
|
+
* lending strategy method; they never build the wire form by hand.
|
|
52
55
|
*/
|
|
53
56
|
export declare class StrategySwapDto {
|
|
54
57
|
routeXdr: string;
|
|
@@ -78,11 +78,12 @@ __decorate([
|
|
|
78
78
|
/**
|
|
79
79
|
* One path in a (possibly multi-path) aggregator swap.
|
|
80
80
|
*
|
|
81
|
-
* `splitPpm` is parts-per-million of the
|
|
82
|
-
* to
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
81
|
+
* `splitPpm` is parts-per-million of the balance of this path's *starting*
|
|
82
|
+
* token allocated to the path. Paths that start from the same token form one
|
|
83
|
+
* group whose weights may not exceed 1_000_000; when a group routes its whole
|
|
84
|
+
* balance, the encoder lets the final leg sweep the remainder so ppm rounding
|
|
85
|
+
* strands nothing. Within a path, output of hop N feeds hop N+1 directly. The
|
|
86
|
+
* single `totalMinOut` guard at the payload level is the final slippage gate.
|
|
86
87
|
*/
|
|
87
88
|
class SwapPathDto {
|
|
88
89
|
}
|
|
@@ -101,7 +102,7 @@ __decorate([
|
|
|
101
102
|
], SwapPathDto.prototype, "hops", void 0);
|
|
102
103
|
__decorate([
|
|
103
104
|
(0, swagger_1.ApiProperty)({
|
|
104
|
-
description: 'Parts per million (ppm) of the
|
|
105
|
+
description: 'Parts per million (ppm) of the starting token balance to route through this path. Must be > 0; weights for paths sharing a starting token must not exceed 1_000_000, and must sum to exactly 1_000_000 unless the payload has a mint leg that consumes the remainder.',
|
|
105
106
|
example: 1000000,
|
|
106
107
|
}),
|
|
107
108
|
(0, class_validator_1.IsInt)(),
|
|
@@ -167,16 +168,18 @@ __decorate([
|
|
|
167
168
|
__metadata("design:type", String)
|
|
168
169
|
], StrategyPayloadDto.prototype, "totalMinOut", void 0);
|
|
169
170
|
/**
|
|
170
|
-
* Opaque strategy swap payload as returned by the quote server. `routeXdr`
|
|
171
|
-
*
|
|
172
|
-
*
|
|
171
|
+
* Opaque strategy swap payload as returned by the quote server. `routeXdr` is
|
|
172
|
+
* the base64 ScVal XDR of the router's compact wire form — an address registry,
|
|
173
|
+
* an amount registry, and a packed instruction stream that `StrategyPayloadDto`
|
|
174
|
+
* is lowered into. Callers pass the decoded bytes to `execute_strategy` or to a
|
|
175
|
+
* lending strategy method; they never build the wire form by hand.
|
|
173
176
|
*/
|
|
174
177
|
class StrategySwapDto {
|
|
175
178
|
}
|
|
176
179
|
exports.StrategySwapDto = StrategySwapDto;
|
|
177
180
|
__decorate([
|
|
178
181
|
(0, swagger_1.ApiProperty)({
|
|
179
|
-
description: 'Base64 ScVal XDR of `StrategyPayloadDto`, passed as Soroban `Bytes` to `execute_strategy(sender, total_in, swap_xdr)`.',
|
|
182
|
+
description: 'Base64 ScVal XDR of the lowered `StrategyPayloadDto`, passed as Soroban `Bytes` to `execute_strategy(sender, total_in, swap_xdr)`.',
|
|
180
183
|
example: 'AAAA...',
|
|
181
184
|
}),
|
|
182
185
|
(0, class_validator_1.IsString)(),
|
|
@@ -38,7 +38,21 @@ export interface StellarAssetListItem {
|
|
|
38
38
|
hubCount: number;
|
|
39
39
|
/** Number of reserves (spoke,hub) for this asset. */
|
|
40
40
|
marketCount: number;
|
|
41
|
+
/**
|
|
42
|
+
* The two underlying token SACs when this asset is an AMM LP share, so
|
|
43
|
+
* clients can render the pair (both leg logos) instead of one unresolvable
|
|
44
|
+
* logo for the share itself.
|
|
45
|
+
*
|
|
46
|
+
* Projected from the asset's indexed `LpShare` price source
|
|
47
|
+
* (`StellarAssetOracle.sources[]`). Present only when BOTH legs are
|
|
48
|
+
* `{ Token }` price keys — a `{ Ref }` leg is registry-only and has no SAC,
|
|
49
|
+
* so there is nothing to render. Consumers may therefore treat "present" as
|
|
50
|
+
* "renderable pair" with no partial case to handle.
|
|
51
|
+
*/
|
|
52
|
+
lpUnderlying?: StellarLpUnderlying;
|
|
41
53
|
}
|
|
54
|
+
/** The two leg SACs of an LP share, in the pool's `[keyA, keyB]` order. */
|
|
55
|
+
export type StellarLpUnderlying = [tokenA: string, tokenB: string];
|
|
42
56
|
/** One (spoke, hub) market row for an asset detail page. */
|
|
43
57
|
export interface StellarAssetPageMarket {
|
|
44
58
|
spokeId: number;
|