@sonarwatch/portfolio-plugins 0.14.143 → 0.14.144
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/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/src/plugins/banx/constants.d.ts +14 -8
- package/src/plugins/banx/constants.js +25 -13
- package/src/plugins/banx/constants.js.map +1 -1
- package/src/plugins/banx/index.js +12 -2
- package/src/plugins/banx/index.js.map +1 -1
- package/src/plugins/banx/loansFetcher.js +108 -123
- package/src/plugins/banx/loansFetcher.js.map +1 -1
- package/src/plugins/banx/marketsJob.js +40 -0
- package/src/plugins/banx/marketsJob.js.map +1 -0
- package/src/plugins/banx/offersFetcher.js +61 -70
- package/src/plugins/banx/offersFetcher.js.map +1 -1
- package/src/plugins/banx/stakingFetcher.js +6 -3
- package/src/plugins/banx/stakingFetcher.js.map +1 -1
- package/src/plugins/banx/structs.d.ts +222 -2
- package/src/plugins/banx/structs.js +216 -2
- package/src/plugins/banx/structs.js.map +1 -1
- package/src/plugins/banx/types.d.ts +50 -258
- package/src/plugins/banx/vaultsFetcher.d.ts +3 -0
- package/src/plugins/banx/vaultsFetcher.js +74 -0
- package/src/plugins/banx/vaultsFetcher.js.map +1 -0
- package/src/plugins/banx/vaultsJob.d.ts +3 -0
- package/src/plugins/banx/{collectionsJob.js → vaultsJob.js} +5 -16
- package/src/plugins/banx/vaultsJob.js.map +1 -0
- package/src/plugins/banx/collectionsJob.js.map +0 -1
- package/src/plugins/banx/filters.d.ts +0 -6
- package/src/plugins/banx/filters.js +0 -39
- package/src/plugins/banx/filters.js.map +0 -1
- package/src/plugins/banx/helpers.d.ts +0 -5
- package/src/plugins/banx/helpers.js +0 -64
- package/src/plugins/banx/helpers.js.map +0 -1
- package/src/plugins/banx/idl.d.ts +0 -123
- package/src/plugins/banx/idl.js +0 -2187
- package/src/plugins/banx/idl.js.map +0 -1
- /package/src/plugins/banx/{collectionsJob.d.ts → marketsJob.d.ts} +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.banxTokenStakeStruct = exports.BanxTokenStakeState = void 0;
|
3
|
+
exports.banxPoolUserDepositStruct = exports.BanxPoolUserDepositState = exports.banxPoolMarketSettingsStruct = exports.banxPoolStruct = exports.FraktbondStruct = exports.Fraktbondstate = exports.bondOfferv3Struct = exports.bondOfferBondingCurveStruct = exports.Bondtradetransactionv3Struct = exports.banxTokenStakeStruct = exports.BondFeatures = exports.BondOfferBondingCurveType = exports.PairState = exports.RepayDestination = exports.LendingTokenType = exports.RedeemResult = exports.BondtradeTransactionv2State = exports.Bondtradetransactionv2type = exports.BanxTokenStakeState = void 0;
|
4
4
|
const beet_1 = require("@metaplex-foundation/beet");
|
5
5
|
const beet_solana_1 = require("@metaplex-foundation/beet-solana");
|
6
6
|
const solana_1 = require("../../utils/solana");
|
@@ -10,8 +10,96 @@ var BanxTokenStakeState;
|
|
10
10
|
BanxTokenStakeState[BanxTokenStakeState["Staked"] = 1] = "Staked";
|
11
11
|
BanxTokenStakeState[BanxTokenStakeState["Unstaked"] = 2] = "Unstaked";
|
12
12
|
})(BanxTokenStakeState || (exports.BanxTokenStakeState = BanxTokenStakeState = {}));
|
13
|
+
var Bondtradetransactionv2type;
|
14
|
+
(function (Bondtradetransactionv2type) {
|
15
|
+
Bondtradetransactionv2type[Bondtradetransactionv2type["None"] = 0] = "None";
|
16
|
+
Bondtradetransactionv2type[Bondtradetransactionv2type["Autocompound"] = 1] = "Autocompound";
|
17
|
+
Bondtradetransactionv2type[Bondtradetransactionv2type["Receivenftonliquidation"] = 2] = "Receivenftonliquidation";
|
18
|
+
Bondtradetransactionv2type[Bondtradetransactionv2type["Autoreceivesol"] = 3] = "Autoreceivesol";
|
19
|
+
Bondtradetransactionv2type[Bondtradetransactionv2type["Autocompoundandreceivenft"] = 4] = "Autocompoundandreceivenft";
|
20
|
+
Bondtradetransactionv2type[Bondtradetransactionv2type["Autoreceiveandreceivenft"] = 5] = "Autoreceiveandreceivenft";
|
21
|
+
Bondtradetransactionv2type[Bondtradetransactionv2type["Autoreceiveandreceivespl"] = 6] = "Autoreceiveandreceivespl";
|
22
|
+
})(Bondtradetransactionv2type || (exports.Bondtradetransactionv2type = Bondtradetransactionv2type = {}));
|
23
|
+
var BondtradeTransactionv2State;
|
24
|
+
(function (BondtradeTransactionv2State) {
|
25
|
+
BondtradeTransactionv2State[BondtradeTransactionv2State["Notactive"] = 0] = "Notactive";
|
26
|
+
BondtradeTransactionv2State[BondtradeTransactionv2State["Active"] = 1] = "Active";
|
27
|
+
BondtradeTransactionv2State[BondtradeTransactionv2State["Perpetualactive"] = 2] = "Perpetualactive";
|
28
|
+
BondtradeTransactionv2State[BondtradeTransactionv2State["Perpetualrepaid"] = 3] = "Perpetualrepaid";
|
29
|
+
BondtradeTransactionv2State[BondtradeTransactionv2State["Perpetualliquidatedbyauction"] = 4] = "Perpetualliquidatedbyauction";
|
30
|
+
BondtradeTransactionv2State[BondtradeTransactionv2State["Perpetualliquidatedbyclaim"] = 5] = "Perpetualliquidatedbyclaim";
|
31
|
+
BondtradeTransactionv2State[BondtradeTransactionv2State["Perpetualmanualterminating"] = 6] = "Perpetualmanualterminating";
|
32
|
+
BondtradeTransactionv2State[BondtradeTransactionv2State["Perpetualpartialrepaid"] = 7] = "Perpetualpartialrepaid";
|
33
|
+
BondtradeTransactionv2State[BondtradeTransactionv2State["Perpetualrefinancerepaid"] = 8] = "Perpetualrefinancerepaid";
|
34
|
+
BondtradeTransactionv2State[BondtradeTransactionv2State["Perpetualrefinancedactive"] = 9] = "Perpetualrefinancedactive";
|
35
|
+
BondtradeTransactionv2State[BondtradeTransactionv2State["Migrated"] = 10] = "Migrated";
|
36
|
+
BondtradeTransactionv2State[BondtradeTransactionv2State["Perpetualborrowerlisting"] = 11] = "Perpetualborrowerlisting";
|
37
|
+
BondtradeTransactionv2State[BondtradeTransactionv2State["Perpetuallenderlisting"] = 12] = "Perpetuallenderlisting";
|
38
|
+
BondtradeTransactionv2State[BondtradeTransactionv2State["Perpetualsellingloan"] = 13] = "Perpetualsellingloan";
|
39
|
+
BondtradeTransactionv2State[BondtradeTransactionv2State["Perpetualsellinglisting"] = 14] = "Perpetualsellinglisting";
|
40
|
+
BondtradeTransactionv2State[BondtradeTransactionv2State["Perpetualsellinglistingclosed"] = 15] = "Perpetualsellinglistingclosed";
|
41
|
+
BondtradeTransactionv2State[BondtradeTransactionv2State["Perpetualaddcollateralclosed"] = 16] = "Perpetualaddcollateralclosed";
|
42
|
+
})(BondtradeTransactionv2State || (exports.BondtradeTransactionv2State = BondtradeTransactionv2State = {}));
|
43
|
+
var RedeemResult;
|
44
|
+
(function (RedeemResult) {
|
45
|
+
RedeemResult[RedeemResult["None"] = 0] = "None";
|
46
|
+
RedeemResult[RedeemResult["Directborrow"] = 1] = "Directborrow";
|
47
|
+
RedeemResult[RedeemResult["Reborrow"] = 2] = "Reborrow";
|
48
|
+
RedeemResult[RedeemResult["Instantrefinanced"] = 3] = "Instantrefinanced";
|
49
|
+
RedeemResult[RedeemResult["Refinancedbyauction"] = 4] = "Refinancedbyauction";
|
50
|
+
RedeemResult[RedeemResult["Partialrepay"] = 5] = "Partialrepay";
|
51
|
+
RedeemResult[RedeemResult["Directrepaid"] = 6] = "Directrepaid";
|
52
|
+
RedeemResult[RedeemResult["Claimed"] = 7] = "Claimed";
|
53
|
+
RedeemResult[RedeemResult["Addcollateral"] = 8] = "Addcollateral";
|
54
|
+
})(RedeemResult || (exports.RedeemResult = RedeemResult = {}));
|
55
|
+
var LendingTokenType;
|
56
|
+
(function (LendingTokenType) {
|
57
|
+
LendingTokenType[LendingTokenType["Nativesol"] = 0] = "Nativesol";
|
58
|
+
LendingTokenType[LendingTokenType["Usdc"] = 1] = "Usdc";
|
59
|
+
LendingTokenType[LendingTokenType["Banxsol"] = 2] = "Banxsol";
|
60
|
+
})(LendingTokenType || (exports.LendingTokenType = LendingTokenType = {}));
|
61
|
+
var RepayDestination;
|
62
|
+
(function (RepayDestination) {
|
63
|
+
RepayDestination[RepayDestination["None"] = 0] = "None";
|
64
|
+
RepayDestination[RepayDestination["Offer"] = 1] = "Offer";
|
65
|
+
RepayDestination[RepayDestination["Wallet"] = 2] = "Wallet";
|
66
|
+
RepayDestination[RepayDestination["Vault"] = 3] = "Vault";
|
67
|
+
})(RepayDestination || (exports.RepayDestination = RepayDestination = {}));
|
68
|
+
var PairState;
|
69
|
+
(function (PairState) {
|
70
|
+
PairState[PairState["Initializing"] = 0] = "Initializing";
|
71
|
+
PairState[PairState["Onmarketvirtual"] = 1] = "Onmarketvirtual";
|
72
|
+
PairState[PairState["Onmarkettokenized"] = 2] = "Onmarkettokenized";
|
73
|
+
PairState[PairState["Frozen"] = 3] = "Frozen";
|
74
|
+
PairState[PairState["Closed"] = 4] = "Closed";
|
75
|
+
PairState[PairState["Perpetualonmarket"] = 5] = "Perpetualonmarket";
|
76
|
+
PairState[PairState["Perpetualclosed"] = 6] = "Perpetualclosed";
|
77
|
+
PairState[PairState["Perpetualbondingcurveonmarket"] = 7] = "Perpetualbondingcurveonmarket";
|
78
|
+
PairState[PairState["Perpetualmigrated"] = 8] = "Perpetualmigrated";
|
79
|
+
PairState[PairState["Perpetualbondingcurveclosed"] = 9] = "Perpetualbondingcurveclosed";
|
80
|
+
PairState[PairState["Perpetuallisting"] = 10] = "Perpetuallisting";
|
81
|
+
})(PairState || (exports.PairState = PairState = {}));
|
82
|
+
var BondOfferBondingCurveType;
|
83
|
+
(function (BondOfferBondingCurveType) {
|
84
|
+
BondOfferBondingCurveType[BondOfferBondingCurveType["Linear"] = 0] = "Linear";
|
85
|
+
BondOfferBondingCurveType[BondOfferBondingCurveType["Exponential"] = 1] = "Exponential";
|
86
|
+
BondOfferBondingCurveType[BondOfferBondingCurveType["Linearusdc"] = 2] = "Linearusdc";
|
87
|
+
BondOfferBondingCurveType[BondOfferBondingCurveType["Exponentialusdc"] = 3] = "Exponentialusdc";
|
88
|
+
BondOfferBondingCurveType[BondOfferBondingCurveType["Linearbanxsol"] = 4] = "Linearbanxsol";
|
89
|
+
BondOfferBondingCurveType[BondOfferBondingCurveType["Exponentialbanxsol"] = 5] = "Exponentialbanxsol";
|
90
|
+
})(BondOfferBondingCurveType || (exports.BondOfferBondingCurveType = BondOfferBondingCurveType = {}));
|
91
|
+
var BondFeatures;
|
92
|
+
(function (BondFeatures) {
|
93
|
+
BondFeatures[BondFeatures["None"] = 0] = "None";
|
94
|
+
BondFeatures[BondFeatures["Autocompound"] = 1] = "Autocompound";
|
95
|
+
BondFeatures[BondFeatures["Receivenftonliquidation"] = 2] = "Receivenftonliquidation";
|
96
|
+
BondFeatures[BondFeatures["Autoreceivesol"] = 3] = "Autoreceivesol";
|
97
|
+
BondFeatures[BondFeatures["Autocompoundandreceivenft"] = 4] = "Autocompoundandreceivenft";
|
98
|
+
BondFeatures[BondFeatures["Autoreceiveandreceivenft"] = 5] = "Autoreceiveandreceivenft";
|
99
|
+
BondFeatures[BondFeatures["Autoreceiveandreceivespl"] = 6] = "Autoreceiveandreceivespl";
|
100
|
+
})(BondFeatures || (exports.BondFeatures = BondFeatures = {}));
|
13
101
|
exports.banxTokenStakeStruct = new beet_1.BeetStruct([
|
14
|
-
['
|
102
|
+
['accountDiscriminator', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 8)],
|
15
103
|
['banxStakeState', beet_1.u8],
|
16
104
|
['user', beet_solana_1.publicKey],
|
17
105
|
['adventureSubscriptionsQuantity', solana_1.u64],
|
@@ -26,4 +114,130 @@ exports.banxTokenStakeStruct = new beet_1.BeetStruct([
|
|
26
114
|
['nftsUnstakedAt', solana_1.u64],
|
27
115
|
['placeholderOne', beet_solana_1.publicKey],
|
28
116
|
], (args) => args);
|
117
|
+
exports.Bondtradetransactionv3Struct = new beet_1.BeetStruct([
|
118
|
+
['accountDiscriminator', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 8)],
|
119
|
+
['bondTradeTransactionState', beet_1.u8],
|
120
|
+
['bondOffer', beet_solana_1.publicKey],
|
121
|
+
['user', beet_solana_1.publicKey],
|
122
|
+
['amountOfBonds', solana_1.u64],
|
123
|
+
['solAmount', solana_1.u64],
|
124
|
+
['feeAmount', solana_1.u64],
|
125
|
+
['bondTradeTransactionType', beet_1.u8],
|
126
|
+
['fbondTokenMint', beet_solana_1.publicKey],
|
127
|
+
['soldAt', solana_1.u64],
|
128
|
+
['redeemedAt', solana_1.u64],
|
129
|
+
['redeemResult', beet_1.u8],
|
130
|
+
['seller', beet_solana_1.publicKey],
|
131
|
+
['isDirectSell', beet_1.bool],
|
132
|
+
['lendingToken', beet_1.u8],
|
133
|
+
['currentRemainingLent', solana_1.u64],
|
134
|
+
['interestSnapshot', solana_1.u64],
|
135
|
+
['partialRepaySnapshot', solana_1.u64],
|
136
|
+
['terminationStartedAt', solana_1.u64],
|
137
|
+
['lenderOriginalLent', solana_1.u64],
|
138
|
+
['lenderFullRepaidAmount', solana_1.u64],
|
139
|
+
['borrowerOriginalLent', solana_1.u64],
|
140
|
+
['borrowerFullRepaidAmount', solana_1.u64],
|
141
|
+
['repayDestination', beet_1.u8],
|
142
|
+
['repaymentCallAmount', solana_1.u64],
|
143
|
+
['terminationFreeze', solana_1.u64],
|
144
|
+
['redeemResultNext', beet_1.u8],
|
145
|
+
['protocolInterestFee', beet_1.u32],
|
146
|
+
['collateralAmountSnapshot', solana_1.u64],
|
147
|
+
['placeholder1', beet_1.u8],
|
148
|
+
['placeholder2', beet_1.u8],
|
149
|
+
['placeholder3', beet_1.u8],
|
150
|
+
['placeholder4', solana_1.u64],
|
151
|
+
['placeholder5', solana_1.u64],
|
152
|
+
['placeholder6', solana_1.u64],
|
153
|
+
['placeholder7', beet_solana_1.publicKey],
|
154
|
+
], (args) => args);
|
155
|
+
exports.bondOfferBondingCurveStruct = new beet_1.BeetStruct([
|
156
|
+
['delta', solana_1.u64],
|
157
|
+
['bondingType', beet_1.u8],
|
158
|
+
], (args) => args);
|
159
|
+
exports.bondOfferv3Struct = new beet_1.BeetStruct([
|
160
|
+
['accountDiscriminator', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 8)],
|
161
|
+
['hadoMarket', beet_solana_1.publicKey],
|
162
|
+
['pairState', beet_1.u8],
|
163
|
+
['bondingCurve', exports.bondOfferBondingCurveStruct],
|
164
|
+
['baseSpotPrice', solana_1.u64],
|
165
|
+
['mathCounter', solana_1.i64],
|
166
|
+
['currentSpotPrice', solana_1.u64],
|
167
|
+
['concentrationIndex', solana_1.u64],
|
168
|
+
['bidCap', solana_1.u64],
|
169
|
+
['bidSettlement', solana_1.i64],
|
170
|
+
['edgeSettlement', solana_1.u64],
|
171
|
+
['fundsSolOrTokenBalance', solana_1.u64],
|
172
|
+
['buyOrdersQuantity', solana_1.u64],
|
173
|
+
['lastTransactedAt', solana_1.u64],
|
174
|
+
['assetReceiver', beet_solana_1.publicKey],
|
175
|
+
['validation', beet_1.u8],
|
176
|
+
['liquidationLtvBp', solana_1.u64],
|
177
|
+
['offerLtvBp', solana_1.u64],
|
178
|
+
['placeholder3', solana_1.u64],
|
179
|
+
['placeholder4', solana_1.u64],
|
180
|
+
['placeholder5', solana_1.u64],
|
181
|
+
['placeholder6', solana_1.u64],
|
182
|
+
['loanApr', solana_1.u64],
|
183
|
+
['placeholder7', beet_solana_1.publicKey],
|
184
|
+
], (args) => args);
|
185
|
+
var Fraktbondstate;
|
186
|
+
(function (Fraktbondstate) {
|
187
|
+
Fraktbondstate[Fraktbondstate["Initialized"] = 0] = "Initialized";
|
188
|
+
Fraktbondstate[Fraktbondstate["Active"] = 1] = "Active";
|
189
|
+
Fraktbondstate[Fraktbondstate["Repaid"] = 2] = "Repaid";
|
190
|
+
Fraktbondstate[Fraktbondstate["Liquidating"] = 3] = "Liquidating";
|
191
|
+
Fraktbondstate[Fraktbondstate["Liquidated"] = 4] = "Liquidated";
|
192
|
+
Fraktbondstate[Fraktbondstate["Perpetualactive"] = 5] = "Perpetualactive";
|
193
|
+
Fraktbondstate[Fraktbondstate["Perpetualrepaid"] = 6] = "Perpetualrepaid";
|
194
|
+
Fraktbondstate[Fraktbondstate["Perpetualliquidatedbyauction"] = 7] = "Perpetualliquidatedbyauction";
|
195
|
+
Fraktbondstate[Fraktbondstate["Perpetualliquidatedbyclaim"] = 8] = "Perpetualliquidatedbyclaim";
|
196
|
+
})(Fraktbondstate || (exports.Fraktbondstate = Fraktbondstate = {}));
|
197
|
+
exports.FraktbondStruct = new beet_1.BeetStruct([
|
198
|
+
['accountDiscriminator', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 8)],
|
199
|
+
['fraktBondState', beet_1.u8],
|
200
|
+
['bondTradeTransactionsCounter', beet_1.u8],
|
201
|
+
['borrowedAmount', solana_1.u64],
|
202
|
+
['banxStake', beet_solana_1.publicKey],
|
203
|
+
['fraktMarket', beet_solana_1.publicKey],
|
204
|
+
['leverageBasePoints', solana_1.u64],
|
205
|
+
['actualReturnedAmount', solana_1.u64],
|
206
|
+
['terminatedCounter', beet_1.u8],
|
207
|
+
['fbondTokenMint', beet_solana_1.publicKey],
|
208
|
+
['fbondTokenSupply', solana_1.u64],
|
209
|
+
['activatedAt', solana_1.u64],
|
210
|
+
['liquidatingAt', solana_1.u64],
|
211
|
+
['fbondIssuer', beet_solana_1.publicKey],
|
212
|
+
['repaidOrLiquidatedAt', solana_1.u64],
|
213
|
+
['currentPerpetualBorrowed', solana_1.u64],
|
214
|
+
['lastTransactedAt', solana_1.u64],
|
215
|
+
['refinanceAuctionStartedAt', solana_1.u64],
|
216
|
+
], (args) => args);
|
217
|
+
exports.banxPoolStruct = new beet_1.BeetStruct([['accountDiscriminator', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 8)]], (args) => args);
|
218
|
+
exports.banxPoolMarketSettingsStruct = new beet_1.BeetStruct([['accountDiscriminator', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 8)]], (args) => args);
|
219
|
+
var BanxPoolUserDepositState;
|
220
|
+
(function (BanxPoolUserDepositState) {
|
221
|
+
BanxPoolUserDepositState[BanxPoolUserDepositState["None"] = 0] = "None";
|
222
|
+
BanxPoolUserDepositState[BanxPoolUserDepositState["Active"] = 1] = "Active";
|
223
|
+
BanxPoolUserDepositState[BanxPoolUserDepositState["Closed"] = 2] = "Closed";
|
224
|
+
})(BanxPoolUserDepositState || (exports.BanxPoolUserDepositState = BanxPoolUserDepositState = {}));
|
225
|
+
exports.banxPoolUserDepositStruct = new beet_1.BeetStruct([
|
226
|
+
['accountDiscriminator', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 8)],
|
227
|
+
['userDepositState', beet_1.u8],
|
228
|
+
['banxPool', beet_solana_1.publicKey],
|
229
|
+
['user', beet_solana_1.publicKey],
|
230
|
+
['depositAmount', solana_1.u128],
|
231
|
+
['depositedAt', solana_1.u64],
|
232
|
+
['depositedAtCumulative', solana_1.u128],
|
233
|
+
['requestedWithdrawAmount', solana_1.u128],
|
234
|
+
['rewardsHarvested', solana_1.u128],
|
235
|
+
['lastTransactedAt', solana_1.u64],
|
236
|
+
['lossCumulative', solana_1.u64],
|
237
|
+
['totalLossAmount', solana_1.u64],
|
238
|
+
['placeholder1', solana_1.u64],
|
239
|
+
['placeholder2', solana_1.u64],
|
240
|
+
['placeholder3', solana_1.u64],
|
241
|
+
['placeholder4', beet_solana_1.publicKey],
|
242
|
+
], (args) => args);
|
29
243
|
//# sourceMappingURL=structs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/banx/structs.ts"],"names":[],"mappings":";;;AAAA,
|
1
|
+
{"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/banx/structs.ts"],"names":[],"mappings":";;;AAAA,oDAMmC;AACnC,kEAA6D;AAG7D,+CAAoD;AAEpD,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,6DAAI,CAAA;IACJ,iEAAM,CAAA;IACN,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C;IAC/B,CAAC,yBAAyB,EAAE,aAAI,CAAC;IACjC,CAAC,kBAAkB,EAAE,aAAI,CAAC;IAC1B,CAAC,kBAAkB,EAAE,YAAG,CAAC;IACzB,CAAC,gBAAgB,EAAE,YAAG,CAAC;IACvB,CAAC,iBAAiB,EAAE,YAAG,CAAC;IACxB,CAAC,cAAc,EAAE,YAAG,CAAC;IACrB,CAAC,cAAc,EAAE,YAAG,CAAC;IACrB,CAAC,cAAc,EAAE,YAAG,CAAC;IACrB,CAAC,cAAc,EAAE,uBAAS,CAAC;CAC5B,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAA2B,CACtC,CAAC"}
|
@@ -1,265 +1,57 @@
|
|
1
|
-
export type
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
};
|
9
|
-
export type BanxAdventure = {
|
10
|
-
adventure: Adventure;
|
11
|
-
adventureSubscription: AdventureSubscription;
|
12
|
-
};
|
13
|
-
export type Adventure = {
|
14
|
-
publicKey: string;
|
15
|
-
adventureState: string;
|
16
|
-
amountOfTokensHarvested: string;
|
17
|
-
isRemoved: boolean;
|
18
|
-
periodEndingAt: string;
|
19
|
-
periodStartedAt: string;
|
20
|
-
placeholderOne: string;
|
21
|
-
rewardsToBeDistributed: string;
|
22
|
-
tokensPerPoints: string;
|
23
|
-
totalBanxSubscribed: string;
|
24
|
-
totalPartnerPoints: string;
|
25
|
-
totalPlayerPoints: string;
|
26
|
-
totalTokensStaked: string;
|
27
|
-
week: string;
|
28
|
-
};
|
29
|
-
export type AdventureSubscription = {
|
30
|
-
publicKey: string;
|
31
|
-
adventure: string;
|
32
|
-
adventureSubscriptionState: string;
|
33
|
-
amountOfTokensHarvested: string;
|
34
|
-
banxTokenStake: string;
|
35
|
-
createdAt: Date;
|
36
|
-
harvestedAt: string;
|
37
|
-
stakeNftAmount: string;
|
38
|
-
stakePartnerPointsAmount: string;
|
39
|
-
stakePlayerPointsAmount: string;
|
40
|
-
stakeTokensAmount: string;
|
41
|
-
subscribedAt: string;
|
42
|
-
unsubscribedAt: string;
|
43
|
-
updatedAt: Date;
|
44
|
-
user: string;
|
45
|
-
};
|
46
|
-
export type BanxTokenStake = {
|
47
|
-
_id: string;
|
48
|
-
publicKey: string;
|
49
|
-
adventureSubscriptionsQuantity: string;
|
50
|
-
banxNftsStakedQuantity: string;
|
51
|
-
banxStakeState: string;
|
52
|
-
createdAt: Date;
|
53
|
-
farmedAmount: string;
|
54
|
-
isRemoved: boolean;
|
55
|
-
nftsStakedAt: string;
|
56
|
-
nftsUnstakedAt: string;
|
57
|
-
partnerPointsStaked: string;
|
58
|
-
placeholderOne: string;
|
59
|
-
playerPointsStaked: string;
|
60
|
-
stakedAt: string;
|
61
|
-
tokensStaked: string;
|
62
|
-
unstakedAt: string;
|
63
|
-
updatedAt: Date;
|
64
|
-
user: string;
|
1
|
+
export type SplAssetMarket = {
|
2
|
+
marketPubkey: string;
|
3
|
+
collateral: {
|
4
|
+
mint: string;
|
5
|
+
decimals: number;
|
6
|
+
name: string;
|
7
|
+
ticker: string;
|
8
|
+
};
|
65
9
|
};
|
66
10
|
export type Collection = {
|
67
11
|
marketPubkey: string;
|
68
12
|
collectionName: string;
|
13
|
+
collectionImage: string;
|
69
14
|
collectionFloor: number;
|
70
15
|
tensorSlug: string;
|
71
16
|
};
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
};
|
114
|
-
export type BondOfferValidation = {
|
115
|
-
loanToValueFilter: number;
|
116
|
-
durationFilter: number;
|
117
|
-
maxReturnAmountFilter: number;
|
118
|
-
bondFeatures: BondFeatures;
|
119
|
-
};
|
120
|
-
export type BondFeatures = {
|
121
|
-
none?: string;
|
122
|
-
autocompound?: string;
|
123
|
-
receiveNftOnLiquidation?: string;
|
124
|
-
autoreceiveSol?: string;
|
125
|
-
autoCompoundAndReceiveNft?: string;
|
126
|
-
autoReceiveAndReceiveNft?: string;
|
127
|
-
};
|
128
|
-
export type BondTradeTransactionV3 = {
|
129
|
-
bondTradeTransactionState: BondTradeTransactionV2State;
|
130
|
-
bondOffer: string;
|
131
|
-
user: string;
|
132
|
-
amountOfBonds: number;
|
133
|
-
solAmount: number;
|
134
|
-
feeAmount: number;
|
135
|
-
bondTradeTransactionType: BondTradeTransactionV2Type;
|
136
|
-
fbondTokenMint: string;
|
137
|
-
soldAt: number;
|
138
|
-
redeemedAt: string;
|
139
|
-
redeemResult: RedeemResult;
|
140
|
-
seller: string;
|
141
|
-
isDirectSell: boolean;
|
142
|
-
lendingToken: LendingTokenType;
|
143
|
-
currentRemainingLent: number;
|
144
|
-
interestSnapshot: number;
|
145
|
-
partialRepaySnapshot: number;
|
146
|
-
terminationStartedAt: number;
|
147
|
-
lenderOriginalLent: number;
|
148
|
-
lenderFullRepaidAmount: number;
|
149
|
-
borrowerOriginalLent: number;
|
150
|
-
borrowerFullRepaidAmount: number;
|
151
|
-
repayDestination: RepayDestination;
|
152
|
-
repaymentCallAmount: number;
|
153
|
-
terminationFreeze: number;
|
154
|
-
placeholder3: number;
|
155
|
-
placeholder4: number;
|
156
|
-
placeholder5: number;
|
157
|
-
placeholder6: number;
|
158
|
-
placeholder7: number;
|
159
|
-
placeholder8: number;
|
160
|
-
};
|
161
|
-
export type BondTradeTransactionV2State = {
|
162
|
-
notActive?: string;
|
163
|
-
active?: string;
|
164
|
-
perpetualActive?: string;
|
165
|
-
perpetualRepaid?: string;
|
166
|
-
perpetualLiquidatedByAuction?: string;
|
167
|
-
perpetualLiquidatedByClaim?: string;
|
168
|
-
perpetualManualTerminating?: string;
|
169
|
-
perpetualPartialRepaid?: string;
|
170
|
-
perpetualRefinanceRepaid?: string;
|
171
|
-
perpetualRefinancedActive?: string;
|
172
|
-
migrated?: string;
|
173
|
-
perpetualBorrowerListing?: string;
|
174
|
-
perpetualLenderListing?: string;
|
175
|
-
};
|
176
|
-
export type BondTradeTransactionV2Type = {
|
177
|
-
none?: string;
|
178
|
-
autocompound?: string;
|
179
|
-
receiveNftOnLiquidation?: string;
|
180
|
-
autoreceiveSol?: string;
|
181
|
-
autoCompoundAndReceiveNft?: string;
|
182
|
-
autoReceiveAndReceiveNft?: string;
|
183
|
-
};
|
184
|
-
export type RedeemResult = {
|
185
|
-
none?: string;
|
186
|
-
directBorrow?: string;
|
187
|
-
reborrow?: string;
|
188
|
-
instantRefinanced?: string;
|
189
|
-
refinancedByAuction?: string;
|
190
|
-
partialRepay?: string;
|
191
|
-
directRepaid?: string;
|
192
|
-
claimed?: string;
|
193
|
-
directBorrowAndDirectRepaid?: string;
|
194
|
-
directBorrowAndReborrowRepaid?: string;
|
195
|
-
directBorrowAndInstantRefinancedRepaid?: string;
|
196
|
-
directBorrowAndRefinancedByAuctionRepaid?: string;
|
197
|
-
directBorrowAndPartialRepaid?: string;
|
198
|
-
directBorrowAndClaimed?: string;
|
199
|
-
reborrowAndDirectRepaid?: string;
|
200
|
-
reborrowAndReborrowRepaid?: string;
|
201
|
-
reborrowAndInstantRefinancedRepaid?: string;
|
202
|
-
reborrowAndRefinancedByAuctionRepaid?: string;
|
203
|
-
reborrowAndPartialRepaid?: string;
|
204
|
-
reborrowAndClaimed?: string;
|
205
|
-
instantRefinancedAndDirectRepaid?: string;
|
206
|
-
instantRefinancedAndReborrowRepaid?: string;
|
207
|
-
instantRefinancedAndInstantRefinancedRepaid?: string;
|
208
|
-
instantRefinancedAndRefinancedByAuctionRepaid?: string;
|
209
|
-
instantRefinancedAndPartialRepaid?: string;
|
210
|
-
instantRefinancedAndClaimed?: string;
|
211
|
-
refinancedByAuctionAndDirectRepaid?: string;
|
212
|
-
refinancedByAuctionAndReborrowRepaid?: string;
|
213
|
-
refinancedByAuctionAndInstantRefinancedRepaid?: string;
|
214
|
-
refinancedByAuctionAndRefinancedByAuctionRepaid?: string;
|
215
|
-
refinancedByAuctionAndPartialRepaid?: string;
|
216
|
-
refinancedByAuctionAndClaimed?: string;
|
217
|
-
partialRepaidAndDirectRepaid?: string;
|
218
|
-
partialRepaidAndReborrowRepaid?: string;
|
219
|
-
partialRepaidAndInstantRefinancedRepaid?: string;
|
220
|
-
partialRepaidAndRefinancedByAuctionRepaid?: string;
|
221
|
-
partialRepaidAndPartialRepaid?: string;
|
222
|
-
partialRepaidAndClaimed?: string;
|
223
|
-
};
|
224
|
-
export type RepayDestination = {
|
225
|
-
none?: string;
|
226
|
-
offer?: string;
|
227
|
-
wallet?: string;
|
228
|
-
vault?: string;
|
229
|
-
};
|
230
|
-
export type LendingTokenType = {
|
231
|
-
nativeSol?: string;
|
232
|
-
usdc?: string;
|
233
|
-
banxSol?: string;
|
234
|
-
};
|
235
|
-
export type FraktBond = {
|
236
|
-
fraktBondState: FraktBondState;
|
237
|
-
bondTradeTransactionsCounter: number;
|
238
|
-
borrowedAmount: number;
|
239
|
-
banxStake: string;
|
240
|
-
fraktMarket: string;
|
241
|
-
hadoMarket?: string;
|
242
|
-
amountToReturn: number;
|
243
|
-
actualReturnedAmount: number;
|
244
|
-
terminatedCounter: number;
|
245
|
-
fbondTokenMint: string;
|
246
|
-
fbondTokenSupply: number;
|
247
|
-
activatedAt: number;
|
248
|
-
liquidatingAt: number;
|
249
|
-
fbondIssuer: string;
|
250
|
-
repaidOrLiquidatedAt: number;
|
251
|
-
currentPerpetualBorrowed: number;
|
252
|
-
lastTransactedAt: number;
|
253
|
-
refinanceAuctionStartedAt: number;
|
254
|
-
};
|
255
|
-
export type FraktBondState = {
|
256
|
-
initialized?: string;
|
257
|
-
active?: string;
|
258
|
-
repaid?: string;
|
259
|
-
liquidating?: string;
|
260
|
-
liquidated?: string;
|
261
|
-
perpetualActive?: string;
|
262
|
-
perpetualRepaid?: string;
|
263
|
-
perpetualLiquidatedByAuction?: string;
|
264
|
-
perpetualLiquidatedByClaim?: string;
|
265
|
-
};
|
17
|
+
type AssetDetail = {
|
18
|
+
mint: string;
|
19
|
+
ticker: string;
|
20
|
+
logoUrl: string;
|
21
|
+
};
|
22
|
+
type AssetAllocation = AssetDetail & {
|
23
|
+
allocation: number;
|
24
|
+
maxCapacity: number;
|
25
|
+
apr: number;
|
26
|
+
liquidationLtv: number;
|
27
|
+
totalDepositedAmount: number;
|
28
|
+
loansTvl: number;
|
29
|
+
avgLtv: number;
|
30
|
+
};
|
31
|
+
type CuratorDetails = {
|
32
|
+
name: string;
|
33
|
+
description: string;
|
34
|
+
xUrl: string;
|
35
|
+
};
|
36
|
+
export type Vault = {
|
37
|
+
vaultPubkey: string;
|
38
|
+
lendingToken: string;
|
39
|
+
vaultName: string;
|
40
|
+
lenderWalletPubkey: string;
|
41
|
+
assetsDetails: AssetDetail[];
|
42
|
+
totalDepositedAmount: number;
|
43
|
+
maxCapacity: number;
|
44
|
+
reserves: string;
|
45
|
+
loansTvl: number;
|
46
|
+
currentApy: number;
|
47
|
+
targetApy: number;
|
48
|
+
performance: number;
|
49
|
+
curatorDetails: CuratorDetails;
|
50
|
+
userTotalDepositedAmount: string;
|
51
|
+
requestedWithdrawAmount: string;
|
52
|
+
pendingClaimAmount: string;
|
53
|
+
assetsAllocation: AssetAllocation[];
|
54
|
+
pnl: number;
|
55
|
+
totalPnl: number;
|
56
|
+
};
|
57
|
+
export {};
|
@@ -0,0 +1,74 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
13
|
+
const web3_js_1 = require("@solana/web3.js");
|
14
|
+
const constants_1 = require("./constants");
|
15
|
+
const structs_1 = require("./structs");
|
16
|
+
const clients_1 = require("../../utils/clients");
|
17
|
+
const ParsedGpa_1 = require("../../utils/solana/beets/ParsedGpa");
|
18
|
+
const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
|
19
|
+
const solana_1 = require("../../utils/solana");
|
20
|
+
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
21
|
+
const client = (0, clients_1.getClientSolana)();
|
22
|
+
const accounts = yield ParsedGpa_1.ParsedGpa.build(client, structs_1.banxPoolUserDepositStruct, constants_1.banxVaultsPid)
|
23
|
+
.addFilter('accountDiscriminator', [111, 224, 169, 186, 223, 215, 84, 49])
|
24
|
+
.addFilter('user', new web3_js_1.PublicKey(owner))
|
25
|
+
.run();
|
26
|
+
if (!accounts.length)
|
27
|
+
return [];
|
28
|
+
const vaults = yield constants_1.vaultsMemo.getItem(cache);
|
29
|
+
if (!vaults)
|
30
|
+
throw new Error('Vaults not cached');
|
31
|
+
const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
|
32
|
+
accounts.forEach((account) => {
|
33
|
+
const vault = vaults.get(account.banxPool.toString());
|
34
|
+
if (!vault)
|
35
|
+
return;
|
36
|
+
const element = elementRegistry.addElementMultiple({
|
37
|
+
label: 'Vault',
|
38
|
+
name: vault.vaultName,
|
39
|
+
ref: account.pubkey,
|
40
|
+
sourceRefs: [
|
41
|
+
{
|
42
|
+
name: 'Vault',
|
43
|
+
address: vault.vaultPubkey.toString(),
|
44
|
+
},
|
45
|
+
],
|
46
|
+
link: `https://banx.gg/lend/vaults/${vault.vaultPubkey}`,
|
47
|
+
});
|
48
|
+
let mint;
|
49
|
+
switch (vault.lendingToken) {
|
50
|
+
case 'usdc':
|
51
|
+
mint = solana_1.usdcSolanaMint;
|
52
|
+
break;
|
53
|
+
case 'banxsol':
|
54
|
+
mint = constants_1.banxSolMint;
|
55
|
+
break;
|
56
|
+
case 'sol':
|
57
|
+
default:
|
58
|
+
mint = portfolio_core_1.solanaNativeAddress;
|
59
|
+
break;
|
60
|
+
}
|
61
|
+
element.addAsset({
|
62
|
+
address: mint,
|
63
|
+
amount: account.depositAmount,
|
64
|
+
});
|
65
|
+
});
|
66
|
+
return elementRegistry.getElements(cache);
|
67
|
+
});
|
68
|
+
const fetcher = {
|
69
|
+
id: `${constants_1.platformId}-vaults`,
|
70
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
71
|
+
executor,
|
72
|
+
};
|
73
|
+
exports.default = fetcher;
|
74
|
+
//# sourceMappingURL=vaultsFetcher.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"vaultsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/banx/vaultsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAA4E;AAC5E,6CAA4C;AAG5C,2CAKqB;AACrB,uCAAsD;AACtD,iDAAsD;AACtD,kEAA+D;AAC/D,gFAA6E;AAC7E,+CAAoD;AAEpD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,QAAQ,GAAG,MAAM,qBAAS,CAAC,KAAK,CACpC,MAAM,EACN,mCAAyB,EAC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