@xoxno/types 1.0.413 → 1.0.415

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.
@@ -0,0 +1,69 @@
1
+ import { LendingDataType } from '../../../enums/lending-data-type.enum';
2
+ import { GovernanceProposalKind, GovernanceProposalStatus, GovernanceProposalTarget } from '../../../enums/lending-governance.enum';
3
+ /**
4
+ * One decoded "what will change" row for a governance proposal, rendered as a
5
+ * label/value pair. The indexer formats these from the decoded operation args
6
+ * so the dashboard can show the proposed change without re-decoding ScVals.
7
+ */
8
+ export declare class GovernanceProposalField {
9
+ label: string;
10
+ value: string;
11
+ }
12
+ /**
13
+ * A timelock proposal on the Stellar lending governance contract.
14
+ *
15
+ * The contract stores only a single `readyLedger` per operation; the full
16
+ * operation (target/function/args/salt) lives in the `OperationScheduled`
17
+ * event. The indexer reconstructs it here so the dashboard can list proposals,
18
+ * show a ledger-based countdown, and rebuild the exact `execute` call from
19
+ * `argsXdr`.
20
+ *
21
+ * `status` is the coarse event-derived state (Pending/Executed/Cancelled).
22
+ * Waiting/Ready/Expired are DERIVED client-side from `readyLedger`,
23
+ * `expiresLedger`, and the current ledger — the contract has no on-chain
24
+ * "ready" or "expired" state.
25
+ */
26
+ export declare class LendingGovernanceProposalDoc {
27
+ dataType: LendingDataType;
28
+ operationId: string;
29
+ kind: GovernanceProposalKind;
30
+ status: GovernanceProposalStatus;
31
+ target: GovernanceProposalTarget;
32
+ targetAddress: string;
33
+ functionName: string;
34
+ argsXdr: string[];
35
+ salt: string;
36
+ predecessor: string;
37
+ proposer: string;
38
+ assetAddress?: string;
39
+ assetSymbol?: string;
40
+ summary: string;
41
+ fields: GovernanceProposalField[];
42
+ scheduledLedger: number;
43
+ readyLedger: number;
44
+ delayLedgers: number;
45
+ expiresLedger: number;
46
+ executedLedger?: number;
47
+ cancelledLedger?: number;
48
+ scheduledAt: number;
49
+ executedAt?: number;
50
+ cancelledAt?: number;
51
+ scheduledTxHash: string;
52
+ executedTxHash?: string;
53
+ cancelledTxHash?: string;
54
+ id: string;
55
+ pk: string;
56
+ _ts?: number;
57
+ constructor(props?: Partial<LendingGovernanceProposalDoc>);
58
+ }
59
+ declare const LendingGovernanceProposalQuery_base: {
60
+ new (resources: LendingGovernanceProposalDoc[], count: number | null, hasMoreResults: boolean, continuationToken?: string): {
61
+ resources: LendingGovernanceProposalDoc[];
62
+ count: number | null;
63
+ hasMoreResults: boolean;
64
+ continuationToken?: string;
65
+ };
66
+ };
67
+ export declare class LendingGovernanceProposalQuery extends LendingGovernanceProposalQuery_base {
68
+ }
69
+ export {};
@@ -0,0 +1,263 @@
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.LendingGovernanceProposalQuery = exports.LendingGovernanceProposalDoc = exports.GovernanceProposalField = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const lending_data_type_enum_1 = require("../../../enums/lending-data-type.enum");
15
+ const lending_governance_enum_1 = require("../../../enums/lending-governance.enum");
16
+ const cosmos_db_paginated_response_dto_1 = require("../../cosmos-db-paginated-response.dto");
17
+ /**
18
+ * One decoded "what will change" row for a governance proposal, rendered as a
19
+ * label/value pair. The indexer formats these from the decoded operation args
20
+ * so the dashboard can show the proposed change without re-decoding ScVals.
21
+ */
22
+ class GovernanceProposalField {
23
+ }
24
+ exports.GovernanceProposalField = GovernanceProposalField;
25
+ __decorate([
26
+ (0, swagger_1.ApiProperty)({ description: 'Field label', example: 'Loan-to-value' }),
27
+ __metadata("design:type", String)
28
+ ], GovernanceProposalField.prototype, "label", void 0);
29
+ __decorate([
30
+ (0, swagger_1.ApiProperty)({ description: 'Human-readable field value', example: '80.00%' }),
31
+ __metadata("design:type", String)
32
+ ], GovernanceProposalField.prototype, "value", void 0);
33
+ /**
34
+ * A timelock proposal on the Stellar lending governance contract.
35
+ *
36
+ * The contract stores only a single `readyLedger` per operation; the full
37
+ * operation (target/function/args/salt) lives in the `OperationScheduled`
38
+ * event. The indexer reconstructs it here so the dashboard can list proposals,
39
+ * show a ledger-based countdown, and rebuild the exact `execute` call from
40
+ * `argsXdr`.
41
+ *
42
+ * `status` is the coarse event-derived state (Pending/Executed/Cancelled).
43
+ * Waiting/Ready/Expired are DERIVED client-side from `readyLedger`,
44
+ * `expiresLedger`, and the current ledger — the contract has no on-chain
45
+ * "ready" or "expired" state.
46
+ */
47
+ class LendingGovernanceProposalDoc {
48
+ constructor(props) {
49
+ this.dataType = lending_data_type_enum_1.LendingDataType.GOVERNANCE_PROPOSAL;
50
+ this.fields = [];
51
+ Object.assign(this, props);
52
+ this.pk = this.dataType;
53
+ this.id = this.operationId;
54
+ }
55
+ }
56
+ exports.LendingGovernanceProposalDoc = LendingGovernanceProposalDoc;
57
+ __decorate([
58
+ (0, swagger_1.ApiProperty)({
59
+ enum: lending_data_type_enum_1.LendingDataType,
60
+ enumName: 'LendingDataType',
61
+ example: lending_data_type_enum_1.LendingDataType.GOVERNANCE_PROPOSAL,
62
+ }),
63
+ __metadata("design:type", Object)
64
+ ], LendingGovernanceProposalDoc.prototype, "dataType", void 0);
65
+ __decorate([
66
+ (0, swagger_1.ApiProperty)({
67
+ description: 'Operation id (keccak256 content hash), hex string',
68
+ example: 'ab12cd34ef56...',
69
+ }),
70
+ __metadata("design:type", String)
71
+ ], LendingGovernanceProposalDoc.prototype, "operationId", void 0);
72
+ __decorate([
73
+ (0, swagger_1.ApiProperty)({
74
+ enum: lending_governance_enum_1.GovernanceProposalKind,
75
+ enumName: 'GovernanceProposalKind',
76
+ description: 'Which change this proposal performs',
77
+ example: lending_governance_enum_1.GovernanceProposalKind.EditAssetConfig,
78
+ }),
79
+ __metadata("design:type", String)
80
+ ], LendingGovernanceProposalDoc.prototype, "kind", void 0);
81
+ __decorate([
82
+ (0, swagger_1.ApiProperty)({
83
+ enum: lending_governance_enum_1.GovernanceProposalStatus,
84
+ enumName: 'GovernanceProposalStatus',
85
+ description: 'Event-derived status. Waiting/Ready/Expired are derived client-side from ledger fields.',
86
+ example: lending_governance_enum_1.GovernanceProposalStatus.Pending,
87
+ }),
88
+ __metadata("design:type", String)
89
+ ], LendingGovernanceProposalDoc.prototype, "status", void 0);
90
+ __decorate([
91
+ (0, swagger_1.ApiProperty)({
92
+ enum: lending_governance_enum_1.GovernanceProposalTarget,
93
+ enumName: 'GovernanceProposalTarget',
94
+ description: 'Whether execution calls the controller or governance itself',
95
+ example: lending_governance_enum_1.GovernanceProposalTarget.Controller,
96
+ }),
97
+ __metadata("design:type", String)
98
+ ], LendingGovernanceProposalDoc.prototype, "target", void 0);
99
+ __decorate([
100
+ (0, swagger_1.ApiProperty)({
101
+ description: 'Contract address invoked on execute (controller or governance)',
102
+ }),
103
+ __metadata("design:type", String)
104
+ ], LendingGovernanceProposalDoc.prototype, "targetAddress", void 0);
105
+ __decorate([
106
+ (0, swagger_1.ApiProperty)({
107
+ description: 'Soroban function symbol invoked on execute',
108
+ example: 'edit_asset_config',
109
+ }),
110
+ __metadata("design:type", String)
111
+ ], LendingGovernanceProposalDoc.prototype, "functionName", void 0);
112
+ __decorate([
113
+ (0, swagger_1.ApiProperty)({
114
+ description: 'Base64 ScVal XDR per execute argument, in function-parameter order. Passed back verbatim to rebuild the execute call.',
115
+ isArray: true,
116
+ items: { type: 'string' },
117
+ }),
118
+ __metadata("design:type", Array)
119
+ ], LendingGovernanceProposalDoc.prototype, "argsXdr", void 0);
120
+ __decorate([
121
+ (0, swagger_1.ApiProperty)({ description: 'Operation salt, hex BytesN<32>' }),
122
+ __metadata("design:type", String)
123
+ ], LendingGovernanceProposalDoc.prototype, "salt", void 0);
124
+ __decorate([
125
+ (0, swagger_1.ApiProperty)({
126
+ description: 'Operation predecessor, hex BytesN<32> (zero = none)',
127
+ }),
128
+ __metadata("design:type", String)
129
+ ], LendingGovernanceProposalDoc.prototype, "predecessor", void 0);
130
+ __decorate([
131
+ (0, swagger_1.ApiProperty)({ description: 'Proposer account (G...) address' }),
132
+ __metadata("design:type", String)
133
+ ], LendingGovernanceProposalDoc.prototype, "proposer", void 0);
134
+ __decorate([
135
+ (0, swagger_1.ApiProperty)({
136
+ required: false,
137
+ description: 'Asset address this proposal concerns, when applicable',
138
+ }),
139
+ __metadata("design:type", String)
140
+ ], LendingGovernanceProposalDoc.prototype, "assetAddress", void 0);
141
+ __decorate([
142
+ (0, swagger_1.ApiProperty)({
143
+ required: false,
144
+ description: 'Resolved token symbol for assetAddress, when known',
145
+ example: 'USDC',
146
+ }),
147
+ __metadata("design:type", String)
148
+ ], LendingGovernanceProposalDoc.prototype, "assetSymbol", void 0);
149
+ __decorate([
150
+ (0, swagger_1.ApiProperty)({
151
+ description: 'One-line human summary of the proposed change',
152
+ example: 'Edit asset config for USDC',
153
+ }),
154
+ __metadata("design:type", String)
155
+ ], LendingGovernanceProposalDoc.prototype, "summary", void 0);
156
+ __decorate([
157
+ (0, swagger_1.ApiProperty)({
158
+ description: 'Decoded change as label/value rows',
159
+ isArray: true,
160
+ type: GovernanceProposalField,
161
+ }),
162
+ __metadata("design:type", Array)
163
+ ], LendingGovernanceProposalDoc.prototype, "fields", void 0);
164
+ __decorate([
165
+ (0, swagger_1.ApiProperty)({
166
+ type: 'integer',
167
+ description: 'Ledger at which the proposal was scheduled',
168
+ }),
169
+ __metadata("design:type", Number)
170
+ ], LendingGovernanceProposalDoc.prototype, "scheduledLedger", void 0);
171
+ __decorate([
172
+ (0, swagger_1.ApiProperty)({
173
+ type: 'integer',
174
+ description: 'Ledger at/after which execution is allowed (OperationLedger)',
175
+ }),
176
+ __metadata("design:type", Number)
177
+ ], LendingGovernanceProposalDoc.prototype, "readyLedger", void 0);
178
+ __decorate([
179
+ (0, swagger_1.ApiProperty)({ type: 'integer', description: 'Timelock delay in ledgers' }),
180
+ __metadata("design:type", Number)
181
+ ], LendingGovernanceProposalDoc.prototype, "delayLedgers", void 0);
182
+ __decorate([
183
+ (0, swagger_1.ApiProperty)({
184
+ type: 'integer',
185
+ description: 'Ledger after which the proposal expires and can no longer be executed (readyLedger + grace)',
186
+ }),
187
+ __metadata("design:type", Number)
188
+ ], LendingGovernanceProposalDoc.prototype, "expiresLedger", void 0);
189
+ __decorate([
190
+ (0, swagger_1.ApiProperty)({
191
+ type: 'integer',
192
+ required: false,
193
+ description: 'Ledger at which the proposal was executed',
194
+ }),
195
+ __metadata("design:type", Number)
196
+ ], LendingGovernanceProposalDoc.prototype, "executedLedger", void 0);
197
+ __decorate([
198
+ (0, swagger_1.ApiProperty)({
199
+ type: 'integer',
200
+ required: false,
201
+ description: 'Ledger at which the proposal was cancelled',
202
+ }),
203
+ __metadata("design:type", Number)
204
+ ], LendingGovernanceProposalDoc.prototype, "cancelledLedger", void 0);
205
+ __decorate([
206
+ (0, swagger_1.ApiProperty)({
207
+ type: 'integer',
208
+ description: 'Unix seconds when the proposal was scheduled',
209
+ }),
210
+ __metadata("design:type", Number)
211
+ ], LendingGovernanceProposalDoc.prototype, "scheduledAt", void 0);
212
+ __decorate([
213
+ (0, swagger_1.ApiProperty)({
214
+ type: 'integer',
215
+ required: false,
216
+ description: 'Unix seconds when executed',
217
+ }),
218
+ __metadata("design:type", Number)
219
+ ], LendingGovernanceProposalDoc.prototype, "executedAt", void 0);
220
+ __decorate([
221
+ (0, swagger_1.ApiProperty)({
222
+ type: 'integer',
223
+ required: false,
224
+ description: 'Unix seconds when cancelled',
225
+ }),
226
+ __metadata("design:type", Number)
227
+ ], LendingGovernanceProposalDoc.prototype, "cancelledAt", void 0);
228
+ __decorate([
229
+ (0, swagger_1.ApiProperty)({ description: 'Transaction hash of the schedule (propose) tx' }),
230
+ __metadata("design:type", String)
231
+ ], LendingGovernanceProposalDoc.prototype, "scheduledTxHash", void 0);
232
+ __decorate([
233
+ (0, swagger_1.ApiProperty)({
234
+ required: false,
235
+ description: 'Transaction hash of the execute tx',
236
+ }),
237
+ __metadata("design:type", String)
238
+ ], LendingGovernanceProposalDoc.prototype, "executedTxHash", void 0);
239
+ __decorate([
240
+ (0, swagger_1.ApiProperty)({
241
+ required: false,
242
+ description: 'Transaction hash of the cancel tx',
243
+ }),
244
+ __metadata("design:type", String)
245
+ ], LendingGovernanceProposalDoc.prototype, "cancelledTxHash", void 0);
246
+ __decorate([
247
+ (0, swagger_1.ApiProperty)({ description: 'Cosmos DB document identifier (= operationId)' }),
248
+ __metadata("design:type", String)
249
+ ], LendingGovernanceProposalDoc.prototype, "id", void 0);
250
+ __decorate([
251
+ (0, swagger_1.ApiProperty)({
252
+ description: 'Cosmos DB partition key',
253
+ example: 'governanceProposal',
254
+ }),
255
+ __metadata("design:type", String)
256
+ ], LendingGovernanceProposalDoc.prototype, "pk", void 0);
257
+ __decorate([
258
+ (0, swagger_1.ApiProperty)({ description: 'Cosmos DB timestamp', required: false }),
259
+ __metadata("design:type", Number)
260
+ ], LendingGovernanceProposalDoc.prototype, "_ts", void 0);
261
+ class LendingGovernanceProposalQuery extends (0, cosmos_db_paginated_response_dto_1.createCosmosPaginatedResponse)(LendingGovernanceProposalDoc) {
262
+ }
263
+ exports.LendingGovernanceProposalQuery = LendingGovernanceProposalQuery;
@@ -27,6 +27,7 @@ export * from "./lending-activity.enum";
27
27
  export * from "./lending-average.enum";
