@sonarwatch/portfolio-plugins 0.11.192 → 0.11.194

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/package.json +2 -2
  3. package/src/AirdropFetcher.d.ts +11 -0
  4. package/src/AirdropFetcher.js +92 -0
  5. package/src/AirdropFetcher.js.map +1 -0
  6. package/src/index.d.ts +3 -0
  7. package/src/index.js +11 -1
  8. package/src/index.js.map +1 -1
  9. package/src/plugins/aftermath/constants.d.ts +2 -0
  10. package/src/plugins/aftermath/constants.js +3 -1
  11. package/src/plugins/aftermath/constants.js.map +1 -1
  12. package/src/plugins/aftermath/index.js +2 -1
  13. package/src/plugins/aftermath/index.js.map +1 -1
  14. package/src/plugins/aftermath/stakingFetcher.d.ts +3 -0
  15. package/src/plugins/aftermath/stakingFetcher.js +102 -0
  16. package/src/plugins/aftermath/stakingFetcher.js.map +1 -0
  17. package/src/plugins/aftermath/types.d.ts +17 -0
  18. package/src/plugins/drift/airdropFetcher.d.ts +3 -0
  19. package/src/plugins/drift/airdropFetcher.js +65 -0
  20. package/src/plugins/drift/airdropFetcher.js.map +1 -0
  21. package/src/plugins/drift/constants.d.ts +6 -0
  22. package/src/plugins/drift/constants.js +10 -4
  23. package/src/plugins/drift/constants.js.map +1 -1
  24. package/src/plugins/drift/helpersAirdrop.d.ts +3 -0
  25. package/src/plugins/drift/helpersAirdrop.js +59 -0
  26. package/src/plugins/drift/helpersAirdrop.js.map +1 -0
  27. package/src/plugins/drift/index.d.ts +1 -0
  28. package/src/plugins/drift/index.js +5 -2
  29. package/src/plugins/drift/index.js.map +1 -1
  30. package/src/plugins/drift/types.d.ts +12 -0
  31. package/src/plugins/jito/airdropFetcher.js +1 -2
  32. package/src/plugins/jito/airdropFetcher.js.map +1 -1
  33. package/src/plugins/jupiter/launchpad/allocationsFetcher.js +1 -1
  34. package/src/plugins/kamino/airdropFetcher.js +1 -1
  35. package/src/plugins/parcl/airdropFetcher.js +8 -47
  36. package/src/plugins/parcl/airdropFetcher.js.map +1 -1
  37. package/src/plugins/parcl/constants.d.ts +3 -0
  38. package/src/plugins/parcl/constants.js +7 -4
  39. package/src/plugins/parcl/constants.js.map +1 -1
  40. package/src/plugins/parcl/helpersAirdrop.d.ts +19 -0
  41. package/src/plugins/parcl/helpersAirdrop.js +99 -0
  42. package/src/plugins/parcl/helpersAirdrop.js.map +1 -0
  43. package/src/plugins/parcl/index.d.ts +1 -0
  44. package/src/plugins/parcl/index.js +3 -1
  45. package/src/plugins/parcl/index.js.map +1 -1
  46. package/src/plugins/parcl/types.d.ts +6 -1
  47. package/src/plugins/sandglass/constants.d.ts +6 -0
  48. package/src/plugins/sandglass/constants.js +16 -0
  49. package/src/plugins/sandglass/constants.js.map +1 -0
  50. package/src/plugins/sandglass/depositFetcher.d.ts +3 -0
  51. package/src/plugins/sandglass/depositFetcher.js +82 -0
  52. package/src/plugins/sandglass/depositFetcher.js.map +1 -0
  53. package/src/plugins/sandglass/filters.d.ts +3 -0
  54. package/src/plugins/sandglass/filters.js +21 -0
  55. package/src/plugins/sandglass/filters.js.map +1 -0
  56. package/src/plugins/sandglass/index.d.ts +6 -0
  57. package/src/plugins/sandglass/index.js +13 -0
  58. package/src/plugins/sandglass/index.js.map +1 -0
  59. package/src/plugins/sandglass/marketsJob.d.ts +3 -0
  60. package/src/plugins/sandglass/marketsJob.js +97 -0
  61. package/src/plugins/sandglass/marketsJob.js.map +1 -0
  62. package/src/plugins/sandglass/structs.d.ts +150 -0
  63. package/src/plugins/sandglass/structs.js +144 -0
  64. package/src/plugins/sandglass/structs.js.map +1 -0
  65. package/src/plugins/sandglass/types.d.ts +7 -0
  66. package/src/plugins/sandglass/types.js +3 -0
  67. package/src/plugins/sandglass/types.js.map +1 -0
  68. package/src/plugins/tensor/airdropPowerUsersFetcher.d.ts +3 -0
  69. package/src/plugins/tensor/airdropPowerUsersFetcher.js +45 -0
  70. package/src/plugins/tensor/airdropPowerUsersFetcher.js.map +1 -0
  71. package/src/plugins/tensor/constants.d.ts +2 -0
  72. package/src/plugins/tensor/constants.js +3 -1
  73. package/src/plugins/tensor/constants.js.map +1 -1
  74. package/src/plugins/tensor/helpers.d.ts +1 -0
  75. package/src/plugins/tensor/helpers.js +16 -0
  76. package/src/plugins/tensor/helpers.js.map +1 -0
  77. package/src/plugins/tensor/index.js +6 -1
  78. package/src/plugins/tensor/index.js.map +1 -1
  79. package/src/plugins/tensor/powerUsers.json +2898 -0
  80. package/src/plugins/wormhole/airdropFetcher.js +1 -2
  81. package/src/plugins/wormhole/airdropFetcher.js.map +1 -1
