@minswap/noodles-sdk 0.0.29 → 0.0.31-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +74 -58
- package/dist/index.js +1 -1
- package/dist/pay.cjs +1 -0
- package/dist/pay.d.ts +541 -0
- package/dist/pay.js +1 -0
- package/package.json +13 -8
package/dist/pay.d.ts
ADDED
|
@@ -0,0 +1,541 @@
|
|
|
1
|
+
import { SuiClient } from '@mysten/sui/client';
|
|
2
|
+
import { Transaction } from '@mysten/sui/transactions';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Parameters for adding a new subscription plan (admin only).
|
|
6
|
+
*/
|
|
7
|
+
export declare type AddPlanRequest = {
|
|
8
|
+
/** Address of the admin performing the operation */
|
|
9
|
+
adminAddress: string;
|
|
10
|
+
/** Unique identifier for the new plan */
|
|
11
|
+
planId: number;
|
|
12
|
+
/** Type of the plan (1 = Default, 2 = CUAddOn) */
|
|
13
|
+
planType: number;
|
|
14
|
+
/** Duration of the plan in months */
|
|
15
|
+
monthInterval: number;
|
|
16
|
+
/** Price of the plan in USDC (with 6 decimals) */
|
|
17
|
+
price: bigint;
|
|
18
|
+
/** Optional existing transaction to append to (for composability) */
|
|
19
|
+
currentTx?: Transaction;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Parameters for adding a new boosting tier (admin only).
|
|
24
|
+
*/
|
|
25
|
+
export declare type AddTierRequest = {
|
|
26
|
+
/** Address of the admin performing the operation */
|
|
27
|
+
adminAddress: string;
|
|
28
|
+
/** Unique identifier for the new tier */
|
|
29
|
+
tierId: bigint;
|
|
30
|
+
/** Duration of the boosting effect in milliseconds */
|
|
31
|
+
duration: bigint;
|
|
32
|
+
/** Point value for the boosting tier */
|
|
33
|
+
point: bigint;
|
|
34
|
+
/** Original amount for the boosting tier */
|
|
35
|
+
originalAmount: bigint;
|
|
36
|
+
/** Amount required to purchase this tier */
|
|
37
|
+
amount: bigint;
|
|
38
|
+
/** Optional existing transaction to append to (for composability) */
|
|
39
|
+
currentTx?: Transaction;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/** Admin capability object ID for privileged operations */
|
|
43
|
+
export declare const ADMIN_CAP_ID = "0x13d101f44a0710a5475bec5f492a87b80e03d92d1cf540f26096f65850b23d26";
|
|
44
|
+
|
|
45
|
+
/** Sui package ID for the boosting protocol */
|
|
46
|
+
export declare const BOOSTING_PACKAGE_ID = "0x25fa0eb553dd69fa6a8028f73a38f1df7f289fa88a58ed3d7dc5a5360155bb19";
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Complete boosting protocol configuration.
|
|
50
|
+
*/
|
|
51
|
+
export declare type BoostingConfig = {
|
|
52
|
+
/** Configuration object ID */
|
|
53
|
+
id: string;
|
|
54
|
+
/** Map of tier ID to tier information */
|
|
55
|
+
tiers: Record<string, TierInfo>;
|
|
56
|
+
/** Address that receives boosting payment fees */
|
|
57
|
+
receiverAddress: string;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Module for managing boosting functionality in the Noodles SDK.
|
|
62
|
+
*
|
|
63
|
+
* This module provides methods for:
|
|
64
|
+
* - Paying boosting fees for different tiers
|
|
65
|
+
* - Managing boosting tiers (admin functions)
|
|
66
|
+
* - Retrieving boosting configuration
|
|
67
|
+
* - Updating fee receiver settings
|
|
68
|
+
*/
|
|
69
|
+
export declare class BoostingModule implements IPayModule {
|
|
70
|
+
/** Reference to the main SDK instance */
|
|
71
|
+
sdk: NoodlesPaySdk;
|
|
72
|
+
/**
|
|
73
|
+
* Creates a new BoostingModule instance.
|
|
74
|
+
*
|
|
75
|
+
* @param sdk - The main Noodles Pay SDK instance
|
|
76
|
+
*/
|
|
77
|
+
constructor(sdk: NoodlesPaySdk);
|
|
78
|
+
/**
|
|
79
|
+
* Retrieves the current boosting configuration from the blockchain.
|
|
80
|
+
*
|
|
81
|
+
* @returns Promise resolving to the current boosting configuration
|
|
82
|
+
* @throws Error if config object is not found or invalid
|
|
83
|
+
*/
|
|
84
|
+
getConfig(): Promise<BoostingConfig>;
|
|
85
|
+
/**
|
|
86
|
+
* Builds a transaction for paying boosting fees for a specific tier.
|
|
87
|
+
* The payment amount is determined by the tier configuration.
|
|
88
|
+
*
|
|
89
|
+
* @param request - Payment request parameters
|
|
90
|
+
* @returns Promise resolving to a transaction ready for execution
|
|
91
|
+
* @throws Error if tier ID is invalid
|
|
92
|
+
*/
|
|
93
|
+
buildPayBoostingTx({ walletAddress, tierId, boostingCoinType, currentTx, }: PayBoostingRequest): Promise<Transaction>;
|
|
94
|
+
/**
|
|
95
|
+
* Builds a transaction for adding a new boosting tier.
|
|
96
|
+
*
|
|
97
|
+
* **Requires admin capability.**
|
|
98
|
+
*
|
|
99
|
+
* @param request - Add tier request parameters
|
|
100
|
+
* @returns Promise resolving to a transaction ready for execution
|
|
101
|
+
*/
|
|
102
|
+
buildAddTierTx({ adminAddress, tierId, duration, point, originalAmount, amount, currentTx, }: AddTierRequest): Promise<Transaction>;
|
|
103
|
+
/**
|
|
104
|
+
* Builds a transaction for updating an existing boosting tier.
|
|
105
|
+
*
|
|
106
|
+
* **Requires admin capability.**
|
|
107
|
+
*
|
|
108
|
+
* @param request - Update tier request parameters
|
|
109
|
+
* @returns Promise resolving to a transaction ready for execution
|
|
110
|
+
*/
|
|
111
|
+
buildUpdateTierTx({ adminAddress, tierId, duration, amount, originalAmount, point, currentTx, }: UpdateTierRequest): Promise<Transaction>;
|
|
112
|
+
/**
|
|
113
|
+
* Builds a transaction for removing a boosting tier.
|
|
114
|
+
*
|
|
115
|
+
* **Requires admin capability.**
|
|
116
|
+
*
|
|
117
|
+
* @param request - Remove tier request parameters
|
|
118
|
+
* @returns Promise resolving to a transaction ready for execution
|
|
119
|
+
*/
|
|
120
|
+
buildRemoveTierTx({ adminAddress, tierId, currentTx }: RemoveTierRequest): Promise<Transaction>;
|
|
121
|
+
/**
|
|
122
|
+
* Builds a transaction for updating the fee receiver address.
|
|
123
|
+
*
|
|
124
|
+
* **Requires admin capability.**
|
|
125
|
+
*
|
|
126
|
+
* @param request - Update fee receiver request parameters
|
|
127
|
+
* @returns Promise resolving to a transaction ready for execution
|
|
128
|
+
*/
|
|
129
|
+
buildUpdateFeeReceiver({ adminAddress, newReceiverAddress, currentTx, }: UpdateFeeReceiverRequest): Promise<Transaction>;
|
|
130
|
+
/**
|
|
131
|
+
* Builds a transaction for paying boosting fees with admin privileges.
|
|
132
|
+
* Allows specifying a custom payment amount instead of using the tier's default amount.
|
|
133
|
+
*
|
|
134
|
+
* **Requires admin capability.**
|
|
135
|
+
*
|
|
136
|
+
* @param request - Admin payment request parameters
|
|
137
|
+
* @returns Promise resolving to a transaction ready for execution
|
|
138
|
+
*/
|
|
139
|
+
buildPayBoostingWithAdminTx({ walletAddress, tierId, customAmount, boostingCoinType, currentTx, }: PayBoostingWithAdminRequest): Promise<Transaction>;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Parameters for buying additional compute units (CU) for CUAddOn plans.
|
|
144
|
+
*/
|
|
145
|
+
export declare type BuyMoreCUPlanRequest = {
|
|
146
|
+
/** Address of the wallet making the purchase */
|
|
147
|
+
walletAddress: string;
|
|
148
|
+
/** ID of the CUAddOn subscription plan */
|
|
149
|
+
planId: number;
|
|
150
|
+
/** encrypted user_id */
|
|
151
|
+
reference: string;
|
|
152
|
+
/** Amount of payment coins want to paid */
|
|
153
|
+
paidAmount: bigint;
|
|
154
|
+
/** Type of coin used for payment (should be USDC) */
|
|
155
|
+
paymentCoinType?: string;
|
|
156
|
+
/** Optional existing transaction to append to (for composability) */
|
|
157
|
+
currentTx?: Transaction;
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
/** Configuration object ID for boosting settings */
|
|
161
|
+
export declare const CONFIG_ID = "0x8b1a8ac6e34688cd8f8f8e5fefa9d5fb9e1ff74d2f132f8e208ae5ac9cc530bb";
|
|
162
|
+
|
|
163
|
+
declare interface IPayModule {
|
|
164
|
+
readonly sdk: NoodlesPaySdk;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export declare class NoodlesPaySdk {
|
|
168
|
+
private _suiClient;
|
|
169
|
+
readonly boostingModule: BoostingModule;
|
|
170
|
+
readonly subscriptionModule: SubscriptionModule;
|
|
171
|
+
constructor();
|
|
172
|
+
get suiClient(): SuiClient;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Parameters for paying boosting fees for a specific tier.
|
|
177
|
+
*/
|
|
178
|
+
export declare type PayBoostingRequest = {
|
|
179
|
+
/** Address of the wallet making the payment */
|
|
180
|
+
walletAddress: string;
|
|
181
|
+
/** ID of the boosting tier to pay for */
|
|
182
|
+
tierId: string;
|
|
183
|
+
/** Type of coin used for boosting payment */
|
|
184
|
+
boostingCoinType: string;
|
|
185
|
+
/** Optional existing transaction to append to (for composability) */
|
|
186
|
+
currentTx?: Transaction;
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Parameters for paying boosting fees with admin privileges using custom amount.
|
|
191
|
+
*/
|
|
192
|
+
export declare type PayBoostingWithAdminRequest = {
|
|
193
|
+
/** Address of the wallet making the payment */
|
|
194
|
+
walletAddress: string;
|
|
195
|
+
/** ID of the boosting tier */
|
|
196
|
+
tierId: string;
|
|
197
|
+
/** Custom payment amount (overrides tier amount) */
|
|
198
|
+
customAmount: bigint;
|
|
199
|
+
/** Type of coin used for boosting payment */
|
|
200
|
+
boostingCoinType: string;
|
|
201
|
+
/** Optional existing transaction to append to (for composability) */
|
|
202
|
+
currentTx?: Transaction;
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
/** Payment coin type on SUI */
|
|
206
|
+
export declare const PAYMENT_COIN_TYPE = "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC";
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Parameters for removing a subscription plan (admin only).
|
|
210
|
+
*/
|
|
211
|
+
export declare type RemovePlanRequest = {
|
|
212
|
+
/** Address of the admin performing the operation */
|
|
213
|
+
adminAddress: string;
|
|
214
|
+
/** ID of the plan to remove */
|
|
215
|
+
planId: number;
|
|
216
|
+
/** Optional existing transaction to append to (for composability) */
|
|
217
|
+
currentTx?: Transaction;
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Parameters for removing a boosting tier (admin only).
|
|
222
|
+
*/
|
|
223
|
+
export declare type RemoveTierRequest = {
|
|
224
|
+
/** Address of the admin performing the operation */
|
|
225
|
+
adminAddress: string;
|
|
226
|
+
/** ID of the tier to remove */
|
|
227
|
+
tierId: bigint;
|
|
228
|
+
/** Optional existing transaction to append to (for composability) */
|
|
229
|
+
currentTx?: Transaction;
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Parameters for setting the accepted payment coin type (admin only).
|
|
234
|
+
* Note: Only one payment type can be accepted at a time. Setting a new type replaces the previous one.
|
|
235
|
+
*/
|
|
236
|
+
export declare type SetAcceptedPaymentTypeRequest = {
|
|
237
|
+
/** Address of the admin performing the operation */
|
|
238
|
+
adminAddress: string;
|
|
239
|
+
/** Type of coin to accept for payments (replaces current accepted type) */
|
|
240
|
+
paymentCoinType: string;
|
|
241
|
+
/** Optional existing transaction to append to (for composability) */
|
|
242
|
+
currentTx?: Transaction;
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Parameters for pausing/unpausing the contract (admin only).
|
|
247
|
+
*/
|
|
248
|
+
export declare type SetPausedRequest = {
|
|
249
|
+
/** Address of the admin performing the operation */
|
|
250
|
+
adminAddress: string;
|
|
251
|
+
/** Whether to pause (true) or unpause (false) the contract */
|
|
252
|
+
paused: boolean;
|
|
253
|
+
/** Optional existing transaction to append to (for composability) */
|
|
254
|
+
currentTx?: Transaction;
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Parameters for subscribing to a plan.
|
|
259
|
+
*/
|
|
260
|
+
export declare type SubscribePlanRequest = {
|
|
261
|
+
/** Address of the wallet making the subscription */
|
|
262
|
+
walletAddress: string;
|
|
263
|
+
/** ID of the subscription plan */
|
|
264
|
+
planId: number;
|
|
265
|
+
/** encrypted user_id */
|
|
266
|
+
reference: string;
|
|
267
|
+
/** Type of coin used for payment (should be USDC) */
|
|
268
|
+
paymentCoinType?: string;
|
|
269
|
+
/** Optional existing transaction to append to (for composability) */
|
|
270
|
+
currentTx?: Transaction;
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Parameters for subscribing with admin privileges using custom amount.
|
|
275
|
+
*/
|
|
276
|
+
export declare type SubscribePlanWithAdminRequest = {
|
|
277
|
+
/** Address of the wallet making the subscription */
|
|
278
|
+
walletAddress: string;
|
|
279
|
+
/** ID of the subscription plan */
|
|
280
|
+
planId: number;
|
|
281
|
+
/** encrypted user_id */
|
|
282
|
+
reference: string;
|
|
283
|
+
/** Custom payment amount (overrides plan price, for promotions/discounts) */
|
|
284
|
+
customAmount: bigint;
|
|
285
|
+
/** Type of coin used for payment (should be USDC) */
|
|
286
|
+
paymentCoinType?: string;
|
|
287
|
+
/** Optional existing transaction to append to (for composability) */
|
|
288
|
+
currentTx?: Transaction;
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
/** Admin capability object ID for privileged operations */
|
|
292
|
+
export declare const SUBSCRIPTION_ADMIN_CAP_ID = "0x4d15fc6c181efbe82020697705d37b29154edecb4c682b502bd8f0136d4dd7bf";
|
|
293
|
+
|
|
294
|
+
/** Configuration object ID for subscription settings */
|
|
295
|
+
export declare const SUBSCRIPTION_CONFIG_ID = "0xe88e0d6792c2bef3f54d594ef26d8df85c6227f5370c200b860d8264f5d78744";
|
|
296
|
+
|
|
297
|
+
/** Sui package ID for the subscription protocol */
|
|
298
|
+
export declare const SUBSCRIPTION_PACKAGE_ID = "0xaedb9a4330883c91769c99e7d2a7ea573b686504daf11d13353141260736a902";
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* Complete subscription protocol configuration.
|
|
302
|
+
*/
|
|
303
|
+
export declare type SubscriptionConfig = {
|
|
304
|
+
/** Configuration object ID */
|
|
305
|
+
id: string;
|
|
306
|
+
/** Map of plan ID to plan information */
|
|
307
|
+
plans: Record<string, SubscriptionPlan>;
|
|
308
|
+
/** Address that receives subscription payments */
|
|
309
|
+
feeReceiverWallet: string;
|
|
310
|
+
/** Whether the contract is paused */
|
|
311
|
+
paused: boolean;
|
|
312
|
+
/** Currently accepted payment coin type (only one type allowed at a time) */
|
|
313
|
+
acceptedPaymentType: string;
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* Module for managing subscription functionality in the Noodles SDK.
|
|
318
|
+
*
|
|
319
|
+
* This module provides methods for:
|
|
320
|
+
* - Subscribing to plans
|
|
321
|
+
* - Upgrading plans (immediate or next billing cycle)
|
|
322
|
+
* - Managing subscription plans (admin functions)
|
|
323
|
+
* - Retrieving subscription configuration
|
|
324
|
+
* - Updating fee receiver wallet and pause settings
|
|
325
|
+
*/
|
|
326
|
+
export declare class SubscriptionModule implements IPayModule {
|
|
327
|
+
/** Reference to the main SDK instance */
|
|
328
|
+
sdk: NoodlesPaySdk;
|
|
329
|
+
/**
|
|
330
|
+
* Creates a new SubscriptionModule instance.
|
|
331
|
+
*
|
|
332
|
+
* @param sdk - The main Noodles Pay SDK instance
|
|
333
|
+
*/
|
|
334
|
+
constructor(sdk: NoodlesPaySdk);
|
|
335
|
+
/**
|
|
336
|
+
* Retrieves the current subscription configuration from the blockchain.
|
|
337
|
+
*
|
|
338
|
+
* @returns Promise resolving to the current subscription configuration
|
|
339
|
+
* @throws Error if config object is not found or invalid
|
|
340
|
+
*/
|
|
341
|
+
getConfig(): Promise<SubscriptionConfig>;
|
|
342
|
+
/**
|
|
343
|
+
* Builds a transaction for subscribing to a plan.
|
|
344
|
+
* The payment amount is determined by the plan configuration.
|
|
345
|
+
*
|
|
346
|
+
* @param request - Subscription request parameters
|
|
347
|
+
* @returns Promise resolving to a transaction ready for execution
|
|
348
|
+
* @throws Error if plan ID is invalid or contract is paused
|
|
349
|
+
*/
|
|
350
|
+
buildSubscribeCyclePlanTx({ walletAddress, planId, reference, paymentCoinType, currentTx, }: SubscribePlanRequest): Promise<Transaction>;
|
|
351
|
+
/**
|
|
352
|
+
* Builds a transaction for upgrading to a higher plan.
|
|
353
|
+
* The upgrade takes effect at the next billing cycle.
|
|
354
|
+
* Charges the full price of the target plan.
|
|
355
|
+
*
|
|
356
|
+
* @param request - Upgrade request parameters
|
|
357
|
+
* @returns Promise resolving to a transaction ready for execution
|
|
358
|
+
* @throws Error if plan IDs are invalid or contract is paused
|
|
359
|
+
*/
|
|
360
|
+
buildUpgradeCyclePlanTx({ walletAddress, currentPlanId, targetPlanId, reference, isNextCycle, paymentCoinType, currentTx, }: UpgradePlanRequest): Promise<Transaction>;
|
|
361
|
+
buildBuyMoreCUPlanTx({ walletAddress, planId, reference, paidAmount, paymentCoinType, currentTx, }: BuyMoreCUPlanRequest): Promise<Transaction>;
|
|
362
|
+
/**
|
|
363
|
+
* Builds a transaction for subscribing with admin privileges.
|
|
364
|
+
* Allows specifying a custom payment amount instead of using the plan's default price.
|
|
365
|
+
* Useful for promotions, discounts, or special cases.
|
|
366
|
+
*
|
|
367
|
+
* **Requires admin capability.**
|
|
368
|
+
*
|
|
369
|
+
* @param request - Admin subscription request parameters
|
|
370
|
+
* @returns Promise resolving to a transaction ready for execution
|
|
371
|
+
* @throws Error if contract is paused
|
|
372
|
+
*/
|
|
373
|
+
buildSubscribePlanWithAdminTx({ walletAddress, planId, reference, customAmount, paymentCoinType, currentTx, }: SubscribePlanWithAdminRequest): Promise<Transaction>;
|
|
374
|
+
/**
|
|
375
|
+
* Builds a transaction for adding a new subscription plan.
|
|
376
|
+
*
|
|
377
|
+
* **Requires admin capability.**
|
|
378
|
+
*
|
|
379
|
+
* @param request - Add plan request parameters
|
|
380
|
+
* @returns Promise resolving to a transaction ready for execution
|
|
381
|
+
*/
|
|
382
|
+
buildAddPlanTx({ adminAddress, planId, planType, monthInterval, price, currentTx, }: AddPlanRequest): Promise<Transaction>;
|
|
383
|
+
/**
|
|
384
|
+
* Builds a transaction for updating an existing subscription plan.
|
|
385
|
+
*
|
|
386
|
+
* **Requires admin capability.**
|
|
387
|
+
*
|
|
388
|
+
* @param request - Update plan request parameters
|
|
389
|
+
* @returns Promise resolving to a transaction ready for execution
|
|
390
|
+
*/
|
|
391
|
+
buildUpdatePlanTx({ adminAddress, planId, planType, monthInterval, price, currentTx, }: UpdatePlanRequest): Promise<Transaction>;
|
|
392
|
+
/**
|
|
393
|
+
* Builds a transaction for removing a subscription plan.
|
|
394
|
+
*
|
|
395
|
+
* **Requires admin capability.**
|
|
396
|
+
*
|
|
397
|
+
* @param request - Remove plan request parameters
|
|
398
|
+
* @returns Promise resolving to a transaction ready for execution
|
|
399
|
+
*/
|
|
400
|
+
buildRemovePlanTx({ adminAddress, planId, currentTx }: RemovePlanRequest): Promise<Transaction>;
|
|
401
|
+
/**
|
|
402
|
+
* Builds a transaction for updating the admin wallet address.
|
|
403
|
+
*
|
|
404
|
+
* **Requires admin capability.**
|
|
405
|
+
*
|
|
406
|
+
* @param request - Update admin wallet request parameters
|
|
407
|
+
* @returns Promise resolving to a transaction ready for execution
|
|
408
|
+
*/
|
|
409
|
+
buildUpdateFeeReceiverWalletTx({ adminAddress, newFeeReceiverWallet, currentTx, }: UpdateFeeReceiverWalletRequest): Promise<Transaction>;
|
|
410
|
+
/**
|
|
411
|
+
* Builds a transaction for pausing or unpausing the contract.
|
|
412
|
+
*
|
|
413
|
+
* **Requires admin capability.**
|
|
414
|
+
*
|
|
415
|
+
* @param request - Set paused request parameters
|
|
416
|
+
* @returns Promise resolving to a transaction ready for execution
|
|
417
|
+
*/
|
|
418
|
+
buildSetPausedTx({ adminAddress, paused, currentTx }: SetPausedRequest): Promise<Transaction>;
|
|
419
|
+
/**
|
|
420
|
+
* Builds a transaction to set the accepted payment coin type.
|
|
421
|
+
* Note: Only one payment type can be accepted at a time. Setting a new type replaces the previous one.
|
|
422
|
+
*
|
|
423
|
+
* **Requires admin capability.**
|
|
424
|
+
*
|
|
425
|
+
* @param request - Set accepted payment type request parameters
|
|
426
|
+
* @returns Promise resolving to a transaction ready for execution
|
|
427
|
+
*/
|
|
428
|
+
buildSetAcceptedPaymentTypeTx({ adminAddress, paymentCoinType, currentTx, }: SetAcceptedPaymentTypeRequest): Promise<Transaction>;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* Information about a specific subscription plan.
|
|
433
|
+
*/
|
|
434
|
+
export declare type SubscriptionPlan = {
|
|
435
|
+
/** Plan identifier */
|
|
436
|
+
id: bigint;
|
|
437
|
+
/** Price in USDC (6 decimals) */
|
|
438
|
+
price: bigint;
|
|
439
|
+
/** Type of the plan (1 = Default, 2 = CUAddOn) */
|
|
440
|
+
planType: number;
|
|
441
|
+
/** Duration of the plan in months */
|
|
442
|
+
monthInterval: number;
|
|
443
|
+
};
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* Information about a specific boosting tier.
|
|
447
|
+
*/
|
|
448
|
+
export declare type TierInfo = {
|
|
449
|
+
/** Duration of the boosting effect in milliseconds */
|
|
450
|
+
duration: bigint;
|
|
451
|
+
/** Amount required to purchase this tier */
|
|
452
|
+
amount: bigint;
|
|
453
|
+
/** Point value associated with this tier */
|
|
454
|
+
point: bigint;
|
|
455
|
+
/** Original amount for the boosting tier */
|
|
456
|
+
originalAmount: bigint;
|
|
457
|
+
};
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* Parameters for updating the fee receiver address (admin only).
|
|
461
|
+
*/
|
|
462
|
+
export declare type UpdateFeeReceiverRequest = {
|
|
463
|
+
/** Address of the admin performing the operation */
|
|
464
|
+
adminAddress: string;
|
|
465
|
+
/** New address to receive boosting fees */
|
|
466
|
+
newReceiverAddress: string;
|
|
467
|
+
/** Optional existing transaction to append to (for composability) */
|
|
468
|
+
currentTx?: Transaction;
|
|
469
|
+
};
|
|
470
|
+
|
|
471
|
+
/**
|
|
472
|
+
* Parameters for updating the admin wallet address (admin only).
|
|
473
|
+
*/
|
|
474
|
+
export declare type UpdateFeeReceiverWalletRequest = {
|
|
475
|
+
/** Address of the admin performing the operation */
|
|
476
|
+
adminAddress: string;
|
|
477
|
+
/** New address to receive subscription payments */
|
|
478
|
+
newFeeReceiverWallet: string;
|
|
479
|
+
/** Optional existing transaction to append to (for composability) */
|
|
480
|
+
currentTx?: Transaction;
|
|
481
|
+
};
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* Parameters for updating an existing subscription plan (admin only).
|
|
485
|
+
*/
|
|
486
|
+
export declare type UpdatePlanRequest = {
|
|
487
|
+
/** Address of the admin performing the operation */
|
|
488
|
+
adminAddress: string;
|
|
489
|
+
/** ID of the plan to update */
|
|
490
|
+
planId: number;
|
|
491
|
+
/** Type of the plan (1 = Default, 2 = CUAddOn) */
|
|
492
|
+
planType: number;
|
|
493
|
+
/** Duration of the plan in months */
|
|
494
|
+
monthInterval: number;
|
|
495
|
+
/** New price of the plan in USDC (with 6 decimals) */
|
|
496
|
+
price: bigint;
|
|
497
|
+
/** Optional existing transaction to append to (for composability) */
|
|
498
|
+
currentTx?: Transaction;
|
|
499
|
+
};
|
|
500
|
+
|
|
501
|
+
/**
|
|
502
|
+
* Parameters for updating an existing boosting tier (admin only).
|
|
503
|
+
*/
|
|
504
|
+
export declare type UpdateTierRequest = {
|
|
505
|
+
/** Address of the admin performing the operation */
|
|
506
|
+
adminAddress: string;
|
|
507
|
+
/** ID of the tier to update */
|
|
508
|
+
tierId: bigint;
|
|
509
|
+
/** New duration of the boosting effect in milliseconds */
|
|
510
|
+
duration: bigint;
|
|
511
|
+
/** New point value for the boosting tier */
|
|
512
|
+
point: bigint;
|
|
513
|
+
/** New original amount for the boosting tier */
|
|
514
|
+
originalAmount: bigint;
|
|
515
|
+
/** New amount required to purchase this tier */
|
|
516
|
+
amount: bigint;
|
|
517
|
+
/** Optional existing transaction to append to (for composability) */
|
|
518
|
+
currentTx?: Transaction;
|
|
519
|
+
};
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* Parameters for upgrading to a higher plan (takes effect at next billing cycle).
|
|
523
|
+
*/
|
|
524
|
+
export declare type UpgradePlanRequest = {
|
|
525
|
+
/** Address of the wallet making the upgrade */
|
|
526
|
+
walletAddress: string;
|
|
527
|
+
/** Current plan ID */
|
|
528
|
+
currentPlanId: number;
|
|
529
|
+
/** Target plan ID to upgrade to */
|
|
530
|
+
targetPlanId: number;
|
|
531
|
+
/** encrypted user_id */
|
|
532
|
+
reference: string;
|
|
533
|
+
/** Whether the upgrade should take effect in the next billing cycle */
|
|
534
|
+
isNextCycle: boolean;
|
|
535
|
+
/** Type of coin used for payment (should be USDC) */
|
|
536
|
+
paymentCoinType?: string;
|
|
537
|
+
/** Optional existing transaction to append to (for composability) */
|
|
538
|
+
currentTx?: Transaction;
|
|
539
|
+
};
|
|
540
|
+
|
|
541
|
+
export { }
|
package/dist/pay.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@minswap/tiny-invariant";import{Transaction as t}from"@mysten/sui/transactions";import{normalizeStructTag as i}from"@mysten/sui/utils";import{SuiClient as n,getFullnodeUrl as s}from"@mysten/sui/client";async function a(e,t,i,n){let{effects:{gasUsed:s,status:a}}=await e.devInspectTransactionBlock({sender:i,transactionBlock:t});if("success"!==a.status)throw Error(`Transaction failed during dev inspect: ${a.error??""}`);let r=BigInt(s.computationCost)+BigInt(s.storageCost)-BigInt(s.storageRebate),u=BigInt(1e4*Number(n));return r*(BigInt(1e4)+u)/BigInt(1e4)}let r="0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI",u=async(e,t,i,n)=>{let s,a=[],r=!0;for(;r;)try{let i=await e.getCoins({owner:t,coinType:n,cursor:s});a=[...a,...i.data],r=i.hasNextPage,s=i.nextCursor}catch(e){console.error("Error fetching data:",e),r=!1}let u=((e,t,i)=>{let n;if(e?.length){do{n=!1;for(let s=0;s<e.length-1;s++){let a=BigInt(e[s][t]),r=BigInt(e[s+1][t]);if("desc"===i?a<r:a>r){let t=e[s];e[s]=e[s+1],e[s+1]=t,n=!0}}}while(n);return e}})(a.map(e=>({...e,balance:e.balance})),"balance","desc")??[],o="0",l=[],d=[];for(let e of u)if(o=(BigInt(e.balance)+BigInt(o)).toString(10),l.push(e.coinObjectId),d.push(e),BigInt(o)>=BigInt(i))break;return{objectIds:l,balance:o,objectCoins:d}};async function o(e,i){let{inheritTx:n,sender:s,feeAmount:a,suiInputAmount:o}=e,l=n||new t;l.setGasBudget(a);let{objectCoins:d}=await u(i,s,(BigInt(o||"0")+a).toString(),r);return l.setGasPayment(d.map(e=>({objectId:e.coinObjectId,version:e.version,digest:e.digest}))),l}let l="0x25fa0eb553dd69fa6a8028f73a38f1df7f289fa88a58ed3d7dc5a5360155bb19",d="0x8b1a8ac6e34688cd8f8f8e5fefa9d5fb9e1ff74d2f132f8e208ae5ac9cc530bb",c="0x13d101f44a0710a5475bec5f492a87b80e03d92d1cf540f26096f65850b23d26";class p{sdk;constructor(e){this.sdk=e}async getConfig(){let t=await this.sdk.suiClient.getObject({id:d,options:{showContent:!0}});e(t.data?.content,"Config object not found or has no content"),e(t.data?.content.dataType==="moveObject","Config object is not a Move object");let i=t.data.content.fields,n=i.id.id,s=i.fee_receiver,a=i.tiers.fields.contents,r={};for(let e of a){let t=e.fields.key,i=e.fields.value.fields.duration,n=e.fields.value.fields.amount,s=e.fields.value.fields.point,a=e.fields.value.fields.original_amount;r[t]={duration:BigInt(i),amount:BigInt(n),point:BigInt(s),originalAmount:BigInt(a)}}return{id:n,receiverAddress:s,tiers:r}}async buildPayBoostingTx({walletAddress:n,tierId:s,boostingCoinType:r,currentTx:u}){let c=await this.getConfig();e(s in c.tiers,"Invalid tier ID");let p=c.tiers[s].amount,g=u||new t,f=g.splitCoins(g.gas,[g.pure.u64(p)]);g.moveCall({target:`${l}::boosting::pay`,typeArguments:[i(r)],arguments:[g.object(d),g.pure.u64(s),f]}),g.setSender(n);let b=await a(this.sdk.suiClient,g,n,0);return o({inheritTx:g,sender:n,feeAmount:b},this.sdk.suiClient)}async buildAddTierTx({adminAddress:e,tierId:i,duration:n,point:s,originalAmount:r,amount:u,currentTx:p}){let g=p||new t;g.moveCall({target:`${l}::config::add_tier`,typeArguments:[],arguments:[g.object(d),g.object(c),g.pure.u64(i),g.pure.u64(s),g.pure.u64(n),g.pure.u64(r),g.pure.u64(u)]}),g.setSender(e);let f=await a(this.sdk.suiClient,g,e,0);return o({inheritTx:g,sender:e,feeAmount:f},this.sdk.suiClient)}async buildUpdateTierTx({adminAddress:e,tierId:i,duration:n,amount:s,originalAmount:r,point:u,currentTx:p}){let g=p||new t;g.moveCall({target:`${l}::config::update_tier`,typeArguments:[],arguments:[g.object(d),g.object(c),g.pure.u64(i),g.pure.u64(n),g.pure.u64(s),g.pure.u64(u),g.pure.u64(r)]}),g.setSender(e);let f=await a(this.sdk.suiClient,g,e,0);return o({inheritTx:g,sender:e,feeAmount:f},this.sdk.suiClient)}async buildRemoveTierTx({adminAddress:e,tierId:i,currentTx:n}){let s=n||new t;s.moveCall({target:`${l}::config::remove_tier`,typeArguments:[],arguments:[s.object(d),s.object(c),s.pure.u64(i)]}),s.setSender(e);let r=await a(this.sdk.suiClient,s,e,0);return o({inheritTx:s,sender:e,feeAmount:r},this.sdk.suiClient)}async buildUpdateFeeReceiver({adminAddress:e,newReceiverAddress:i,currentTx:n}){let s=n||new t;s.moveCall({target:`${l}::config::update_fee_receiver`,typeArguments:[],arguments:[s.object(d),s.object(c),s.pure.address(i)]}),s.setSender(e);let r=await a(this.sdk.suiClient,s,e,0);return o({inheritTx:s,sender:e,feeAmount:r},this.sdk.suiClient)}async buildPayBoostingWithAdminTx({walletAddress:e,tierId:n,customAmount:s,boostingCoinType:r,currentTx:u}){let p=u||new t,g=p.splitCoins(p.gas,[p.pure.u64(s)]);p.moveCall({target:`${l}::boosting::pay_with_admin`,typeArguments:[i(r)],arguments:[p.object(c),p.object(d),p.pure.u64(n),p.pure.u64(s),g]}),p.setSender(e);let f=await a(this.sdk.suiClient,p,e,0);return o({inheritTx:p,sender:e,feeAmount:f},this.sdk.suiClient)}}async function g(e,n){let{account:s,amount:a,splits:o,coinType:l,inheritTx:d,inspecTransaction:c,isSponsored:p=!1}=e,g=d??new t,{objectIds:f}=await u(n,s,a,l),b=f[0];if(i(l)===i(r)&&!p){let e;return c?(f.length>1&&g.mergeCoins(g.object(b),f.slice(1).map(e=>g.object(e))),e=g.splitCoins(g.object(b),o)):e=g.splitCoins(g.gas,o),{tx:g,coinData:e}}f.length>1&&g.mergeCoins(g.object(b),f.slice(1).map(e=>g.object(e)));let m=g.splitCoins(g.object(b),o);return{tx:g,coinData:m}}let f="0xaedb9a4330883c91769c99e7d2a7ea573b686504daf11d13353141260736a902",b="0xe88e0d6792c2bef3f54d594ef26d8df85c6227f5370c200b860d8264f5d78744",m="0x4d15fc6c181efbe82020697705d37b29154edecb4c682b502bd8f0136d4dd7bf",C="0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC";class h{sdk;constructor(e){this.sdk=e}async getConfig(){let t=await this.sdk.suiClient.getObject({id:b,options:{showContent:!0}});e(t.data,"Config object not found"),e(t.data.content,"Config object has no content"),e(t.data?.content.dataType==="moveObject","Config object is not a Move object");let i=t.data.content.fields,n=i.id.id,s=i.fee_receiver,a=i.paused,r=i.accepted_payment_type,u=i.plans.fields.contents,o={};for(let e of u){let t=e.fields.key,i=e.fields.value.fields.id,n=e.fields.value.fields.price,s=e.fields.value.fields.month_interval,a=e.fields.value.fields.ptype;o[t]={id:BigInt(i),price:BigInt(n),monthInterval:s,planType:a}}return{id:n,plans:o,feeReceiverWallet:s,paused:a,acceptedPaymentType:r}}async buildSubscribeCyclePlanTx({walletAddress:t,planId:i,reference:n,paymentCoinType:s=C,currentTx:r}){let u=await this.getConfig();e(!u.paused,"Contract is paused"),e(i in u.plans,"Invalid plan ID");let l=u.plans[i].price,{tx:d,coinData:c}=await g({account:t,amount:l.toString(),splits:[l.toString()],coinType:s,inheritTx:r},this.sdk.suiClient);d.moveCall({target:`${f}::subscription::subscribe_cycle_plan`,typeArguments:[s],arguments:[d.object(b),d.pure.u64(i),d.pure.string(n),c]}),d.setSender(t);let p=await a(this.sdk.suiClient,d,t,0);return o({inheritTx:d,sender:t,feeAmount:p},this.sdk.suiClient)}async buildUpgradeCyclePlanTx({walletAddress:t,currentPlanId:i,targetPlanId:n,reference:s,isNextCycle:r,paymentCoinType:u=C,currentTx:l}){let d=await this.getConfig();e(!d.paused,"Contract is paused"),e(i in d.plans,"Invalid current plan ID"),e(n in d.plans,"Invalid target plan ID"),e(i!==n,"Current and target plan IDs must be different");let c=d.plans[n].price,{tx:p,coinData:m}=await g({account:t,amount:c.toString(),splits:[c.toString()],coinType:u,inheritTx:l},this.sdk.suiClient);p.moveCall({target:`${f}::subscription::upgrade_cycle_plan`,typeArguments:[u],arguments:[p.object(b),p.pure.u64(i),p.pure.u64(n),p.pure.string(s),p.pure.bool(r),m]}),p.setSender(t);let h=await a(this.sdk.suiClient,p,t,0);return o({inheritTx:p,sender:t,feeAmount:h},this.sdk.suiClient)}async buildBuyMoreCUPlanTx({walletAddress:t,planId:i,reference:n,paidAmount:s,paymentCoinType:r=C,currentTx:u}){let l=await this.getConfig();e(!l.paused,"Contract is paused"),e(i in l.plans,"Invalid plan ID");let{tx:d,coinData:c}=await g({account:t,amount:s.toString(),splits:[s.toString()],coinType:r,inheritTx:u},this.sdk.suiClient);d.moveCall({target:`${f}::subscription::buy_more_cu`,typeArguments:[r],arguments:[d.object(b),d.pure.u64(i),d.pure.string(n),d.pure.u64(s),c]}),d.setSender(t);let p=await a(this.sdk.suiClient,d,t,0);return o({inheritTx:d,sender:t,feeAmount:p},this.sdk.suiClient)}async buildSubscribePlanWithAdminTx({walletAddress:t,planId:i,reference:n,customAmount:s,paymentCoinType:r=C,currentTx:u}){e(!(await this.getConfig()).paused,"Contract is paused");let{tx:l,coinData:d}=await g({account:t,amount:s.toString(),splits:[s.toString()],coinType:r,inheritTx:u},this.sdk.suiClient);l.moveCall({target:`${f}::subscription::subscribe_plan_with_admin`,typeArguments:[r],arguments:[l.object(m),l.object(b),l.pure.u64(i),l.pure.string(n),l.pure.u64(s),d]}),l.setSender(t);let c=await a(this.sdk.suiClient,l,t,0);return o({inheritTx:l,sender:t,feeAmount:c},this.sdk.suiClient)}async buildAddPlanTx({adminAddress:e,planId:i,planType:n,monthInterval:s,price:r,currentTx:u}){let l=u||new t;l.moveCall({target:`${f}::config::add_plan`,typeArguments:[],arguments:[l.object(b),l.object(m),l.pure.u64(i),l.pure.u8(n),l.pure.u8(s),l.pure.u64(r)]}),l.setSender(e);let d=await a(this.sdk.suiClient,l,e,0);return o({inheritTx:l,sender:e,feeAmount:d},this.sdk.suiClient)}async buildUpdatePlanTx({adminAddress:e,planId:i,planType:n,monthInterval:s,price:r,currentTx:u}){let l=u||new t;l.moveCall({target:`${f}::config::update_plan`,typeArguments:[],arguments:[l.object(b),l.object(m),l.pure.u64(BigInt(i)),l.pure.u8(n),l.pure.u8(s),l.pure.u64(r)]}),l.setSender(e);let d=await a(this.sdk.suiClient,l,e,0);return o({inheritTx:l,sender:e,feeAmount:d},this.sdk.suiClient)}async buildRemovePlanTx({adminAddress:e,planId:i,currentTx:n}){let s=n||new t;s.moveCall({target:`${f}::config::remove_plan`,typeArguments:[],arguments:[s.object(b),s.object(m),s.pure.u64(BigInt(i))]}),s.setSender(e);let r=await a(this.sdk.suiClient,s,e,0);return o({inheritTx:s,sender:e,feeAmount:r},this.sdk.suiClient)}async buildUpdateFeeReceiverWalletTx({adminAddress:e,newFeeReceiverWallet:i,currentTx:n}){let s=n||new t;s.moveCall({target:`${f}::config::update_fee_receiver`,typeArguments:[],arguments:[s.object(b),s.object(m),s.pure.address(i)]}),s.setSender(e);let r=await a(this.sdk.suiClient,s,e,0);return o({inheritTx:s,sender:e,feeAmount:r},this.sdk.suiClient)}async buildSetPausedTx({adminAddress:e,paused:i,currentTx:n}){let s=n||new t;s.moveCall({target:`${f}::config::set_paused`,typeArguments:[],arguments:[s.object(b),s.object(m),s.pure.bool(i)]}),s.setSender(e);let r=await a(this.sdk.suiClient,s,e,0);return o({inheritTx:s,sender:e,feeAmount:r},this.sdk.suiClient)}async buildSetAcceptedPaymentTypeTx({adminAddress:e,paymentCoinType:i,currentTx:n}){let s=n||new t;s.moveCall({target:`${f}::config::set_accepted_payment_type`,typeArguments:[i],arguments:[s.object(b),s.object(m)]}),s.setSender(e);let r=await a(this.sdk.suiClient,s,e,0);return o({inheritTx:s,sender:e,feeAmount:r},this.sdk.suiClient)}}class y{_suiClient;boostingModule;subscriptionModule;constructor(){this._suiClient=new n({url:s("mainnet")}),this.subscriptionModule=new h(this),this.boostingModule=new p(this)}get suiClient(){return this._suiClient}}export{c as ADMIN_CAP_ID,l as BOOSTING_PACKAGE_ID,p as BoostingModule,d as CONFIG_ID,y as NoodlesPaySdk,C as PAYMENT_COIN_TYPE,m as SUBSCRIPTION_ADMIN_CAP_ID,b as SUBSCRIPTION_CONFIG_ID,f as SUBSCRIPTION_PACKAGE_ID,h as SubscriptionModule};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minswap/noodles-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.31-beta.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"exports": {
|
|
@@ -8,6 +8,11 @@
|
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
9
9
|
"import": "./dist/index.js",
|
|
10
10
|
"require": "./dist/index.cjs"
|
|
11
|
+
},
|
|
12
|
+
"./pay": {
|
|
13
|
+
"types": "./dist/pay.d.ts",
|
|
14
|
+
"import": "./dist/pay.js",
|
|
15
|
+
"require": "./dist/pay.cjs"
|
|
11
16
|
}
|
|
12
17
|
},
|
|
13
18
|
"main": "./dist/index.cjs",
|
|
@@ -20,10 +25,10 @@
|
|
|
20
25
|
"url": "git@github.com:minswap/noodles-sdk.git"
|
|
21
26
|
},
|
|
22
27
|
"devDependencies": {
|
|
23
|
-
"@biomejs/biome": "2.3.
|
|
28
|
+
"@biomejs/biome": "2.3.10",
|
|
24
29
|
"@changesets/cli": "2.29.8",
|
|
25
30
|
"@microsoft/api-extractor": "7.55.2",
|
|
26
|
-
"@rslib/core": "0.18.
|
|
31
|
+
"@rslib/core": "0.18.5",
|
|
27
32
|
"@types/bn.js": "5.2.0",
|
|
28
33
|
"@types/node": "24",
|
|
29
34
|
"tsx": "4.21.0",
|
|
@@ -31,17 +36,17 @@
|
|
|
31
36
|
},
|
|
32
37
|
"dependencies": {
|
|
33
38
|
"@7kprotocol/sdk-ts": "3.6.0",
|
|
34
|
-
"@alphafi/alphalend-sdk": "1.1.
|
|
39
|
+
"@alphafi/alphalend-sdk": "1.1.27",
|
|
35
40
|
"@cetusprotocol/aggregator-sdk": "1.4.2",
|
|
36
41
|
"@cetusprotocol/cetus-sui-clmm-sdk": "5.4.0",
|
|
37
42
|
"@flowx-finance/sdk": "1.14.0",
|
|
38
|
-
"@interest-protocol/memez-fun-sdk": "19.
|
|
43
|
+
"@interest-protocol/memez-fun-sdk": "19.1.0",
|
|
39
44
|
"@interest-protocol/sui-core-sdk": "1.0.0",
|
|
40
45
|
"@minswap/tiny-invariant": "1.2.0",
|
|
41
46
|
"@mysten/sui": "1.44.0",
|
|
42
|
-
"@naviprotocol/astros-aggregator-sdk": "1.
|
|
43
|
-
"@scallop-io/sui-scallop-sdk": "2.3.
|
|
44
|
-
"@suilend/sdk": "1.1.
|
|
47
|
+
"@naviprotocol/astros-aggregator-sdk": "1.13.0",
|
|
48
|
+
"@scallop-io/sui-scallop-sdk": "2.3.9",
|
|
49
|
+
"@suilend/sdk": "1.1.98",
|
|
45
50
|
"aftermath-ts-sdk": "1.3.24",
|
|
46
51
|
"bignumber.js": "9.3.1",
|
|
47
52
|
"bn.js": "5.2.2"
|