28
28
  export * from "./lending-data-type.enum";
29
29
  export * from "./lending-event-identifier.enum";
30
+ export * from "./lending-governance.enum";
30
31
  export * from "./lending-position-type.enum";
31
32
  export * from "./lending.enum";
32
33
  export * from "./linked-account-type.enum";
@@ -43,6 +43,7 @@ __exportStar(require("./lending-activity.enum"), exports);
43
43
  __exportStar(require("./lending-average.enum"), exports);
44
44
  __exportStar(require("./lending-data-type.enum"), exports);
45
45
  __exportStar(require("./lending-event-identifier.enum"), exports);
46
+ __exportStar(require("./lending-governance.enum"), exports);
46
47
  __exportStar(require("./lending-position-type.enum"), exports);
47
48
  __exportStar(require("./lending.enum"), exports);
48
49
  __exportStar(require("./linked-account-type.enum"), exports);
@@ -2,5 +2,6 @@ export declare enum LendingDataType {
2
2
  MARKET_PROFILE = "marketProfile",
3
3
  ACCOUNT_PROFILE = "accountProfile",
4
4
  EMODE_CATEGORY_PROFILE = "emodeCategoryProfile",
5
- TOKEN_EMODE_PROFILE = "tokenEmodeProfile"
5
+ TOKEN_EMODE_PROFILE = "tokenEmodeProfile",
6
+ GOVERNANCE_PROPOSAL = "governanceProposal"
6
7
  }