@@ -0,0 +1,97 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ const bignumber_js_1 = __importDefault(require("bignumber.js"));
16
+ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
17
+ const clients_1 = require("../../utils/clients");
18
+ const solana_1 = require("../../utils/solana");
19
+ const constants_1 = require("./constants");
20
+ const structs_1 = require("./structs");
21
+ const filters_1 = require("./filters");
22
+ const constants_2 = require("../tokens/constants");
23
+ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
24
+ var _a, _b;
25
+ const client = (0, clients_1.getClientSolana)();
26
+ const markets = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.marketStruct, constants_1.programId, filters_1.marketAccountFilters);
27
+ const mints = markets
28
+ .map((market) => [
29
+ market.tokenLpMintAddress,
30
+ market.tokenPtMintAddress,
31
+ market.tokenYtMintAddress,
32
+ market.tokenLpMintAddress,
33
+ ])
34
+ .flat();
35
+ const baseMints = markets.map((market) => market.tokenSyMintAddress.toString());
36
+ const baseTokenPriceById = yield cache.getTokenPricesAsMap(baseMints, portfolio_core_1.NetworkId.solana);
37
+ const mintsAccounts = yield (0, solana_1.getParsedMultipleAccountsInfo)(client, solana_1.mintAccountStruct, mints);
38
+ const mintsInfoById = new Map();
39
+ mintsAccounts.forEach((mintAccount) => {
40
+ if (mintAccount)
41
+ mintsInfoById.set(mintAccount === null || mintAccount === void 0 ? void 0 : mintAccount.pubkey.toString(), mintAccount);
42
+ });
43
+ const sources = [];
44
+ const marketsInfos = [];
45
+ for (const market of markets) {
46
+ const baseTokenPrice = baseTokenPriceById.get(market.tokenSyMintAddress.toString());
47
+ if (!baseTokenPrice)
48
+ continue;
49
+ const ptPrice = market.marketConfig.startPrice.dividedBy(market.marketConfig.marketEndPrice);
50
+ const ytPrice = new bignumber_js_1.default(1).minus(ptPrice);
51
+ const ptMint = market.tokenPtMintAddress;
52
+ const ytMint = market.tokenYtMintAddress;
53
+ const ptDecimals = (_a = mintsInfoById.get(ptMint.toString())) === null || _a === void 0 ? void 0 : _a.decimals;
54
+ const ytDecimals = (_b = mintsInfoById.get(ytMint.toString())) === null || _b === void 0 ? void 0 : _b.decimals;
55
+ if (ptDecimals)
56
+ sources.push({
57
+ address: ptMint.toString(),
58
+ decimals: ptDecimals,
59
+ id: market.pubkey.toString(),
60
+ networkId: portfolio_core_1.NetworkId.solana,
61
+ platformId: constants_2.walletTokensPlatform.id,
62
+ price: ptPrice.times(baseTokenPrice.price).toNumber(),
63
+ timestamp: Date.now(),
64
+ weight: 1,
65
+ });
66
+ if (ytDecimals)
67
+ sources.push({
68
+ address: ytMint.toString(),
69
+ decimals: ytDecimals,
70
+ id: market.pubkey.toString(),
71
+ networkId: portfolio_core_1.NetworkId.solana,
72
+ platformId: constants_2.walletTokensPlatform.id,
73
+ price: ytPrice.times(baseTokenPrice.price).toNumber(),
74
+ timestamp: Date.now(),
75
+ weight: 1,
76
+ });
77
+ marketsInfos.push({
78
+ pubkey: market.pubkey.toString(),
79
+ ytMint: market.tokenYtMintAddress.toString(),
80
+ lpMint: market.tokenLpMintAddress.toString(),
81
+ ptMint: market.tokenPtMintAddress.toString(),
82
+ syMint: market.tokenSyMintAddress.toString(),
83
+ });
84
+ }
85
+ yield cache.setItem(constants_1.marketsInfoKey, marketsInfos, {
86
+ prefix: constants_1.platformId,
87
+ networkId: portfolio_core_1.NetworkId.solana,
88
+ });
89
+ yield cache.setTokenPriceSources(sources);
90
+ });
91
+ const job = {
92
+ id: `${constants_1.platformId}-markets`,
93
+ executor,
94
+ label: 'normal',
95
+ };
96
+ exports.default = job;
97
+ //# sourceMappingURL=marketsJob.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"marketsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/sandglass/marketsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,gEAAqC;AACrC,+DAAyE;AAGzE,iDAAsD;AACtD,+CAK4B;AAC5B,2CAAoE;AACpE,uCAAyC;AACzC,uCAAiD;AAEjD,mDAA2D;AAE3D,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,OAAO,GAAG,MAAM,IAAA,iCAAwB,EAC5C,MAAM,EACN,sBAAY,EACZ,qBAAS,EACT,8BAAoB,CACrB,CAAC;IAEF,MAAM,KAAK,GAAG,OAAO;SAClB,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;QACf,MAAM,CAAC,kBAAkB;QACzB,MAAM,CAAC,kBAAkB;QACzB,MAAM,CAAC,kBAAkB;QACzB,MAAM,CAAC,kBAAkB;KAC1B,CAAC;SACD,IAAI,EAAE,CAAC;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,CAAC,QAAQ,EAAE;YAC5C,MAAM,EAAE,MAAM,CAAC,kBAAkB,CAAC,QAAQ,EAAE;SAC7C,CAAC,CAAC;IACL,CAAC;IAED,MAAM,KAAK,CAAC,OAAO,CAAC,0BAAc,EAAE,YAAY,EAAE;QAChD,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;IAEH,MAAM,KAAK,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -0,0 +1,150 @@
1
+ /// <reference types="node" />
2
+ import { BeetStruct } from '@metaplex-foundation/beet';
3
+ import { PublicKey } from '@metaplex-foundation/js';
4
+ import BigNumber from 'bignumber.js';
5
+ export type MarketInfo = {
6
+ vaultSyAmount: BigNumber;
7
+ vaultPtAmount: BigNumber;
8
+ vaultYtAmount: BigNumber;
9
+ vaultLpAmount: BigNumber;
10
+ volume: BigNumber;
11
+ feeTrade: BigNumber;
12
+ feePlatform: BigNumber;
13
+ feeTradeVolume: BigNumber;
14
+ feePlatformVolume: BigNumber;
15
+ infoTemp1: BigNumber;
16
+ infoTemp2: BigNumber;
17
+ infoTemp3: BigNumber;
18
+ infoTemp4: BigNumber;
19
+ };
20
+ export declare const marketInfoStruct: BeetStruct<MarketInfo, Partial<MarketInfo>>;
21
+ export type MarketConfig = {
22
+ priceBase: BigNumber;
23
+ startTime: BigNumber;
24
+ startPrice: BigNumber;
25
+ startEpoch: BigNumber;
26
+ startLpValue: BigNumber;
27
+ endTime: BigNumber;
28
+ marketEndPrice: BigNumber;
29
+ marketApy: BigNumber;
30
+ updateSkipTime: BigNumber;
31
+ lastUpdateEpoch: BigNumber;
32
+ marketSolPrice: BigNumber;
33
+ lastUpdateTime: BigNumber;
34
+ marketConfig1: BigNumber;
35
+ marketConfig2: BigNumber;
36
+ marketConfig3: BigNumber;
37
+ marketConfig4: BigNumber;
38
+ marketConfig5: BigNumber;
39
+ marketConfig6: BigNumber;
40
+ marketConfig7: BigNumber;
41
+ };
42
+ export declare const marketConfigStruct: BeetStruct<MarketConfig, Partial<MarketConfig>>;
43
+ export type Freeze = {
44
+ market: number;
45
+ mint: number;
46
+ redeem: number;
47
+ trade: number;
48
+ deposi: number;
49
+ withdr: number;
50
+ };
51
+ export declare const freezeStruct: BeetStruct<Freeze, Partial<Freeze>>;
52
+ export type Fees = {
53
+ feeDenominator: BigNumber;
54
+ tradeFeeNumerator: BigNumber;
55
+ platformFeeNumerator: BigNumber;
56
+ yieldFeeNumerator: BigNumber;
57
+ feeNumerator1: BigNumber;
58
+ feeNumerator2: BigNumber;
59
+ };
60
+ export declare const feesStruct: BeetStruct<Fees, Partial<Fees>>;
61
+ export type PoolConfig = {
62
+ fees: Fees;
63
+ configDenominator: BigNumber;
64
+ leverage: BigNumber;
65
+ poolConfig8: BigNumber;
66
+ poolConfig9: BigNumber;
67
+ spreadReduce: BigNumber;
68
+ feeTimeExp: BigNumber;
69
+ depositCapPt: BigNumber;
70
+ poolConfig1: BigNumber;
71
+ poolConfig2: BigNumber;
72
+ poolConfig3: BigNumber;
73
+ poolConfig4: BigNumber;
74
+ poolConfig5: BigNumber;
75
+ poolConfig6: BigNumber;
76
+ poolConfig7: BigNumber;
77
+ };
78
+ export declare const poolConfigStruct: BeetStruct<PoolConfig, Partial<PoolConfig>>;
79
+ export type Market = {
80
+ buffer: Buffer;
81
+ bumpSeed: number;
82
+ freeze: Freeze;
83
+ marketSigner: PublicKey;
84
+ tokenProgram: PublicKey;
85
+ marketInfo: MarketInfo;
86
+ marketConfig: MarketConfig;
87
+ poolConfig: PoolConfig;
88
+ oracleAccount: PublicKey;
89
+ tokenSyMintAddress: PublicKey;
90
+ tokenPtMintAddress: PublicKey;
91
+ tokenYtMintAddress: PublicKey;
92
+ tokenLpMintAddress: PublicKey;
93
+ poolPtTokenAccount: PublicKey;
94
+ poolYtTokenAccount: PublicKey;
95
+ vaultSyTokenAccount: PublicKey;
96
+ vaultPtTokenAccount: PublicKey;
97
+ vaultYtTokenAccount: PublicKey;
98
+ vaultLpTokenAccount: PublicKey;
99
+ feeLpTokenAccount: PublicKey;
100
+ marketAddress1: PublicKey;
101
+ marketAddress2: PublicKey;
102
+ marketAddress3: PublicKey;
103
+ marketAddress4: PublicKey;
104
+ marketAddress5: PublicKey;
105
+ marketAddress6: PublicKey;
106
+ marketAddress7: PublicKey;
107
+ };
108
+ export declare const marketStruct: BeetStruct<Market, Partial<Market>>;
109
+ export type TradeInfo = {
110
+ volume: BigNumber;
111
+ tradeInfo1: BigNumber;
112
+ tradeInfo2: BigNumber;
113
+ tradeInfo3: BigNumber;
114
+ tradeInfo4: BigNumber;
115
+ tradeInfo5: BigNumber;
116
+ };
117
+ export declare const tradeInfoStruct: BeetStruct<TradeInfo, Partial<TradeInfo>>;
118
+ export type StakeInfo = {
119
+ stakePtAmount: BigNumber;
120
+ stakePtTime: BigNumber;
121
+ stakePtPriceSy: BigNumber;
122
+ stakePtPricePt: BigNumber;
123
+ stakeYtAmount: BigNumber;
124
+ stakeYtTime: BigNumber;
125
+ stakeYtPriceSy: BigNumber;
126
+ stakeYtPriceYt: BigNumber;
127
+ stakeLpAmount: BigNumber;
128
+ stakeLpTime: BigNumber;
129
+ stakeLpPriceSy: BigNumber;
130
+ staleInfo1: BigNumber;
131
+ staleInfo2: BigNumber;
132
+ staleInfo3: BigNumber;
133
+ staleInfo4: BigNumber;
134
+ staleInfo5: BigNumber;
135
+ };
136
+ export declare const stakeInfoStruct: BeetStruct<StakeInfo, Partial<StakeInfo>>;
137
+ export type SandglassAccount = {
138
+ buffer: Buffer;
139
+ bumpSeed: number;
140
+ marketAccount: PublicKey;
141
+ userAddress: PublicKey;
142
+ tradeInfo: TradeInfo;
143
+ stakeInfo: StakeInfo;
144
+ sandglassAddress1: PublicKey;
145
+ sandglassAddress2: PublicKey;
146
+ sandglassAddress3: PublicKey;
147
+ sandglassAddress4: PublicKey;
148
+ sandglassAddress5: PublicKey;
149
+ };
150
+ export declare const sandglassAccountStruct: BeetStruct<SandglassAccount, Partial<SandglassAccount>>;
@@ -0,0 +1,144 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.sandglassAccountStruct = exports.stakeInfoStruct = exports.tradeInfoStruct = exports.marketStruct = exports.poolConfigStruct = exports.feesStruct = exports.freezeStruct = exports.marketConfigStruct = exports.marketInfoStruct = 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.marketInfoStruct = new beet_1.BeetStruct([
8
+ ['vaultSyAmount', solana_1.u64],
9
+ ['vaultPtAmount', solana_1.u64],
10
+ ['vaultYtAmount', solana_1.u64],
11
+ ['vaultLpAmount', solana_1.u64],
12
+ ['volume', solana_1.u64],
13
+ ['feeTrade', solana_1.u64],
14
+ ['feePlatform', solana_1.u64],
15
+ ['feeTradeVolume', solana_1.u64],
16
+ ['feePlatformVolume', solana_1.u64],
17
+ ['infoTemp1', solana_1.u64],
18
+ ['infoTemp2', solana_1.u64],
19
+ ['infoTemp3', solana_1.u64],
20
+ ['infoTemp4', solana_1.u64],
21
+ ], (args) => args);
22
+ exports.marketConfigStruct = new beet_1.BeetStruct([
23
+ ['priceBase', solana_1.u64],
24
+ ['startTime', solana_1.u64],
25
+ ['startPrice', solana_1.u64],
26
+ ['startEpoch', solana_1.u64],
27
+ ['startLpValue', solana_1.u64],
28
+ ['endTime', solana_1.u64],
29
+ ['marketEndPrice', solana_1.u64],
30
+ ['marketApy', solana_1.u64],
31
+ ['updateSkipTime', solana_1.u64],
32
+ ['lastUpdateEpoch', solana_1.u64],
33
+ ['marketSolPrice', solana_1.u64],
34
+ ['lastUpdateTime', solana_1.u64],
35
+ ['marketConfig1', solana_1.u64],
36
+ ['marketConfig2', solana_1.u64],
37
+ ['marketConfig3', solana_1.u64],
38
+ ['marketConfig4', solana_1.u64],
39
+ ['marketConfig5', solana_1.u64],
40
+ ['marketConfig6', solana_1.u64],
41
+ ['marketConfig7', solana_1.u64],
42
+ ], (args) => args);
43
+ exports.freezeStruct = new beet_1.BeetStruct([
44
+ ['market', beet_1.u8],
45
+ ['mint', beet_1.u8],
46
+ ['redeem', beet_1.u8],
47
+ ['trade', beet_1.u8],
48
+ ['deposi', beet_1.u8],
49
+ ['withdr', beet_1.u8],
50
+ ], (args) => args);
51
+ exports.feesStruct = new beet_1.BeetStruct([
52
+ ['feeDenominator', solana_1.u64],
53
+ ['tradeFeeNumerator', solana_1.u64],
54
+ ['platformFeeNumerator', solana_1.u64],
55
+ ['yieldFeeNumerator', solana_1.u64],
56
+ ['feeNumerator1', solana_1.u64],
57
+ ['feeNumerator2', solana_1.u64],
58
+ ], (args) => args);
59
+ exports.poolConfigStruct = new beet_1.BeetStruct([
60
+ ['fees', exports.feesStruct],
61
+ ['configDenominator', solana_1.u64],
62
+ ['leverage', solana_1.u64],
63
+ ['poolConfig8', solana_1.u64],
64
+ ['poolConfig9', solana_1.u64],
65
+ ['spreadReduce', solana_1.u64],
66
+ ['feeTimeExp', solana_1.u64],
67
+ ['depositCapPt', solana_1.u64],
68
+ ['poolConfig1', solana_1.u64],
69
+ ['poolConfig2', solana_1.u64],
70
+ ['poolConfig3', solana_1.u64],
71
+ ['poolConfig4', solana_1.u64],
72
+ ['poolConfig5', solana_1.u64],
73
+ ['poolConfig6', solana_1.u64],
74
+ ['poolConfig7', solana_1.u64],
75
+ ], (args) => args);
76
+ exports.marketStruct = new beet_1.BeetStruct([
77
+ ['buffer', (0, solana_1.blob)(8)],
78
+ ['bumpSeed', beet_1.u8],
79
+ ['freeze', exports.freezeStruct],
80
+ ['marketSigner', beet_solana_1.publicKey],
81
+ ['tokenProgram', beet_solana_1.publicKey],
82
+ ['marketInfo', exports.marketInfoStruct],
83
+ ['marketConfig', exports.marketConfigStruct],
84
+ ['poolConfig', exports.poolConfigStruct],
85
+ ['oracleAccount', beet_solana_1.publicKey],
86
+ ['tokenSyMintAddress', beet_solana_1.publicKey],
87
+ ['tokenPtMintAddress', beet_solana_1.publicKey],
88
+ ['tokenYtMintAddress', beet_solana_1.publicKey],
89
+ ['tokenLpMintAddress', beet_solana_1.publicKey],
90
+ ['poolPtTokenAccount', beet_solana_1.publicKey],
91
+ ['poolYtTokenAccount', beet_solana_1.publicKey],
92
+ ['vaultSyTokenAccount', beet_solana_1.publicKey],
93
+ ['vaultPtTokenAccount', beet_solana_1.publicKey],
94
+ ['vaultYtTokenAccount', beet_solana_1.publicKey],
95
+ ['vaultLpTokenAccount', beet_solana_1.publicKey],
96
+ ['feeLpTokenAccount', beet_solana_1.publicKey],
97
+ ['marketAddress1', beet_solana_1.publicKey],
98
+ ['marketAddress2', beet_solana_1.publicKey],
99
+ ['marketAddress3', beet_solana_1.publicKey],
100
+ ['marketAddress4', beet_solana_1.publicKey],
101
+ ['marketAddress5', beet_solana_1.publicKey],
102
+ ['marketAddress6', beet_solana_1.publicKey],
103
+ ['marketAddress7', beet_solana_1.publicKey],
104
+ ], (args) => args);
105
+ exports.tradeInfoStruct = new beet_1.BeetStruct([
106
+ ['volume', solana_1.u64],
107
+ ['tradeInfo1', solana_1.u64],
108
+ ['tradeInfo2', solana_1.u64],
109
+ ['tradeInfo3', solana_1.u64],
110
+ ['tradeInfo4', solana_1.u64],
111
+ ['tradeInfo5', solana_1.u64],
112
+ ], (args) => args);
113
+ exports.stakeInfoStruct = new beet_1.BeetStruct([
114
+ ['stakePtAmount', solana_1.u64],
115
+ ['stakePtTime', solana_1.i64],
116
+ ['stakePtPriceSy', solana_1.u64],
117
+ ['stakePtPricePt', solana_1.u64],
118
+ ['stakeYtAmount', solana_1.u64],
119
+ ['stakeYtTime', solana_1.i64],
120
+ ['stakeYtPriceSy', solana_1.u64],
121
+ ['stakeYtPriceYt', solana_1.u64],
122
+ ['stakeLpAmount', solana_1.u64],
123
+ ['stakeLpTime', solana_1.i64],
124
+ ['stakeLpPriceSy', solana_1.u64],
125
+ ['staleInfo1', solana_1.u64],
126
+ ['staleInfo2', solana_1.u64],
127
+ ['staleInfo3', solana_1.u64],
128
+ ['staleInfo4', solana_1.u64],
129
+ ['staleInfo5', solana_1.u64],
130
+ ], (args) => args);
131
+ exports.sandglassAccountStruct = new beet_1.BeetStruct([
132
+ ['buffer', (0, solana_1.blob)(8)],
133
+ ['bumpSeed', beet_1.u8],
134
+ ['marketAccount', beet_solana_1.publicKey],
135
+ ['userAddress', beet_solana_1.publicKey],
136
+ ['tradeInfo', exports.tradeInfoStruct],
137
+ ['stakeInfo', exports.stakeInfoStruct],
138
+ ['sandglassAddress1', beet_solana_1.publicKey],
139
+ ['sandglassAddress2', beet_solana_1.publicKey],
140
+ ['sandglassAddress3', beet_solana_1.publicKey],
141
+ ['sandglassAddress4', beet_solana_1.publicKey],
142
+ ['sandglassAddress5', beet_solana_1.publicKey],
143
+ ], (args) => args);
144
+ //# sourceMappingURL=structs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/sandglass/structs.ts"],"names":[],"mappings":";;;AAAA,oDAA2D;AAC3D,kEAA6D;AAG7D,+CAAoD;AAkBvC,QAAA,gBAAgB,GAAG,IAAI,iBAAU,CAC5C;IACE,CAAC,eAAe,EAAE,YAAG,CAAC;IACtB,CAAC,eAAe,EAAE,YAAG,CAAC;IACtB,CAAC,eAAe,EAAE,YAAG,CAAC;IACtB,CAAC,eAAe,EAAE,YAAG,CAAC;IACtB,CAAC,QAAQ,EAAE,YAAG,CAAC;IACf,CAAC,UAAU,EAAE,YAAG,CAAC;IACjB,CAAC,aAAa,EAAE,YAAG,CAAC;IACpB,CAAC,gBAAgB,EAAE,YAAG,CAAC;IACvB,CAAC,mBAAmB,EAAE,YAAG,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AAE,uBAAS,CAAC;IAChC,CAAC,mBAAmB,EAAE,uBAAS,CAAC;IAChC,CAAC,mBAAmB,EAAE,uBAAS,CAAC;CACjC,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAwB,CACnC,CAAC"}
@@ -0,0 +1,7 @@
1
+ export type MarketInfo = {
2
+ pubkey: string;
3
+ ytMint: string;
4
+ ptMint: string;
5
+ lpMint: string;
6
+ syMint: string;
7
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/sandglass/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import { Fetcher } from '../../Fetcher';
2
+ declare const fetcher: Fetcher;
3
+ export default fetcher;
@@ -0,0 +1,45 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
16
+ const constants_1 = require("./constants");
17
+ const helpers_1 = require("./helpers");
18
+ const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
19
+ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
20
+ const amount = (0, helpers_1.findPowerUserAllocation)(owner);
21
+ if (!amount)
22
+ return [];
23
+ const tokenPrice = yield cache.getTokenPrice(constants_1.tnsrMint, portfolio_core_1.NetworkId.solana);
24
+ const asset = (0, tokenPriceToAssetToken_1.default)(constants_1.tnsrMint, amount, portfolio_core_1.NetworkId.solana, tokenPrice, undefined, { isClaimable: false });
25
+ return [
26
+ {
27
+ type: 'multiple',
28
+ label: 'Airdrop',
29
+ networkId: portfolio_core_1.NetworkId.solana,
30
+ platformId: constants_1.platformId,
31
+ name: 'Power User',
32
+ data: {
33
+ assets: [asset],
34
+ },
35
+ value: asset.value,
36
+ },
37
+ ];
38
+ });
39
+ const fetcher = {
40
+ id: `${constants_1.platformId}-airdrop-power-users`,
41
+ networkId: portfolio_core_1.NetworkId.solana,
42
+ executor,
43
+ };
44
+ exports.default = fetcher;
45
+ //# sourceMappingURL=airdropPowerUsersFetcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"airdropPowerUsersFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/airdropPowerUsersFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AAGvD,2CAAmD;AACnD,uCAAoD;AACpD,qGAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,iCAAuB,EAAC,KAAK,CAAC,CAAC;IAC9C,IAAI,CAAC,MAAM;QAAE,OAAO,EAAE,CAAC;IAEvB,MAAM,UAAU,GAAG,MAAM,KAAK,CAAC,aAAa,CAAC,oBAAQ,EAAE,0BAAS,CAAC,MAAM,CAAC,CAAC;IAEzE,MAAM,KAAK,GAAG,IAAA,gCAAsB,EAClC,oBAAQ,EACR,MAAM,EACN,0BAAS,CAAC,MAAM,EAChB,UAAU,EACV,SAAS,EACT,EAAE,WAAW,EAAE,KAAK,EAAE,CACvB,CAAC;IAEF,OAAO;QACL;YACE,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,SAAS;YAChB,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,IAAI,EAAE,YAAY;YAClB,IAAI,EAAE;gBACJ,MAAM,EAAE,CAAC,KAAK,CAAC;aAChB;YACD,KAAK,EAAE,KAAK,CAAC,KAAK;SACnB;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,sBAAsB;IACvC,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -5,3 +5,5 @@ export declare const platform: Platform;
5
5
  export declare const cachePrefix = "tensor";
