@numen-crypto/contract 0.2.5 → 0.4.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.d.cts CHANGED
@@ -16,6 +16,9 @@ declare const ERROR_CODE: {
16
16
  readonly SESSION_EXPIRED: "SESSION_EXPIRED";
17
17
  readonly TOTP_REQUIRED: "TOTP_REQUIRED";
18
18
  readonly TOTP_ALREADY_ENABLED: "TOTP_ALREADY_ENABLED";
19
+ readonly EMAIL_NOT_VERIFIED: "EMAIL_NOT_VERIFIED";
20
+ readonly EMAIL_ALREADY_VERIFIED: "EMAIL_ALREADY_VERIFIED";
21
+ readonly TOKEN_INVALID: "TOKEN_INVALID";
19
22
  readonly INSUFFICIENT_BALANCE: "INSUFFICIENT_BALANCE";
20
23
  readonly PURCHASE_LIMIT_EXCEEDED: "PURCHASE_LIMIT_EXCEEDED";
21
24
  readonly SALE_PHASE_INACTIVE: "SALE_PHASE_INACTIVE";
@@ -153,6 +156,17 @@ declare const DepositableAssetSchema: z.ZodEnum<["USDT", "BTC", "ETH", "BNB", "T
153
156
  type DepositableAsset = z.infer<typeof DepositableAssetSchema>;
154
157
  declare const TOKEN_ASSET: "NMN";
155
158
  declare const FUNDING_ASSET: "USDT";
159
+ declare const ASSET_DECIMALS: {
160
+ readonly NMN: 4;
161
+ readonly USDT: 2;
162
+ readonly BTC: 8;
163
+ readonly ETH: 8;
164
+ readonly BNB: 8;
165
+ readonly TRX: 6;
166
+ readonly SOL: 6;
167
+ };
168
+ declare const NMN_PRICE_DECIMALS = 8;
169
+ declare function assetDecimals(asset: AssetSymbol): number;
156
170
  declare const AssetBalanceSchema: z.ZodObject<{
157
171
  asset: z.ZodEnum<["NMN", "USDT", "BTC", "ETH", "BNB", "TRX", "SOL"]>;
158
172
  name: z.ZodString;
@@ -1359,6 +1373,87 @@ declare namespace ConfirmTotpCommand {
1359
1373
  type Response = z.infer<typeof ResponseSchema>;
1360
1374
  }
1361
1375
 
1376
+ declare namespace VerifyEmailCommand {
1377
+ const endpointDetails: EndpointDetails;
1378
+ const RequestSchema: z.ZodObject<{
1379
+ token: z.ZodString;
1380
+ }, "strip", z.ZodTypeAny, {
1381
+ token: string;
1382
+ }, {
1383
+ token: string;
1384
+ }>;
1385
+ type Request = z.infer<typeof RequestSchema>;
1386
+ const ResponseSchema: z.ZodObject<{
1387
+ verified: z.ZodBoolean;
1388
+ }, "strip", z.ZodTypeAny, {
1389
+ verified: boolean;
1390
+ }, {
1391
+ verified: boolean;
1392
+ }>;
1393
+ type Response = z.infer<typeof ResponseSchema>;
1394
+ }
1395
+ declare namespace ResendVerificationCommand {
1396
+ const endpointDetails: EndpointDetails;
1397
+ const RequestSchema: z.ZodObject<{
1398
+ email: z.ZodString;
1399
+ }, "strip", z.ZodTypeAny, {
1400
+ email: string;
1401
+ }, {
1402
+ email: string;
1403
+ }>;
1404
+ type Request = z.infer<typeof RequestSchema>;
1405
+ const ResponseSchema: z.ZodObject<{
1406
+ sent: z.ZodBoolean;
1407
+ }, "strip", z.ZodTypeAny, {
1408
+ sent: boolean;
1409
+ }, {
1410
+ sent: boolean;
1411
+ }>;
1412
+ type Response = z.infer<typeof ResponseSchema>;
1413
+ }
1414
+
1415
+ declare namespace ForgotPasswordCommand {
1416
+ const endpointDetails: EndpointDetails;
1417
+ const RequestSchema: z.ZodObject<{
1418
+ email: z.ZodString;
1419
+ }, "strip", z.ZodTypeAny, {
1420
+ email: string;
1421
+ }, {
1422
+ email: string;
1423
+ }>;
1424
+ type Request = z.infer<typeof RequestSchema>;
1425
+ const ResponseSchema: z.ZodObject<{
1426
+ sent: z.ZodBoolean;
1427
+ }, "strip", z.ZodTypeAny, {
1428
+ sent: boolean;
1429
+ }, {
1430
+ sent: boolean;
1431
+ }>;
1432
+ type Response = z.infer<typeof ResponseSchema>;
1433
+ }
1434
+ declare namespace ResetPasswordCommand {
1435
+ const endpointDetails: EndpointDetails;
1436
+ const RequestSchema: z.ZodObject<{
1437
+ token: z.ZodString;
1438
+ password: z.ZodString;
1439
+ }, "strip", z.ZodTypeAny, {
1440
+ password: string;
1441
+ token: string;
1442
+ }, {
1443
+ password: string;
1444
+ token: string;
1445
+ }>;
1446
+ type Request = z.infer<typeof RequestSchema>;
1447
+ const ResponseSchema: z.ZodObject<{
1448
+ reset: z.ZodBoolean;
1449
+ }, "strip", z.ZodTypeAny, {
1450
+ reset: boolean;
1451
+ }, {
1452
+ reset: boolean;
1453
+ }>;
1454
+ type Response = z.infer<typeof ResponseSchema>;
1455
+ }
1456
+
1362
1457
  declare namespace GetWalletCommand {
1363
1458
  const endpointDetails: EndpointDetails;
1364
1459
  const ResponseSchema: zod.ZodObject<{
@@ -2520,10 +2615,13 @@ declare namespace ConfirmEmailChangeCommand {
2520
2615
  const endpointDetails: EndpointDetails;
2521
2616
  const RequestSchema: z.ZodObject<{
2522
2617
  code: z.ZodString;
2618
+ totp: z.ZodOptional<z.ZodString>;
2523
2619
  }, "strip", z.ZodTypeAny, {
2524
2620
  code: string;
2621
+ totp?: string | undefined;
2525
2622
  }, {
2526
2623
  code: string;
2624
+ totp?: string | undefined;
2527
2625
  }>;
2528
2626
  type Request = z.infer<typeof RequestSchema>;
2529
2627
  const ResponseSchema: z.ZodObject<{
@@ -3886,6 +3984,10 @@ declare const REST_API: {
3886
3984
  readonly ME: "/auth/me";
3887
3985
  readonly TOTP_SETUP: "/auth/totp/setup";
3888
3986
  readonly TOTP_CONFIRM: "/auth/totp/confirm";
3987
+ readonly VERIFY_EMAIL: "/auth/verify-email";
3988
+ readonly RESEND_VERIFICATION: "/auth/verify-email/resend";
3989
+ readonly FORGOT_PASSWORD: "/auth/password/forgot";
3990
+ readonly RESET_PASSWORD: "/auth/password/reset";
3889
3991
  };
3890
3992
  readonly WALLET: {
3891
3993
  readonly OVERVIEW: "/wallet";
@@ -3964,4 +4066,4 @@ declare const REST_API: {
3964
4066
  declare const API_PREFIX = "/api";
3965
4067
  declare const API_VERSION = "v1";
3966
4068
 
3967
- export { API_PREFIX, API_VERSION, ASSET_SYMBOLS, AVATAR_CONTENT_TYPES, type AssetBalance, AssetBalanceSchema, type AssetSymbol, AssetSymbolSchema, AvatarContentTypeSchema, AvatarUploadUrlCommand, BuyPackageCommand, CancelOrderCommand, CancelWithdrawalCommand, type ChartPeriod, ChartPeriodSchema, type ChartPoint, ChartPointSchema, ClaimDailyBonusCommand, ConfirmEmailChangeCommand, ConfirmTotpCommand, ConfirmWithdrawalCommand, CreateTicketCommand, DEPOSITABLE_ASSETS, type DailyBonusClaimResult, DailyBonusClaimResultSchema, type DailyBonusDay, DailyBonusDaySchema, type DailyBonusStatus, DailyBonusStatusSchema, type DepositAddress, DepositAddressCommand, DepositAddressSchema, type DepositableAsset, DepositableAssetSchema, DisableTotpCommand, ERROR_CODE, type EarningsOverview, EarningsOverviewSchema, type EndpointDetails, type ErrorCode, type ErrorResponse, ErrorResponseSchema, FUNDING_ASSET, GetDailyBonusCommand, GetEarningsCommand, GetIncomeCommand, GetLeaderboardCommand, GetOrderBookCommand, GetPackagesCommand, GetPartnersCommand, GetRanksCommand, GetSettingsCommand, GetSlidesCommand, GetTicketCommand, GetTokenChartCommand, GetTokenPriceCommand, GetTransactionsCommand, GetWalletCommand, type HttpMethod, type IncomeOverview, IncomeOverviewSchema, type IncomePeriod, IncomePeriodSchema, type Leaderboard, type LeaderboardEntry, LeaderboardEntrySchema, type LeaderboardPeriod, LeaderboardPeriodSchema, LeaderboardSchema, LinkGoogleCommand, type LinkProvider, LinkProviderSchema, LinkTelegramCommand, type LinkedAccount, LinkedAccountSchema, ListLinkedAccountsCommand, ListMyOrdersCommand, ListNotificationsCommand, ListTicketsCommand, ListTradesCommand, ListWithdrawalsCommand, LoginCommand, LogoutCommand, MONEY_REGEX, MarkNotificationsReadCommand, MeCommand, MoneyStringSchema, type MonthlyPricePoint, MonthlyPricePointSchema, type Notification, NotificationSchema, type NotificationType, NotificationTypeSchema, type Order, type OrderBook, type OrderBookLevel, OrderBookLevelSchema, OrderBookSchema, OrderSchema, type OrderSide, OrderSideSchema, type OrderStatus, OrderStatusSchema, type OrderType, OrderTypeSchema, type Package, PackageSchema, type PackageStatus, PackageStatusSchema, type PackagesOverview, PackagesOverviewSchema, PaginatedSchema, type PaginationQuery, PaginationQuerySchema, type PartnerAccrual, PartnerAccrualSchema, type PartnerLevel, PartnerLevelSchema, type PartnersOverview, PartnersOverviewSchema, type Period, PeriodSchema, PlaceOrderCommand, PositiveMoneyStringSchema, type PublicTrade, PublicTradeSchema, REST_API, type RankDef, RankDefSchema, RegisterCommand, ReplyTicketCommand, RequestEmailChangeCommand, RequestWithdrawalCommand, type SessionInfo, SessionInfoSchema, SetupTotpCommand, type Slide, type SlideButtonStyle, SlideButtonStyleSchema, type SlideKind, SlideKindSchema, type SlideLinkTarget, SlideLinkTargetSchema, SlideSchema, type SlidesResponse, SlidesResponseSchema, SwapCommand, type SwapSide, SwapSideSchema, TICKET_CATEGORIES, TOKEN_ASSET, type TicketAttachment, type TicketAttachmentInput, TicketAttachmentInputSchema, TicketAttachmentSchema, TicketAttachmentUploadCommand, type TicketAuthorType, TicketAuthorTypeSchema, TicketBodySchema, type TicketCategory, TicketCategorySchema, type TicketDetail, TicketDetailSchema, type TicketMessage, TicketMessageSchema, type TicketStatus, TicketStatusSchema, type TicketSummary, TicketSummarySchema, type TokenPrice, TokenPriceSchema, type TradeResult, TradeResultSchema, type Transaction, TransactionSchema, type TransactionStatus, TransactionStatusSchema, type TransactionType, TransactionTypeSchema, UnlinkAccountCommand, UpdateProfileCommand, UpdateSettingsCommand, type UserProfile, UserProfileSchema, type UserRank, UserRankSchema, type UserSettings, UserSettingsSchema, type UserStatus, UserStatusSchema, UuidSchema, type WalletOverview, WalletOverviewSchema, type Withdrawal, WithdrawalSchema, type WithdrawalStatus, WithdrawalStatusSchema, endpoint };
4069
+ export { API_PREFIX, API_VERSION, ASSET_DECIMALS, ASSET_SYMBOLS, AVATAR_CONTENT_TYPES, type AssetBalance, AssetBalanceSchema, type AssetSymbol, AssetSymbolSchema, AvatarContentTypeSchema, AvatarUploadUrlCommand, BuyPackageCommand, CancelOrderCommand, CancelWithdrawalCommand, type ChartPeriod, ChartPeriodSchema, type ChartPoint, ChartPointSchema, ClaimDailyBonusCommand, ConfirmEmailChangeCommand, ConfirmTotpCommand, ConfirmWithdrawalCommand, CreateTicketCommand, DEPOSITABLE_ASSETS, type DailyBonusClaimResult, DailyBonusClaimResultSchema, type DailyBonusDay, DailyBonusDaySchema, type DailyBonusStatus, DailyBonusStatusSchema, type DepositAddress, DepositAddressCommand, DepositAddressSchema, type DepositableAsset, DepositableAssetSchema, DisableTotpCommand, ERROR_CODE, type EarningsOverview, EarningsOverviewSchema, type EndpointDetails, type ErrorCode, type ErrorResponse, ErrorResponseSchema, FUNDING_ASSET, ForgotPasswordCommand, GetDailyBonusCommand, GetEarningsCommand, GetIncomeCommand, GetLeaderboardCommand, GetOrderBookCommand, GetPackagesCommand, GetPartnersCommand, GetRanksCommand, GetSettingsCommand, GetSlidesCommand, GetTicketCommand, GetTokenChartCommand, GetTokenPriceCommand, GetTransactionsCommand, GetWalletCommand, type HttpMethod, type IncomeOverview, IncomeOverviewSchema, type IncomePeriod, IncomePeriodSchema, type Leaderboard, type LeaderboardEntry, LeaderboardEntrySchema, type LeaderboardPeriod, LeaderboardPeriodSchema, LeaderboardSchema, LinkGoogleCommand, type LinkProvider, LinkProviderSchema, LinkTelegramCommand, type LinkedAccount, LinkedAccountSchema, ListLinkedAccountsCommand, ListMyOrdersCommand, ListNotificationsCommand, ListTicketsCommand, ListTradesCommand, ListWithdrawalsCommand, LoginCommand, LogoutCommand, MONEY_REGEX, MarkNotificationsReadCommand, MeCommand, MoneyStringSchema, type MonthlyPricePoint, MonthlyPricePointSchema, NMN_PRICE_DECIMALS, type Notification, NotificationSchema, type NotificationType, NotificationTypeSchema, type Order, type OrderBook, type OrderBookLevel, OrderBookLevelSchema, OrderBookSchema, OrderSchema, type OrderSide, OrderSideSchema, type OrderStatus, OrderStatusSchema, type OrderType, OrderTypeSchema, type Package, PackageSchema, type PackageStatus, PackageStatusSchema, type PackagesOverview, PackagesOverviewSchema, PaginatedSchema, type PaginationQuery, PaginationQuerySchema, type PartnerAccrual, PartnerAccrualSchema, type PartnerLevel, PartnerLevelSchema, type PartnersOverview, PartnersOverviewSchema, type Period, PeriodSchema, PlaceOrderCommand, PositiveMoneyStringSchema, type PublicTrade, PublicTradeSchema, REST_API, type RankDef, RankDefSchema, RegisterCommand, ReplyTicketCommand, RequestEmailChangeCommand, RequestWithdrawalCommand, ResendVerificationCommand, ResetPasswordCommand, type SessionInfo, SessionInfoSchema, SetupTotpCommand, type Slide, type SlideButtonStyle, SlideButtonStyleSchema, type SlideKind, SlideKindSchema, type SlideLinkTarget, SlideLinkTargetSchema, SlideSchema, type SlidesResponse, SlidesResponseSchema, SwapCommand, type SwapSide, SwapSideSchema, TICKET_CATEGORIES, TOKEN_ASSET, type TicketAttachment, type TicketAttachmentInput, TicketAttachmentInputSchema, TicketAttachmentSchema, TicketAttachmentUploadCommand, type TicketAuthorType, TicketAuthorTypeSchema, TicketBodySchema, type TicketCategory, TicketCategorySchema, type TicketDetail, TicketDetailSchema, type TicketMessage, TicketMessageSchema, type TicketStatus, TicketStatusSchema, type TicketSummary, TicketSummarySchema, type TokenPrice, TokenPriceSchema, type TradeResult, TradeResultSchema, type Transaction, TransactionSchema, type TransactionStatus, TransactionStatusSchema, type TransactionType, TransactionTypeSchema, UnlinkAccountCommand, UpdateProfileCommand, UpdateSettingsCommand, type UserProfile, UserProfileSchema, type UserRank, UserRankSchema, type UserSettings, UserSettingsSchema, type UserStatus, UserStatusSchema, UuidSchema, VerifyEmailCommand, type WalletOverview, WalletOverviewSchema, type Withdrawal, WithdrawalSchema, type WithdrawalStatus, WithdrawalStatusSchema, assetDecimals, endpoint };
package/dist/index.d.ts CHANGED
@@ -16,6 +16,9 @@ declare const ERROR_CODE: {
16
16
  readonly SESSION_EXPIRED: "SESSION_EXPIRED";
17
17
  readonly TOTP_REQUIRED: "TOTP_REQUIRED";
18
18
  readonly TOTP_ALREADY_ENABLED: "TOTP_ALREADY_ENABLED";
19
+ readonly EMAIL_NOT_VERIFIED: "EMAIL_NOT_VERIFIED";
20
+ readonly EMAIL_ALREADY_VERIFIED: "EMAIL_ALREADY_VERIFIED";
21
+ readonly TOKEN_INVALID: "TOKEN_INVALID";
19
22
  readonly INSUFFICIENT_BALANCE: "INSUFFICIENT_BALANCE";
20
23
  readonly PURCHASE_LIMIT_EXCEEDED: "PURCHASE_LIMIT_EXCEEDED";
21
24
  readonly SALE_PHASE_INACTIVE: "SALE_PHASE_INACTIVE";
@@ -153,6 +156,17 @@ declare const DepositableAssetSchema: z.ZodEnum<["USDT", "BTC", "ETH", "BNB", "T
153
156
  type DepositableAsset = z.infer<typeof DepositableAssetSchema>;
154
157
  declare const TOKEN_ASSET: "NMN";
155
158
  declare const FUNDING_ASSET: "USDT";
159
+ declare const ASSET_DECIMALS: {
160
+ readonly NMN: 4;
161
+ readonly USDT: 2;
162
+ readonly BTC: 8;
163
+ readonly ETH: 8;
164
+ readonly BNB: 8;
165
+ readonly TRX: 6;
166
+ readonly SOL: 6;
167
+ };
168
+ declare const NMN_PRICE_DECIMALS = 8;
169
+ declare function assetDecimals(asset: AssetSymbol): number;
156
170
  declare const AssetBalanceSchema: z.ZodObject<{
157
171
  asset: z.ZodEnum<["NMN", "USDT", "BTC", "ETH", "BNB", "TRX", "SOL"]>;
158
172
  name: z.ZodString;
@@ -1359,6 +1373,87 @@ declare namespace ConfirmTotpCommand {
1359
1373
  type Response = z.infer<typeof ResponseSchema>;
1360
1374
  }
1361
1375
 
1376
+ declare namespace VerifyEmailCommand {
1377
+ const endpointDetails: EndpointDetails;
1378
+ const RequestSchema: z.ZodObject<{
1379
+ token: z.ZodString;
1380
+ }, "strip", z.ZodTypeAny, {
1381
+ token: string;
1382
+ }, {
1383
+ token: string;
1384
+ }>;
1385
+ type Request = z.infer<typeof RequestSchema>;
1386
+ const ResponseSchema: z.ZodObject<{
1387
+ verified: z.ZodBoolean;
1388
+ }, "strip", z.ZodTypeAny, {
1389
+ verified: boolean;
1390
+ }, {
1391
+ verified: boolean;
1392
+ }>;
1393
+ type Response = z.infer<typeof ResponseSchema>;
1394
+ }
1395
+ declare namespace ResendVerificationCommand {
1396
+ const endpointDetails: EndpointDetails;
1397
+ const RequestSchema: z.ZodObject<{
1398
+ email: z.ZodString;
1399
+ }, "strip", z.ZodTypeAny, {
1400
+ email: string;
1401
+ }, {
1402
+ email: string;
1403
+ }>;
1404
+ type Request = z.infer<typeof RequestSchema>;
1405
+ const ResponseSchema: z.ZodObject<{
1406
+ sent: z.ZodBoolean;
1407
+ }, "strip", z.ZodTypeAny, {
1408
+ sent: boolean;
1409
+ }, {
1410
+ sent: boolean;
1411
+ }>;
1412
+ type Response = z.infer<typeof ResponseSchema>;
1413
+ }
1414
+
1415
+ declare namespace ForgotPasswordCommand {
1416
+ const endpointDetails: EndpointDetails;
1417
+ const RequestSchema: z.ZodObject<{
1418
+ email: z.ZodString;
1419
+ }, "strip", z.ZodTypeAny, {
1420
+ email: string;
1421
+ }, {
1422
+ email: string;
1423
+ }>;
1424
+ type Request = z.infer<typeof RequestSchema>;
1425
+ const ResponseSchema: z.ZodObject<{
1426
+ sent: z.ZodBoolean;
1427
+ }, "strip", z.ZodTypeAny, {
1428
+ sent: boolean;
1429
+ }, {
1430
+ sent: boolean;
1431
+ }>;
1432
+ type Response = z.infer<typeof ResponseSchema>;
1433
+ }
1434
+ declare namespace ResetPasswordCommand {
1435
+ const endpointDetails: EndpointDetails;
1436
+ const RequestSchema: z.ZodObject<{
1437
+ token: z.ZodString;
1438
+ password: z.ZodString;
1439
+ }, "strip", z.ZodTypeAny, {
1440
+ password: string;
1441
+ token: string;
1442
+ }, {
1443
+ password: string;
1444
+ token: string;
1445
+ }>;
1446
+ type Request = z.infer<typeof RequestSchema>;
1447
+ const ResponseSchema: z.ZodObject<{
1448
+ reset: z.ZodBoolean;
1449
+ }, "strip", z.ZodTypeAny, {
1450
+ reset: boolean;
1451
+ }, {
1452
+ reset: boolean;
1453
+ }>;
1454
+ type Response = z.infer<typeof ResponseSchema>;
1455
+ }
1456
+
1362
1457
  declare namespace GetWalletCommand {
1363
1458
  const endpointDetails: EndpointDetails;
1364
1459
  const ResponseSchema: zod.ZodObject<{
@@ -2520,10 +2615,13 @@ declare namespace ConfirmEmailChangeCommand {
2520
2615
  const endpointDetails: EndpointDetails;
2521
2616
  const RequestSchema: z.ZodObject<{
2522
2617
  code: z.ZodString;
2618
+ totp: z.ZodOptional<z.ZodString>;
2523
2619
  }, "strip", z.ZodTypeAny, {
2524
2620
  code: string;
2621
+ totp?: string | undefined;
2525
2622
  }, {
2526
2623
  code: string;
2624
+ totp?: string | undefined;
2527
2625
  }>;
2528
2626
  type Request = z.infer<typeof RequestSchema>;
2529
2627
  const ResponseSchema: z.ZodObject<{
@@ -3886,6 +3984,10 @@ declare const REST_API: {
3886
3984
  readonly ME: "/auth/me";
3887
3985
  readonly TOTP_SETUP: "/auth/totp/setup";
3888
3986
  readonly TOTP_CONFIRM: "/auth/totp/confirm";
3987
+ readonly VERIFY_EMAIL: "/auth/verify-email";
3988
+ readonly RESEND_VERIFICATION: "/auth/verify-email/resend";
3989
+ readonly FORGOT_PASSWORD: "/auth/password/forgot";
3990
+ readonly RESET_PASSWORD: "/auth/password/reset";
3889
3991
  };
3890
3992
  readonly WALLET: {
3891
3993
  readonly OVERVIEW: "/wallet";
@@ -3964,4 +4066,4 @@ declare const REST_API: {
3964
4066
  declare const API_PREFIX = "/api";
3965
4067
  declare const API_VERSION = "v1";
3966
4068
 
3967
- export { API_PREFIX, API_VERSION, ASSET_SYMBOLS, AVATAR_CONTENT_TYPES, type AssetBalance, AssetBalanceSchema, type AssetSymbol, AssetSymbolSchema, AvatarContentTypeSchema, AvatarUploadUrlCommand, BuyPackageCommand, CancelOrderCommand, CancelWithdrawalCommand, type ChartPeriod, ChartPeriodSchema, type ChartPoint, ChartPointSchema, ClaimDailyBonusCommand, ConfirmEmailChangeCommand, ConfirmTotpCommand, ConfirmWithdrawalCommand, CreateTicketCommand, DEPOSITABLE_ASSETS, type DailyBonusClaimResult, DailyBonusClaimResultSchema, type DailyBonusDay, DailyBonusDaySchema, type DailyBonusStatus, DailyBonusStatusSchema, type DepositAddress, DepositAddressCommand, DepositAddressSchema, type DepositableAsset, DepositableAssetSchema, DisableTotpCommand, ERROR_CODE, type EarningsOverview, EarningsOverviewSchema, type EndpointDetails, type ErrorCode, type ErrorResponse, ErrorResponseSchema, FUNDING_ASSET, GetDailyBonusCommand, GetEarningsCommand, GetIncomeCommand, GetLeaderboardCommand, GetOrderBookCommand, GetPackagesCommand, GetPartnersCommand, GetRanksCommand, GetSettingsCommand, GetSlidesCommand, GetTicketCommand, GetTokenChartCommand, GetTokenPriceCommand, GetTransactionsCommand, GetWalletCommand, type HttpMethod, type IncomeOverview, IncomeOverviewSchema, type IncomePeriod, IncomePeriodSchema, type Leaderboard, type LeaderboardEntry, LeaderboardEntrySchema, type LeaderboardPeriod, LeaderboardPeriodSchema, LeaderboardSchema, LinkGoogleCommand, type LinkProvider, LinkProviderSchema, LinkTelegramCommand, type LinkedAccount, LinkedAccountSchema, ListLinkedAccountsCommand, ListMyOrdersCommand, ListNotificationsCommand, ListTicketsCommand, ListTradesCommand, ListWithdrawalsCommand, LoginCommand, LogoutCommand, MONEY_REGEX, MarkNotificationsReadCommand, MeCommand, MoneyStringSchema, type MonthlyPricePoint, MonthlyPricePointSchema, type Notification, NotificationSchema, type NotificationType, NotificationTypeSchema, type Order, type OrderBook, type OrderBookLevel, OrderBookLevelSchema, OrderBookSchema, OrderSchema, type OrderSide, OrderSideSchema, type OrderStatus, OrderStatusSchema, type OrderType, OrderTypeSchema, type Package, PackageSchema, type PackageStatus, PackageStatusSchema, type PackagesOverview, PackagesOverviewSchema, PaginatedSchema, type PaginationQuery, PaginationQuerySchema, type PartnerAccrual, PartnerAccrualSchema, type PartnerLevel, PartnerLevelSchema, type PartnersOverview, PartnersOverviewSchema, type Period, PeriodSchema, PlaceOrderCommand, PositiveMoneyStringSchema, type PublicTrade, PublicTradeSchema, REST_API, type RankDef, RankDefSchema, RegisterCommand, ReplyTicketCommand, RequestEmailChangeCommand, RequestWithdrawalCommand, type SessionInfo, SessionInfoSchema, SetupTotpCommand, type Slide, type SlideButtonStyle, SlideButtonStyleSchema, type SlideKind, SlideKindSchema, type SlideLinkTarget, SlideLinkTargetSchema, SlideSchema, type SlidesResponse, SlidesResponseSchema, SwapCommand, type SwapSide, SwapSideSchema, TICKET_CATEGORIES, TOKEN_ASSET, type TicketAttachment, type TicketAttachmentInput, TicketAttachmentInputSchema, TicketAttachmentSchema, TicketAttachmentUploadCommand, type TicketAuthorType, TicketAuthorTypeSchema, TicketBodySchema, type TicketCategory, TicketCategorySchema, type TicketDetail, TicketDetailSchema, type TicketMessage, TicketMessageSchema, type TicketStatus, TicketStatusSchema, type TicketSummary, TicketSummarySchema, type TokenPrice, TokenPriceSchema, type TradeResult, TradeResultSchema, type Transaction, TransactionSchema, type TransactionStatus, TransactionStatusSchema, type TransactionType, TransactionTypeSchema, UnlinkAccountCommand, UpdateProfileCommand, UpdateSettingsCommand, type UserProfile, UserProfileSchema, type UserRank, UserRankSchema, type UserSettings, UserSettingsSchema, type UserStatus, UserStatusSchema, UuidSchema, type WalletOverview, WalletOverviewSchema, type Withdrawal, WithdrawalSchema, type WithdrawalStatus, WithdrawalStatusSchema, endpoint };
4069
+ export { API_PREFIX, API_VERSION, ASSET_DECIMALS, ASSET_SYMBOLS, AVATAR_CONTENT_TYPES, type AssetBalance, AssetBalanceSchema, type AssetSymbol, AssetSymbolSchema, AvatarContentTypeSchema, AvatarUploadUrlCommand, BuyPackageCommand, CancelOrderCommand, CancelWithdrawalCommand, type ChartPeriod, ChartPeriodSchema, type ChartPoint, ChartPointSchema, ClaimDailyBonusCommand, ConfirmEmailChangeCommand, ConfirmTotpCommand, ConfirmWithdrawalCommand, CreateTicketCommand, DEPOSITABLE_ASSETS, type DailyBonusClaimResult, DailyBonusClaimResultSchema, type DailyBonusDay, DailyBonusDaySchema, type DailyBonusStatus, DailyBonusStatusSchema, type DepositAddress, DepositAddressCommand, DepositAddressSchema, type DepositableAsset, DepositableAssetSchema, DisableTotpCommand, ERROR_CODE, type EarningsOverview, EarningsOverviewSchema, type EndpointDetails, type ErrorCode, type ErrorResponse, ErrorResponseSchema, FUNDING_ASSET, ForgotPasswordCommand, GetDailyBonusCommand, GetEarningsCommand, GetIncomeCommand, GetLeaderboardCommand, GetOrderBookCommand, GetPackagesCommand, GetPartnersCommand, GetRanksCommand, GetSettingsCommand, GetSlidesCommand, GetTicketCommand, GetTokenChartCommand, GetTokenPriceCommand, GetTransactionsCommand, GetWalletCommand, type HttpMethod, type IncomeOverview, IncomeOverviewSchema, type IncomePeriod, IncomePeriodSchema, type Leaderboard, type LeaderboardEntry, LeaderboardEntrySchema, type LeaderboardPeriod, LeaderboardPeriodSchema, LeaderboardSchema, LinkGoogleCommand, type LinkProvider, LinkProviderSchema, LinkTelegramCommand, type LinkedAccount, LinkedAccountSchema, ListLinkedAccountsCommand, ListMyOrdersCommand, ListNotificationsCommand, ListTicketsCommand, ListTradesCommand, ListWithdrawalsCommand, LoginCommand, LogoutCommand, MONEY_REGEX, MarkNotificationsReadCommand, MeCommand, MoneyStringSchema, type MonthlyPricePoint, MonthlyPricePointSchema, NMN_PRICE_DECIMALS, type Notification, NotificationSchema, type NotificationType, NotificationTypeSchema, type Order, type OrderBook, type OrderBookLevel, OrderBookLevelSchema, OrderBookSchema, OrderSchema, type OrderSide, OrderSideSchema, type OrderStatus, OrderStatusSchema, type OrderType, OrderTypeSchema, type Package, PackageSchema, type PackageStatus, PackageStatusSchema, type PackagesOverview, PackagesOverviewSchema, PaginatedSchema, type PaginationQuery, PaginationQuerySchema, type PartnerAccrual, PartnerAccrualSchema, type PartnerLevel, PartnerLevelSchema, type PartnersOverview, PartnersOverviewSchema, type Period, PeriodSchema, PlaceOrderCommand, PositiveMoneyStringSchema, type PublicTrade, PublicTradeSchema, REST_API, type RankDef, RankDefSchema, RegisterCommand, ReplyTicketCommand, RequestEmailChangeCommand, RequestWithdrawalCommand, ResendVerificationCommand, ResetPasswordCommand, type SessionInfo, SessionInfoSchema, SetupTotpCommand, type Slide, type SlideButtonStyle, SlideButtonStyleSchema, type SlideKind, SlideKindSchema, type SlideLinkTarget, SlideLinkTargetSchema, SlideSchema, type SlidesResponse, SlidesResponseSchema, SwapCommand, type SwapSide, SwapSideSchema, TICKET_CATEGORIES, TOKEN_ASSET, type TicketAttachment, type TicketAttachmentInput, TicketAttachmentInputSchema, TicketAttachmentSchema, TicketAttachmentUploadCommand, type TicketAuthorType, TicketAuthorTypeSchema, TicketBodySchema, type TicketCategory, TicketCategorySchema, type TicketDetail, TicketDetailSchema, type TicketMessage, TicketMessageSchema, type TicketStatus, TicketStatusSchema, type TicketSummary, TicketSummarySchema, type TokenPrice, TokenPriceSchema, type TradeResult, TradeResultSchema, type Transaction, TransactionSchema, type TransactionStatus, TransactionStatusSchema, type TransactionType, TransactionTypeSchema, UnlinkAccountCommand, UpdateProfileCommand, UpdateSettingsCommand, type UserProfile, UserProfileSchema, type UserRank, UserRankSchema, type UserSettings, UserSettingsSchema, type UserStatus, UserStatusSchema, UuidSchema, VerifyEmailCommand, type WalletOverview, WalletOverviewSchema, type Withdrawal, WithdrawalSchema, type WithdrawalStatus, WithdrawalStatusSchema, assetDecimals, endpoint };
package/dist/index.js CHANGED
@@ -16,6 +16,9 @@ var ERROR_CODE = {
16
16
  SESSION_EXPIRED: "SESSION_EXPIRED",
17
17
  TOTP_REQUIRED: "TOTP_REQUIRED",
18
18
  TOTP_ALREADY_ENABLED: "TOTP_ALREADY_ENABLED",
19
+ EMAIL_NOT_VERIFIED: "EMAIL_NOT_VERIFIED",
20
+ EMAIL_ALREADY_VERIFIED: "EMAIL_ALREADY_VERIFIED",
21
+ TOKEN_INVALID: "TOKEN_INVALID",
19
22
  INSUFFICIENT_BALANCE: "INSUFFICIENT_BALANCE",
20
23
  PURCHASE_LIMIT_EXCEEDED: "PURCHASE_LIMIT_EXCEEDED",
21
24
  SALE_PHASE_INACTIVE: "SALE_PHASE_INACTIVE",
@@ -78,6 +81,19 @@ var DEPOSITABLE_ASSETS = ["USDT", "BTC", "ETH", "BNB", "TRX", "SOL"];
78
81
  var DepositableAssetSchema = z.enum(DEPOSITABLE_ASSETS);
79
82
  var TOKEN_ASSET = "NMN";
80
83
  var FUNDING_ASSET = "USDT";
84
+ var ASSET_DECIMALS = {
85
+ NMN: 4,
86
+ USDT: 2,
87
+ BTC: 8,
88
+ ETH: 8,
89
+ BNB: 8,
90
+ TRX: 6,
91
+ SOL: 6
92
+ };
93
+ var NMN_PRICE_DECIMALS = 8;
94
+ function assetDecimals(asset) {
95
+ return ASSET_DECIMALS[asset];
96
+ }
81
97
  var AssetBalanceSchema = z.object({
82
98
  asset: AssetSymbolSchema,
83
99
  name: z.string(),
@@ -383,6 +399,43 @@ var ConfirmTotpCommand;
383
399
  });
384
400
  ConfirmTotpCommand2.ResponseSchema = z.void();
385
401
  })(ConfirmTotpCommand || (ConfirmTotpCommand = {}));
402
+ var VerifyEmailCommand;
403
+ ((VerifyEmailCommand2) => {
404
+ VerifyEmailCommand2.endpointDetails = endpoint(
405
+ "POST",
406
+ "/auth/verify-email",
407
+ "Confirm an email address with the token from the letter"
408
+ );
409
+ VerifyEmailCommand2.RequestSchema = z.object({
410
+ token: z.string().min(16).max(256)
411
+ });
412
+ VerifyEmailCommand2.ResponseSchema = z.object({ verified: z.boolean() });
413
+ })(VerifyEmailCommand || (VerifyEmailCommand = {}));
414
+ var ResendVerificationCommand;
415
+ ((ResendVerificationCommand2) => {
416
+ ResendVerificationCommand2.endpointDetails = endpoint("POST", "/auth/verify-email/resend", "Send the verification letter again");
417
+ ResendVerificationCommand2.RequestSchema = z.object({
418
+ email: z.string().email().max(254)
419
+ });
420
+ ResendVerificationCommand2.ResponseSchema = z.object({ sent: z.boolean() });
421
+ })(ResendVerificationCommand || (ResendVerificationCommand = {}));
422
+ var ForgotPasswordCommand;
423
+ ((ForgotPasswordCommand2) => {
424
+ ForgotPasswordCommand2.endpointDetails = endpoint("POST", "/auth/password/forgot", "Send a password reset link");
425
+ ForgotPasswordCommand2.RequestSchema = z.object({
426
+ email: z.string().email().max(254)
427
+ });
428
+ ForgotPasswordCommand2.ResponseSchema = z.object({ sent: z.boolean() });
429
+ })(ForgotPasswordCommand || (ForgotPasswordCommand = {}));
430
+ var ResetPasswordCommand;
431
+ ((ResetPasswordCommand2) => {
432
+ ResetPasswordCommand2.endpointDetails = endpoint("POST", "/auth/password/reset", "Set a new password using the reset token");
433
+ ResetPasswordCommand2.RequestSchema = z.object({
434
+ token: z.string().min(16).max(256),
435
+ password: z.string().min(8).max(128)
436
+ });
437
+ ResetPasswordCommand2.ResponseSchema = z.object({ reset: z.boolean() });
438
+ })(ResetPasswordCommand || (ResetPasswordCommand = {}));
386
439
 
387
440
  // src/commands/wallet/get-wallet.command.ts
388
441
  var GetWalletCommand;
@@ -555,7 +608,11 @@ var BuyPackageCommand;
555
608
  // src/commands/content/get-slides.command.ts
556
609
  var GetSlidesCommand;
557
610
  ((GetSlidesCommand2) => {
558
- GetSlidesCommand2.endpointDetails = endpoint("GET", "/content/slides", "Active dashboard carousel slides in display order");
611
+ GetSlidesCommand2.endpointDetails = endpoint(
612
+ "GET",
613
+ "/content/slides",
614
+ "Active dashboard carousel slides in display order"
615
+ );
559
616
  GetSlidesCommand2.ResponseSchema = SlidesResponseSchema;
560
617
  })(GetSlidesCommand || (GetSlidesCommand = {}));
561
618
  var GetRanksCommand;
@@ -629,7 +686,8 @@ var ConfirmEmailChangeCommand;
629
686
  ((ConfirmEmailChangeCommand2) => {
630
687
  ConfirmEmailChangeCommand2.endpointDetails = endpoint("POST", "/settings/email/confirm", "Confirm an email change with the code");
631
688
  ConfirmEmailChangeCommand2.RequestSchema = z.object({
632
- code: z.string().regex(/^\d{6}$/)
689
+ code: z.string().regex(/^\d{6}$/),
690
+ totp: z.string().regex(/^\d{6}$/).optional()
633
691
  });
634
692
  ConfirmEmailChangeCommand2.ResponseSchema = z.object({ email: z.string().email() });
635
693
  })(ConfirmEmailChangeCommand || (ConfirmEmailChangeCommand = {}));
@@ -855,7 +913,11 @@ var REST_API = {
855
913
  LOGOUT: "/auth/logout",
856
914
  ME: "/auth/me",
857
915
  TOTP_SETUP: "/auth/totp/setup",
858
- TOTP_CONFIRM: "/auth/totp/confirm"
916
+ TOTP_CONFIRM: "/auth/totp/confirm",
917
+ VERIFY_EMAIL: "/auth/verify-email",
918
+ RESEND_VERIFICATION: "/auth/verify-email/resend",
919
+ FORGOT_PASSWORD: "/auth/password/forgot",
920
+ RESET_PASSWORD: "/auth/password/reset"
859
921
  },
860
922
  WALLET: {
861
923
  OVERVIEW: "/wallet",
@@ -934,6 +996,6 @@ var REST_API = {
934
996
  var API_PREFIX = "/api";
935
997
  var API_VERSION = "v1";
936
998
 
937
- export { API_PREFIX, API_VERSION, ASSET_SYMBOLS, AVATAR_CONTENT_TYPES, AssetBalanceSchema, AssetSymbolSchema, AvatarContentTypeSchema, AvatarUploadUrlCommand, BuyPackageCommand, CancelOrderCommand, CancelWithdrawalCommand, ChartPeriodSchema, ChartPointSchema, ClaimDailyBonusCommand, ConfirmEmailChangeCommand, ConfirmTotpCommand, ConfirmWithdrawalCommand, CreateTicketCommand, DEPOSITABLE_ASSETS, DailyBonusClaimResultSchema, DailyBonusDaySchema, DailyBonusStatusSchema, DepositAddressCommand, DepositAddressSchema, DepositableAssetSchema, DisableTotpCommand, ERROR_CODE, EarningsOverviewSchema, ErrorResponseSchema, FUNDING_ASSET, GetDailyBonusCommand, GetEarningsCommand, GetIncomeCommand, GetLeaderboardCommand, GetOrderBookCommand, GetPackagesCommand, GetPartnersCommand, GetRanksCommand, GetSettingsCommand, GetSlidesCommand, GetTicketCommand, GetTokenChartCommand, GetTokenPriceCommand, GetTransactionsCommand, GetWalletCommand, IncomeOverviewSchema, IncomePeriodSchema, LeaderboardEntrySchema, LeaderboardPeriodSchema, LeaderboardSchema, LinkGoogleCommand, LinkProviderSchema, LinkTelegramCommand, LinkedAccountSchema, ListLinkedAccountsCommand, ListMyOrdersCommand, ListNotificationsCommand, ListTicketsCommand, ListTradesCommand, ListWithdrawalsCommand, LoginCommand, LogoutCommand, MONEY_REGEX, MarkNotificationsReadCommand, MeCommand, MoneyStringSchema, MonthlyPricePointSchema, NotificationSchema, NotificationTypeSchema, OrderBookLevelSchema, OrderBookSchema, OrderSchema, OrderSideSchema, OrderStatusSchema, OrderTypeSchema, PackageSchema, PackageStatusSchema, PackagesOverviewSchema, PaginatedSchema, PaginationQuerySchema, PartnerAccrualSchema, PartnerLevelSchema, PartnersOverviewSchema, PeriodSchema, PlaceOrderCommand, PositiveMoneyStringSchema, PublicTradeSchema, REST_API, RankDefSchema, RegisterCommand, ReplyTicketCommand, RequestEmailChangeCommand, RequestWithdrawalCommand, SessionInfoSchema, SetupTotpCommand, SlideButtonStyleSchema, SlideKindSchema, SlideLinkTargetSchema, SlideSchema, SlidesResponseSchema, SwapCommand, SwapSideSchema, TICKET_CATEGORIES, TOKEN_ASSET, TicketAttachmentInputSchema, TicketAttachmentSchema, TicketAttachmentUploadCommand, TicketAuthorTypeSchema, TicketBodySchema, TicketCategorySchema, TicketDetailSchema, TicketMessageSchema, TicketStatusSchema, TicketSummarySchema, TokenPriceSchema, TradeResultSchema, TransactionSchema, TransactionStatusSchema, TransactionTypeSchema, UnlinkAccountCommand, UpdateProfileCommand, UpdateSettingsCommand, UserProfileSchema, UserRankSchema, UserSettingsSchema, UserStatusSchema, UuidSchema, WalletOverviewSchema, WithdrawalSchema, WithdrawalStatusSchema, endpoint };
999
+ export { API_PREFIX, API_VERSION, ASSET_DECIMALS, ASSET_SYMBOLS, AVATAR_CONTENT_TYPES, AssetBalanceSchema, AssetSymbolSchema, AvatarContentTypeSchema, AvatarUploadUrlCommand, BuyPackageCommand, CancelOrderCommand, CancelWithdrawalCommand, ChartPeriodSchema, ChartPointSchema, ClaimDailyBonusCommand, ConfirmEmailChangeCommand, ConfirmTotpCommand, ConfirmWithdrawalCommand, CreateTicketCommand, DEPOSITABLE_ASSETS, DailyBonusClaimResultSchema, DailyBonusDaySchema, DailyBonusStatusSchema, DepositAddressCommand, DepositAddressSchema, DepositableAssetSchema, DisableTotpCommand, ERROR_CODE, EarningsOverviewSchema, ErrorResponseSchema, FUNDING_ASSET, ForgotPasswordCommand, GetDailyBonusCommand, GetEarningsCommand, GetIncomeCommand, GetLeaderboardCommand, GetOrderBookCommand, GetPackagesCommand, GetPartnersCommand, GetRanksCommand, GetSettingsCommand, GetSlidesCommand, GetTicketCommand, GetTokenChartCommand, GetTokenPriceCommand, GetTransactionsCommand, GetWalletCommand, IncomeOverviewSchema, IncomePeriodSchema, LeaderboardEntrySchema, LeaderboardPeriodSchema, LeaderboardSchema, LinkGoogleCommand, LinkProviderSchema, LinkTelegramCommand, LinkedAccountSchema, ListLinkedAccountsCommand, ListMyOrdersCommand, ListNotificationsCommand, ListTicketsCommand, ListTradesCommand, ListWithdrawalsCommand, LoginCommand, LogoutCommand, MONEY_REGEX, MarkNotificationsReadCommand, MeCommand, MoneyStringSchema, MonthlyPricePointSchema, NMN_PRICE_DECIMALS, NotificationSchema, NotificationTypeSchema, OrderBookLevelSchema, OrderBookSchema, OrderSchema, OrderSideSchema, OrderStatusSchema, OrderTypeSchema, PackageSchema, PackageStatusSchema, PackagesOverviewSchema, PaginatedSchema, PaginationQuerySchema, PartnerAccrualSchema, PartnerLevelSchema, PartnersOverviewSchema, PeriodSchema, PlaceOrderCommand, PositiveMoneyStringSchema, PublicTradeSchema, REST_API, RankDefSchema, RegisterCommand, ReplyTicketCommand, RequestEmailChangeCommand, RequestWithdrawalCommand, ResendVerificationCommand, ResetPasswordCommand, SessionInfoSchema, SetupTotpCommand, SlideButtonStyleSchema, SlideKindSchema, SlideLinkTargetSchema, SlideSchema, SlidesResponseSchema, SwapCommand, SwapSideSchema, TICKET_CATEGORIES, TOKEN_ASSET, TicketAttachmentInputSchema, TicketAttachmentSchema, TicketAttachmentUploadCommand, TicketAuthorTypeSchema, TicketBodySchema, TicketCategorySchema, TicketDetailSchema, TicketMessageSchema, TicketStatusSchema, TicketSummarySchema, TokenPriceSchema, TradeResultSchema, TransactionSchema, TransactionStatusSchema, TransactionTypeSchema, UnlinkAccountCommand, UpdateProfileCommand, UpdateSettingsCommand, UserProfileSchema, UserRankSchema, UserSettingsSchema, UserStatusSchema, UuidSchema, VerifyEmailCommand, WalletOverviewSchema, WithdrawalSchema, WithdrawalStatusSchema, assetDecimals, endpoint };
938
1000
  //# sourceMappingURL=index.js.map
939
1001
  //# sourceMappingURL=index.js.map