@sonarwatch/portfolio-plugins 0.11.153 → 0.11.155

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,178 @@
1
+ /// <reference types="node" />
2
+ import { BeetStruct } from '@metaplex-foundation/beet';
3
+ import { PublicKey } from '@solana/web3.js';
4
+ import BigNumber from 'bignumber.js';
5
+ type RealizedYield = {
6
+ gainPerSecond: BigNumber;
7
+ apr: BigNumber;
8
+ buffer: Buffer[];
9
+ };
10
+ export declare const realizedYieldStruct: BeetStruct<RealizedYield, Partial<RealizedYield>>;
11
+ type FeesV1 = {
12
+ feeMultiplier: BigNumber;
13
+ controllerFee: BigNumber;
14
+ platformFee: BigNumber;
15
+ withdrawFee: BigNumber;
16
+ depositFee: BigNumber;
17
+ feeWallet: PublicKey;
18
+ totalCollectedA: BigNumber;
19
+ totalCollectedB: BigNumber;
20
+ buffer: BigNumber[];
21
+ };
22
+ export declare const feesV1Struct: BeetStruct<FeesV1, Partial<FeesV1>>;
23
+ type VaultBaseV1 = {
24
+ nonce: number;
25
+ tag: number[];
26
+ pda: PublicKey;
27
+ pdaNonce: number;
28
+ pdaAlignment: number[];
29
+ totalDepositedBalance: BigNumber;
30
+ totalShares: BigNumber;
31
+ underlyingMint: PublicKey;
32
+ underlyingWithdrawQueue: PublicKey;
33
+ underlyingDepositQueue: PublicKey;
34
+ underlyingCompoundQueue: PublicKey;
35
+ sharesMint: PublicKey;
36
+ withdrawsPaused: number;
37
+ depositsPaused: number;
38
+ compoundPaused: number;
39
+ supportsCompound: number;
40
+ rebasePaused: number;
41
+ rebalancePaused: number;
42
+ stateAlignment: number[];
43
+ precisionFactor: BigNumber;
44
+ lastCompoundTime: BigNumber;
45
+ compoundInterval: BigNumber;
46
+ slippageTolerance: number;
47
+ slipAlignment: number[];
48
+ fees: FeesV1;
49
+ farm: BigNumber[];
50
+ configured: number;
51
+ configuredAlignment: number[];
52
+ pendingFees: BigNumber;
53
+ totalDepositedBalanceCap: BigNumber;
54
+ realizedYield: RealizedYield;
55
+ buffer: BigNumber[];
56
+ };
57
+ export declare const vaultBaseV1Struct: BeetStruct<VaultBaseV1, Partial<VaultBaseV1>>;
58
+ export declare enum ProgramType {
59
+ SplUnmodified = 0,
60
+ SplModifiedSolend = 1,
61
+ MangoV3 = 2,
62
+ Unknown = 3
63
+ }
64
+ type StandaloneVaultCacheV1 = {
65
+ vaultAddress: PublicKey;
66
+ depositedBalance: BigNumber;
67
+ programType: ProgramType;
68
+ programAddress: PublicKey;
69
+ sharesMint: PublicKey;
70
+ sharesAccount: PublicKey;
71
+ alignment: number[];
72
+ buffer: BigNumber[];
73
+ };
74
+ export declare const standaloneVaultCacheV1Struct: BeetStruct<StandaloneVaultCacheV1, Partial<StandaloneVaultCacheV1>>;
75
+ export type MultiDepositOptimizerV1 = {
76
+ buffer: Buffer;
77
+ base: VaultBaseV1;
78
+ lastRebaseSlot: BigNumber;
79
+ standaloneVaults: StandaloneVaultCacheV1[];
80
+ targetVault: PublicKey;
81
+ stateTransitionAccount: PublicKey;
82
+ minimumRebalanceAmount: BigNumber;
83
+ pading: number[];
84
+ };
85
+ export declare const multiDepositOptimizerV1Struct: BeetStruct<MultiDepositOptimizerV1, Partial<MultiDepositOptimizerV1>>;
86
+ type DepositTrackingV1 = {
87
+ buffer: Buffer;
88
+ owner: PublicKey;
89
+ vault: PublicKey;
90
+ pdaNonce: number;
91
+ queueNonce: number;
92
+ alignment: number[];
93
+ shares: BigNumber;
94
+ depositedBalance: BigNumber;
95
+ lastDepositTime: BigNumber;
96
+ pendingWithdrawAmount: BigNumber;
97
+ totalDepositedUnderlying: BigNumber;
98
+ totalWithdrawnUnderlying: BigNumber;
99
+ lastPendingReward: BigNumber;
100
+ rewardPerSharePaid: BigNumber;
101
+ extraDataAccount: PublicKey;
102
+ padding: number[];
103
+ };
104
+ export declare const depositTrackingV1Struct: BeetStruct<DepositTrackingV1, Partial<DepositTrackingV1>>;
105
+ export type LastUpdateSlot = {
106
+ slot: BigNumber;
107
+ stale: number;
108
+ };
109
+ export declare const lastUpdateSlotStruct: BeetStruct<LastUpdateSlot, Partial<LastUpdateSlot>>;
110
+ export type Liquidity = {
111
+ mintPubKey: PublicKey;
112
+ mintDecimals: number;
113
+ supplyPubKey: PublicKey;
114
+ feeReceiver: PublicKey;
115
+ oraclePubKey: PublicKey;
116
+ availableAmount: BigNumber;
117
+ borrowedAmountWads: BigNumber;
118
+ cumulativeBorrowRate: BigNumber;
119
+ marketPrice: BigNumber;
120
+ platformAmountWads: BigNumber;
121
+ platformFees: number;
122
+ collateralMint: PublicKey;
123
+ };
124
+ export declare const liquidityStruct: BeetStruct<Liquidity, Partial<Liquidity>>;
125
+ export type LendingReserve = {
126
+ version: number;
127
+ lastUpdateSlot: LastUpdateSlot;
128
+ lendingMarket: PublicKey;
129
+ borrowAuthorizer: PublicKey;
130
+ liquidity: Liquidity;
131
+ };
132
+ export declare const lendingReserveStruct: BeetStruct<LendingReserve, Partial<LendingReserve>>;
133
+ export type Obligation = {
134
+ obligationAccount: PublicKey;
135
+ coinAmount: BigNumber;
136
+ pcAmount: BigNumber;
137
+ depositedLpTokens: BigNumber;
138
+ positionState: number;
139
+ };
140
+ export declare const obligationStruct: BeetStruct<Obligation, Partial<Obligation>>;
141
+ export type UserFarm = {
142
+ buffer: Buffer;
143
+ authority: PublicKey;
144
+ leveragedFarm: PublicKey;
145
+ userFarmNumber: number;
146
+ numberOfObligations: number;
147
+ numberOfUserFarms: number;
148
+ nonce: number;
149
+ obligations: Obligation[];
150
+ };
151
+ export declare const userFarmStruct: BeetStruct<UserFarm, Partial<UserFarm>>;
152
+ export type ObligationLiquity = {
153
+ borrowReserve: PublicKey;
154
+ cumulativeBorrowRateWads: BigNumber;
155
+ borrowedAmountWads: BigNumber;
156
+ marketValue: BigNumber;
157
+ };
158
+ export declare const obligationLiquityStruct: BeetStruct<ObligationLiquity, Partial<ObligationLiquity>>;
159
+ export type LendingObligation = {
160
+ version: number;
161
+ lastUpdateSlot: LastUpdateSlot;
162
+ lendingMarket: PublicKey;
163
+ owner: PublicKey;
164
+ borrowedValue: BigNumber;
165
+ vaultShares: BigNumber;
166
+ lpTokens: BigNumber;
167
+ coinDeposits: BigNumber;
168
+ pcDeposits: BigNumber;
169
+ depositsMarketValue: BigNumber;
170
+ lpDecimals: number;
171
+ coinDecimals: number;
172
+ pcDecimals: number;
173
+ depositsLen: number;
174
+ borrowsLen: number;
175
+ obligationLiquidities: ObligationLiquity[];
176
+ };
177
+ export declare const lendingObligationStruct: BeetStruct<LendingObligation, Partial<LendingObligation>>;
178
+ export {};
@@ -0,0 +1,174 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.lendingObligationStruct = exports.obligationLiquityStruct = exports.userFarmStruct = exports.obligationStruct = exports.lendingReserveStruct = exports.liquidityStruct = exports.lastUpdateSlotStruct = exports.depositTrackingV1Struct = exports.multiDepositOptimizerV1Struct = exports.standaloneVaultCacheV1Struct = exports.ProgramType = exports.vaultBaseV1Struct = exports.feesV1Struct = exports.realizedYieldStruct = void 0;
4
+ const beet_1 = require("@metaplex-foundation/beet");
5
+ const beet_solana_1 = require("@metaplex-foundation/beet-solana");
6
+ const solana_1 = require("../../utils/solana");
7
+ exports.realizedYieldStruct = new beet_1.BeetStruct([
8
+ ['gainPerSecond', solana_1.u128],
9
+ ['apr', solana_1.u128],
10
+ ['buffer', (0, beet_1.uniformFixedSizeArray)((0, solana_1.blob)(8), 4)],
11
+ ], (args) => args);
12
+ exports.feesV1Struct = new beet_1.BeetStruct([
13
+ ['feeMultiplier', solana_1.u64],
14
+ ['controllerFee', solana_1.u64],
15
+ ['platformFee', solana_1.u64],
16
+ ['withdrawFee', solana_1.u64],
17
+ ['depositFee', solana_1.u64],
18
+ ['feeWallet', beet_solana_1.publicKey],
19
+ ['totalCollectedA', solana_1.u64],
20
+ ['totalCollectedB', solana_1.u64],
21
+ ['buffer', (0, beet_1.uniformFixedSizeArray)(solana_1.u64, 6)],
22
+ ], (args) => args);
23
+ exports.vaultBaseV1Struct = new beet_1.BeetStruct([
24
+ ['nonce', beet_1.u8],
25
+ ['tag', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 32)],
26
+ ['pda', beet_solana_1.publicKey],
27
+ ['pdaNonce', beet_1.u8],
28
+ ['pdaAlignment', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 6)],
29
+ ['totalDepositedBalance', solana_1.u64],
30
+ ['totalShares', solana_1.u64],
31
+ ['underlyingMint', beet_solana_1.publicKey],
32
+ ['underlyingWithdrawQueue', beet_solana_1.publicKey],
33
+ ['underlyingDepositQueue', beet_solana_1.publicKey],
34
+ ['underlyingCompoundQueue', beet_solana_1.publicKey],
35
+ ['sharesMint', beet_solana_1.publicKey],
36
+ ['withdrawsPaused', beet_1.u8],
37
+ ['depositsPaused', beet_1.u8],
38
+ ['compoundPaused', beet_1.u8],
39
+ ['supportsCompound', beet_1.u8],
40
+ ['rebasePaused', beet_1.u8],
41
+ ['rebalancePaused', beet_1.u8],
42
+ ['stateAlignment', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 2)],
43
+ ['precisionFactor', solana_1.u64],
44
+ ['lastCompoundTime', solana_1.i64],
45
+ ['compoundInterval', solana_1.i64],
46
+ ['slippageTolerance', beet_1.u8],
47
+ ['slipAlignment', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 7)],
48
+ ['fees', exports.feesV1Struct],
49
+ ['farm', (0, beet_1.uniformFixedSizeArray)(solana_1.u64, 2)],
50
+ ['configured', beet_1.u8],
51
+ ['configuredAlignment', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 7)],
52
+ ['pendingFees', solana_1.u64],
53
+ ['totalDepositedBalanceCap', solana_1.u64],
54
+ ['realizedYield', exports.realizedYieldStruct],
55
+ ['buffer', (0, beet_1.uniformFixedSizeArray)(solana_1.u64, 4)],
56
+ ], (args) => args);
57
+ var ProgramType;
58
+ (function (ProgramType) {
59
+ ProgramType[ProgramType["SplUnmodified"] = 0] = "SplUnmodified";
60
+ ProgramType[ProgramType["SplModifiedSolend"] = 1] = "SplModifiedSolend";
61
+ ProgramType[ProgramType["MangoV3"] = 2] = "MangoV3";
62
+ ProgramType[ProgramType["Unknown"] = 3] = "Unknown";
63
+ })(ProgramType || (exports.ProgramType = ProgramType = {}));
64
+ exports.standaloneVaultCacheV1Struct = new beet_1.BeetStruct([
65
+ ['vaultAddress', beet_solana_1.publicKey],
66
+ ['depositedBalance', solana_1.u64],
67
+ ['programType', beet_1.u8],
68
+ ['programAddress', beet_solana_1.publicKey],
69
+ ['sharesMint', beet_solana_1.publicKey],
70
+ ['sharesAccount', beet_solana_1.publicKey],
71
+ ['alignment', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 7)],
72
+ ['buffer', (0, beet_1.uniformFixedSizeArray)(solana_1.u64, 6)],
73
+ ], (args) => args);
74
+ exports.multiDepositOptimizerV1Struct = new beet_1.BeetStruct([
75
+ ['buffer', (0, solana_1.blob)(8)],
76
+ ['base', exports.vaultBaseV1Struct],
77
+ ['lastRebaseSlot', solana_1.u64],
78
+ [
79
+ 'standaloneVaults',
80
+ (0, beet_1.uniformFixedSizeArray)(exports.standaloneVaultCacheV1Struct, 6),
81
+ ],
82
+ ['targetVault', beet_solana_1.publicKey],
83
+ ['stateTransitionAccount', beet_solana_1.publicKey],
84
+ ['minimumRebalanceAmount', solana_1.u64],
85
+ ['pading', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 272)],
86
+ ], (args) => args);
87
+ exports.depositTrackingV1Struct = new beet_1.BeetStruct([
88
+ ['buffer', (0, solana_1.blob)(8)],
89
+ ['owner', beet_solana_1.publicKey],
90
+ ['vault', beet_solana_1.publicKey],
91
+ ['pdaNonce', beet_1.u8],
92
+ ['queueNonce', beet_1.u8],
93
+ ['alignment', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 6)],
94
+ ['shares', solana_1.u64],
95
+ ['depositedBalance', solana_1.u64],
96
+ ['lastDepositTime', solana_1.i64],
97
+ ['pendingWithdrawAmount', solana_1.u64],
98
+ ['totalDepositedUnderlying', solana_1.u64],
99
+ ['totalWithdrawnUnderlying', solana_1.u64],
100
+ ['lastPendingReward', solana_1.u64],
101
+ ['rewardPerSharePaid', solana_1.u128],
102
+ ['extraDataAccount', beet_solana_1.publicKey],
103
+ ['padding', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 256)],
104
+ ], (args) => args);
105
+ exports.lastUpdateSlotStruct = new beet_1.BeetStruct([
106
+ ['slot', solana_1.u64],
107
+ ['stale', beet_1.u8],
108
+ ], (args) => args);
109
+ exports.liquidityStruct = new beet_1.BeetStruct([
110
+ ['mintPubKey', beet_solana_1.publicKey],
111
+ ['mintDecimals', beet_1.u8],
112
+ ['supplyPubKey', beet_solana_1.publicKey],
113
+ ['feeReceiver', beet_solana_1.publicKey],
114
+ ['oraclePubKey', beet_solana_1.publicKey],
115
+ ['availableAmount', solana_1.u64],
116
+ ['borrowedAmountWads', solana_1.u128],
117
+ ['cumulativeBorrowRate', solana_1.u128],
118
+ ['marketPrice', solana_1.u128],
119
+ ['platformAmountWads', solana_1.u128],
120
+ ['platformFees', beet_1.u8],
121
+ ['collateralMint', beet_solana_1.publicKey],
122
+ ], (args) => args);
123
+ exports.lendingReserveStruct = new beet_1.BeetStruct([
124
+ ['version', beet_1.u8],
125
+ ['lastUpdateSlot', exports.lastUpdateSlotStruct],
126
+ ['lendingMarket', beet_solana_1.publicKey],
127
+ ['borrowAuthorizer', beet_solana_1.publicKey],
128
+ ['liquidity', exports.liquidityStruct],
129
+ ], (args) => args);
130
+ exports.obligationStruct = new beet_1.BeetStruct([
131
+ ['obligationAccount', beet_solana_1.publicKey],
132
+ ['coinAmount', solana_1.u64],
133
+ ['pcAmount', solana_1.u64],
134
+ ['depositedLpTokens', solana_1.u64],
135
+ ['positionState', beet_1.u8],
136
+ ], (args) => args);
137
+ exports.userFarmStruct = new beet_1.BeetStruct([
138
+ ['buffer', (0, solana_1.blob)(8)],
139
+ ['authority', beet_solana_1.publicKey],
140
+ ['leveragedFarm', beet_solana_1.publicKey],
141
+ ['userFarmNumber', beet_1.u8],
142
+ ['numberOfObligations', beet_1.u8],
143
+ ['numberOfUserFarms', beet_1.u8],
144
+ ['nonce', beet_1.u8],
145
+ ['obligations', (0, beet_1.uniformFixedSizeArray)(exports.obligationStruct, 3)],
146
+ ], (args) => args);
147
+ exports.obligationLiquityStruct = new beet_1.BeetStruct([
148
+ ['borrowReserve', beet_solana_1.publicKey],
149
+ ['cumulativeBorrowRateWads', solana_1.u128],
150
+ ['borrowedAmountWads', solana_1.u128],
151
+ ['marketValue', solana_1.u128],
152
+ ], (args) => args);
153
+ exports.lendingObligationStruct = new beet_1.BeetStruct([
154
+ ['version', beet_1.u8],
155
+ ['lastUpdateSlot', exports.lastUpdateSlotStruct],
156
+ ['lendingMarket', beet_solana_1.publicKey],
157
+ ['owner', beet_solana_1.publicKey],
158
+ ['borrowedValue', solana_1.u128],
159
+ ['vaultShares', solana_1.u64],
160
+ ['lpTokens', solana_1.u64],
161
+ ['coinDeposits', solana_1.u64],
162
+ ['pcDeposits', solana_1.u64],
163
+ ['depositsMarketValue', solana_1.u128],
164
+ ['lpDecimals', beet_1.u8],
165
+ ['coinDecimals', beet_1.u8],
166
+ ['pcDecimals', beet_1.u8],
167
+ ['depositsLen', beet_1.u8],
168
+ ['borrowsLen', beet_1.u8],
169
+ [
170
+ 'obligationLiquidities',
171
+ (0, beet_1.uniformFixedSizeArray)(exports.obligationLiquityStruct, 2),
172
+ ],
173
+ ], (args) => args);
174
+ //# sourceMappingURL=structs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tulip/structs.ts"],"names":[],"mappings":";;;AAAA,oDAImC;AAGnC,kEAA6D;AAC7D,+CAA0D;AAQ7C,QAAA,mBAAmB,GAAG,IAAI,iBAAU,CAC/C;IACE,CAAC,eAAe,EAAE,aAAI,CAAC;IACvB,CAAC,KAAK,EAAE,aAAI,CAAC;I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IAC5B,CAAC,aAAa,EAAE,aAAI,CAAC;CACtB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAyB,CACpC,CAAC;AAqBW,QAAA,uBAAuB,GAAG,IAAI,iBAAU,CACnD;IACE,CAAC,SAAS,EAAE,SAAE,CAAC;IACf,CAAC,gBAAgB,EAAE,4BAAoB,CAAC;IACxC,CAAC,eAAe,EAAE,uBAAS,CAAC;IAC5B,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,eAAe,EAAE,aAAI,CAAC;IACvB,CAAC,aAAa,EAAE,YAAG,CAAC;IACpB,CAAC,UAAU,EAAE,YAAG,CAAC;IACjB,CAAC,cAAc,EAAE,YAAG,CAAC;IACrB,CAAC,YAAY,EAAE,YAAG,CAAC;IACnB,CAAC,qBAAqB,EAAE,aAAI,CAAC;IAC7B,CAAC,YAAY,EAAE,SAAE,CAAC;IAClB,CAAC,cAAc,EAAE,SAAE,CAAC;IACpB,CAAC,YAAY,EAAE,SAAE,CAAC;IAClB,CAAC,aAAa,EAAE,SAAE,CAAC;IACnB,CAAC,YAAY,EAAE,SAAE,CAAC;IAClB;QACE,uBAAuB;QACvB,IAAA,4BAAqB,EAAC,+BAAuB,EAAE,CAAC,CAAC;KAClD;CACF,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAyB,CACpC,CAAC"}
@@ -40,28 +40,28 @@ function getPairKey(version) {
40
40
  exports.getPairKey = getPairKey;
41
41
  function getPairsV2FromTheGraph(url, length = 300) {
42
42
  return __awaiter(this, void 0, void 0, function* () {
43
- const query = (0, graphql_request_1.gql) `
44
- {
45
- pairs(
46
- orderBy: reserveUSD
47
- first: ${length}
48
- orderDirection: desc
49
- where: { trackedReserveETH_not: "0" }
50
- ) {
51
- id
52
- reserve0
53
- reserve1
54
- totalSupply
55
- token0 {
56
- id
57
- decimals
58
- }
59
- token1 {
60
- id
61
- decimals
62
- }
63
- }
64
- }
43
+ const query = (0, graphql_request_1.gql) `
44
+ {
45
+ pairs(
46
+ orderBy: reserveUSD
47
+ first: ${length}
48
+ orderDirection: desc
49
+ where: { trackedReserveETH_not: "0" }
50
+ ) {
51
+ id
52
+ reserve0
53
+ reserve1
54
+ totalSupply
55
+ token0 {
56
+ id
57
+ decimals
58
+ }
59
+ token1 {
60
+ id
61
+ decimals
62
+ }
63
+ }
64
+ }
65
65
  `;
66
66
  const res = yield (0, graphql_request_1.default)(url, query);
67
67
  const pairs = res.pairs;
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.poolQueryMsg = exports.minterQueryMsg = exports.tokenInfoQueryMsg = exports.infoQueryMsg = void 0;
4
- exports.infoQueryMsg = JSON.parse(`{
5
- "info": {}
4
+ exports.infoQueryMsg = JSON.parse(`{
5
+ "info": {}
6
6
  }`);
7
- exports.tokenInfoQueryMsg = JSON.parse(`{
8
- "token_info": {}
7
+ exports.tokenInfoQueryMsg = JSON.parse(`{
8
+ "token_info": {}
9
9
  }`);
10
- exports.minterQueryMsg = JSON.parse(`{
11
- "minter": {}
10
+ exports.minterQueryMsg = JSON.parse(`{
11
+ "minter": {}
12
12
  }`);
13
- exports.poolQueryMsg = JSON.parse(`{
14
- "pool": {}
13
+ exports.poolQueryMsg = JSON.parse(`{
14
+ "pool": {}
15
15
  }`);
16
16
  //# sourceMappingURL=constants.js.map
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  function getQueryBalanceByOwner(owner) {
4
- return JSON.parse(`{
5
- "balance": {
6
- "address": "${owner}"
7
- }
4
+ return JSON.parse(`{
5
+ "balance": {
6
+ "address": "${owner}"
7
+ }
8
8
  }`);
9
9
  }
10
10
  exports.default = getQueryBalanceByOwner;