@sonarwatch/portfolio-plugins 0.12.163 → 0.12.165

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/package.json +1 -1
  3. package/src/index.js +4 -4
  4. package/src/index.js.map +1 -1
  5. package/src/plugins/abex/types.d.ts +5 -12
  6. package/src/plugins/aftermath/types.d.ts +2 -6
  7. package/src/plugins/alphafi/types.d.ts +1 -3
  8. package/src/plugins/bucket/types.d.ts +2 -3
  9. package/src/plugins/cetus/clmmsFetcher.js +3 -3
  10. package/src/plugins/cetus/clmmsFetcher.js.map +1 -1
  11. package/src/plugins/cetus/constants.d.ts +2 -0
  12. package/src/plugins/cetus/constants.js +5 -1
  13. package/src/plugins/cetus/constants.js.map +1 -1
  14. package/src/plugins/cetus/farmsFetcher.js +118 -0
  15. package/src/plugins/cetus/farmsFetcher.js.map +1 -0
  16. package/src/plugins/cetus/helpers.js +3 -2
  17. package/src/plugins/cetus/helpers.js.map +1 -1
  18. package/src/plugins/cetus/index.js +4 -2
  19. package/src/plugins/cetus/index.js.map +1 -1
  20. package/src/plugins/cetus/types.d.ts +92 -3
  21. package/src/plugins/cetus/types.js.map +1 -1
  22. package/src/plugins/cetus/vaultsJob.d.ts +3 -0
  23. package/src/plugins/cetus/vaultsJob.js +101 -0
  24. package/src/plugins/cetus/vaultsJob.js.map +1 -0
  25. package/src/plugins/drift/index.js +2 -1
  26. package/src/plugins/drift/index.js.map +1 -1
  27. package/src/plugins/flowx/stakingPoolV3Fetcher.js +2 -2
  28. package/src/plugins/flowx/stakingPoolV3Fetcher.js.map +1 -1
  29. package/src/plugins/flowx/types.d.ts +2 -3
  30. package/src/plugins/haedal/types.d.ts +1 -3
  31. package/src/plugins/jewel/types.d.ts +1 -3
  32. package/src/plugins/kai/types.d.ts +3 -6
  33. package/src/plugins/kriya/types.d.ts +1 -3
  34. package/src/plugins/kriya/types.js.map +1 -1
  35. package/src/plugins/{flexlend → lulo}/constants.d.ts +1 -1
  36. package/src/plugins/{flexlend → lulo}/constants.js +2 -2
  37. package/src/plugins/lulo/constants.js.map +1 -0
  38. package/src/plugins/lulo/depositsFetcher.js.map +1 -0
  39. package/src/plugins/{flexlend → lulo}/helpers.js +1 -1
  40. package/src/plugins/lulo/helpers.js.map +1 -0
  41. package/src/plugins/{flexlend → lulo}/index.js +6 -1
  42. package/src/plugins/lulo/index.js.map +1 -0
  43. package/src/plugins/lulo/liftFetcher.d.ts +3 -0
  44. package/src/plugins/{flexlend → lulo}/liftFetcher.js +1 -1
  45. package/src/plugins/lulo/liftFetcher.js.map +1 -0
  46. package/src/plugins/lulo/rewardsFetcher.d.ts +3 -0
  47. package/src/plugins/lulo/rewardsFetcher.js +38 -0
  48. package/src/plugins/lulo/rewardsFetcher.js.map +1 -0
  49. package/src/plugins/lulo/struct.js.map +1 -0
  50. package/src/plugins/navi/types.d.ts +4 -9
  51. package/src/plugins/orca/getWhirlpoolPositions.js +17 -20
  52. package/src/plugins/orca/getWhirlpoolPositions.js.map +1 -1
  53. package/src/plugins/raydium/getRaydiumCLMMPositions.js +21 -11
  54. package/src/plugins/raydium/getRaydiumCLMMPositions.js.map +1 -1
  55. package/src/plugins/raydium/helpers.d.ts +5 -1
  56. package/src/plugins/raydium/helpers.js +59 -11
  57. package/src/plugins/raydium/helpers.js.map +1 -1
  58. package/src/plugins/scallop/types/basic.d.ts +2 -3
  59. package/src/plugins/scallop/types/data.d.ts +1 -3
  60. package/src/plugins/tokens/fetchers/sui.js +1 -8
  61. package/src/plugins/tokens/fetchers/sui.js.map +1 -1
  62. package/src/plugins/tradeport/types.d.ts +1 -4
  63. package/src/plugins/turbos/clmmVaultFetcher.js +2 -2
  64. package/src/plugins/turbos/clmmVaultFetcher.js.map +1 -1
  65. package/src/plugins/turbos/clmmsPositionsFetcher.js +2 -1
  66. package/src/plugins/turbos/clmmsPositionsFetcher.js.map +1 -1
  67. package/src/plugins/turbos/helper.d.ts +0 -1
  68. package/src/plugins/turbos/helper.js +1 -6
  69. package/src/plugins/turbos/helper.js.map +1 -1
  70. package/src/plugins/turbos/types.d.ts +2 -6
  71. package/src/plugins/typus/constants.d.ts +8 -0
  72. package/src/plugins/typus/constants.js +12 -1
  73. package/src/plugins/typus/constants.js.map +1 -1
  74. package/src/plugins/typus/index.js +4 -2
  75. package/src/plugins/typus/index.js.map +1 -1
  76. package/src/plugins/typus/safuFetcher.d.ts +3 -0
  77. package/src/plugins/typus/safuFetcher.js +97 -0
  78. package/src/plugins/typus/safuFetcher.js.map +1 -0
  79. package/src/plugins/typus/safuVaultsJob.d.ts +3 -0
  80. package/src/plugins/typus/safuVaultsJob.js +30 -0
  81. package/src/plugins/typus/safuVaultsJob.js.map +1 -0
  82. package/src/plugins/typus/safu_helpers.d.ts +8 -0
  83. package/src/plugins/typus/safu_helpers.js +205 -0
  84. package/src/plugins/typus/safu_helpers.js.map +1 -0
  85. package/src/plugins/typus/safu_types.d.ts +55 -0
  86. package/src/plugins/typus/safu_types.js +3 -0
  87. package/src/plugins/typus/safu_types.js.map +1 -0
  88. package/src/plugins/typus/types.d.ts +1 -3
  89. package/src/utils/sui/bitsToNumber.d.ts +1 -0
  90. package/src/utils/sui/bitsToNumber.js +11 -0
  91. package/src/utils/sui/bitsToNumber.js.map +1 -0
  92. package/src/utils/sui/structs/id.d.ts +3 -0
  93. package/src/utils/sui/structs/id.js +3 -0
  94. package/src/utils/sui/structs/id.js.map +1 -0
  95. package/src/utils/sui/structs/nft.d.ts +2 -3
  96. package/src/utils/sui/types.d.ts +2 -3
  97. package/src/plugins/flexlend/constants.js.map +0 -1
  98. package/src/plugins/flexlend/depositsFetcher.js.map +0 -1
  99. package/src/plugins/flexlend/helpers.js.map +0 -1
  100. package/src/plugins/flexlend/index.js.map +0 -1
  101. package/src/plugins/flexlend/liftFetcher.js.map +0 -1
  102. package/src/plugins/flexlend/struct.js.map +0 -1
  103. /package/src/plugins/{flexlend/depositsFetcher.d.ts → cetus/farmsFetcher.d.ts} +0 -0
  104. /package/src/plugins/{flexlend/liftFetcher.d.ts → lulo/depositsFetcher.d.ts} +0 -0
  105. /package/src/plugins/{flexlend → lulo}/depositsFetcher.js +0 -0
  106. /package/src/plugins/{flexlend → lulo}/helpers.d.ts +0 -0
  107. /package/src/plugins/{flexlend → lulo}/index.d.ts +0 -0
  108. /package/src/plugins/{flexlend → lulo}/struct.d.ts +0 -0
  109. /package/src/plugins/{flexlend → lulo}/struct.js +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"safuFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/typus/safuFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AAGpC,2CAKqB;AACrB,iDAAmD;AACnD,iDAA8C;AAC9C,kEAA+D;AAE/D,qGAA6E;AAC7E,gEAAqC;AAErC,MAAM,UAAU,GAAG,IAAI,6BAAa,CAEjC,yBAAa,EAAE;IAChB,MAAM,EAAE,sBAAU;IAClB,SAAS,EAAE,0BAAS,CAAC,GAAG;CACzB,CAAC,CAAC;AAEH,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,UAAU,GAAG,MAAM,IAAA,2BAAY,EAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAErD,IAAI,WAAW,GAAG,KAAK,CAAC;IACxB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,yBAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAC9C,MAAM,UAAU,GAAG,yBAAa,CAAC,CAAC,CAAC,CAAC;QACpC,IAAI,UAAU,CAAC,UAAU,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtC,WAAW,GAAG,IAAI,CAAC;YACnB,MAAM;QACR,CAAC;IACH,CAAC;IACD,IAAI,CAAC,WAAW;QAAE,OAAO,EAAE,CAAC;IAE5B,MAAM,MAAM,GAAG,MAA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E,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;gBACtD,IAAI,EAAE;oBACJ,WAAW;iBACZ;aACF,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,OAAO;IACxB,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Job } from '../../Job';