6
6
  export declare const tensorPid: PublicKey;
7
7
  export declare const locksPid: PublicKey;
8
+ export declare const tnsrMint = "TNSRxcUxoT9xBG3de7PiJyTDYu7kskLqcpddxnEJAS6";
9
+ export declare const tnsrDecimals = 9;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.locksPid = exports.tensorPid = exports.cachePrefix = exports.platform = exports.platformId = void 0;
3
+ exports.tnsrDecimals = exports.tnsrMint = exports.locksPid = exports.tensorPid = exports.cachePrefix = exports.platform = exports.platformId = void 0;
4
4
  const web3_js_1 = require("@solana/web3.js");
5
5
  exports.platformId = 'tensor';
6
6
  exports.platform = {
@@ -13,4 +13,6 @@ exports.platform = {
13
13
  exports.cachePrefix = 'tensor';
14
14
  exports.tensorPid = new web3_js_1.PublicKey('TSWAPaqyCSx2KABk68Shruf4rp7CxcNi8hAsbdwmHbN');
15
15
  exports.locksPid = new web3_js_1.PublicKey('TLoCKic2wGJm7VhZKumih4Lc35fUhYqVMgA4j389Buk');
16
+ exports.tnsrMint = 'TNSRxcUxoT9xBG3de7PiJyTDYu7kskLqcpddxnEJAS6';
17
+ exports.tnsrDecimals = 9;
16
18
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,QAAQ,CAAC;AACtB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,8CAA8C;IACrD,OAAO,EAAE,+BAA+B;IACxC,OAAO,EAAE,2BAA2B;CACrC,CAAC;AACW,QAAA,WAAW,GAAG,QAAQ,CAAC;AAEvB,QAAA,SAAS,GAAG,IAAI,mBAAS,CACpC,6CAA6C,CAC9C,CAAC;AAEW,QAAA,QAAQ,GAAG,IAAI,mBAAS,CACnC,6CAA6C,CAC9C,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,QAAQ,CAAC;AACtB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,8CAA8C;IACrD,OAAO,EAAE,+BAA+B;IACxC,OAAO,EAAE,2BAA2B;CACrC,CAAC;AACW,QAAA,WAAW,GAAG,QAAQ,CAAC;AAEvB,QAAA,SAAS,GAAG,IAAI,mBAAS,CACpC,6CAA6C,CAC9C,CAAC;AAEW,QAAA,QAAQ,GAAG,IAAI,mBAAS,CACnC,6CAA6C,CAC9C,CAAC;AACW,QAAA,QAAQ,GAAG,6CAA6C,CAAC;AACzD,QAAA,YAAY,GAAG,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export declare function findPowerUserAllocation(owner: string): number | undefined;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.findPowerUserAllocation = void 0;
7
+ const powerUsers_json_1 = __importDefault(require("./powerUsers.json"));
8
+ function findPowerUserAllocation(owner) {
9
+ const users = powerUsers_json_1.default;
10
+ const amount = users[owner];
11
+ if (!amount)
12
+ return undefined;
13
+ return amount;
14
+ }
15
+ exports.findPowerUserAllocation = findPowerUserAllocation;
16
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/helpers.ts"],"names":[],"mappings":";;;;;;AAAA,wEAA2C;AAE3C,SAAgB,uBAAuB,CAAC,KAAa;IACnD,MAAM,KAAK,GAA8B,yBAAU,CAAC;IACpD,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;IAC5B,IAAI,CAAC,MAAM;QAAE,OAAO,SAAS,CAAC;IAC9B,OAAO,MAAM,CAAC;AAChB,CAAC;AALD,0DAKC"}
@@ -7,6 +7,11 @@ exports.fetchers = exports.platforms = void 0;
7
7
  const constants_1 = require("./constants");
8
8
  const bidsFetcher_1 = __importDefault(require("./bidsFetcher"));
9
9
  const locksFetcher_1 = __importDefault(require("./locksFetcher"));
10
+ const airdropPowerUsersFetcher_1 = __importDefault(require("./airdropPowerUsersFetcher"));
10
11
  exports.platforms = [constants_1.platform];
11
- exports.fetchers = [bidsFetcher_1.default, locksFetcher_1.default];
12
+ exports.fetchers = [
13
+ bidsFetcher_1.default,
14
+ locksFetcher_1.default,
15
+ airdropPowerUsersFetcher_1.default,
16
+ ];
12
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/index.ts"],"names":[],"mappings":";;;;;;AAIA,2CAAuC;AACvC,gEAAwC;AACxC,kEAA0C;AAE7B,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,QAAQ,GAAc,CAAC,qBAAW,EAAE,sBAAY,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/index.ts"],"names":[],"mappings":";;;;;;AAIA,2CAAuC;AACvC,gEAAwC;AACxC,kEAA0C;AAC1C,0FAAiE;AAEpD,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,QAAQ,GAAc;IACjC,qBAAW;IACX,sBAAY;IACZ,kCAAuB;CACxB,CAAC"}