@xoxno/types 1.0.393 → 1.0.395
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.
|
@@ -58,6 +58,7 @@ export declare class AggregatorSwapDto {
|
|
|
58
58
|
*/
|
|
59
59
|
export declare class BatchSwapDto {
|
|
60
60
|
paths: SwapPathDto[];
|
|
61
|
+
referralId?: number;
|
|
61
62
|
sender: string;
|
|
62
63
|
totalIn: string;
|
|
63
64
|
totalMinOut: string;
|
|
@@ -98,6 +99,7 @@ export declare class StellarAggregatorQuoteRequestDto {
|
|
|
98
99
|
includePaths?: boolean;
|
|
99
100
|
sender?: string;
|
|
100
101
|
router?: string;
|
|
102
|
+
referralId?: number;
|
|
101
103
|
platform?: StellarQuotePlatform;
|
|
102
104
|
fresh?: boolean;
|
|
103
105
|
}
|
|
@@ -115,7 +117,7 @@ export declare class StellarAggregatorQuoteRequestDto {
|
|
|
115
117
|
export declare class StellarQuoteSwapHopDto {
|
|
116
118
|
dex: SwapVenue;
|
|
117
119
|
kind: string;
|
|
118
|
-
|
|
120
|
+
address: string;
|
|
119
121
|
feeBps: number;
|
|
120
122
|
from: string;
|
|
121
123
|
tokenInKind: StellarTokenKind;
|
|
@@ -191,4 +193,11 @@ export declare class StellarAggregatorQuoteResponseDto {
|
|
|
191
193
|
transaction?: StellarQuoteTransactionPayloadDto;
|
|
192
194
|
platform: StellarQuotePlatform;
|
|
193
195
|
alternatives?: StellarQuoteAlternativeDto[];
|
|
196
|
+
feeBps?: number;
|
|
197
|
+
feeAmount?: string;
|
|
198
|
+
feeAmountShort?: number;
|
|
199
|
+
feeOnInput?: boolean;
|
|
200
|
+
amountInUsd?: number;
|
|
201
|
+
amountOutUsd?: number;
|
|
202
|
+
amountOutMinUsd?: number;
|
|
194
203
|
}
|
|
@@ -165,6 +165,17 @@ __decorate([
|
|
|
165
165
|
(0, class_transformer_1.Type)(() => SwapPathDto),
|
|
166
166
|
__metadata("design:type", Array)
|
|
167
167
|
], BatchSwapDto.prototype, "paths", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
(0, swagger_1.ApiProperty)({
|
|
170
|
+
description: 'Referral identifier. `0` (or omitted) means no referral and no fee — matches rs-aggregator MVX semantics. Non-zero IDs MUST be registered on-chain via `add_referral`; the router rejects unknown IDs at execution.',
|
|
171
|
+
example: 0,
|
|
172
|
+
required: false,
|
|
173
|
+
}),
|
|
174
|
+
(0, class_validator_1.IsOptional)(),
|
|
175
|
+
(0, class_validator_1.IsInt)(),
|
|
176
|
+
(0, class_validator_1.Min)(0),
|
|
177
|
+
__metadata("design:type", Number)
|
|
178
|
+
], BatchSwapDto.prototype, "referralId", void 0);
|
|
168
179
|
__decorate([
|
|
169
180
|
(0, swagger_1.ApiProperty)({
|
|
170
181
|
description: 'Account whose SAC balances fund the swap and receive the output. G-strkey for user-direct swaps, C-strkey when called by another contract.',
|
|
@@ -307,6 +318,17 @@ __decorate([
|
|
|
307
318
|
(0, class_validator_1.IsString)(),
|
|
308
319
|
__metadata("design:type", String)
|
|
309
320
|
], StellarAggregatorQuoteRequestDto.prototype, "router", void 0);
|
|
321
|
+
__decorate([
|
|
322
|
+
(0, swagger_1.ApiProperty)({
|
|
323
|
+
description: 'Referral identifier embedded into the envelope. `0` (default) means no referral / no fee. Non-zero IDs must be registered on-chain via `add_referral` or the contract reverts.',
|
|
324
|
+
required: false,
|
|
325
|
+
example: 0,
|
|
326
|
+
}),
|
|
327
|
+
(0, class_validator_1.IsOptional)(),
|
|
328
|
+
(0, class_validator_1.IsInt)(),
|
|
329
|
+
(0, class_validator_1.Min)(0),
|
|
330
|
+
__metadata("design:type", Number)
|
|
331
|
+
], StellarAggregatorQuoteRequestDto.prototype, "referralId", void 0);
|
|
310
332
|
__decorate([
|
|
311
333
|
(0, swagger_1.ApiProperty)({
|
|
312
334
|
description: 'Execution-plane filter.',
|
|
@@ -360,11 +382,11 @@ __decorate([
|
|
|
360
382
|
], StellarQuoteSwapHopDto.prototype, "kind", void 0);
|
|
361
383
|
__decorate([
|
|
362
384
|
(0, swagger_1.ApiProperty)({
|
|
363
|
-
description: 'Canonical pool identifier. C-strkey for Soroban pools, L-strkey for native AMM pools.',
|
|
385
|
+
description: 'Canonical pool identifier. C-strkey for Soroban pools, L-strkey for native AMM pools. Field name `address` mirrors MVX QuoteSwapResponse exactly so chain-agnostic clients can iterate hops without branching on chain.',
|
|
364
386
|
}),
|
|
365
387
|
(0, class_validator_1.IsString)(),
|
|
366
388
|
__metadata("design:type", String)
|
|
367
|
-
], StellarQuoteSwapHopDto.prototype, "
|
|
389
|
+
], StellarQuoteSwapHopDto.prototype, "address", void 0);
|
|
368
390
|
__decorate([
|
|
369
391
|
(0, swagger_1.ApiProperty)({ description: 'Pool fee in basis points.', example: 30 }),
|
|
370
392
|
(0, class_validator_1.IsInt)(),
|
|
@@ -696,3 +718,68 @@ __decorate([
|
|
|
696
718
|
(0, class_transformer_1.Type)(() => StellarQuoteAlternativeDto),
|
|
697
719
|
__metadata("design:type", Array)
|
|
698
720
|
], StellarAggregatorQuoteResponseDto.prototype, "alternatives", void 0);
|
|
721
|
+
__decorate([
|
|
722
|
+
(0, swagger_1.ApiProperty)({
|
|
723
|
+
description: 'Combined static + referral fee in basis points (1 bps = 0.01%) the router will charge for this swap. Absent when `referralId == 0` (no fee — matches rs-aggregator MVX semantics).',
|
|
724
|
+
required: false,
|
|
725
|
+
example: 30,
|
|
726
|
+
}),
|
|
727
|
+
(0, class_validator_1.IsOptional)(),
|
|
728
|
+
(0, class_validator_1.IsInt)(),
|
|
729
|
+
(0, class_validator_1.Min)(0),
|
|
730
|
+
__metadata("design:type", Number)
|
|
731
|
+
], StellarAggregatorQuoteResponseDto.prototype, "feeBps", void 0);
|
|
732
|
+
__decorate([
|
|
733
|
+
(0, swagger_1.ApiProperty)({
|
|
734
|
+
description: 'Fee amount the router will deduct (i128 string). Charged on the input token when `feeOnInput=true`, otherwise on the output token. The `amountOut` / `amountOutMin` fields already reflect this deduction.',
|
|
735
|
+
required: false,
|
|
736
|
+
}),
|
|
737
|
+
(0, class_validator_1.IsOptional)(),
|
|
738
|
+
(0, class_validator_1.IsString)(),
|
|
739
|
+
__metadata("design:type", String)
|
|
740
|
+
], StellarAggregatorQuoteResponseDto.prototype, "feeAmount", void 0);
|
|
741
|
+
__decorate([
|
|
742
|
+
(0, swagger_1.ApiProperty)({
|
|
743
|
+
description: 'Display value of `feeAmount` (decimals applied; loses precision above 2^53).',
|
|
744
|
+
required: false,
|
|
745
|
+
}),
|
|
746
|
+
(0, class_validator_1.IsOptional)(),
|
|
747
|
+
(0, class_validator_1.IsNumber)(),
|
|
748
|
+
__metadata("design:type", Number)
|
|
749
|
+
], StellarAggregatorQuoteResponseDto.prototype, "feeAmountShort", void 0);
|
|
750
|
+
__decorate([
|
|
751
|
+
(0, swagger_1.ApiProperty)({
|
|
752
|
+
description: '`true` if the fee is charged on the input token, `false` if charged on the output. Mirrors the contract\'s `fee_on_input = !out_whitelisted || in_whitelisted` rule.',
|
|
753
|
+
required: false,
|
|
754
|
+
}),
|
|
755
|
+
(0, class_validator_1.IsOptional)(),
|
|
756
|
+
(0, class_validator_1.IsBoolean)(),
|
|
757
|
+
__metadata("design:type", Boolean)
|
|
758
|
+
], StellarAggregatorQuoteResponseDto.prototype, "feeOnInput", void 0);
|
|
759
|
+
__decorate([
|
|
760
|
+
(0, swagger_1.ApiProperty)({
|
|
761
|
+
description: 'USD value of `amountIn`. Absent when the input token has no Reflector oracle price on the active network.',
|
|
762
|
+
required: false,
|
|
763
|
+
}),
|
|
764
|
+
(0, class_validator_1.IsOptional)(),
|
|
765
|
+
(0, class_validator_1.IsNumber)(),
|
|
766
|
+
__metadata("design:type", Number)
|
|
767
|
+
], StellarAggregatorQuoteResponseDto.prototype, "amountInUsd", void 0);
|
|
768
|
+
__decorate([
|
|
769
|
+
(0, swagger_1.ApiProperty)({
|
|
770
|
+
description: 'USD value of `amountOut`.',
|
|
771
|
+
required: false,
|
|
772
|
+
}),
|
|
773
|
+
(0, class_validator_1.IsOptional)(),
|
|
774
|
+
(0, class_validator_1.IsNumber)(),
|
|
775
|
+
__metadata("design:type", Number)
|
|
776
|
+
], StellarAggregatorQuoteResponseDto.prototype, "amountOutUsd", void 0);
|
|
777
|
+
__decorate([
|
|
778
|
+
(0, swagger_1.ApiProperty)({
|
|
779
|
+
description: 'USD value of `amountOutMin` (only set when `slippage` was requested and the output token has a price).',
|
|
780
|
+
required: false,
|
|
781
|
+
}),
|
|
782
|
+
(0, class_validator_1.IsOptional)(),
|
|
783
|
+
(0, class_validator_1.IsNumber)(),
|
|
784
|
+
__metadata("design:type", Number)
|
|
785
|
+
], StellarAggregatorQuoteResponseDto.prototype, "amountOutMinUsd", void 0);
|