@numen-crypto/contract 0.14.0 → 0.15.1
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 +169 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +848 -18
- package/dist/index.d.ts +848 -18
- package/dist/index.js +155 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -16,6 +16,7 @@ var ERROR_CODE = {
|
|
|
16
16
|
INVALID_CREDENTIALS: "INVALID_CREDENTIALS",
|
|
17
17
|
SESSION_INVALID: "SESSION_INVALID",
|
|
18
18
|
SESSION_EXPIRED: "SESSION_EXPIRED",
|
|
19
|
+
REFRESH_INVALID: "REFRESH_INVALID",
|
|
19
20
|
TOTP_REQUIRED: "TOTP_REQUIRED",
|
|
20
21
|
TOTP_ALREADY_ENABLED: "TOTP_ALREADY_ENABLED",
|
|
21
22
|
EMAIL_NOT_VERIFIED: "EMAIL_NOT_VERIFIED",
|
|
@@ -30,13 +31,48 @@ var ERROR_CODE = {
|
|
|
30
31
|
INSUFFICIENT_BALANCE: "INSUFFICIENT_BALANCE",
|
|
31
32
|
PURCHASE_LIMIT_EXCEEDED: "PURCHASE_LIMIT_EXCEEDED",
|
|
32
33
|
PURCHASE_CAP_EXCEEDED: "PURCHASE_CAP_EXCEEDED",
|
|
34
|
+
MONTHLY_BUY_CAP_EXCEEDED: "MONTHLY_BUY_CAP_EXCEEDED",
|
|
33
35
|
DAILY_PURCHASE_LIMIT: "DAILY_PURCHASE_LIMIT",
|
|
34
36
|
TOKENS_FROZEN: "TOKENS_FROZEN",
|
|
35
37
|
SELL_WINDOW_EXCEEDED: "SELL_WINDOW_EXCEEDED",
|
|
36
38
|
UPGRADE_NOT_AVAILABLE: "UPGRADE_NOT_AVAILABLE",
|
|
37
39
|
SALE_PHASE_INACTIVE: "SALE_PHASE_INACTIVE",
|
|
40
|
+
PRICE_MOVED: "PRICE_MOVED",
|
|
41
|
+
SWAP_AMOUNT_TOO_SMALL: "SWAP_AMOUNT_TOO_SMALL",
|
|
42
|
+
SWAP_AMOUNT_TOO_LARGE: "SWAP_AMOUNT_TOO_LARGE",
|
|
43
|
+
SWAP_DISABLED: "SWAP_DISABLED",
|
|
44
|
+
SWAP_RESTRICTED: "SWAP_RESTRICTED",
|
|
45
|
+
DEPOSITS_DISABLED: "DEPOSITS_DISABLED",
|
|
46
|
+
DEPOSITS_RESTRICTED: "DEPOSITS_RESTRICTED",
|
|
47
|
+
MARKET_CLOSED: "MARKET_CLOSED",
|
|
48
|
+
BELOW_FLOOR_PRICE: "BELOW_FLOOR_PRICE",
|
|
49
|
+
NO_LIQUIDITY: "NO_LIQUIDITY",
|
|
50
|
+
UNFUNDED_MAKER_ORDER: "UNFUNDED_MAKER_ORDER",
|
|
51
|
+
ORDER_LIMIT_EXCEEDED: "ORDER_LIMIT_EXCEEDED",
|
|
52
|
+
ORDER_NOT_FOUND: "ORDER_NOT_FOUND",
|
|
53
|
+
ORDER_NOT_CANCELABLE: "ORDER_NOT_CANCELABLE",
|
|
54
|
+
PACKAGE_NOT_FOUND: "PACKAGE_NOT_FOUND",
|
|
55
|
+
PACKAGE_LOCKED: "PACKAGE_LOCKED",
|
|
56
|
+
PACKAGE_DAILY_LIMIT: "PACKAGE_DAILY_LIMIT",
|
|
57
|
+
PACKAGE_WEEKLY_LIMIT: "PACKAGE_WEEKLY_LIMIT",
|
|
58
|
+
PACKAGE_PURCHASE_IN_PROGRESS: "PACKAGE_PURCHASE_IN_PROGRESS",
|
|
38
59
|
WITHDRAWAL_COOLOFF: "WITHDRAWAL_COOLOFF",
|
|
60
|
+
WITHDRAWAL_AMOUNT_TOO_SMALL: "WITHDRAWAL_AMOUNT_TOO_SMALL",
|
|
61
|
+
WITHDRAWAL_AMOUNT_TOO_LARGE: "WITHDRAWAL_AMOUNT_TOO_LARGE",
|
|
62
|
+
WITHDRAWAL_DAILY_LIMIT: "WITHDRAWAL_DAILY_LIMIT",
|
|
63
|
+
WITHDRAWALS_RESTRICTED: "WITHDRAWALS_RESTRICTED",
|
|
64
|
+
QUOTA_NOT_FOUND: "QUOTA_NOT_FOUND",
|
|
65
|
+
QUOTA_NOT_ACTIVE: "QUOTA_NOT_ACTIVE",
|
|
66
|
+
QUOTA_ALREADY_ACTIVE: "QUOTA_ALREADY_ACTIVE",
|
|
67
|
+
QUOTA_EXPIRED: "QUOTA_EXPIRED",
|
|
68
|
+
QUOTA_CAP_EXCEEDED: "QUOTA_CAP_EXCEEDED",
|
|
69
|
+
QUOTA_FUNDS_LOCKED: "QUOTA_FUNDS_LOCKED",
|
|
39
70
|
BONUS_ALREADY_CLAIMED: "BONUS_ALREADY_CLAIMED",
|
|
71
|
+
WHEEL_DISABLED: "WHEEL_DISABLED",
|
|
72
|
+
WHEEL_PAID_SPIN_DISABLED: "WHEEL_PAID_SPIN_DISABLED",
|
|
73
|
+
WHEEL_FREE_SPIN_USED: "WHEEL_FREE_SPIN_USED",
|
|
74
|
+
WHEEL_PAID_LIMIT: "WHEEL_PAID_LIMIT",
|
|
75
|
+
WHEEL_NO_PRIZES: "WHEEL_NO_PRIZES",
|
|
40
76
|
LINK_PROVIDER_DISABLED: "LINK_PROVIDER_DISABLED",
|
|
41
77
|
LINK_VERIFICATION_FAILED: "LINK_VERIFICATION_FAILED",
|
|
42
78
|
LINK_ALREADY_USED: "LINK_ALREADY_USED"
|
|
@@ -171,6 +207,33 @@ var PartnerLevelSchema = zod.z.object({
|
|
|
171
207
|
turnover: MoneyStringSchema,
|
|
172
208
|
reward: MoneyStringSchema
|
|
173
209
|
});
|
|
210
|
+
var PartnerNodeSchema = zod.z.object({
|
|
211
|
+
id: zod.z.string().uuid(),
|
|
212
|
+
email: zod.z.string(),
|
|
213
|
+
displayName: zod.z.string().nullable(),
|
|
214
|
+
level: zod.z.number().int().min(1).max(10),
|
|
215
|
+
balanceUsd: MoneyStringSchema,
|
|
216
|
+
directPartners: zod.z.number().int().nonnegative(),
|
|
217
|
+
networkSize: zod.z.number().int().nonnegative(),
|
|
218
|
+
personalTurnover: MoneyStringSchema,
|
|
219
|
+
joinedAt: zod.z.string()
|
|
220
|
+
});
|
|
221
|
+
var PartnerBranchRootSchema = zod.z.object({
|
|
222
|
+
id: zod.z.string().uuid(),
|
|
223
|
+
email: zod.z.string(),
|
|
224
|
+
displayName: zod.z.string().nullable(),
|
|
225
|
+
/** 0 — сам пользователь, 1-10 — глубина узла в его сети. */
|
|
226
|
+
level: zod.z.number().int().min(0).max(10),
|
|
227
|
+
directPartners: zod.z.number().int().nonnegative(),
|
|
228
|
+
networkSize: zod.z.number().int().nonnegative()
|
|
229
|
+
});
|
|
230
|
+
var PartnerBranchSchema = zod.z.object({
|
|
231
|
+
root: PartnerBranchRootSchema,
|
|
232
|
+
partners: zod.z.array(PartnerNodeSchema),
|
|
233
|
+
total: zod.z.number().int().nonnegative(),
|
|
234
|
+
page: zod.z.number().int().min(1),
|
|
235
|
+
pageSize: zod.z.number().int().min(1)
|
|
236
|
+
});
|
|
174
237
|
var PartnersOverviewSchema = zod.z.object({
|
|
175
238
|
period: PeriodSchema,
|
|
176
239
|
referralCode: zod.z.string(),
|
|
@@ -230,6 +293,12 @@ var SlideSchema = zod.z.object({
|
|
|
230
293
|
buttonStyle: SlideButtonStyleSchema.nullable()
|
|
231
294
|
});
|
|
232
295
|
var SlidesResponseSchema = zod.z.array(SlideSchema);
|
|
296
|
+
var CONTENT_LOCALES = ["ru", "en", "ar", "zh", "uk", "es", "fr", "bn", "pt", "ja", "ko", "tr"];
|
|
297
|
+
var ContentLocaleSchema = zod.z.enum(CONTENT_LOCALES);
|
|
298
|
+
var DEFAULT_CONTENT_LOCALE = "ru";
|
|
299
|
+
function isContentLocale(value) {
|
|
300
|
+
return CONTENT_LOCALES.includes(value);
|
|
301
|
+
}
|
|
233
302
|
var RankDefSchema = zod.z.object({
|
|
234
303
|
name: zod.z.string(),
|
|
235
304
|
order: zod.z.number().int().nonnegative(),
|
|
@@ -259,6 +328,7 @@ var UserSettingsSchema = zod.z.object({
|
|
|
259
328
|
var DailyBonusDaySchema = zod.z.object({
|
|
260
329
|
dayIndex: zod.z.number().int().min(1),
|
|
261
330
|
rewardNmn: MoneyStringSchema,
|
|
331
|
+
rewardUsd: MoneyStringSchema,
|
|
262
332
|
surprise: zod.z.boolean(),
|
|
263
333
|
claimedNmn: MoneyStringSchema.nullable()
|
|
264
334
|
});
|
|
@@ -268,12 +338,14 @@ var DailyBonusStatusSchema = zod.z.object({
|
|
|
268
338
|
claimableToday: zod.z.boolean(),
|
|
269
339
|
todayDayIndex: zod.z.number().int().min(1),
|
|
270
340
|
nextRewardNmn: MoneyStringSchema,
|
|
341
|
+
nextRewardUsd: MoneyStringSchema,
|
|
271
342
|
days: zod.z.array(DailyBonusDaySchema)
|
|
272
343
|
});
|
|
273
344
|
var DailyBonusClaimResultSchema = zod.z.object({
|
|
274
345
|
claimed: zod.z.boolean(),
|
|
275
346
|
dayIndex: zod.z.number().int().min(1),
|
|
276
347
|
rewardNmn: MoneyStringSchema,
|
|
348
|
+
rewardUsd: MoneyStringSchema,
|
|
277
349
|
currentStreak: zod.z.number().int().positive()
|
|
278
350
|
});
|
|
279
351
|
var NotificationTypeSchema = zod.z.enum([
|
|
@@ -647,6 +719,21 @@ exports.GetPartnersCommand = void 0;
|
|
|
647
719
|
});
|
|
648
720
|
GetPartnersCommand2.ResponseSchema = PartnersOverviewSchema;
|
|
649
721
|
})(exports.GetPartnersCommand || (exports.GetPartnersCommand = {}));
|
|
722
|
+
exports.BrowsePartnersCommand = void 0;
|
|
723
|
+
((BrowsePartnersCommand2) => {
|
|
724
|
+
BrowsePartnersCommand2.endpointDetails = endpoint(
|
|
725
|
+
"GET",
|
|
726
|
+
"/partners/browse",
|
|
727
|
+
"Direct partners of a node inside the caller downline, with balances and counts"
|
|
728
|
+
);
|
|
729
|
+
BrowsePartnersCommand2.QuerySchema = zod.z.object({
|
|
730
|
+
root: UuidSchema.optional(),
|
|
731
|
+
page: zod.z.coerce.number().int().min(1).default(1),
|
|
732
|
+
pageSize: zod.z.coerce.number().int().min(1).max(100).default(48),
|
|
733
|
+
search: zod.z.string().max(254).optional()
|
|
734
|
+
});
|
|
735
|
+
BrowsePartnersCommand2.ResponseSchema = PartnerBranchSchema;
|
|
736
|
+
})(exports.BrowsePartnersCommand || (exports.BrowsePartnersCommand = {}));
|
|
650
737
|
|
|
651
738
|
// src/commands/packages/get-packages.command.ts
|
|
652
739
|
exports.GetPackagesCommand = void 0;
|
|
@@ -693,8 +780,6 @@ exports.UpgradePackageCommand = void 0;
|
|
|
693
780
|
tokenPrice: MoneyStringSchema
|
|
694
781
|
});
|
|
695
782
|
})(exports.UpgradePackageCommand || (exports.UpgradePackageCommand = {}));
|
|
696
|
-
|
|
697
|
-
// src/commands/content/get-slides.command.ts
|
|
698
783
|
exports.GetSlidesCommand = void 0;
|
|
699
784
|
((GetSlidesCommand2) => {
|
|
700
785
|
GetSlidesCommand2.endpointDetails = endpoint(
|
|
@@ -702,6 +787,9 @@ exports.GetSlidesCommand = void 0;
|
|
|
702
787
|
"/content/slides",
|
|
703
788
|
"Active dashboard carousel slides in display order"
|
|
704
789
|
);
|
|
790
|
+
GetSlidesCommand2.QuerySchema = zod.z.object({
|
|
791
|
+
locale: ContentLocaleSchema.optional()
|
|
792
|
+
});
|
|
705
793
|
GetSlidesCommand2.ResponseSchema = SlidesResponseSchema;
|
|
706
794
|
})(exports.GetSlidesCommand || (exports.GetSlidesCommand = {}));
|
|
707
795
|
exports.GetRanksCommand = void 0;
|
|
@@ -862,6 +950,64 @@ exports.ClaimDailyBonusCommand = void 0;
|
|
|
862
950
|
ClaimDailyBonusCommand2.endpointDetails = endpoint("POST", "/bonus/daily/claim", "Claim today's daily bonus");
|
|
863
951
|
ClaimDailyBonusCommand2.ResponseSchema = DailyBonusClaimResultSchema;
|
|
864
952
|
})(exports.ClaimDailyBonusCommand || (exports.ClaimDailyBonusCommand = {}));
|
|
953
|
+
var WHEEL_SLOT_COUNT = 8;
|
|
954
|
+
var WheelSlotSchema = zod.z.number().int().min(0).max(WHEEL_SLOT_COUNT - 1);
|
|
955
|
+
var WheelAmountModeSchema = zod.z.enum(["ASSET", "USD"]);
|
|
956
|
+
var WheelSpinKindSchema = zod.z.enum(["FREE", "PAID"]);
|
|
957
|
+
var WheelPrizeSchema = zod.z.object({
|
|
958
|
+
id: zod.z.string().uuid(),
|
|
959
|
+
slot: WheelSlotSchema,
|
|
960
|
+
asset: AssetSymbolSchema,
|
|
961
|
+
label: zod.z.string().nullable(),
|
|
962
|
+
amount: MoneyStringSchema,
|
|
963
|
+
valueUsd: MoneyStringSchema,
|
|
964
|
+
jackpot: zod.z.boolean()
|
|
965
|
+
});
|
|
966
|
+
var WheelWinSchema = zod.z.object({
|
|
967
|
+
id: zod.z.string().uuid(),
|
|
968
|
+
slot: WheelSlotSchema,
|
|
969
|
+
asset: AssetSymbolSchema,
|
|
970
|
+
label: zod.z.string().nullable(),
|
|
971
|
+
amount: MoneyStringSchema,
|
|
972
|
+
valueUsd: MoneyStringSchema,
|
|
973
|
+
kind: WheelSpinKindSchema,
|
|
974
|
+
jackpot: zod.z.boolean(),
|
|
975
|
+
createdAt: zod.z.string()
|
|
976
|
+
});
|
|
977
|
+
var WheelStatusSchema = zod.z.object({
|
|
978
|
+
enabled: zod.z.boolean(),
|
|
979
|
+
paidSpinEnabled: zod.z.boolean(),
|
|
980
|
+
freeSpinAvailable: zod.z.boolean(),
|
|
981
|
+
nextFreeSpinAt: zod.z.string().nullable(),
|
|
982
|
+
paidSpinPriceUsd: MoneyStringSchema,
|
|
983
|
+
paidSpinPriceNmn: MoneyStringSchema,
|
|
984
|
+
paidSpinsLeftToday: zod.z.number().int().nonnegative(),
|
|
985
|
+
prizes: zod.z.array(WheelPrizeSchema),
|
|
986
|
+
history: zod.z.array(WheelWinSchema)
|
|
987
|
+
});
|
|
988
|
+
var WheelSpinResultSchema = zod.z.object({
|
|
989
|
+
spinId: zod.z.string().uuid(),
|
|
990
|
+
slot: WheelSlotSchema,
|
|
991
|
+
prize: WheelPrizeSchema,
|
|
992
|
+
amount: MoneyStringSchema,
|
|
993
|
+
valueUsd: MoneyStringSchema,
|
|
994
|
+
kind: WheelSpinKindSchema,
|
|
995
|
+
freeSpinAvailable: zod.z.boolean(),
|
|
996
|
+
paidSpinsLeftToday: zod.z.number().int().nonnegative()
|
|
997
|
+
});
|
|
998
|
+
exports.GetWheelCommand = void 0;
|
|
999
|
+
((GetWheelCommand2) => {
|
|
1000
|
+
GetWheelCommand2.endpointDetails = endpoint("GET", "/wheel", "Wheel of fortune prizes and the caller spin state");
|
|
1001
|
+
GetWheelCommand2.ResponseSchema = WheelStatusSchema;
|
|
1002
|
+
})(exports.GetWheelCommand || (exports.GetWheelCommand = {}));
|
|
1003
|
+
exports.SpinWheelCommand = void 0;
|
|
1004
|
+
((SpinWheelCommand2) => {
|
|
1005
|
+
SpinWheelCommand2.endpointDetails = endpoint("POST", "/wheel/spin", "Spin the wheel, free once a day or paid");
|
|
1006
|
+
SpinWheelCommand2.RequestSchema = zod.z.object({
|
|
1007
|
+
paid: zod.z.boolean().default(false)
|
|
1008
|
+
});
|
|
1009
|
+
SpinWheelCommand2.ResponseSchema = WheelSpinResultSchema;
|
|
1010
|
+
})(exports.SpinWheelCommand || (exports.SpinWheelCommand = {}));
|
|
865
1011
|
exports.GetTutorialRewardCommand = void 0;
|
|
866
1012
|
((GetTutorialRewardCommand2) => {
|
|
867
1013
|
GetTutorialRewardCommand2.endpointDetails = endpoint("GET", "/tutorial/reward", "Reward for finishing the product tour");
|
|
@@ -1070,7 +1216,8 @@ var REST_API = {
|
|
|
1070
1216
|
ORDER: "/exchange/orders/:id"
|
|
1071
1217
|
},
|
|
1072
1218
|
PARTNERS: {
|
|
1073
|
-
OVERVIEW: "/partners"
|
|
1219
|
+
OVERVIEW: "/partners",
|
|
1220
|
+
BROWSE: "/partners/browse"
|
|
1074
1221
|
},
|
|
1075
1222
|
PACKAGES: {
|
|
1076
1223
|
OVERVIEW: "/packages",
|
|
@@ -1113,6 +1260,10 @@ var REST_API = {
|
|
|
1113
1260
|
DAILY: "/bonus/daily",
|
|
1114
1261
|
DAILY_CLAIM: "/bonus/daily/claim"
|
|
1115
1262
|
},
|
|
1263
|
+
WHEEL: {
|
|
1264
|
+
STATUS: "/wheel",
|
|
1265
|
+
SPIN: "/wheel/spin"
|
|
1266
|
+
},
|
|
1116
1267
|
LEADERBOARD: {
|
|
1117
1268
|
OVERVIEW: "/leaderboard"
|
|
1118
1269
|
},
|
|
@@ -1142,8 +1293,11 @@ exports.AVATAR_CONTENT_TYPES = AVATAR_CONTENT_TYPES;
|
|
|
1142
1293
|
exports.AssetBalanceSchema = AssetBalanceSchema;
|
|
1143
1294
|
exports.AssetSymbolSchema = AssetSymbolSchema;
|
|
1144
1295
|
exports.AvatarContentTypeSchema = AvatarContentTypeSchema;
|
|
1296
|
+
exports.CONTENT_LOCALES = CONTENT_LOCALES;
|
|
1145
1297
|
exports.ChartPeriodSchema = ChartPeriodSchema;
|
|
1146
1298
|
exports.ChartPointSchema = ChartPointSchema;
|
|
1299
|
+
exports.ContentLocaleSchema = ContentLocaleSchema;
|
|
1300
|
+
exports.DEFAULT_CONTENT_LOCALE = DEFAULT_CONTENT_LOCALE;
|
|
1147
1301
|
exports.DEPOSITABLE_ASSETS = DEPOSITABLE_ASSETS;
|
|
1148
1302
|
exports.DailyBonusClaimResultSchema = DailyBonusClaimResultSchema;
|
|
1149
1303
|
exports.DailyBonusDaySchema = DailyBonusDaySchema;
|
|
@@ -1181,7 +1335,10 @@ exports.PackagesOverviewSchema = PackagesOverviewSchema;
|
|
|
1181
1335
|
exports.PaginatedSchema = PaginatedSchema;
|
|
1182
1336
|
exports.PaginationQuerySchema = PaginationQuerySchema;
|
|
1183
1337
|
exports.PartnerAccrualSchema = PartnerAccrualSchema;
|
|
1338
|
+
exports.PartnerBranchRootSchema = PartnerBranchRootSchema;
|
|
1339
|
+
exports.PartnerBranchSchema = PartnerBranchSchema;
|
|
1184
1340
|
exports.PartnerLevelSchema = PartnerLevelSchema;
|
|
1341
|
+
exports.PartnerNodeSchema = PartnerNodeSchema;
|
|
1185
1342
|
exports.PartnersOverviewSchema = PartnersOverviewSchema;
|
|
1186
1343
|
exports.PeriodSchema = PeriodSchema;
|
|
1187
1344
|
exports.PositiveMoneyStringSchema = PositiveMoneyStringSchema;
|
|
@@ -1218,10 +1375,19 @@ exports.UserRankSchema = UserRankSchema;
|
|
|
1218
1375
|
exports.UserSettingsSchema = UserSettingsSchema;
|
|
1219
1376
|
exports.UserStatusSchema = UserStatusSchema;
|
|
1220
1377
|
exports.UuidSchema = UuidSchema;
|
|
1378
|
+
exports.WHEEL_SLOT_COUNT = WHEEL_SLOT_COUNT;
|
|
1221
1379
|
exports.WalletOverviewSchema = WalletOverviewSchema;
|
|
1380
|
+
exports.WheelAmountModeSchema = WheelAmountModeSchema;
|
|
1381
|
+
exports.WheelPrizeSchema = WheelPrizeSchema;
|
|
1382
|
+
exports.WheelSlotSchema = WheelSlotSchema;
|
|
1383
|
+
exports.WheelSpinKindSchema = WheelSpinKindSchema;
|
|
1384
|
+
exports.WheelSpinResultSchema = WheelSpinResultSchema;
|
|
1385
|
+
exports.WheelStatusSchema = WheelStatusSchema;
|
|
1386
|
+
exports.WheelWinSchema = WheelWinSchema;
|
|
1222
1387
|
exports.WithdrawalSchema = WithdrawalSchema;
|
|
1223
1388
|
exports.WithdrawalStatusSchema = WithdrawalStatusSchema;
|
|
1224
1389
|
exports.assetDecimals = assetDecimals;
|
|
1225
1390
|
exports.endpoint = endpoint;
|
|
1391
|
+
exports.isContentLocale = isContentLocale;
|
|
1226
1392
|
//# sourceMappingURL=index.cjs.map
|
|
1227
1393
|
//# sourceMappingURL=index.cjs.map
|