2
+ declare const job: Job;
3
+ export default job;
@@ -0,0 +1,30 @@
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 constants_1 = require("./constants");
13
+ const clients_1 = require("../../utils/clients");
14
+ const safu_helpers_1 = require("./safu_helpers");
15
+ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
16
+ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
17
+ const client = (0, clients_1.getClientSui)();
18
+ const vaultsData = yield (0, safu_helpers_1.getVaultData)(client);
19
+ yield cache.setItem(constants_1.safuVaultsKey, vaultsData, {
20
+ prefix: constants_1.platformId,
21
+ networkId: portfolio_core_1.NetworkId.sui,
22
+ });
23
+ });
24
+ const job = {
25
+ id: `${constants_1.platformId}-safu-vaults`,
26
+ executor,
27
+ label: 'normal',
28
+ };
29
+ exports.default = job;
30
+ //# sourceMappingURL=safuVaultsJob.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"safuVaultsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/typus/safuVaultsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,2CAAwD;AAGxD,iDAAmD;AACnD,iDAA8C;AAC9C,+DAAuD;AAEvD,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,UAAU,GAAG,MAAM,IAAA,2BAAY,EAAC,MAAM,CAAC,CAAC;IAE9C,MAAM,KAAK,CAAC,OAAO,CAAC,yBAAa,EAAE,UAAU,EAAE;QAC7C,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,GAAG;KACzB,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,cAAc;IAC/B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { Share, TypusBidReceipt, Vault } from './safu_types';
2
+ import { SuiClient } from '../../utils/clients/types';
3
+ export declare function getVaultData(provider: SuiClient): Promise<{
4
+ [key: string]: [Vault, TypusBidReceipt | null];
5
+ }>;
6
+ export declare function getShareData(provider: SuiClient, owner: string): Promise<{
7
+ [key: string]: Share[];
8
+ }>;
@@ -0,0 +1,205 @@
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
+ exports.getShareData = exports.getVaultData = void 0;
13
+ const transactions_1 = require("@mysten/sui.js/transactions");
14
+ const constants_1 = require("./constants");
15
+ const bcs_1 = require("@mysten/bcs");
16
+ const SENDER = '0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA';
17
+ function getVaultData(provider) {
18
+ return __awaiter(this, void 0, void 0, function* () {
19
+ let transactionBlock = new transactions_1.TransactionBlock();
20
+ transactionBlock.moveCall({
21
+ target: `${constants_1.safuPackage}::view_function::get_vault_data_bcs`,
22
+ typeArguments: [`${constants_1.frameworkPackage}::vault::TypusBidReceipt`],
23
+ arguments: [
24
+ transactionBlock.pure(constants_1.safuRegistryId),
25
+ transactionBlock.pure(constants_1.vaultsIndexes),
26
+ ],
27
+ });
28
+ let results = (yield provider.devInspectTransactionBlock({
29
+ sender: SENDER,
30
+ transactionBlock,
31
+ })).results;
32
+ // console.log(JSON.stringify(results));
33
+ // @ts-ignore
34
+ let bytes = results[results.length - 1].returnValues[0][0];
35
+ // console.log(JSON.stringify(bytes));
36
+ let reader = new bcs_1.BcsReader(new Uint8Array(bytes));
37
+ let result = {};
38
+ reader.readVec((reader) => {
39
+ reader.readULEB();
40
+ let id = AddressFromBytes(reader.readBytes(32));
41
+ let depositToken = String.fromCharCode.apply(null, Array.from(reader.readBytes(reader.read8())));
42
+ let rewardToken = reader.readVec((reader) => {
43
+ return String.fromCharCode.apply(null, Array.from(reader.readBytes(reader.read8())));
44
+ });
45
+ let infoArray = reader.readVec((reader) => {
46
+ return reader.read64();
47
+ });
48
+ let configArray = reader.readVec((reader) => {
49
+ return reader.read64();
50
+ });
51
+ let info = {
52
+ index: infoArray[0],
53
+ round: infoArray[1],
54
+ portfolio_vault_index: infoArray[2],
55
+ refresh_ts_ms: infoArray[3],
56
+ status: infoArray[4],
57
+ lending_enabled: infoArray[5],
58
+ price_mbp: infoArray[6],
59
+ mbp_incentivised: infoArray[7],
60
+ fixed_incentivised: infoArray[8],
61
+ token_decimal: infoArray[9],
62
+ lending_apr_mbp: infoArray[10],
63
+ creation_ts_ms: infoArray[11],
64
+ };
65
+ let config = {
66
+ capacity: configArray[0],
67
+ lot_size: configArray[1],
68
+ min_size: configArray[2],
69
+ fee_bp: configArray[3],
70
+ utilization_rate_bp: configArray[4],
71
+ point_per_hour_bp: configArray[5],
72
+ incentive_mbp: configArray[6],
73
+ incentive_fixed: configArray[7],
74
+ };
75
+ // skip BigVector
76
+ reader.readBytes(32); // id
77
+ reader.readBytes(reader.read8()); // element_type
78
+ reader.read64(); // slice_idx
79
+ reader.read32(); // slice_size
80
+ reader.read64(); // length
81
+ let shareSupplyArray = reader.readVec((reader) => {
82
+ return reader.read64();
83
+ });
84
+ let shareSupply = {
85
+ active_share: shareSupplyArray[0],
86
+ deactivating_share: shareSupplyArray[1],
87
+ inactive_share: shareSupplyArray[2],
88
+ warmup_share: shareSupplyArray[3],
89
+ snapshot_share: shareSupplyArray[4],
90
+ reward_share: shareSupplyArray.slice(5),
91
+ };
92
+ let u64Padding = reader.readVec((reader) => {
93
+ return reader.read64();
94
+ });
95
+ let bcsPadding = reader.readVec((reader) => {
96
+ return reader.read8();
97
+ });
98
+ let has_bid_receipt = reader.read8() > 0;
99
+ if (has_bid_receipt) {
100
+ result[info.index] = [
101
+ {
102
+ id,
103
+ depositToken,
104
+ rewardToken,
105
+ info,
106
+ config,
107
+ shareSupply,
108
+ u64Padding,
109
+ bcsPadding,
110
+ },
111
+ {
112
+ id: AddressFromBytes(reader.readBytes(32)),
113
+ vid: AddressFromBytes(reader.readBytes(32)),
114
+ index: reader.read64(),
115
+ metadata: String.fromCharCode.apply(null, Array.from(reader.readBytes(reader.read8()))),
116
+ u64_padding: reader.readVec((reader) => {
117
+ return reader.read64();
118
+ }),
119
+ },
120
+ ];
121
+ }
122
+ else {
123
+ result[info.index] = [
124
+ {
125
+ id,
126
+ depositToken,
127
+ rewardToken,
128
+ info,
129
+ config,
130
+ shareSupply,
131
+ u64Padding,
132
+ bcsPadding,
133
+ },
134
+ null,
135
+ ];
136
+ }
137
+ });
138
+ return result;
139
+ });
140
+ }
141
+ exports.getVaultData = getVaultData;
142
+ function AddressFromBytes(x) {
143
+ let address = '0x';
144
+ for (let i = 0; i < x.length; i++) {
145
+ address = address.concat(x[i].toString(16).padStart(2, '0'));
146
+ }
147
+ return address;
148
+ }
149
+ function getShareData(provider, owner) {
150
+ return __awaiter(this, void 0, void 0, function* () {
151
+ let transactionBlock = new transactions_1.TransactionBlock();
152
+ const indexes = constants_1.vaultsIndexes.slice();
153
+ transactionBlock.moveCall({
154
+ target: `${constants_1.safuPackage}::view_function::get_share_data_bcs`,
155
+ typeArguments: [],
156
+ arguments: [
157
+ transactionBlock.pure(constants_1.safuRegistryId),
158
+ transactionBlock.pure(owner),
159
+ transactionBlock.pure(indexes),
160
+ ],
161
+ });
162
+ let results = (yield provider.devInspectTransactionBlock({
163
+ sender: SENDER,
164
+ transactionBlock,
165
+ })).results;
166
+ // console.log(JSON.stringify(results));
167
+ // @ts-ignore
168
+ let bytes = results[results.length - 1].returnValues[0][0];
169
+ // console.log(JSON.stringify(bytes));
170
+ let reader = new bcs_1.BcsReader(new Uint8Array(bytes));
171
+ let result = {};
172
+ reader.readVec((reader, i) => {
173
+ reader.read8();
174
+ let share = reader.readVec((reader) => {
175
+ let user = AddressFromBytes(reader.readBytes(32));
176
+ let shareSupplyArray = reader.readVec((reader) => {
177
+ return reader.read64();
178
+ });
179
+ let shareSupply = {
180
+ active_share: shareSupplyArray[0],
181
+ deactivating_share: shareSupplyArray[1],
182
+ inactive_share: shareSupplyArray[2],
183
+ warmup_share: shareSupplyArray[3],
184
+ snapshot_share: shareSupplyArray[4],
185
+ reward_share: shareSupplyArray.slice(5),
186
+ };
187
+ return {
188
+ user,
189
+ share: shareSupply,
190
+ u64Padding: reader.readVec((reader) => {
191
+ return reader.read64();
192
+ }),
193
+ bcsPadding: reader.readVec((reader) => {
194
+ return reader.read8();
195
+ }),
196
+ };
197
+ });
198
+ let index = indexes.pop();
199
+ result[index] = share;
200
+ });
201
+ return result;
202
+ });
203
+ }
204
+ exports.getShareData = getShareData;
205
+ //# sourceMappingURL=safu_helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"safu_helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/typus/safu_helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,8DAA+D;AAE/D,2CAKqB;AACrB,qCAAwC;AAExC,MAAM,MAAM,GACV,oEAAoE,CAAC;AAEvE,SAAsB,YAAY,CAChC,QAAmB;;QAEnB,IAAI,gBAAgB,GAAG,IAAI,+BAAgB,EAAE,CAAC;QAC9C,gBAAgB,CAAC,QAAQ,CAAC;YACxB,MAAM,EAAE,GAAG,uBAAW,qCAAqC;YAC3D,aAAa,EAAE,CAAC,GAAG,4BAAgB,0BAA0B,CAAC;YAC9D,SAAS,EAAE;gBACT,gBAAgB,CAAC,IAAI,CAAC,0BAAc,CAAC;gBACrC,gBAAgB,CAAC,IAAI,CAAC,yBAAa,CAAC;aACrC;SACF,CAAC,CAAC;QACH,IAAI,OAAO,GAAG,CACZ,MAAM,QAAQ,CAAC,0BAA0B,CAAC;YACxC,MAAM,EAAE,MAAM;YACd,gBAAgB;SACjB,CAAC,CACH,CAAC,OAAO,CAAC;QACV,wCAAwC;QACxC,aAAa;QACb,IAAI,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3D,sCAAsC;QACtC,IAAI,MAAM,GAAG,IAAI,eAAS,CAAC,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;QAClD,IAAI,MAAM,GAEN,EAAE,CAAC;QACP,MAAM,CAAC,O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AC,KAAK,EAAE,CAAC;oBACxB,CAAC,CAAC;iBACH,CAAC;YACJ,CAAC,CAAC,CAAC;YACH,IAAI,KAAK,GAAG,OAAO,CAAC,GAAG,EAAG,CAAC;YAC3B,MAAM,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;QACxB,CAAC,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC;IAChB,CAAC;CAAA;AA5DD,oCA4DC"}
@@ -0,0 +1,55 @@
1
+ export interface Vault {
2
+ id: string;
3
+ depositToken: string;
4
+ rewardToken: string[];
5
+ info: Info;
6
+ config: Config;
7
+ shareSupply: ShareSupply;
8
+ u64Padding: string[];
9
+ bcsPadding: string[];
10
+ }
11
+ export interface Info {
12
+ index: string;
13
+ round: string;
14
+ portfolio_vault_index: string;
15
+ refresh_ts_ms: string;
16
+ status: string;
17
+ lending_enabled: string;
18
+ price_mbp: string;
19
+ mbp_incentivised: string;
20
+ fixed_incentivised: string;
21
+ token_decimal: string;
22
+ lending_apr_mbp: string;
23
+ creation_ts_ms: string;
24
+ }
25
+ export interface Config {
26
+ capacity: string;
27
+ lot_size: string;
28
+ min_size: string;
29
+ fee_bp: string;
30
+ utilization_rate_bp: string;
31
+ point_per_hour_bp: string;
32
+ incentive_mbp: string;
33
+ incentive_fixed: string;
34
+ }
35
+ export interface ShareSupply {
36
+ active_share: string;
37
+ deactivating_share: string;
38
+ inactive_share: string;
39
+ warmup_share: string;
40
+ snapshot_share: string;
41
+ reward_share: string[];
42
+ }
43
+ export interface TypusBidReceipt {
44
+ id: string;
45
+ vid: string;
46
+ index: string;
47
+ metadata: string;
48
+ u64_padding: string[];
49
+ }
50
+ export interface Share {
51
+ user: string;
52
+ share: ShareSupply;
53
+ u64Padding: string[];
54
+ bcsPadding: string[];
55
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=safu_types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"safu_types.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/typus/safu_types.ts"],"names":[],"mappings":""}
@@ -1,3 +1,4 @@
1
+ import { ID } from '../../utils/sui/structs/id';
1
2
  export type DepositShare = {
2
3
  index: string;
3
4
  activeSubVaultUserShare: string;
@@ -14,9 +15,6 @@ export type DepositReceipt = {
14
15
  u64_padding: any[];
15
16
  vid: string;
16
17
  };
17
- export type ID = {
18
- id: string;
19
- };
20
18
  export type Vault = {
21
19
  active_share_supply: string;
22
20
  bcs_padding: any[];
@@ -0,0 +1 @@
1
+ export declare function bitsToNumber(bits: number | string): number;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.bitsToNumber = void 0;
4
+ function bitsToNumber(bits) {
5
+ return asIntN(BigInt(bits));
6
+ }
7
+ exports.bitsToNumber = bitsToNumber;
8
+ function asIntN(int, bits = 32) {
9
+ return Number(BigInt.asIntN(bits, BigInt(int)));
10
+ }
11
+ //# sourceMappingURL=bitsToNumber.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bitsToNumber.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/utils/sui/bitsToNumber.ts"],"names":[],"mappings":";;;AAAA,SAAgB,YAAY,CAAC,IAAqB;IAChD,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;AAC9B,CAAC;AAFD,oCAEC;AAED,SAAS,MAAM,CAAC,GAAW,EAAE,IAAI,GAAG,EAAE;IACpC,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAClD,CAAC"}
@@ -0,0 +1,3 @@
1
+ export type ID = {
2
+ id: string;
3
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=id.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"id.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/utils/sui/structs/id.ts"],"names":[],"mappings":""}
@@ -1,7 +1,6 @@
1
+ import { ID } from './id';
1
2
  export type NftStruct = {
2
- id?: {
3
- id: string;
4
- };
3
+ id?: ID;
5
4
  name?: string;
6
5
  description?: string;
7
6
  url?: string;
@@ -1,4 +1,5 @@
1
1
  import { SuiEvent, SuiObjectData, SuiObjectResponse } from '@mysten/sui.js/client';
2
+ import { ID } from './structs/id';
2
3
  export type ParsedData<K> = {
3
4
  hasPublicTransfer: boolean;
4
5
  type: string;
@@ -23,7 +24,5 @@ export type Event<K> = SuiEvent & {
23
24
  };
24
25
  export type AirdropWrapperNFT = {
25
26
  balance: string;
26
- id: {
27
- id: string;
28
- };
27
+ id: ID;
29
28
  };
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flexlend/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,UAAU,CAAC;AACxB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,6CAA6C;IACpD,WAAW,EAAE,MAAM;IACnB,OAAO,EAAE,qBAAqB;IAC9B,OAAO,EAAE,6BAA6B;CACvC,CAAC;AAEW,QAAA,aAAa,GAAG,IAAI,mBAAS,CACxC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,qBAAqB,GAAG,IAAI,mBAAS,CAChD,8CAA8C,CAC/C,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flexlend/depositsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAyE;AACzE,6CAAyD;AAGzD,2CAAyC;AACzC,uCAA8C;AAC9C,+EAA4D;AAC5D,0EAA8D;AAC9D,mFAA6D;AAC7D,mDAA2D;AAC3D,kFAA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,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flexlend/helpers.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAC5C,2CAA4C;AAE5C,SAAgB,iBAAiB,CAAC,KAAa;IAC7C,OAAO,mBAAS,CAAC,sBAAsB,CACrC,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,EAAE,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,CAAC,EAClE,yBAAa,CACd,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;AAClB,CAAC;AALD,8CAKC;AAED,SAAgB,WAAW,CAAC,aAAuB;IACjD,OAAO,CACL,aAAa,CAAC,QAAQ,EAAE;QACxB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,CACrE,CAAC;AACJ,CAAC;AALD,kCAKC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flexlend/index.ts"],"names":[],"mappings":";;;;;;AAGA,wEAAgD;AAChD,gEAAwC;AACxC,2CAAuC;AAE1B,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,EAAE,CAAC;AACjB,QAAA,QAAQ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