@@ -7,4 +7,5 @@ var LendingDataType;
7
7
  LendingDataType["ACCOUNT_PROFILE"] = "accountProfile";
8
8
  LendingDataType["EMODE_CATEGORY_PROFILE"] = "emodeCategoryProfile";
9
9
  LendingDataType["TOKEN_EMODE_PROFILE"] = "tokenEmodeProfile";
10
+ LendingDataType["GOVERNANCE_PROPOSAL"] = "governanceProposal";
10
11
  })(LendingDataType || (exports.LendingDataType = LendingDataType = {}));
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Stellar lending governance (timelock) proposal taxonomy.
3
+ *
4
+ * `GovernanceProposalKind` mirrors the `propose_*` entrypoints on the
5
+ * governance contract; the indexer maps an operation's invoked function symbol
6
+ * to one of these so the dashboard can title and group proposals.
7
+ */
8
+ export declare enum GovernanceProposalKind {
9
+ SetAggregator = "SetAggregator",
10
+ SetAccumulator = "SetAccumulator",
11
+ SetPoolTemplate = "SetPoolTemplate",
12
+ EditAssetConfig = "EditAssetConfig",
13
+ SetPositionLimits = "SetPositionLimits",
14
+ SetMinBorrowCollateral = "SetMinBorrowCollateral",
15
+ AddEModeCategory = "AddEModeCategory",
16
+ EditEModeCategory = "EditEModeCategory",
17
+ RemoveEModeCategory = "RemoveEModeCategory",
18
+ AddAssetToEModeCategory = "AddAssetToEModeCategory",
19
+ EditAssetInEModeCategory = "EditAssetInEModeCategory",
20
+ RemoveAssetFromEMode = "RemoveAssetFromEMode",
21
+ ApproveToken = "ApproveToken",
22
+ RevokeToken = "RevokeToken",
23
+ CreateLiquidityPool = "CreateLiquidityPool",
24
+ UpgradeLiquidityPoolParams = "UpgradeLiquidityPoolParams",
25
+ DeployPool = "DeployPool",
26
+ UpgradePool = "UpgradePool",
27
+ GrantControllerRole = "GrantControllerRole",
28
+ RevokeControllerRole = "RevokeControllerRole",
29
+ UpgradeController = "UpgradeController",
30
+ MigrateController = "MigrateController",
31
+ TransferControllerOwnership = "TransferControllerOwnership",
32
+ ConfigureMarketOracle = "ConfigureMarketOracle",
33
+ EditOracleTolerance = "EditOracleTolerance",
34
+ GovernanceUpgrade = "GovernanceUpgrade",
35
+ UpdateDelay = "UpdateDelay",
36
+ GrantGovernanceRole = "GrantGovernanceRole",
37
+ RevokeGovernanceRole = "RevokeGovernanceRole",
38
+ TransferGovernanceOwnership = "TransferGovernanceOwnership",
39
+ Unknown = "Unknown"
40
+ }
41
+ /**
42
+ * Coarse, event-derived proposal status. `Waiting`/`Ready`/`Expired` are NOT
43
+ * stored on-chain — clients derive them from `readyLedger`, `expiresLedger`,
44
+ * and the current ledger.
45
+ */
46
+ export declare enum GovernanceProposalStatus {
47
+ Pending = "Pending",
48
+ Executed = "Executed",
49
+ Cancelled = "Cancelled"
50
+ }
51
+ /**
52
+ * Whether executing the proposal invokes the lending controller (generic
53
+ * `execute`) or the governance contract itself (typed `execute_*`).
54
+ */
55
+ export declare enum GovernanceProposalTarget {
56
+ Controller = "Controller",
57
+ Governance = "Governance"
58
+ }
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GovernanceProposalTarget = exports.GovernanceProposalStatus = exports.GovernanceProposalKind = void 0;
4
+ /**
5
+ * Stellar lending governance (timelock) proposal taxonomy.
6
+ *
7
+ * `GovernanceProposalKind` mirrors the `propose_*` entrypoints on the
8
+ * governance contract; the indexer maps an operation's invoked function symbol
9
+ * to one of these so the dashboard can title and group proposals.
10
+ */
11
+ var GovernanceProposalKind;
12
+ (function (GovernanceProposalKind) {
13
+ GovernanceProposalKind["SetAggregator"] = "SetAggregator";
14
+ GovernanceProposalKind["SetAccumulator"] = "SetAccumulator";
15
+ GovernanceProposalKind["SetPoolTemplate"] = "SetPoolTemplate";
16
+ GovernanceProposalKind["EditAssetConfig"] = "EditAssetConfig";
17
+ GovernanceProposalKind["SetPositionLimits"] = "SetPositionLimits";
18
+ GovernanceProposalKind["SetMinBorrowCollateral"] = "SetMinBorrowCollateral";
19
+ GovernanceProposalKind["AddEModeCategory"] = "AddEModeCategory";
20
+ GovernanceProposalKind["EditEModeCategory"] = "EditEModeCategory";
21
+ GovernanceProposalKind["RemoveEModeCategory"] = "RemoveEModeCategory";
22
+ GovernanceProposalKind["AddAssetToEModeCategory"] = "AddAssetToEModeCategory";
23
+ GovernanceProposalKind["EditAssetInEModeCategory"] = "EditAssetInEModeCategory";
24
+ GovernanceProposalKind["RemoveAssetFromEMode"] = "RemoveAssetFromEMode";
25
+ GovernanceProposalKind["ApproveToken"] = "ApproveToken";
26
+ GovernanceProposalKind["RevokeToken"] = "RevokeToken";
27
+ GovernanceProposalKind["CreateLiquidityPool"] = "CreateLiquidityPool";
28
+ GovernanceProposalKind["UpgradeLiquidityPoolParams"] = "UpgradeLiquidityPoolParams";
29
+ GovernanceProposalKind["DeployPool"] = "DeployPool";
30
+ GovernanceProposalKind["UpgradePool"] = "UpgradePool";
31
+ GovernanceProposalKind["GrantControllerRole"] = "GrantControllerRole";
32
+ GovernanceProposalKind["RevokeControllerRole"] = "RevokeControllerRole";
33
+ GovernanceProposalKind["UpgradeController"] = "UpgradeController";
34
+ GovernanceProposalKind["MigrateController"] = "MigrateController";
35
+ GovernanceProposalKind["TransferControllerOwnership"] = "TransferControllerOwnership";
36
+ GovernanceProposalKind["ConfigureMarketOracle"] = "ConfigureMarketOracle";
37
+ GovernanceProposalKind["EditOracleTolerance"] = "EditOracleTolerance";
38
+ GovernanceProposalKind["GovernanceUpgrade"] = "GovernanceUpgrade";
39
+ GovernanceProposalKind["UpdateDelay"] = "UpdateDelay";
40
+ GovernanceProposalKind["GrantGovernanceRole"] = "GrantGovernanceRole";
41
+ GovernanceProposalKind["RevokeGovernanceRole"] = "RevokeGovernanceRole";
42
+ GovernanceProposalKind["TransferGovernanceOwnership"] = "TransferGovernanceOwnership";
43
+ GovernanceProposalKind["Unknown"] = "Unknown";
44
+ })(GovernanceProposalKind || (exports.GovernanceProposalKind = GovernanceProposalKind = {}));
45
+ /**
46
+ * Coarse, event-derived proposal status. `Waiting`/`Ready`/`Expired` are NOT
47
+ * stored on-chain — clients derive them from `readyLedger`, `expiresLedger`,
48
+ * and the current ledger.
49
+ */
50
+ var GovernanceProposalStatus;
51
+ (function (GovernanceProposalStatus) {
52
+ GovernanceProposalStatus["Pending"] = "Pending";
53
+ GovernanceProposalStatus["Executed"] = "Executed";
54
+ GovernanceProposalStatus["Cancelled"] = "Cancelled";
55
+ })(GovernanceProposalStatus || (exports.GovernanceProposalStatus = GovernanceProposalStatus = {}));
56
+ /**
57
+ * Whether executing the proposal invokes the lending controller (generic
58
+ * `execute`) or the governance contract itself (typed `execute_*`).
59
+ */
60
+ var GovernanceProposalTarget;
61
+ (function (GovernanceProposalTarget) {
62
+ GovernanceProposalTarget["Controller"] = "Controller";
63
+ GovernanceProposalTarget["Governance"] = "Governance";
64
+ })(GovernanceProposalTarget || (exports.GovernanceProposalTarget = GovernanceProposalTarget = {}));
@@ -13,8 +13,6 @@ export declare enum StellarLendingTopic {
13
13
  ConfigEModeCategory = "config:emode_category",
14
14
  ConfigEModeAsset = "config:emode_asset",
15
15
  ConfigRemoveEModeAsset = "config:remove_emode_asset",
16
- DebtCeilingUpdate = "debt:ceiling_update",
17
- DebtCeilingBatchUpdate = "debt:ceiling_batch_update",
18
16
  DebtBadDebt = "debt:bad_debt",
19
17
  StrategyInitialPayment = "strategy:initial_payment",
20
18
  ConfigApproveToken = "config:approve_token",
@@ -17,8 +17,6 @@ var StellarLendingTopic;
17
17
  StellarLendingTopic["ConfigEModeCategory"] = "config:emode_category";
18
18
  StellarLendingTopic["ConfigEModeAsset"] = "config:emode_asset";
19
19
  StellarLendingTopic["ConfigRemoveEModeAsset"] = "config:remove_emode_asset";
20
- StellarLendingTopic["DebtCeilingUpdate"] = "debt:ceiling_update";
21
- StellarLendingTopic["DebtCeilingBatchUpdate"] = "debt:ceiling_batch_update";
22
20
  StellarLendingTopic["DebtBadDebt"] = "debt:bad_debt";
23
21
  StellarLendingTopic["StrategyInitialPayment"] = "strategy:initial_payment";
24
22
  StellarLendingTopic["ConfigApproveToken"] = "config:approve_token";
package/dist/index.d.ts CHANGED
@@ -45,6 +45,7 @@ export * from './cosmos-db/documents/lending/lending-account-profile';
45
45
  export * from './cosmos-db/documents/lending/lending-account-summary';
46
46
  export * from './cosmos-db/documents/lending/lending-chain';
47
47
  export * from './cosmos-db/documents/lending/lending-emode-category-profile.doc';
48
+ export * from './cosmos-db/documents/lending/lending-governance-proposal.doc';
48
49
  export * from './cosmos-db/documents/lending/lending-market-profile.doc';
49
50
  export * from './cosmos-db/documents/lending/lending-nft-attributes';
50
51
  export * from './cosmos-db/documents/lending/lending-oracle';
@@ -210,6 +211,7 @@ export * from './requests/collection/pinned-collections';
210
211
  export * from './requests/collection/ranks';
211
212
  export * from './requests/collection/shareholder.dto';
212
213
  export * from './requests/lending/hatom-info.dto';
214
+ export * from './requests/lending/lending-governance-proposal.filter';
213
215
  export * from './requests/lending/lending-indexes.dto';
214
216
  export * from './requests/lending/lending-market-profile.filter';
215
217
  export * from './requests/lending/lending-token-price.dto';
package/dist/index.js CHANGED
@@ -61,6 +61,7 @@ __exportStar(require("./cosmos-db/documents/lending/lending-account-profile"), e
61
61
  __exportStar(require("./cosmos-db/documents/lending/lending-account-summary"), exports);
62
62
  __exportStar(require("./cosmos-db/documents/lending/lending-chain"), exports);
63
63
  __exportStar(require("./cosmos-db/documents/lending/lending-emode-category-profile.doc"), exports);
64
+ __exportStar(require("./cosmos-db/documents/lending/lending-governance-proposal.doc"), exports);
64
65
  __exportStar(require("./cosmos-db/documents/lending/lending-market-profile.doc"), exports);
65
66
  __exportStar(require("./cosmos-db/documents/lending/lending-nft-attributes"), exports);
66
67
  __exportStar(require("./cosmos-db/documents/lending/lending-oracle"), exports);
@@ -228,6 +229,7 @@ __exportStar(require("./enums/lending-activity.enum"), exports);
228
229
  __exportStar(require("./enums/lending-average.enum"), exports);
229
230
  __exportStar(require("./enums/lending-data-type.enum"), exports);
230
231
  __exportStar(require("./enums/lending-event-identifier.enum"), exports);
232
+ __exportStar(require("./enums/lending-governance.enum"), exports);
231
233
  __exportStar(require("./enums/lending-position-type.enum"), exports);
232
234
  __exportStar(require("./enums/lending.enum"), exports);
233
235
  __exportStar(require("./enums/linked-account-type.enum"), exports);
@@ -300,6 +302,7 @@ __exportStar(require("./requests/collection/pinned-collections"), exports);
300
302
  __exportStar(require("./requests/collection/ranks"), exports);
301
303
  __exportStar(require("./requests/collection/shareholder.dto"), exports);
302
304
  __exportStar(require("./requests/lending/hatom-info.dto"), exports);
305
+ __exportStar(require("./requests/lending/lending-governance-proposal.filter"), exports);
303
306
  __exportStar(require("./requests/lending/lending-indexes.dto"), exports);
304
307
  __exportStar(require("./requests/lending/lending-market-profile.filter"), exports);
305
308
  __exportStar(require("./requests/lending/lending-token-price.dto"), exports);
@@ -0,0 +1,20 @@
1
+ import { CosmosDbGenericFilter } from '../../cosmos-db/cosmos-db-generic-filter';
2
+ import { GovernanceProposalKind, GovernanceProposalStatus } from '../../enums/lending-governance.enum';
3
+ import { LendingGovernanceProposalDoc } from '../../cosmos-db/documents/lending/lending-governance-proposal.doc';
4
+ export declare class LendingGovernanceProposalFilterCriteriaDto {
5
+ status?: GovernanceProposalStatus[];
6
+ kind?: GovernanceProposalKind[];
7
+ proposer?: string[];
8
+ assetAddress?: string[];
9
+ }
10
+ export declare class LendingGovernanceProposalFilter extends CosmosDbGenericFilter<LendingGovernanceProposalDoc> {
11
+ filters: {
12
+ status?: GovernanceProposalStatus[];
13
+ kind?: GovernanceProposalKind[];
14
+ proposer?: string[];
15
+ assetAddress?: string[];
16
+ pk?: string;
17
+ };
18
+ includeCount?: boolean;
19
+ constructor(props?: Partial<LendingGovernanceProposalFilter>);
20
+ }
@@ -0,0 +1,71 @@
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.LendingGovernanceProposalFilter = exports.LendingGovernanceProposalFilterCriteriaDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const cosmos_db_generic_filter_1 = require("../../cosmos-db/cosmos-db-generic-filter");
15
+ const lending_data_type_enum_1 = require("../../enums/lending-data-type.enum");
16
+ const lending_governance_enum_1 = require("../../enums/lending-governance.enum");
17
+ class LendingGovernanceProposalFilterCriteriaDto {
18
+ }
19
+ exports.LendingGovernanceProposalFilterCriteriaDto = LendingGovernanceProposalFilterCriteriaDto;
20
+ __decorate([
21
+ (0, swagger_1.ApiProperty)({
22
+ required: false,
23
+ isArray: true,
24
+ enum: lending_governance_enum_1.GovernanceProposalStatus,
25
+ enumName: 'GovernanceProposalStatus',
26
+ }),
27
+ __metadata("design:type", Array)
28
+ ], LendingGovernanceProposalFilterCriteriaDto.prototype, "status", void 0);
29
+ __decorate([
30
+ (0, swagger_1.ApiProperty)({
31
+ required: false,
32
+ isArray: true,
33
+ enum: lending_governance_enum_1.GovernanceProposalKind,
34
+ enumName: 'GovernanceProposalKind',
35
+ }),
36
+ __metadata("design:type", Array)
37
+ ], LendingGovernanceProposalFilterCriteriaDto.prototype, "kind", void 0);
38
+ __decorate([
39
+ (0, swagger_1.ApiProperty)({ required: false, type: String, isArray: true }),
40
+ __metadata("design:type", Array)
41
+ ], LendingGovernanceProposalFilterCriteriaDto.prototype, "proposer", void 0);
42
+ __decorate([
43
+ (0, swagger_1.ApiProperty)({ required: false, type: String, isArray: true }),
44
+ __metadata("design:type", Array)
45
+ ], LendingGovernanceProposalFilterCriteriaDto.prototype, "assetAddress", void 0);
46
+ class LendingGovernanceProposalFilter extends cosmos_db_generic_filter_1.CosmosDbGenericFilter {
47
+ constructor(props) {
48
+ super(props);
49
+ this.filters = {
50
+ pk: lending_data_type_enum_1.LendingDataType.GOVERNANCE_PROPOSAL,
51
+ };
52
+ this.includeCount = false;
53
+ this.filters = {
54
+ ...this.filters,
55
+ ...props?.filters,
56
+ };
57
+ if (props) {
58
+ const { filters: _filters, ...otherProps } = props;
59
+ Object.assign(this, otherProps);
60
+ }
61
+ }
62
+ }
63
+ exports.LendingGovernanceProposalFilter = LendingGovernanceProposalFilter;
64
+ __decorate([
65
+ (0, swagger_1.ApiProperty)({ type: LendingGovernanceProposalFilterCriteriaDto }),
66
+ __metadata("design:type", Object)
67
+ ], LendingGovernanceProposalFilter.prototype, "filters", void 0);
68
+ __decorate([
69
+ (0, swagger_1.ApiProperty)({ required: false, type: 'boolean', default: false }),
70
+ __metadata("design:type", Boolean)
71
+ ], LendingGovernanceProposalFilter.prototype, "includeCount", void 0);
@@ -31,11 +31,8 @@ export declare class AssetConfigRawDto {
31
31
  liquidationFeesBps: number;
32
32
  isCollateralizable: boolean;
33
33
  isBorrowable: boolean;
34
- isIsolatedAsset: boolean;
35
34
  isSiloedBorrowing: boolean;
36
35
  isFlashloanable: boolean;
37
- isolationBorrowEnabled: boolean;
38
- isolationDebtCeilingUsdWad: string;
39
36
  flashloanFeeBps: number;
40
37
  borrowCap: string;
41
38
  supplyCap: string;
@@ -108,10 +108,6 @@ __decorate([
108
108
  (0, swagger_1.ApiProperty)({ description: 'Whether the asset can be borrowed' }),
109
109
  __metadata("design:type", Boolean)
110
110
  ], AssetConfigRawDto.prototype, "isBorrowable", void 0);
111
- __decorate([
112
- (0, swagger_1.ApiProperty)({ description: 'Whether the asset is an isolated collateral' }),
113
- __metadata("design:type", Boolean)
114
- ], AssetConfigRawDto.prototype, "isIsolatedAsset", void 0);
115
111
  __decorate([
116
112
  (0, swagger_1.ApiProperty)({ description: 'Whether the asset uses siloed borrowing' }),
117
113
  __metadata("design:type", Boolean)
@@ -120,18 +116,6 @@ __decorate([
120
116
  (0, swagger_1.ApiProperty)({ description: 'Whether the asset can be flash-loaned' }),
121
117
  __metadata("design:type", Boolean)
122
118
  ], AssetConfigRawDto.prototype, "isFlashloanable", void 0);
123
- __decorate([
124
- (0, swagger_1.ApiProperty)({
125
- description: 'Whether borrowing against the isolated asset is enabled',
126
- }),
127
- __metadata("design:type", Boolean)
128
- ], AssetConfigRawDto.prototype, "isolationBorrowEnabled", void 0);
129
- __decorate([
130
- (0, swagger_1.ApiProperty)({
131
- description: 'Isolation debt ceiling, USD WAD decimal string',
132
- }),
133
- __metadata("design:type", String)
134
- ], AssetConfigRawDto.prototype, "isolationDebtCeilingUsdWad", void 0);
135
119
  __decorate([
136
120
  (0, swagger_1.ApiProperty)({ type: 'integer', description: 'Flash-loan fee, bps' }),
137
121
  __metadata("design:type", Number)
@@ -16,10 +16,8 @@ export declare class StellarMarketStateSnapshot {
16
16
  }
17
17
  export declare class StellarEventAccountAttributes {
18
18
  owner: string;
19
- isIsolatedPosition: boolean;
20
19
  eModeCategoryId: number;
21
20
  mode: 'None' | 'Multiply' | 'Long' | 'Short';
22
- isolatedToken?: string;
23
21
  }
24
22
  export declare class StellarEventPositionDelta {
25
23
  action: string;
@@ -32,10 +30,6 @@ export declare class StellarEventPositionDelta {
32
30
  liquidationBonusBps?: number;
33
31
  loanToValueBps?: number;
34
32
  }
35
- export declare class StellarEventDebtCeilingEntry {
36
- asset: string;
37
- totalDebtUsdWad: string;
38
- }
39
33
  export declare class StellarEventEModeCategory {
40
34
  categoryId: number;
41
35
  loanToValueBps: number;
@@ -108,13 +102,6 @@ export declare class StellarRemoveEModeAssetEvent {
108
102
  asset: string;
109
103
  categoryId: number;
110
104
  }
111
- export declare class StellarUpdateDebtCeilingEvent {
112
- asset: string;
113
- totalDebtUsdWad: string;
114
- }
115
- export declare class StellarUpdateDebtCeilingBatchEvent {
116
- updates: StellarEventDebtCeilingEntry[];
117
- }
118
105
  export declare class StellarCleanBadDebtEvent {
119
106
  accountId: string;
120
107
  totalBorrowUsdWad: string;
@@ -184,12 +171,6 @@ export type StellarLendingDecodedEvent = {
184
171
  } | {
185
172
  topic: 'config:remove_emode_asset';
186
173
  data: StellarRemoveEModeAssetEvent;
187
- } | {
188
- topic: 'debt:ceiling_update';
189
- data: StellarUpdateDebtCeilingEvent;
190
- } | {
191
- topic: 'debt:ceiling_batch_update';
192
- data: StellarUpdateDebtCeilingBatchEvent;
193
174
  } | {
194
175
  topic: 'debt:bad_debt';
195
176
  data: StellarCleanBadDebtEvent;
@@ -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.StellarUpdateDebtCeilingBatchEvent = exports.StellarUpdateDebtCeilingEvent = 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.StellarEventDebtCeilingEntry = 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.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");
@@ -84,12 +84,6 @@ __decorate([
84
84
  (0, swagger_1.ApiProperty)({ type: String, description: 'Account owner at emission time' }),
85
85
  __metadata("design:type", String)
86
86
  ], StellarEventAccountAttributes.prototype, "owner", void 0);
87
- __decorate([
88
- (0, swagger_1.ApiProperty)({
89
- description: 'True when the account is bound to a single isolated collateral asset',
90
- }),
91
- __metadata("design:type", Boolean)
92
- ], StellarEventAccountAttributes.prototype, "isIsolatedPosition", void 0);
93
87
  __decorate([
94
88
  (0, swagger_1.ApiProperty)({
95
89
  type: 'integer',
@@ -105,14 +99,6 @@ __decorate([
105
99
  }),
106
100
  __metadata("design:type", String)
107
101
  ], StellarEventAccountAttributes.prototype, "mode", void 0);
108
- __decorate([
109
- (0, swagger_1.ApiProperty)({
110
- type: String,
111
- required: false,
112
- description: 'Isolated collateral asset when isIsolatedPosition',
113
- }),
114
- __metadata("design:type", String)
115
- ], StellarEventAccountAttributes.prototype, "isolatedToken", void 0);
116
102
  class StellarEventPositionDelta {
117
103
  }
118
104
  exports.StellarEventPositionDelta = StellarEventPositionDelta;
@@ -177,19 +163,6 @@ __decorate([
177
163
  }),
178
164
  __metadata("design:type", Number)
179
165
  ], StellarEventPositionDelta.prototype, "loanToValueBps", void 0);
180
- class StellarEventDebtCeilingEntry {
181
- }
182
- exports.StellarEventDebtCeilingEntry = StellarEventDebtCeilingEntry;
183
- __decorate([
184
- (0, swagger_1.ApiProperty)({ type: String, description: 'Isolated asset address' }),
185
- __metadata("design:type", String)
186
- ], StellarEventDebtCeilingEntry.prototype, "asset", void 0);
187
- __decorate([
188
- (0, swagger_1.ApiProperty)({
189
- description: 'Total isolated debt against the asset, USD WAD decimal string',
190
- }),
191
- __metadata("design:type", String)
192
- ], StellarEventDebtCeilingEntry.prototype, "totalDebtUsdWad", void 0);
193
166
  class StellarEventEModeCategory {
194
167
  }
195
168
  exports.StellarEventEModeCategory = StellarEventEModeCategory;
@@ -471,32 +444,6 @@ __decorate([
471
444
  (0, swagger_1.ApiProperty)({ type: 'integer', description: 'E-mode category id' }),
472
445
  __metadata("design:type", Number)
473
446
  ], StellarRemoveEModeAssetEvent.prototype, "categoryId", void 0);
474
- // ---------- topic: debt:ceiling_update ----------
475
- class StellarUpdateDebtCeilingEvent {
476
- }
477
- exports.StellarUpdateDebtCeilingEvent = StellarUpdateDebtCeilingEvent;
478
- __decorate([
479
- (0, swagger_1.ApiProperty)({ type: String, description: 'Isolated asset address' }),
480
- __metadata("design:type", String)
481
- ], StellarUpdateDebtCeilingEvent.prototype, "asset", void 0);
482
- __decorate([
483
- (0, swagger_1.ApiProperty)({
484
- description: 'Total isolated debt against the asset, USD WAD decimal string',
485
- }),
486
- __metadata("design:type", String)
487
- ], StellarUpdateDebtCeilingEvent.prototype, "totalDebtUsdWad", void 0);
488
- // ---------- topic: debt:ceiling_batch_update ----------
489
- class StellarUpdateDebtCeilingBatchEvent {
490
- }
491
- exports.StellarUpdateDebtCeilingBatchEvent = StellarUpdateDebtCeilingBatchEvent;
492
- __decorate([
493
- (0, swagger_1.ApiProperty)({
494
- type: StellarEventDebtCeilingEntry,
495
- isArray: true,
496
- description: 'Final isolated-debt totals for touched assets',
497
- }),
498
- __metadata("design:type", Array)
499
- ], StellarUpdateDebtCeilingBatchEvent.prototype, "updates", void 0);
500
447
  // ---------- topic: debt:bad_debt ----------
501
448
  class StellarCleanBadDebtEvent {
502
449
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xoxno/types",
3
- "version": "1.0.413",
3
+ "version": "1.0.415",
4
4
  "description": "Shared types and utilities for XOXNO API.",
5
5
  "exports": {
6
6
  ".": {