@xoxno/types 1.0.470 → 1.0.473
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/common/kusto/lending-position-status.js +1 -1
- package/dist/cosmos-db/documents/lending/lending-oracle.d.ts +12 -11
- package/dist/cosmos-db/documents/lending/lending-oracle.js +19 -62
- package/dist/enums/lending-governance.enum.d.ts +26 -29
- package/dist/enums/lending-governance.enum.js +25 -28
- package/dist/enums/stellar-lending-topic.enum.d.ts +39 -4
- package/dist/enums/stellar-lending-topic.enum.js +39 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/requests/lending/defillama-lending-export.dto.d.ts +238 -0
- package/dist/requests/lending/defillama-lending-export.dto.js +862 -0
- package/dist/requests/lending/stellar-lending-events.dto.d.ts +37 -1
- package/dist/requests/lending/stellar-lending-events.dto.js +74 -11
- package/dist/stellar-lending/api-dto.d.ts +12 -3
- package/dist/stellar-lending/documents/asset.doc.d.ts +6 -2
- package/dist/stellar-lending/documents/asset.doc.js +4 -0
- package/dist/stellar-lending/documents/spoke-asset.doc.d.ts +2 -2
- package/dist/stellar-lending/documents/spoke-asset.doc.js +2 -1
- package/dist/stellar-lending/enums/activity.enum.d.ts +2 -0
- package/dist/stellar-lending/enums/activity.enum.js +2 -0
- package/dist/stellar-lending/enums/governance.enum.d.ts +28 -23
- package/dist/stellar-lending/enums/governance.enum.js +27 -22
- package/dist/stellar-lending/kusto/activity-data.d.ts +16 -1
- package/dist/stellar-lending/list.d.ts +1 -1
- package/dist/stellar-lending/live-state.d.ts +21 -1
- package/dist/stellar-lending/oracle-provider.d.ts +102 -33
- package/dist/stellar-lending/oracle-provider.js +8 -0
- package/package.json +1 -1
|
@@ -1,40 +1,109 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* Persistence / event shapes for the Stellar price-aggregator composable
|
|
3
|
+
* oracle model (`config:asset_oracle`).
|
|
4
|
+
*
|
|
5
|
+
* Mirrors on-chain `PriceKey` + `AssetOracle` (`sources`, independence,
|
|
6
|
+
* tolerance, sanity). `i128` → string; `u32/u64` → number. No Nest
|
|
7
|
+
* decorators — api-v2 owns swagger DTOs; this package owns wire shapes.
|
|
5
8
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
/** On-chain `PriceKey`: Token SAC or registry-only Ref symbol. */
|
|
10
|
+
export type StellarPriceKey = {
|
|
11
|
+
Token: string;
|
|
12
|
+
} | {
|
|
13
|
+
Ref: string;
|
|
14
|
+
};
|
|
15
|
+
/** On-chain `ProviderKind`. */
|
|
16
|
+
export type StellarProviderKind = 'Reflector' | 'RedStone' | 'Xoxno';
|
|
17
|
+
/** On-chain `FeedNature`. */
|
|
18
|
+
export type StellarFeedNature = 'Market' | 'Fundamental';
|
|
19
|
+
/** On-chain `OracleAssetRef` for Reflector legs. */
|
|
20
|
+
export type StellarOracleAssetRef = {
|
|
21
|
+
Stellar: string;
|
|
22
|
+
} | {
|
|
23
|
+
Symbol: string;
|
|
24
|
+
} | {
|
|
25
|
+
String: string;
|
|
26
|
+
};
|
|
27
|
+
/** On-chain `OracleReadMode`. */
|
|
28
|
+
export type StellarOracleReadMode = 'Spot' | {
|
|
29
|
+
Twap: number;
|
|
30
|
+
};
|
|
31
|
+
/** On-chain `OracleTolerance` (BPS band around 10000). */
|
|
32
|
+
export interface StellarOracleTolerance {
|
|
33
|
+
upperRatioBps: number;
|
|
34
|
+
lowerRatioBps: number;
|
|
35
|
+
}
|
|
36
|
+
export interface StellarReflectorFeedRef {
|
|
37
|
+
contract: string;
|
|
38
|
+
asset: StellarOracleAssetRef;
|
|
39
|
+
readMode: StellarOracleReadMode;
|
|
40
|
+
}
|
|
41
|
+
export interface StellarMultiFeedRef {
|
|
42
|
+
contract: string;
|
|
43
|
+
feedId: string;
|
|
44
|
+
kind: StellarProviderKind;
|
|
45
|
+
nature: StellarFeedNature;
|
|
46
|
+
}
|
|
47
|
+
/** On-chain `ProviderRef`. */
|
|
48
|
+
export type StellarProviderRef = {
|
|
49
|
+
Reflector: StellarReflectorFeedRef;
|
|
50
|
+
} | {
|
|
51
|
+
MultiFeed: StellarMultiFeedRef;
|
|
52
|
+
};
|
|
53
|
+
export interface StellarFeedSource {
|
|
54
|
+
provider: StellarProviderRef;
|
|
55
|
+
decimals: number;
|
|
56
|
+
maxStaleSeconds: number;
|
|
57
|
+
}
|
|
58
|
+
export interface StellarScaledSource {
|
|
59
|
+
factor: StellarFeedSource;
|
|
60
|
+
quote: StellarPriceKey;
|
|
61
|
+
minFactorWad: string;
|
|
62
|
+
maxFactorWad: string;
|
|
63
|
+
}
|
|
64
|
+
export type StellarPoolKind = 'ConstantProduct';
|
|
65
|
+
export interface StellarLpShareSource {
|
|
66
|
+
pool: string;
|
|
67
|
+
kind: StellarPoolKind;
|
|
68
|
+
keyA: StellarPriceKey;
|
|
69
|
+
keyB: StellarPriceKey;
|
|
70
|
+
reserveADecimals: number;
|
|
71
|
+
reserveBDecimals: number;
|
|
72
|
+
shareDecimals: number;
|
|
73
|
+
}
|
|
74
|
+
/** On-chain `PriceSource`. */
|
|
75
|
+
export type StellarPriceSource = {
|
|
76
|
+
Feed: StellarFeedSource;
|
|
77
|
+
} | {
|
|
78
|
+
Scaled: StellarScaledSource;
|
|
79
|
+
} | {
|
|
80
|
+
LpShare: StellarLpShareSource;
|
|
81
|
+
};
|
|
82
|
+
export interface StellarTrustDomain {
|
|
83
|
+
kind: StellarProviderKind;
|
|
84
|
+
contract: string;
|
|
85
|
+
}
|
|
86
|
+
/** On-chain `IndependencePolicy`. */
|
|
87
|
+
export type StellarIndependencePolicy = 'RequireDisjoint' | {
|
|
88
|
+
AllowShared: StellarTrustDomain[];
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* On-chain `AssetOracle` — one or two independent opinions for a `PriceKey`.
|
|
92
|
+
* Stored on `StellarAssetDoc.oracleProvider` and carried by
|
|
93
|
+
* `config:asset_oracle` events.
|
|
94
|
+
*/
|
|
95
|
+
export interface StellarAssetOracle {
|
|
14
96
|
assetDecimals: number;
|
|
15
97
|
maxPriceStaleSeconds: number;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
primarySymbol: string | null;
|
|
20
|
-
primaryFeedId: string | null;
|
|
21
|
-
primaryQuoteToken: string | null;
|
|
22
|
-
primaryReadMode: number;
|
|
23
|
-
primaryTwapRecords: number;
|
|
24
|
-
primaryDecimals: number;
|
|
25
|
-
primaryResolutionSeconds: number;
|
|
26
|
-
primaryMaxStaleSeconds: number;
|
|
27
|
-
anchorProvider: number | null;
|
|
28
|
-
anchorContract: string | null;
|
|
29
|
-
anchorAsset: string | null;
|
|
30
|
-
anchorSymbol: string | null;
|
|
31
|
-
anchorFeedId: string | null;
|
|
32
|
-
anchorQuoteToken: string | null;
|
|
33
|
-
anchorReadMode: number;
|
|
34
|
-
anchorTwapRecords: number;
|
|
35
|
-
anchorDecimals: number;
|
|
36
|
-
anchorResolutionSeconds: number;
|
|
37
|
-
anchorMaxStaleSeconds: number;
|
|
98
|
+
sources: StellarPriceSource[];
|
|
99
|
+
tolerance: StellarOracleTolerance;
|
|
100
|
+
independence: StellarIndependencePolicy;
|
|
38
101
|
minSanityPriceWad: string;
|
|
39
102
|
maxSanityPriceWad: string;
|
|
40
103
|
}
|
|
104
|
+
/**
|
|
105
|
+
* @deprecated Alias of {@link StellarAssetOracle}. Prefer `StellarAssetOracle`.
|
|
106
|
+
* Kept so existing imports continue to resolve while consumers migrate off the
|
|
107
|
+
* v1 primary/anchor flat projection.
|
|
108
|
+
*/
|
|
109
|
+
export type StellarOracleProvider = StellarAssetOracle;
|
|
@@ -1,2 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Persistence / event shapes for the Stellar price-aggregator composable
|
|
4
|
+
* oracle model (`config:asset_oracle`).
|
|
5
|
+
*
|
|
6
|
+
* Mirrors on-chain `PriceKey` + `AssetOracle` (`sources`, independence,
|
|
7
|
+
* tolerance, sanity). `i128` → string; `u32/u64` → number. No Nest
|
|
8
|
+
* decorators — api-v2 owns swagger DTOs; this package owns wire shapes.
|
|
9
|
+
*/
|
|
2
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|