@xoxno/types 1.0.421 → 1.0.423
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.
- package/dist/cosmos-db/documents/lending/lending-emode-category-profile.doc.d.ts +3 -3
- package/dist/cosmos-db/documents/lending/lending-emode-category-profile.doc.js +4 -0
- package/dist/cosmos-db/documents/lending/lending-token-emode-profile.doc.d.ts +4 -0
- package/dist/cosmos-db/documents/lending/lending-token-emode-profile.doc.js +32 -0
- package/dist/enums/lending-governance.enum.d.ts +1 -0
- package/dist/enums/lending-governance.enum.js +1 -0
- package/dist/enums/stellar-lending-topic.enum.d.ts +1 -0
- package/dist/enums/stellar-lending-topic.enum.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/requests/lending/blend.dto.d.ts +54 -0
- package/dist/requests/lending/blend.dto.js +169 -0
- package/dist/requests/lending/stellar-lending-admin-args.dto.d.ts +2 -2
- package/dist/requests/lending/stellar-lending-admin-args.dto.js +14 -12
- package/dist/requests/lending/stellar-lending-events.dto.d.ts +13 -1
- package/dist/requests/lending/stellar-lending-events.dto.js +41 -1
- package/package.json +1 -1
|
@@ -14,12 +14,12 @@ export declare class LendingEModeCategoryProfileDoc {
|
|
|
14
14
|
chain: ActivityChain;
|
|
15
15
|
constructor(props?: Partial<LendingEModeCategoryProfileDoc>);
|
|
16
16
|
}
|
|
17
|
-
declare type ShortLendingTokenEModeProfileDoc_base = Pick<LendingTokenEModeProfileDoc, "token" | "name" | "canBeCollateral" | "canBeBorrowed" | "eModeCategory" | "ltv" | "liquidationThreshold" | "liquidationBonus">;
|
|
17
|
+
declare type ShortLendingTokenEModeProfileDoc_base = Pick<LendingTokenEModeProfileDoc, "token" | "name" | "canBeCollateral" | "canBeBorrowed" | "eModeCategory" | "ltv" | "liquidationThreshold" | "liquidationBonus" | "supplyCap" | "borrowCap" | "suppliedScaledRay" | "borrowedScaledRay">;
|
|
18
18
|
export declare type ShortLendingTokenEModeProfileDoc = ShortLendingTokenEModeProfileDoc_base ;
|
|
19
|
-
declare const ShortLendingTokenEModeProfileDocNest_base: import("@nestjs/common").Type<Pick<LendingTokenEModeProfileDoc, "token" | "name" | "canBeCollateral" | "canBeBorrowed" | "eModeCategory" | "ltv" | "liquidationThreshold" | "liquidationBonus">>;
|
|
19
|
+
declare const ShortLendingTokenEModeProfileDocNest_base: import("@nestjs/common").Type<Pick<LendingTokenEModeProfileDoc, "token" | "name" | "canBeCollateral" | "canBeBorrowed" | "eModeCategory" | "ltv" | "liquidationThreshold" | "liquidationBonus" | "supplyCap" | "borrowCap" | "suppliedScaledRay" | "borrowedScaledRay">>;
|
|
20
20
|
export declare class ShortLendingTokenEModeProfileDocNest extends ShortLendingTokenEModeProfileDocNest_base {
|
|
21
21
|
}
|
|
22
22
|
export declare class LendingEModeCategoryProfile extends LendingEModeCategoryProfileDoc {
|
|
23
|
-
eModeTokenProfiles: Pick<LendingTokenEModeProfileDoc, 'token' | 'name' | 'canBeBorrowed' | 'canBeCollateral' | 'eModeCategory' | 'ltv' | 'liquidationThreshold' | 'liquidationBonus'>[];
|
|
23
|
+
eModeTokenProfiles: Pick<LendingTokenEModeProfileDoc, 'token' | 'name' | 'canBeBorrowed' | 'canBeCollateral' | 'eModeCategory' | 'ltv' | 'liquidationThreshold' | 'liquidationBonus' | 'supplyCap' | 'borrowCap' | 'suppliedScaledRay' | 'borrowedScaledRay'>[];
|
|
24
24
|
}
|
|
25
25
|
export {};
|
|
@@ -102,6 +102,10 @@ class ShortLendingTokenEModeProfileDoc extends (0, swagger_1.PickType)(lending_t
|
|
|
102
102
|
'ltv',
|
|
103
103
|
'liquidationThreshold',
|
|
104
104
|
'liquidationBonus',
|
|
105
|
+
'supplyCap',
|
|
106
|
+
'borrowCap',
|
|
107
|
+
'suppliedScaledRay',
|
|
108
|
+
'borrowedScaledRay',
|
|
105
109
|
]) {
|
|
106
110
|
}
|
|
107
111
|
exports.ShortLendingTokenEModeProfileDoc = ShortLendingTokenEModeProfileDoc;
|
|
@@ -10,6 +10,10 @@ export declare class LendingTokenEModeProfileDoc {
|
|
|
10
10
|
ltv?: string;
|
|
11
11
|
liquidationThreshold?: string;
|
|
12
12
|
liquidationBonus?: string;
|
|
13
|
+
supplyCap?: string;
|
|
14
|
+
borrowCap?: string;
|
|
15
|
+
suppliedScaledRay?: string;
|
|
16
|
+
borrowedScaledRay?: string;
|
|
13
17
|
id: string;
|
|
14
18
|
pk: string;
|
|
15
19
|
_ts: number;
|
|
@@ -92,6 +92,38 @@ __decorate([
|
|
|
92
92
|
}),
|
|
93
93
|
__metadata("design:type", String)
|
|
94
94
|
], LendingTokenEModeProfileDoc.prototype, "liquidationBonus", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, swagger_1.ApiProperty)({
|
|
97
|
+
description: 'Spoke supply cap in asset-native units (0 = uncapped). Stellar e-mode only.',
|
|
98
|
+
required: false,
|
|
99
|
+
example: '100000000000000',
|
|
100
|
+
}),
|
|
101
|
+
__metadata("design:type", String)
|
|
102
|
+
], LendingTokenEModeProfileDoc.prototype, "supplyCap", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, swagger_1.ApiProperty)({
|
|
105
|
+
description: 'Spoke borrow cap in asset-native units (0 = uncapped). Stellar e-mode only.',
|
|
106
|
+
required: false,
|
|
107
|
+
example: '100000000000000',
|
|
108
|
+
}),
|
|
109
|
+
__metadata("design:type", String)
|
|
110
|
+
], LendingTokenEModeProfileDoc.prototype, "borrowCap", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
(0, swagger_1.ApiProperty)({
|
|
113
|
+
description: 'Aggregate supplied scaled amount (RAY) tracked for this asset within the spoke. Stellar indexer only.',
|
|
114
|
+
required: false,
|
|
115
|
+
example: '0',
|
|
116
|
+
}),
|
|
117
|
+
__metadata("design:type", String)
|
|
118
|
+
], LendingTokenEModeProfileDoc.prototype, "suppliedScaledRay", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
(0, swagger_1.ApiProperty)({
|
|
121
|
+
description: 'Aggregate borrowed scaled amount (RAY) tracked for this asset within the spoke. Stellar indexer only.',
|
|
122
|
+
required: false,
|
|
123
|
+
example: '0',
|
|
124
|
+
}),
|
|
125
|
+
__metadata("design:type", String)
|
|
126
|
+
], LendingTokenEModeProfileDoc.prototype, "borrowedScaledRay", void 0);
|
|
95
127
|
__decorate([
|
|
96
128
|
(0, swagger_1.ApiProperty)({
|
|
97
129
|
description: 'Cosmos DB document identifier',
|
|
@@ -22,6 +22,7 @@ export declare enum GovernanceProposalKind {
|
|
|
22
22
|
RevokeToken = "RevokeToken",
|
|
23
23
|
CreateLiquidityPool = "CreateLiquidityPool",
|
|
24
24
|
UpgradeLiquidityPoolParams = "UpgradeLiquidityPoolParams",
|
|
25
|
+
UpdatePoolCaps = "UpdatePoolCaps",
|
|
25
26
|
DeployPool = "DeployPool",
|
|
26
27
|
UpgradePool = "UpgradePool",
|
|
27
28
|
GrantControllerRole = "GrantControllerRole",
|
|
@@ -26,6 +26,7 @@ var GovernanceProposalKind;
|
|
|
26
26
|
GovernanceProposalKind["RevokeToken"] = "RevokeToken";
|
|
27
27
|
GovernanceProposalKind["CreateLiquidityPool"] = "CreateLiquidityPool";
|
|
28
28
|
GovernanceProposalKind["UpgradeLiquidityPoolParams"] = "UpgradeLiquidityPoolParams";
|
|
29
|
+
GovernanceProposalKind["UpdatePoolCaps"] = "UpdatePoolCaps";
|
|
29
30
|
GovernanceProposalKind["DeployPool"] = "DeployPool";
|
|
30
31
|
GovernanceProposalKind["UpgradePool"] = "UpgradePool";
|
|
31
32
|
GovernanceProposalKind["GrantControllerRole"] = "GrantControllerRole";
|
|
@@ -6,6 +6,7 @@ export declare enum StellarLendingTopic {
|
|
|
6
6
|
MarketCreate = "market:create",
|
|
7
7
|
MarketParamsUpdate = "market:params_update",
|
|
8
8
|
MarketStateBatchUpdate = "market:batch_state_update",
|
|
9
|
+
MarketParamsBatchUpdate = "market:batch_params_update",
|
|
9
10
|
PositionBatchUpdate = "position:batch_update",
|
|
10
11
|
PositionFlashLoan = "position:flash_loan",
|
|
11
12
|
ConfigAsset = "config:asset",
|
|
@@ -10,6 +10,7 @@ var StellarLendingTopic;
|
|
|
10
10
|
StellarLendingTopic["MarketCreate"] = "market:create";
|
|
11
11
|
StellarLendingTopic["MarketParamsUpdate"] = "market:params_update";
|
|
12
12
|
StellarLendingTopic["MarketStateBatchUpdate"] = "market:batch_state_update";
|
|
13
|
+
StellarLendingTopic["MarketParamsBatchUpdate"] = "market:batch_params_update";
|
|
13
14
|
StellarLendingTopic["PositionBatchUpdate"] = "position:batch_update";
|
|
14
15
|
StellarLendingTopic["PositionFlashLoan"] = "position:flash_loan";
|
|
15
16
|
StellarLendingTopic["ConfigAsset"] = "config:asset";
|
package/dist/index.d.ts
CHANGED
|
@@ -210,6 +210,7 @@ export * from './requests/collection/listings';
|
|
|
210
210
|
export * from './requests/collection/pinned-collections';
|
|
211
211
|
export * from './requests/collection/ranks';
|
|
212
212
|
export * from './requests/collection/shareholder.dto';
|
|
213
|
+
export * from './requests/lending/blend.dto';
|
|
213
214
|
export * from './requests/lending/hatom-info.dto';
|
|
214
215
|
export * from './requests/lending/lending-governance-proposal.filter';
|
|
215
216
|
export * from './requests/lending/lending-indexes.dto';
|
package/dist/index.js
CHANGED
|
@@ -301,6 +301,7 @@ __exportStar(require("./requests/collection/listings"), exports);
|
|
|
301
301
|
__exportStar(require("./requests/collection/pinned-collections"), exports);
|
|
302
302
|
__exportStar(require("./requests/collection/ranks"), exports);
|
|
303
303
|
__exportStar(require("./requests/collection/shareholder.dto"), exports);
|
|
304
|
+
__exportStar(require("./requests/lending/blend.dto"), exports);
|
|
304
305
|
__exportStar(require("./requests/lending/hatom-info.dto"), exports);
|
|
305
306
|
__exportStar(require("./requests/lending/lending-governance-proposal.filter"), exports);
|
|
306
307
|
__exportStar(require("./requests/lending/lending-indexes.dto"), exports);
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Blend V2 → XOXNO migration detection types.
|
|
3
|
+
*
|
|
4
|
+
* A live read of a user's Blend pool position (`get_positions` → shares,
|
|
5
|
+
* converted to underlying via each reserve's 12-decimal `b_rate`/`d_rate`),
|
|
6
|
+
* annotated with whether each leg can migrate into the XOXNO controller.
|
|
7
|
+
*
|
|
8
|
+
* A debt leg is migratable only when the XOXNO market can flash-borrow it
|
|
9
|
+
* (zero-fee `create_strategy`): the asset is a borrowable market here AND the
|
|
10
|
+
* pool has enough free liquidity within its borrow cap / max utilization.
|
|
11
|
+
*/
|
|
12
|
+
/** Why a position leg cannot migrate into XOXNO. */
|
|
13
|
+
export type BlendMigrateBlockReason = 'not_a_market' | 'market_inactive' | 'not_collateralizable' | 'not_borrowable' | 'insufficient_liquidity' | 'borrow_cap' | 'max_utilization';
|
|
14
|
+
/** One asset leg of a Blend position, in underlying token units. */
|
|
15
|
+
export declare class BlendLeg {
|
|
16
|
+
token: string;
|
|
17
|
+
symbol: string;
|
|
18
|
+
decimals: number;
|
|
19
|
+
amount: string;
|
|
20
|
+
amountShort: number;
|
|
21
|
+
usd: number;
|
|
22
|
+
}
|
|
23
|
+
/** Per-leg migratability verdict. */
|
|
24
|
+
export declare class BlendLegMigratability {
|
|
25
|
+
token: string;
|
|
26
|
+
role: 'collateral' | 'supply' | 'debt';
|
|
27
|
+
migratable: boolean;
|
|
28
|
+
reason?: BlendMigrateBlockReason;
|
|
29
|
+
}
|
|
30
|
+
/** A user's full Blend position + XOXNO migratability annotations. */
|
|
31
|
+
export declare class BlendUserPosition {
|
|
32
|
+
address: string;
|
|
33
|
+
blendPool: string;
|
|
34
|
+
collateral: BlendLeg[];
|
|
35
|
+
supply: BlendLeg[];
|
|
36
|
+
debt: BlendLeg[];
|
|
37
|
+
legs: BlendLegMigratability[];
|
|
38
|
+
migratable: boolean;
|
|
39
|
+
empty: boolean;
|
|
40
|
+
}
|
|
41
|
+
/** One debt asset the migration repays via a zero-fee XOXNO flash borrow. */
|
|
42
|
+
export declare class BlendDebtCap {
|
|
43
|
+
token: string;
|
|
44
|
+
cap: string;
|
|
45
|
+
}
|
|
46
|
+
/** Chain-agnostic args for `migrate_from_blend`. */
|
|
47
|
+
export declare class MigrateFromBlendArgs {
|
|
48
|
+
blendPool: string;
|
|
49
|
+
accountId: string;
|
|
50
|
+
eModeCategory: number;
|
|
51
|
+
collateralTokens: string[];
|
|
52
|
+
supplyTokens: string[];
|
|
53
|
+
debtCaps: BlendDebtCap[];
|
|
54
|
+
}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.MigrateFromBlendArgs = exports.BlendDebtCap = exports.BlendUserPosition = exports.BlendLegMigratability = exports.BlendLeg = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const BLEND_BLOCK_REASONS = [
|
|
15
|
+
'not_a_market',
|
|
16
|
+
'market_inactive',
|
|
17
|
+
'not_collateralizable',
|
|
18
|
+
'not_borrowable',
|
|
19
|
+
'insufficient_liquidity',
|
|
20
|
+
'borrow_cap',
|
|
21
|
+
'max_utilization',
|
|
22
|
+
];
|
|
23
|
+
/** One asset leg of a Blend position, in underlying token units. */
|
|
24
|
+
class BlendLeg {
|
|
25
|
+
}
|
|
26
|
+
exports.BlendLeg = BlendLeg;
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, swagger_1.ApiProperty)({ description: 'Underlying asset contract address (SAC/SEP-41)' }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], BlendLeg.prototype, "token", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, swagger_1.ApiProperty)({ description: 'Asset symbol', example: 'XLM' }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], BlendLeg.prototype, "symbol", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, swagger_1.ApiProperty)({ description: 'Asset decimals', example: 7 }),
|
|
37
|
+
__metadata("design:type", Number)
|
|
38
|
+
], BlendLeg.prototype, "decimals", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, swagger_1.ApiProperty)({
|
|
41
|
+
description: 'Underlying amount in base units (decimal string)',
|
|
42
|
+
example: '5000000000',
|
|
43
|
+
}),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], BlendLeg.prototype, "amount", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, swagger_1.ApiProperty)({ description: 'Underlying amount, human-readable', example: 500 }),
|
|
48
|
+
__metadata("design:type", Number)
|
|
49
|
+
], BlendLeg.prototype, "amountShort", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, swagger_1.ApiProperty)({ description: 'USD value of the leg', example: 106.6 }),
|
|
52
|
+
__metadata("design:type", Number)
|
|
53
|
+
], BlendLeg.prototype, "usd", void 0);
|
|
54
|
+
/** Per-leg migratability verdict. */
|
|
55
|
+
class BlendLegMigratability {
|
|
56
|
+
}
|
|
57
|
+
exports.BlendLegMigratability = BlendLegMigratability;
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, swagger_1.ApiProperty)({ description: 'Underlying asset contract address' }),
|
|
60
|
+
__metadata("design:type", String)
|
|
61
|
+
], BlendLegMigratability.prototype, "token", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, swagger_1.ApiProperty)({ description: 'Position role on Blend', enum: ['collateral', 'supply', 'debt'] }),
|
|
64
|
+
__metadata("design:type", String)
|
|
65
|
+
], BlendLegMigratability.prototype, "role", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, swagger_1.ApiProperty)({ description: 'Whether this leg can migrate into XOXNO' }),
|
|
68
|
+
__metadata("design:type", Boolean)
|
|
69
|
+
], BlendLegMigratability.prototype, "migratable", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, swagger_1.ApiProperty)({
|
|
72
|
+
description: 'Why the leg is blocked (absent when migratable)',
|
|
73
|
+
enum: BLEND_BLOCK_REASONS,
|
|
74
|
+
required: false,
|
|
75
|
+
}),
|
|
76
|
+
__metadata("design:type", String)
|
|
77
|
+
], BlendLegMigratability.prototype, "reason", void 0);
|
|
78
|
+
/** A user's full Blend position + XOXNO migratability annotations. */
|
|
79
|
+
class BlendUserPosition {
|
|
80
|
+
}
|
|
81
|
+
exports.BlendUserPosition = BlendUserPosition;
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, swagger_1.ApiProperty)({ description: 'User address (Stellar G…)' }),
|
|
84
|
+
__metadata("design:type", String)
|
|
85
|
+
], BlendUserPosition.prototype, "address", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, swagger_1.ApiProperty)({ description: 'Blend pool contract address' }),
|
|
88
|
+
__metadata("design:type", String)
|
|
89
|
+
], BlendUserPosition.prototype, "blendPool", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, swagger_1.ApiProperty)({ type: () => BlendLeg, isArray: true }),
|
|
92
|
+
__metadata("design:type", Array)
|
|
93
|
+
], BlendUserPosition.prototype, "collateral", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, swagger_1.ApiProperty)({ type: () => BlendLeg, isArray: true }),
|
|
96
|
+
__metadata("design:type", Array)
|
|
97
|
+
], BlendUserPosition.prototype, "supply", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, swagger_1.ApiProperty)({ type: () => BlendLeg, isArray: true }),
|
|
100
|
+
__metadata("design:type", Array)
|
|
101
|
+
], BlendUserPosition.prototype, "debt", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, swagger_1.ApiProperty)({ type: () => BlendLegMigratability, isArray: true }),
|
|
104
|
+
__metadata("design:type", Array)
|
|
105
|
+
], BlendUserPosition.prototype, "legs", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
(0, swagger_1.ApiProperty)({
|
|
108
|
+
description: 'True when ≥1 leg is migratable AND every debt leg is flash-borrowable by XOXNO',
|
|
109
|
+
}),
|
|
110
|
+
__metadata("design:type", Boolean)
|
|
111
|
+
], BlendUserPosition.prototype, "migratable", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
(0, swagger_1.ApiProperty)({ description: 'True when the user holds no Blend position' }),
|
|
114
|
+
__metadata("design:type", Boolean)
|
|
115
|
+
], BlendUserPosition.prototype, "empty", void 0);
|
|
116
|
+
/** One debt asset the migration repays via a zero-fee XOXNO flash borrow. */
|
|
117
|
+
class BlendDebtCap {
|
|
118
|
+
}
|
|
119
|
+
exports.BlendDebtCap = BlendDebtCap;
|
|
120
|
+
__decorate([
|
|
121
|
+
(0, swagger_1.ApiProperty)({ description: 'Debt asset contract address' }),
|
|
122
|
+
__metadata("design:type", String)
|
|
123
|
+
], BlendDebtCap.prototype, "token", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
(0, swagger_1.ApiProperty)({
|
|
126
|
+
description: 'Repay cap in base units (decimal string); excess is refunded on-chain',
|
|
127
|
+
example: '200500000',
|
|
128
|
+
}),
|
|
129
|
+
__metadata("design:type", String)
|
|
130
|
+
], BlendDebtCap.prototype, "cap", void 0);
|
|
131
|
+
/** Chain-agnostic args for `migrate_from_blend`. */
|
|
132
|
+
class MigrateFromBlendArgs {
|
|
133
|
+
}
|
|
134
|
+
exports.MigrateFromBlendArgs = MigrateFromBlendArgs;
|
|
135
|
+
__decorate([
|
|
136
|
+
(0, swagger_1.ApiProperty)({ description: 'Blend pool contract address' }),
|
|
137
|
+
__metadata("design:type", String)
|
|
138
|
+
], MigrateFromBlendArgs.prototype, "blendPool", void 0);
|
|
139
|
+
__decorate([
|
|
140
|
+
(0, swagger_1.ApiProperty)({
|
|
141
|
+
description: 'Existing XOXNO account id, or "0" to create a new account',
|
|
142
|
+
example: '0',
|
|
143
|
+
}),
|
|
144
|
+
__metadata("design:type", String)
|
|
145
|
+
], MigrateFromBlendArgs.prototype, "accountId", void 0);
|
|
146
|
+
__decorate([
|
|
147
|
+
(0, swagger_1.ApiProperty)({ description: 'eMode category to enter (0 = none)', example: 0 }),
|
|
148
|
+
__metadata("design:type", Number)
|
|
149
|
+
], MigrateFromBlendArgs.prototype, "eModeCategory", void 0);
|
|
150
|
+
__decorate([
|
|
151
|
+
(0, swagger_1.ApiProperty)({
|
|
152
|
+
description: 'Collateral assets to withdraw from Blend and re-collateralize',
|
|
153
|
+
type: () => String,
|
|
154
|
+
isArray: true,
|
|
155
|
+
}),
|
|
156
|
+
__metadata("design:type", Array)
|
|
157
|
+
], MigrateFromBlendArgs.prototype, "collateralTokens", void 0);
|
|
158
|
+
__decorate([
|
|
159
|
+
(0, swagger_1.ApiProperty)({
|
|
160
|
+
description: 'Non-collateral supply assets to withdraw from Blend and re-supply',
|
|
161
|
+
type: () => String,
|
|
162
|
+
isArray: true,
|
|
163
|
+
}),
|
|
164
|
+
__metadata("design:type", Array)
|
|
165
|
+
], MigrateFromBlendArgs.prototype, "supplyTokens", void 0);
|
|
166
|
+
__decorate([
|
|
167
|
+
(0, swagger_1.ApiProperty)({ type: () => BlendDebtCap, isArray: true }),
|
|
168
|
+
__metadata("design:type", Array)
|
|
169
|
+
], MigrateFromBlendArgs.prototype, "debtCaps", void 0);
|
|
@@ -23,6 +23,8 @@ export declare class InterestRateModelDto {
|
|
|
23
23
|
export declare class MarketParamsRawDto extends InterestRateModelDto {
|
|
24
24
|
assetId: string;
|
|
25
25
|
assetDecimals: number;
|
|
26
|
+
supplyCap: string;
|
|
27
|
+
borrowCap: string;
|
|
26
28
|
}
|
|
27
29
|
export declare class AssetConfigRawDto {
|
|
28
30
|
loanToValueBps: number;
|
|
@@ -33,8 +35,6 @@ export declare class AssetConfigRawDto {
|
|
|
33
35
|
isBorrowable: boolean;
|
|
34
36
|
isFlashloanable: boolean;
|
|
35
37
|
flashloanFeeBps: number;
|
|
36
|
-
borrowCap: string;
|
|
37
|
-
supplyCap: string;
|
|
38
38
|
eModeCategories: number[];
|
|
39
39
|
}
|
|
40
40
|
export declare class PositionLimitsDto {
|
|
@@ -81,6 +81,20 @@ __decorate([
|
|
|
81
81
|
}),
|
|
82
82
|
__metadata("design:type", Number)
|
|
83
83
|
], MarketParamsRawDto.prototype, "assetDecimals", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, swagger_1.ApiProperty)({
|
|
86
|
+
description: 'Hub supply cap in asset-native units (0 = uncapped). Lives on the pool MarketParamsRaw.',
|
|
87
|
+
example: '100000000000000',
|
|
88
|
+
}),
|
|
89
|
+
__metadata("design:type", String)
|
|
90
|
+
], MarketParamsRawDto.prototype, "supplyCap", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, swagger_1.ApiProperty)({
|
|
93
|
+
description: 'Hub borrow cap in asset-native units (0 = uncapped). Lives on the pool MarketParamsRaw.',
|
|
94
|
+
example: '100000000000000',
|
|
95
|
+
}),
|
|
96
|
+
__metadata("design:type", String)
|
|
97
|
+
], MarketParamsRawDto.prototype, "borrowCap", void 0);
|
|
84
98
|
class AssetConfigRawDto {
|
|
85
99
|
}
|
|
86
100
|
exports.AssetConfigRawDto = AssetConfigRawDto;
|
|
@@ -116,18 +130,6 @@ __decorate([
|
|
|
116
130
|
(0, swagger_1.ApiProperty)({ type: 'integer', description: 'Flash-loan fee, bps' }),
|
|
117
131
|
__metadata("design:type", Number)
|
|
118
132
|
], AssetConfigRawDto.prototype, "flashloanFeeBps", void 0);
|
|
119
|
-
__decorate([
|
|
120
|
-
(0, swagger_1.ApiProperty)({
|
|
121
|
-
description: 'Borrow cap, asset units decimal string (0 = uncapped)',
|
|
122
|
-
}),
|
|
123
|
-
__metadata("design:type", String)
|
|
124
|
-
], AssetConfigRawDto.prototype, "borrowCap", void 0);
|
|
125
|
-
__decorate([
|
|
126
|
-
(0, swagger_1.ApiProperty)({
|
|
127
|
-
description: 'Supply cap, asset units decimal string (0 = uncapped)',
|
|
128
|
-
}),
|
|
129
|
-
__metadata("design:type", String)
|
|
130
|
-
], AssetConfigRawDto.prototype, "supplyCap", void 0);
|
|
131
133
|
__decorate([
|
|
132
134
|
(0, swagger_1.ApiProperty)({
|
|
133
135
|
type: 'integer',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AssetConfigRawDto } from './stellar-lending-admin-args.dto';
|
|
1
|
+
import { AssetConfigRawDto, MarketParamsRawDto } from './stellar-lending-admin-args.dto';
|
|
2
2
|
import { StellarLendingOracleUpdateStruct } from '../../cosmos-db/documents/lending/lending-oracle';
|
|
3
3
|
/**
|
|
4
4
|
* Decoded Stellar lending event payload types.
|
|
@@ -40,6 +40,8 @@ export declare class StellarEModeAssetConfig {
|
|
|
40
40
|
loanToValueBps: number;
|
|
41
41
|
liquidationThresholdBps: number;
|
|
42
42
|
liquidationBonusBps: number;
|
|
43
|
+
supplyCap: string;
|
|
44
|
+
borrowCap: string;
|
|
43
45
|
}
|
|
44
46
|
export declare class StellarCreateMarketEvent {
|
|
45
47
|
baseAsset: string;
|
|
@@ -67,6 +69,13 @@ export declare class StellarUpdateMarketParamsEvent {
|
|
|
67
69
|
maxUtilizationRay?: string;
|
|
68
70
|
reserveFactorBps: number;
|
|
69
71
|
}
|
|
72
|
+
export declare class StellarPoolMarketParamsUpdate {
|
|
73
|
+
asset: string;
|
|
74
|
+
params: MarketParamsRawDto;
|
|
75
|
+
}
|
|
76
|
+
export declare class StellarUpdateMarketParamsBatchEvent {
|
|
77
|
+
updates: StellarPoolMarketParamsUpdate[];
|
|
78
|
+
}
|
|
70
79
|
export declare class StellarUpdateMarketStateBatchEvent {
|
|
71
80
|
updates: StellarMarketStateSnapshot[];
|
|
72
81
|
}
|
|
@@ -150,6 +159,9 @@ export type StellarLendingDecodedEvent = {
|
|
|
150
159
|
} | {
|
|
151
160
|
topic: 'market:batch_state_update';
|
|
152
161
|
data: StellarUpdateMarketStateBatchEvent;
|
|
162
|
+
} | {
|
|
163
|
+
topic: 'market:batch_params_update';
|
|
164
|
+
data: StellarUpdateMarketParamsBatchEvent;
|
|
153
165
|
} | {
|
|
154
166
|
topic: 'position:batch_update';
|
|
155
167
|
data: StellarUpdatePositionBatchEvent;
|
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.StellarOracleTwapDegradedEvent = exports.StellarOracleDisabledEvent = exports.StellarUpdatePositionLimitsEvent = exports.StellarUpdatePoolTemplateEvent = exports.StellarUpdateAccumulatorEvent = exports.StellarUpdateAggregatorEvent = exports.StellarApproveTokenEvent = exports.StellarInitialMultiplyPaymentEvent = exports.StellarCleanBadDebtEvent = exports.StellarRemoveEModeAssetEvent = exports.StellarUpdateEModeAssetEvent = exports.StellarUpdateEModeCategoryEvent = exports.StellarUpdateAssetOracleEvent = exports.StellarUpdateAssetConfigEvent = exports.StellarFlashLoanEvent = exports.StellarUpdatePositionBatchEvent = exports.StellarUpdateMarketStateBatchEvent = exports.StellarUpdateMarketParamsEvent = exports.StellarCreateMarketEvent = exports.StellarEModeAssetConfig = exports.StellarEventEModeCategory = exports.StellarEventPositionDelta = exports.StellarEventAccountAttributes = exports.StellarMarketStateSnapshot = void 0;
|
|
12
|
+
exports.StellarOracleTwapDegradedEvent = exports.StellarOracleDisabledEvent = exports.StellarUpdatePositionLimitsEvent = exports.StellarUpdatePoolTemplateEvent = exports.StellarUpdateAccumulatorEvent = exports.StellarUpdateAggregatorEvent = exports.StellarApproveTokenEvent = exports.StellarInitialMultiplyPaymentEvent = exports.StellarCleanBadDebtEvent = exports.StellarRemoveEModeAssetEvent = exports.StellarUpdateEModeAssetEvent = exports.StellarUpdateEModeCategoryEvent = exports.StellarUpdateAssetOracleEvent = exports.StellarUpdateAssetConfigEvent = exports.StellarFlashLoanEvent = exports.StellarUpdatePositionBatchEvent = exports.StellarUpdateMarketStateBatchEvent = exports.StellarUpdateMarketParamsBatchEvent = exports.StellarPoolMarketParamsUpdate = exports.StellarUpdateMarketParamsEvent = exports.StellarCreateMarketEvent = exports.StellarEModeAssetConfig = exports.StellarEventEModeCategory = exports.StellarEventPositionDelta = exports.StellarEventAccountAttributes = exports.StellarMarketStateSnapshot = void 0;
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
14
|
const lending_enum_1 = require("../../enums/lending.enum");
|
|
15
15
|
const stellar_lending_admin_args_dto_1 = require("./stellar-lending-admin-args.dto");
|
|
@@ -210,6 +210,20 @@ __decorate([
|
|
|
210
210
|
}),
|
|
211
211
|
__metadata("design:type", Number)
|
|
212
212
|
], StellarEModeAssetConfig.prototype, "liquidationBonusBps", void 0);
|
|
213
|
+
__decorate([
|
|
214
|
+
(0, swagger_1.ApiProperty)({
|
|
215
|
+
description: 'Spoke supply cap in asset-native units (0 = uncapped). Enforced per e-mode category.',
|
|
216
|
+
example: '0',
|
|
217
|
+
}),
|
|
218
|
+
__metadata("design:type", String)
|
|
219
|
+
], StellarEModeAssetConfig.prototype, "supplyCap", void 0);
|
|
220
|
+
__decorate([
|
|
221
|
+
(0, swagger_1.ApiProperty)({
|
|
222
|
+
description: 'Spoke borrow cap in asset-native units (0 = uncapped). Enforced per e-mode category.',
|
|
223
|
+
example: '0',
|
|
224
|
+
}),
|
|
225
|
+
__metadata("design:type", String)
|
|
226
|
+
], StellarEModeAssetConfig.prototype, "borrowCap", void 0);
|
|
213
227
|
// ---------- topic: market:create ----------
|
|
214
228
|
class StellarCreateMarketEvent {
|
|
215
229
|
}
|
|
@@ -312,6 +326,32 @@ __decorate([
|
|
|
312
326
|
(0, swagger_1.ApiProperty)({ type: 'integer', description: 'Reserve factor, bps' }),
|
|
313
327
|
__metadata("design:type", Number)
|
|
314
328
|
], StellarUpdateMarketParamsEvent.prototype, "reserveFactorBps", void 0);
|
|
329
|
+
class StellarPoolMarketParamsUpdate {
|
|
330
|
+
}
|
|
331
|
+
exports.StellarPoolMarketParamsUpdate = StellarPoolMarketParamsUpdate;
|
|
332
|
+
__decorate([
|
|
333
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Pool asset address' }),
|
|
334
|
+
__metadata("design:type", String)
|
|
335
|
+
], StellarPoolMarketParamsUpdate.prototype, "asset", void 0);
|
|
336
|
+
__decorate([
|
|
337
|
+
(0, swagger_1.ApiProperty)({
|
|
338
|
+
type: stellar_lending_admin_args_dto_1.MarketParamsRawDto,
|
|
339
|
+
description: 'Full pool market params including hub caps',
|
|
340
|
+
}),
|
|
341
|
+
__metadata("design:type", stellar_lending_admin_args_dto_1.MarketParamsRawDto)
|
|
342
|
+
], StellarPoolMarketParamsUpdate.prototype, "params", void 0);
|
|
343
|
+
// ---------- topic: market:batch_params_update ----------
|
|
344
|
+
class StellarUpdateMarketParamsBatchEvent {
|
|
345
|
+
}
|
|
346
|
+
exports.StellarUpdateMarketParamsBatchEvent = StellarUpdateMarketParamsBatchEvent;
|
|
347
|
+
__decorate([
|
|
348
|
+
(0, swagger_1.ApiProperty)({
|
|
349
|
+
type: StellarPoolMarketParamsUpdate,
|
|
350
|
+
isArray: true,
|
|
351
|
+
description: 'Per-asset hub cap / params updates from the central pool',
|
|
352
|
+
}),
|
|
353
|
+
__metadata("design:type", Array)
|
|
354
|
+
], StellarUpdateMarketParamsBatchEvent.prototype, "updates", void 0);
|
|
315
355
|
// ---------- topic: market:batch_state_update ----------
|
|
316
356
|
class StellarUpdateMarketStateBatchEvent {
|
|
317
357
|
}
|