@sonarwatch/portfolio-plugins 0.12.27 → 0.12.29

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. package/CHANGELOG.md +1810 -1802
  2. package/README.md +3 -3
  3. package/package.json +1 -1
  4. package/src/plugins/balancer/helpers/pools.js +21 -21
  5. package/src/plugins/bluefin/positionFetcher.js +5 -5
  6. package/src/plugins/bluefin/positionFetcher.js.map +1 -1
  7. package/src/plugins/bonfida/airdropFetcher.d.ts +3 -0
  8. package/src/plugins/bonfida/airdropFetcher.js +59 -0
  9. package/src/plugins/bonfida/airdropFetcher.js.map +1 -0
  10. package/src/plugins/bonfida/constants.d.ts +4 -0
  11. package/src/plugins/bonfida/constants.js +5 -1
  12. package/src/plugins/bonfida/constants.js.map +1 -1
  13. package/src/plugins/bonfida/filters.d.ts +2 -0
  14. package/src/plugins/bonfida/filters.js +15 -0
  15. package/src/plugins/bonfida/filters.js.map +1 -0
  16. package/src/plugins/bonfida/index.js +2 -1
  17. package/src/plugins/bonfida/index.js.map +1 -1
  18. package/src/plugins/bonfida/types.d.ts +6 -0
  19. package/src/plugins/bonfida/types.js +3 -0
  20. package/src/plugins/bonfida/types.js.map +1 -0
  21. package/src/plugins/flash/perpetualFetcher.js +8 -13
  22. package/src/plugins/flash/perpetualFetcher.js.map +1 -1
  23. package/src/plugins/flash/poolJob.js +1 -1
  24. package/src/plugins/flash/poolJob.js.map +1 -1
  25. package/src/plugins/flash/structs.d.ts +2 -2
  26. package/src/plugins/flash/structs.js +2 -2
  27. package/src/plugins/flash/structs.js.map +1 -1
  28. package/src/plugins/futarchy/constants.js +3 -0
  29. package/src/plugins/futarchy/constants.js.map +1 -1
  30. package/src/plugins/jupiter/exchange/constants.d.ts +1 -0
  31. package/src/plugins/jupiter/exchange/constants.js +2 -1
  32. package/src/plugins/jupiter/exchange/constants.js.map +1 -1
  33. package/src/plugins/jupiter/exchange/custodiesJob.js +11 -4
  34. package/src/plugins/jupiter/exchange/custodiesJob.js.map +1 -1
  35. package/src/plugins/jupiter/exchange/filters.js +1 -6
  36. package/src/plugins/jupiter/exchange/filters.js.map +1 -1
  37. package/src/plugins/jupiter/exchange/perpetualFetcher.js +54 -45
  38. package/src/plugins/jupiter/exchange/perpetualFetcher.js.map +1 -1
  39. package/src/plugins/jupiter/exchange/structs.d.ts +1 -0
  40. package/src/plugins/jupiter/exchange/structs.js +1 -0
  41. package/src/plugins/jupiter/exchange/structs.js.map +1 -1
  42. package/src/plugins/jupiter/types.d.ts +27 -2
  43. package/src/plugins/jupiter/types.js.map +1 -1
  44. package/src/plugins/kamino/constants.js +4 -0
  45. package/src/plugins/kamino/constants.js.map +1 -1
  46. package/src/plugins/meteora/dlmmPositionsFetcher.js +8 -9
  47. package/src/plugins/meteora/dlmmPositionsFetcher.js.map +1 -1
  48. package/src/plugins/parcl/marginFetcher.js +4 -2
  49. package/src/plugins/parcl/marginFetcher.js.map +1 -1
  50. package/src/plugins/pyth/stakingFetcher.js +4 -2
  51. package/src/plugins/pyth/stakingFetcher.js.map +1 -1
  52. package/src/plugins/raydium/clmmJob.js +114 -15
  53. package/src/plugins/raydium/clmmJob.js.map +1 -1
  54. package/src/plugins/raydium/cpmmJob.js +79 -65
  55. package/src/plugins/raydium/cpmmJob.js.map +1 -1
  56. package/src/plugins/sushiswap/helpers.js +24 -24
  57. package/src/plugins/uniswap-v2/helpers.js +22 -22
  58. package/src/plugins/whalesmarket/constants.d.ts +3 -0
  59. package/src/plugins/whalesmarket/constants.js +4 -1
  60. package/src/plugins/whalesmarket/constants.js.map +1 -1
  61. package/src/plugins/whalesmarket/depositFetcher.js +119 -26
  62. package/src/plugins/whalesmarket/depositFetcher.js.map +1 -1
  63. package/src/plugins/whalesmarket/filters.d.ts +20 -0
  64. package/src/plugins/whalesmarket/filters.js +25 -1
  65. package/src/plugins/whalesmarket/filters.js.map +1 -1
  66. package/src/plugins/whalesmarket/index.js +2 -1
  67. package/src/plugins/whalesmarket/index.js.map +1 -1
  68. package/src/plugins/whalesmarket/structs.d.ts +29 -0
  69. package/src/plugins/whalesmarket/structs.js +31 -1
  70. package/src/plugins/whalesmarket/structs.js.map +1 -1
  71. package/src/plugins/whalesmarket/tokensJob.d.ts +3 -0
  72. package/src/plugins/whalesmarket/tokensJob.js +47 -0
  73. package/src/plugins/whalesmarket/tokensJob.js.map +1 -0
  74. package/src/plugins/whalesmarket/types.d.ts +111 -0
  75. package/src/plugins/whalesmarket/types.js +48 -0
  76. package/src/plugins/whalesmarket/types.js.map +1 -0
  77. package/src/utils/misc/constants.d.ts +1 -0
  78. package/src/utils/misc/constants.js +2 -1
  79. package/src/utils/misc/constants.js.map +1 -1
  80. package/src/utils/misc/getLpUnderlyingTokenSource.js +2 -1
  81. package/src/utils/misc/getLpUnderlyingTokenSource.js.map +1 -1
  82. package/src/utils/sei/constants.js +8 -8
  83. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
  84. package/src/utils/solana/pyth/helpers.d.ts +2 -2
  85. package/src/utils/solana/pyth/helpers.js +13 -7
  86. package/src/utils/solana/pyth/helpers.js.map +1 -1
@@ -34,6 +34,7 @@ export type Offer = {
34
34
  };
35
35
  export declare const offerStruct: BeetStruct<Offer, Partial<Offer>>;
36
36
  export type Order = {
37
+ buffer: Buffer;
37
38
  version: number;
38
39
  id: BigNumber;
39
40
  config: PublicKey;
@@ -56,3 +57,31 @@ export type ExToken = {
56
57
  vaultTokenBump: number;
57
58
  };
58
59
  export declare const exTokenStruct: BeetStruct<ExToken, Partial<ExToken>>;
60
+ export declare enum TokenCategory {
61
+ Point = 0,
62
+ PreMarket = 1
63
+ }
64
+ export declare enum TokenStatus {
65
+ Active = 0,
66
+ Settle = 1,
67
+ Inactive = 2
68
+ }
69
+ export type TokenConfig = {
70
+ buffer: Buffer;
71
+ version: number;
72
+ id: number;
73
+ bump: number;
74
+ settleTime: BigNumber;
75
+ settleDuration: BigNumber;
76
+ pledgeRate: BigNumber;
77
+ status: TokenStatus;
78
+ token: PublicKey;
79
+ config: PublicKey;
80
+ vaultToken: PublicKey;
81
+ vaultTokenBump: number;
82
+ settleRate: BigNumber;
83
+ category: TokenCategory;
84
+ feeRefund: BigNumber;
85
+ feeSettle: BigNumber;
86
+ };
87
+ export declare const tokenConfigStruct: BeetStruct<TokenConfig, Partial<TokenConfig>>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.exTokenStruct = exports.orderStruct = exports.offerStruct = exports.OrderStatus = exports.OfferType = exports.OfferStatus = void 0;
3
+ exports.tokenConfigStruct = exports.TokenStatus = exports.TokenCategory = exports.exTokenStruct = exports.orderStruct = exports.offerStruct = exports.OrderStatus = exports.OfferType = exports.OfferStatus = 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");
@@ -38,6 +38,7 @@ exports.offerStruct = new beet_1.BeetStruct([
38
38
  ['config', beet_solana_1.publicKey],
39
39
  ], (args) => args);
40
40
  exports.orderStruct = new beet_1.BeetStruct([
41
+ ['buffer', (0, solana_1.blob)(8)],
41
42
  ['version', beet_1.u8],
42
43
  ['id', solana_1.u64],
43
44
  ['config', beet_solana_1.publicKey],
@@ -58,4 +59,33 @@ exports.exTokenStruct = new beet_1.BeetStruct([
58
59
  ['vaultToken', beet_solana_1.publicKey],
59
60
  ['vaultTokenBump', beet_1.u8],
60
61
  ], (args) => args);
62
+ var TokenCategory;
63
+ (function (TokenCategory) {
64
+ TokenCategory[TokenCategory["Point"] = 0] = "Point";
65
+ TokenCategory[TokenCategory["PreMarket"] = 1] = "PreMarket";
66
+ })(TokenCategory || (exports.TokenCategory = TokenCategory = {}));
67
+ var TokenStatus;
68
+ (function (TokenStatus) {
69
+ TokenStatus[TokenStatus["Active"] = 0] = "Active";
70
+ TokenStatus[TokenStatus["Settle"] = 1] = "Settle";
71
+ TokenStatus[TokenStatus["Inactive"] = 2] = "Inactive";
72
+ })(TokenStatus || (exports.TokenStatus = TokenStatus = {}));
73
+ exports.tokenConfigStruct = new beet_1.BeetStruct([
74
+ ['buffer', (0, solana_1.blob)(8)],
75
+ ['version', beet_1.u8],
76
+ ['id', beet_1.u16],
77
+ ['bump', beet_1.u8],
78
+ ['settleTime', solana_1.i64],
79
+ ['settleDuration', solana_1.i64],
80
+ ['pledgeRate', solana_1.u64],
81
+ ['status', beet_1.u8],
82
+ ['token', beet_solana_1.publicKey],
83
+ ['config', beet_solana_1.publicKey],
84
+ ['vaultToken', beet_solana_1.publicKey],
85
+ ['vaultTokenBump', beet_1.u8],
86
+ ['settleRate', solana_1.u64],
87
+ ['category', beet_1.u8],
88
+ ['feeRefund', solana_1.u64],
89
+ ['feeSettle', solana_1.u64],
90
+ ], (args) => args);
61
91
  //# sourceMappingURL=structs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/whalesmarket/structs.ts"],"names":[],"mappings":";;;AAAA,oDAAiE;AACjE,kEAA6D;AAG7D,+CAA+C;AAE/C,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,6CAAI,CAAA;IACJ,iDAAM,CAAA;AACR,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB;AAED,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,uCAAG,CAAA;IACH,yCAAI,CAAA;AACN,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AAED,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,6CAAI,CAAA;IACJ,iDAAM,CAAA;IACN,uDAAS,CAAA;AACX,CAAC,EAJW,WAAW,2BAAX,WAAW,QAItB;AAoBY,QAAA,WAAW,GAAG,IAAI,iBAAU,CACvC;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,SAAS,EAAE,SAAE,CAAC;IACf,CAAC,IAAI,EAAE,YAAG,CAAC;IACX,CAAC,WAAW,EAAE,SAAE,CAAC;IACjB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,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAe,CAC1B,CAAC"}
1
+ {"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/whalesmarket/structs.ts"],"names":[],"mappings":";;;AAAA,oDAAsE;AACtE,kEAA6D;AAG7D,+CAAoD;AAEpD,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,6CAAI,CAAA;IACJ,iDAAM,CAAA;AACR,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB;AAED,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,uCAAG,CAAA;IACH,yCAAI,CAAA;AACN,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AAED,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,6CAAI,CAAA;IACJ,iDAAM,CAAA;IACN,uDAAS,CAAA;AACX,CAAC,EAJW,WAAW,2BAAX,WAAW,QAItB;AAoBY,QAAA,WAAW,GAAG,IAAI,iBAAU,CACvC;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,SAAS,EAAE,SAAE,CAAC;IACf,CAAC,IAAI,EAAE,YAAG,CAAC;IACX,CAAC,WAAW,EAAE,SAAE,CAAC;IACjB,CAAC,aAAa,EAAE,uBAAS,CAAC;IAC1B,CAAC,aAAa,EAAE,YAAG,CAAC;IACpB,CAAC,OAAO,EAAE,YAAG,CAAC;IACd,CAAC,SAAS,EAAE,uBAAS,CAAC;IACtB,CAAC,YAAY,EAAE,YAAG,CAAC;IACnB,CAAC,QAAQ,EAAE,SAAE,CAAC;IACd,CAAC,cAAc,EAAE,YAAG,CAAC;IACrB,CAAC,aAAa,EAAE,WAAI,CAAC;IACrB,CAAC,WAAW,EAAE,uBAAS,CAAC;IACxB,CAAC,MAAM,EAAE,SAAE,CAAC;IACZ,CAAC,QAAQ,EAAE,uBAAS,CAAC;CACtB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAa,CACxB,C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EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,SAAS,EAAE,SAAE,CAAC;IACf,CAAC,IAAI,EAAE,UAAG,CAAC;IACX,CAAC,MAAM,EAAE,SAAE,CAAC;IACZ,CAAC,YAAY,EAAE,YAAG,CAAC;IACnB,CAAC,gBAAgB,EAAE,YAAG,CAAC;IACvB,CAAC,YAAY,EAAE,YAAG,CAAC;IACnB,CAAC,QAAQ,EAAE,SAAE,CAAC;IACd,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,QAAQ,EAAE,uBAAS,CAAC;IACrB,CAAC,YAAY,EAAE,uBAAS,CAAC;IACzB,CAAC,gBAAgB,EAAE,SAAE,CAAC;IACtB,CAAC,YAAY,EAAE,YAAG,CAAC;IACnB,CAAC,UAAU,EAAE,SAAE,CAAC;IAChB,CAAC,WAAW,EAAE,YAAG,CAAC;IAClB,CAAC,WAAW,EAAE,YAAG,CAAC;CACnB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAmB,CAC9B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Job } from '../../Job';
2
+ declare const job: Job;
3
+ export default job;
@@ -0,0 +1,47 @@
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 axios_1 = __importDefault(require("axios"));
16
+ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
17
+ const constants_1 = require("./constants");
18
+ const minToTake = 200;
19
+ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
20
+ const lastCount = yield cache.getItem(constants_1.lastCountKey, {
21
+ prefix: constants_1.platformId,
22
+ networkId: portfolio_core_1.NetworkId.solana,
23
+ });
24
+ const apiRes = yield axios_1.default
25
+ .get(constants_1.whalesApi, {
26
+ params: { take: lastCount || minToTake, chain_id: 666666 },
27
+ })
28
+ .catch(() => null);
29
+ if (apiRes === null || apiRes === void 0 ? void 0 : apiRes.data.data) {
30
+ const tokens = apiRes.data.data.list;
31
+ yield cache.setItem(constants_1.tokensKey, tokens, {
32
+ prefix: constants_1.platformId,
33
+ networkId: portfolio_core_1.NetworkId.solana,
34
+ });
35
+ yield cache.setItem(constants_1.lastCountKey, apiRes.data.data.count, {
36
+ prefix: constants_1.platformId,
37
+ networkId: portfolio_core_1.NetworkId.solana,
38
+ });
39
+ }
40
+ });
41
+ const job = {
42
+ id: `${constants_1.platformId}-tokens`,
43
+ executor,
44
+ label: 'normal',
45
+ };
46
+ exports.default = job;
47
+ //# sourceMappingURL=tokensJob.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokensJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/whalesmarket/tokensJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,kDAA6C;AAC7C,+DAAuD;AAGvD,2CAA6E;AAG7E,MAAM,SAAS,GAAG,GAAG,CAAC;AACtB,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,SAAS,GAAG,MAAM,KAAK,CAAC,OAAO,CAAS,wBAAY,EAAE;QAC1D,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;IAEH,MAAM,MAAM,GAAyC,MAAM,eAAK;SAC7D,GAAG,CAAC,qBAAS,EAAE;QACd,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,IAAI,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE;KAC3D,CAAC;SACD,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IAErB,IAAI,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,CAAC,IAAI,EAAE,CAAC;QACtB,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;QACrC,MAAM,KAAK,CAAC,OAAO,CAAC,qBAAS,EAAE,MAAM,EAAE;YACrC,MAAM,EAAE,sBAAU;YAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;SAC5B,CAAC,CAAC;QACH,MAAM,KAAK,CAAC,OAAO,CAAC,wBAAY,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;YACxD,MAAM,EAAE,sBAAU;YAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;SAC5B,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,SAAS;IAC1B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -0,0 +1,111 @@
1
+ export type TokensResponse = {
2
+ messages: string;
3
+ data: Data;
4
+ status_code: number;
5
+ };
6
+ export type Data = {
7
+ count: number;
8
+ list: Token[];
9
+ };
10
+ export type Token = {
11
+ id: string;
12
+ created_at: Date;
13
+ address: null | string;
14
+ settle_time: number | null;
15
+ settle_duration: number | null;
16
+ pledge_rate: number | null;
17
+ status: ListStatus;
18
+ symbol: string;
19
+ name: string;
20
+ icon: string;
21
+ price: number | null;
22
+ last_price: number;
23
+ coin_gecko_id: null | string;
24
+ decimals: number | null;
25
+ type: Type;
26
+ token_id: null | string;
27
+ category: Category;
28
+ price_change: PriceChange;
29
+ volume: Volume;
30
+ volume_change: VolumeChange;
31
+ settle_type: SettleType;
32
+ chain_id: number;
33
+ network_icon: string;
34
+ network_name: string;
35
+ network_url: string;
36
+ website: null | string;
37
+ twitter: null | string;
38
+ start_time: number | null;
39
+ banner_url: null | string;
40
+ priority: number | null;
41
+ metadata: Metadata | null;
42
+ unit: Unit | null;
43
+ settle_rate: number | null;
44
+ total_volume: number;
45
+ };
46
+ export declare enum Category {
47
+ PointMarket = "point_market",
48
+ PreMarket = "pre_market",
49
+ RuneMarket = "rune_market"
50
+ }
51
+ export type Metadata = {
52
+ title: string;
53
+ description: string;
54
+ background_image: string;
55
+ cta: Cta;
56
+ icon?: string;
57
+ status?: MetadataStatus;
58
+ priority?: number;
59
+ };
60
+ export type Cta = {
61
+ text: string;
62
+ url: string;
63
+ };
64
+ export declare enum MetadataStatus {
65
+ Inactive = "inactive"
66
+ }
67
+ export type PriceChange = {
68
+ h24: number;
69
+ };
70
+ export declare enum SettleType {
71
+ Manual = "manual",
72
+ System = "system"
73
+ }
74
+ export declare enum ListStatus {
75
+ Active = "active",
76
+ Draft = "draft",
77
+ Ended = "ended",
78
+ Settling = "settling"
79
+ }
80
+ export declare enum Type {
81
+ Currency = "currency",
82
+ PreMarket = "pre_market"
83
+ }
84
+ export type Unit = {
85
+ prefix_icon: PrefixIcon;
86
+ icon: string;
87
+ symbol: symbol;
88
+ };
89
+ export declare enum PrefixIcon {
90
+ Diamonds = "Diamonds",
91
+ Empty = "",
92
+ Pearl = "Pearl",
93
+ Shards = "Shards"
94
+ }
95
+ export declare enum Symbol {
96
+ Diamond = "Diamond",
97
+ Empty = "",
98
+ EzPoint = "ezPoint",
99
+ Mile = "Mile",
100
+ Pearl = "Pearl",
101
+ Score = "Score",
102
+ Shard = "Shard"
103
+ }
104
+ export type Volume = {
105
+ h24: number;
106
+ total_vol?: number;
107
+ };
108
+ export type VolumeChange = {
109
+ h24: number;
110
+ total_vol_day30?: number;
111
+ };
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Symbol = exports.PrefixIcon = exports.Type = exports.ListStatus = exports.SettleType = exports.MetadataStatus = exports.Category = void 0;
4
+ var Category;
5
+ (function (Category) {
6
+ Category["PointMarket"] = "point_market";
7
+ Category["PreMarket"] = "pre_market";
8
+ Category["RuneMarket"] = "rune_market";
9
+ })(Category || (exports.Category = Category = {}));
10
+ var MetadataStatus;
11
+ (function (MetadataStatus) {
12
+ MetadataStatus["Inactive"] = "inactive";
13
+ })(MetadataStatus || (exports.MetadataStatus = MetadataStatus = {}));
14
+ var SettleType;
15
+ (function (SettleType) {
16
+ SettleType["Manual"] = "manual";
17
+ SettleType["System"] = "system";
18
+ })(SettleType || (exports.SettleType = SettleType = {}));
19
+ var ListStatus;
20
+ (function (ListStatus) {
21
+ ListStatus["Active"] = "active";
22
+ ListStatus["Draft"] = "draft";
23
+ ListStatus["Ended"] = "ended";
24
+ ListStatus["Settling"] = "settling";
25
+ })(ListStatus || (exports.ListStatus = ListStatus = {}));
26
+ var Type;
27
+ (function (Type) {
28
+ Type["Currency"] = "currency";
29
+ Type["PreMarket"] = "pre_market";
30
+ })(Type || (exports.Type = Type = {}));
31
+ var PrefixIcon;
32
+ (function (PrefixIcon) {
33
+ PrefixIcon["Diamonds"] = "Diamonds";
34
+ PrefixIcon["Empty"] = "";
35
+ PrefixIcon["Pearl"] = "Pearl";
36
+ PrefixIcon["Shards"] = "Shards";
37
+ })(PrefixIcon || (exports.PrefixIcon = PrefixIcon = {}));
38
+ var Symbol;
39
+ (function (Symbol) {
40
+ Symbol["Diamond"] = "Diamond";
41
+ Symbol["Empty"] = "";
42
+ Symbol["EzPoint"] = "ezPoint";
43
+ Symbol["Mile"] = "Mile";
44
+ Symbol["Pearl"] = "Pearl";
45
+ Symbol["Score"] = "Score";
46
+ Symbol["Shard"] = "Shard";
47
+ })(Symbol || (exports.Symbol = Symbol = {}));
48
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/whalesmarket/types.ts"],"names":[],"mappings":";;;AAgDA,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,wCAA4B,CAAA;IAC5B,oCAAwB,CAAA;IACxB,sCAA0B,CAAA;AAC5B,CAAC,EAJW,QAAQ,wBAAR,QAAQ,QAInB;AAiBD,IAAY,cAEX;AAFD,WAAY,cAAc;IACxB,uCAAqB,CAAA;AACvB,CAAC,EAFW,cAAc,8BAAd,cAAc,QAEzB;AAMD,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,+BAAiB,CAAA;IACjB,+BAAiB,CAAA;AACnB,CAAC,EAHW,UAAU,0BAAV,UAAU,QAGrB;AAED,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,+BAAiB,CAAA;IACjB,6BAAe,CAAA;IACf,6BAAe,CAAA;IACf,mCAAqB,CAAA;AACvB,CAAC,EALW,UAAU,0BAAV,UAAU,QAKrB;AAED,IAAY,IAGX;AAHD,WAAY,IAAI;IACd,6BAAqB,CAAA;IACrB,gCAAwB,CAAA;AAC1B,CAAC,EAHW,IAAI,oBAAJ,IAAI,QAGf;AAQD,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,mCAAqB,CAAA;IACrB,wBAAU,CAAA;IACV,6BAAe,CAAA;IACf,+BAAiB,CAAA;AACnB,CAAC,EALW,UAAU,0BAAV,UAAU,QAKrB;AAED,IAAY,MAQX;AARD,WAAY,MAAM;IAChB,6BAAmB,CAAA;IACnB,oBAAU,CAAA;IACV,6BAAmB,CAAA;IACnB,uBAAa,CAAA;IACb,yBAAe,CAAA;IACf,yBAAe,CAAA;IACf,yBAAe,CAAA;AACjB,CAAC,EARW,MAAM,sBAAN,MAAM,QAQjB"}
@@ -3,3 +3,4 @@ export declare const zeroBigInt: bigint;
3
3
  export declare const zeroBigNumber: BigNumber;
4
4
  export declare const lpAddressesCachePrefix = "lp-addresses";
5
5
  export declare const usdcLogoUri = "https://raw.githubusercontent.com/sonarwatch/token-lists/main/images/common/USDC.png";
6
+ export declare const minimumReserveValue = 2500;
@@ -3,10 +3,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.usdcLogoUri = exports.lpAddressesCachePrefix = exports.zeroBigNumber = exports.zeroBigInt = void 0;
6
+ exports.minimumReserveValue = exports.usdcLogoUri = exports.lpAddressesCachePrefix = exports.zeroBigNumber = exports.zeroBigInt = void 0;
7
7
  const bignumber_js_1 = __importDefault(require("bignumber.js"));
8
8
  exports.zeroBigInt = BigInt(0);
9
9
  exports.zeroBigNumber = (0, bignumber_js_1.default)(0);
10
10
  exports.lpAddressesCachePrefix = 'lp-addresses';
11
11
  exports.usdcLogoUri = 'https://raw.githubusercontent.com/sonarwatch/token-lists/main/images/common/USDC.png';
12
+ exports.minimumReserveValue = 2500;
12
13
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/constants.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAqC;AAExB,QAAA,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;AACvB,QAAA,aAAa,GAAG,IAAA,sBAAS,EAAC,CAAC,CAAC,CAAC;AAC7B,QAAA,sBAAsB,GAAG,cAAc,CAAC;AACxC,QAAA,WAAW,GACtB,sFAAsF,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/constants.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAqC;AAExB,QAAA,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;AACvB,QAAA,aAAa,GAAG,IAAA,sBAAS,EAAC,CAAC,CAAC,CAAC;AAC7B,QAAA,sBAAsB,GAAG,cAAc,CAAC;AACxC,QAAA,WAAW,GACtB,sFAAsF,CAAC;AAC5E,QAAA,mBAAmB,GAAG,IAAI,CAAC"}
@@ -8,6 +8,7 @@ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
8
8
  const constants_1 = require("../../plugins/tokens/constants");
9
9
  const getSourceWeight_1 = __importDefault(require("./getSourceWeight"));
10
10
  const constants_2 = require("../sui/constants");
11
+ const constants_3 = require("./constants");
11
12
  exports.defaultAcceptedPairs = new Map([
12
13
  [
13
14
  portfolio_core_1.NetworkId.sei,
@@ -56,7 +57,7 @@ function getLpUnderlyingTokenSource(params) {
56
57
  if (acceptedPairs.length === 0)
57
58
  return [];
58
59
  if (!minReserveValue)
59
- minReserveValue = 2500;
60
+ minReserveValue = constants_3.minimumReserveValue;
60
61
  // Verify underlyings weights
61
62
  let totalWeight = poolUnderlyings.reduce((partialSum, p) => partialSum + (p.weight || 0), 0);
62
63
  if (totalWeight === 0)
@@ -1 +1 @@
1
- {"version":3,"file":"getLpUnderlyingTokenSource.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/getLpUnderlyingTokenSource.ts"],"names":[],"mappings":";;;;;;AAAA,+DAYoC;AACpC,8DAAsE;AACtE,wEAAgD;AAChD,gDAA+C;AAElC,QAAA,oBAAoB,GAAG,IAAI,GAAG,CAA0B;IACnE;QACE,0BAAS,CAAC,GAAG;QACb;YACE,iCAAgB;YAChB,sEAAsE,EAAE,OAAO;YAC/E,qHAAqH,EAAE,SAAS;SACjI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,mCAAkB,EAAC,CAAC,EAAE,0BAAS,CAAC,GAAG,CAAC,CAAC;KACnD;IACD;QACE,0BAAS,CAAC,MAAM;QAChB;YACE,oCAAmB;YACnB,2CAA0B;YAC1B,8CAA8C,EAAE,OAAO;YACvD,8CAA8C,EAAE,OAAO;SACxD,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,mCAAkB,EAAC,CAAC,EAAE,0BAAS,CAAC,MAAM,CAAC,CAAC;KACtD;IACD;QACE,0BAAS,C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CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAChD,MAAM,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;QAC7B,IAAI,uBAAuB,KAAK,UAAU,CAAC,CAAC,CAAC;YAAE,SAAS;QACxD,IAAI,aAAa,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YAAE,SAAS;QACpD,IACE,CAAC,CAAC,UAAU;YACZ,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,kCAAiB,CAAC;YAE5D,SAAS;QAEX,IAAI,YAAY,GAAG,CAAC,CAAC;QACrB,IAAI,CAAC,CAAC,MAAM,IAAI,eAAe,CAAC,MAAM;YACpC,YAAY,GAAG,CAAC,CAAC,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC;QACnD,MAAM,KAAK,GAAG,CAAC,YAAY,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC,aAAa,CAAC;QAEnE,MAAM,MAAM,GAAqB;YAC/B,EAAE,EAAE,QAAQ;YACZ,SAAS;YACT,UAAU,EAAE,gCAAoB,CAAC,EAAE;YACnC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;YACtB,QAAQ,EAAE,CAAC,CAAC,QAAQ;YACpB,KAAK;YACL,MAAM,EAAE,IAAA,yBAAe,EAAC,iBAAiB,CAAC;YAC1C,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;YACrB,aAAa;YACb,WAAW;SACZ,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAnFD,gEAmFC"}
1
+ {"version":3,"file":"getLpUnderlyingTokenSource.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/misc/getLpUnderlyingTokenSource.ts"],"names":[],"mappings":";;;;;;AAAA,+DAYoC;AACpC,8DAAsE;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MAAM,MAAM,GAAqB;YAC/B,EAAE,EAAE,QAAQ;YACZ,SAAS;YACT,UAAU,EAAE,gCAAoB,CAAC,EAAE;YACnC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;YACtB,QAAQ,EAAE,CAAC,CAAC,QAAQ;YACpB,KAAK;YACL,MAAM,EAAE,IAAA,yBAAe,EAAC,iBAAiB,CAAC;YAC1C,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;YACrB,aAAa;YACb,WAAW;SACZ,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAnFD,gEAmFC"}
@@ -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;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import { PublicKey, AccountInfo } from '@solana/web3.js';
2
+ import { PublicKey } from '@solana/web3.js';
3
3
  import { TokenPriceSource } from '@sonarwatch/portfolio-core';
4
4
  import { Base, MappingData, PermissionData, PriceData } from './structs';
5
5
  import { SolanaClient } from '../../clients/types';
@@ -12,7 +12,7 @@ export declare function parseBaseData(data: Buffer): Base | undefined;
12
12
  export declare const parseMappingData: (data: Buffer) => MappingData;
13
13
  export declare const parsePriceData: (data: Buffer, currentSlot?: number) => PriceData;
14
14
  export declare const parsePermissionData: (data: Buffer) => PermissionData;
15
- export declare function getPythPricesDatasMap(pubkeys: PublicKey[], accounts: (AccountInfo<Buffer> | null)[]): Map<string, PriceData>;
15
+ export declare function getPythPricesAsMap(connection: SolanaClient, feedAddresses: PublicKey[]): Promise<Map<string, number>>;
16
16
  export declare function getPythPrices(connection: SolanaClient, feedAddresses: PublicKey[]): Promise<(number | null)[]>;
17
17
  export declare function getPythPrice(connection: SolanaClient, feedAddress: PublicKey): Promise<number | null>;
18
18
  export declare function getPythTokenPriceSources(connection: SolanaClient, params: {
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.getPythTokenPriceSources = exports.getPythPrice = exports.getPythPrices = exports.getPythPricesDatasMap = exports.parsePermissionData = exports.parsePriceData = exports.parseMappingData = exports.parseBaseData = exports.MAX_SLOT_DIFFERENCE = exports.Version = exports.Version2 = exports.Magic = void 0;
12
+ exports.getPythTokenPriceSources = exports.getPythPrice = exports.getPythPrices = exports.getPythPricesAsMap = exports.parsePermissionData = exports.parsePriceData = exports.parseMappingData = exports.parseBaseData = exports.MAX_SLOT_DIFFERENCE = exports.Version = exports.Version2 = exports.Magic = void 0;
13
13
  const web3_js_1 = require("@solana/web3.js");
14
14
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
15
15
  const structs_1 = require("./structs");
@@ -242,13 +242,19 @@ const parsePermissionData = (data) => {
242
242
  };
243
243
  };
244
244
  exports.parsePermissionData = parsePermissionData;
245
- function getPythPricesDatasMap(pubkeys, accounts) {
246
- const pricesDatas = accounts.map((account) => account ? (0, exports.parsePriceData)(account.data) : undefined);
247
- const priceMap = new Map();
248
- pricesDatas.forEach((prices, index) => prices ? priceMap.set(pubkeys[index].toString(), prices) : undefined);
249
- return priceMap;
245
+ function getPythPricesAsMap(connection, feedAddresses) {
246
+ return __awaiter(this, void 0, void 0, function* () {
247
+ const prices = yield getPythPrices(connection, feedAddresses);
248
+ const priceMap = new Map();
249
+ feedAddresses.forEach((feedAddress, i) => {
250
+ const price = prices[i];
251
+ if (price)
252
+ priceMap.set(feedAddress.toString(), price);
253
+ });
254
+ return priceMap;
255
+ });
250
256
  }
251
- exports.getPythPricesDatasMap = getPythPricesDatasMap;
257
+ exports.getPythPricesAsMap = getPythPricesAsMap;
252
258
  function getPythPrices(connection, feedAddresses) {
253
259
  return __awaiter(this, void 0, void 0, function* () {
254
260
  const accounts = yield (0, getMultipleAccountsInfoSafe_1.getMultipleAccountsInfoSafe)(connection, feedAddresses);
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/utils/solana/pyth/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAyD;AACzD,+DAAyE;AACzE,uCAYmB;AACnB,uCAA4D;AAE5D,gFAA6E;AAC7E,iEAAyE;AACzE,0EAAuE;AAE1D,QAAA,KAAK,GAAG,UAAU,CAAC;AACnB,QAAA,QAAQ,GAAG,CAAC,CAAC;AACb,QAAA,OAAO,GAAG,gBAAQ,CAAC;AAChC,uGAAuG;AAC1F,QAAA,mBAAmB,GAAG,EAAE,CAAC;AAEtC,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AACvC,MAAM,QAAQ,GAAG,C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