@xoxno/types 1.0.4 → 1.0.6

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.
Files changed (58) hide show
  1. package/dist/common/owner.dto.d.ts +0 -5
  2. package/dist/common/socials.d.ts +0 -1
  3. package/dist/common/statistics.d.ts +0 -1
  4. package/dist/cosmos-db/cosmos-db-query.d.ts +2 -2
  5. package/dist/cosmos-db/documents/collection/collectionConfig.d.ts +0 -1
  6. package/dist/cosmos-db/documents/collection/mintProfile.d.ts +0 -1
  7. package/dist/cosmos-db/documents/collection/mintStage.d.ts +0 -1
  8. package/dist/cosmos-db/documents/collection/profile.d.ts +2 -3
  9. package/dist/cosmos-db/documents/collection/stats.d.ts +0 -1
  10. package/dist/cosmos-db/documents/lending/lending-nft-attributes.d.ts +0 -1
  11. package/dist/cosmos-db/documents/lending/lending-token-emode-profile.doc.d.ts +0 -1
  12. package/dist/cosmos-db/documents/token/nft-details.doc.d.ts +3 -4
  13. package/dist/cosmos-db/documents/token/nft-metadata-attributes.d.ts +0 -1
  14. package/dist/cosmos-db/documents/token/token-data.enum.d.ts +1 -1
  15. package/dist/cosmos-db/documents/token/token-data.enum.js +1 -1
  16. package/dist/cosmos-db/documents/user/user-creator-profile.doc.d.ts +2 -2
  17. package/dist/cosmos-db/documents/user/user-creator-profile.doc.js +2 -1
  18. package/dist/cosmos-db/documents/user/user-deposit.d.ts +0 -1
  19. package/dist/entities/auth/auth-strategy.enum.d.ts +4 -0
  20. package/dist/entities/auth/auth-strategy.enum.js +8 -0
  21. package/dist/entities/auth/login-request.dto.d.ts +8 -0
  22. package/dist/entities/auth/login-request.dto.js +52 -0
  23. package/dist/entities/auth/role.enum.d.ts +10 -0
  24. package/dist/entities/auth/role.enum.js +14 -0
  25. package/dist/entities/token-data/fiat-tokens.enum.d.ts +10 -0
  26. package/dist/entities/token-data/fiat-tokens.enum.js +10 -0
  27. package/dist/entities/token-data/known-mvx-tokens.enum.d.ts +34 -0
  28. package/dist/entities/token-data/known-mvx-tokens.enum.js +32 -0
  29. package/dist/entities/token-data/metrics.d.ts +46 -0
  30. package/dist/entities/token-data/metrics.js +177 -0
  31. package/dist/entities/token-data/query-prices.enum.d.ts +44 -0
  32. package/dist/entities/token-data/query-prices.enum.js +34 -0
  33. package/dist/entities/token-data/token-category.enum.d.ts +9 -0
  34. package/dist/entities/token-data/token-category.enum.js +13 -0
  35. package/dist/entities/token-data/token-data.doc.d.ts +16 -0
  36. package/dist/entities/token-data/token-data.doc.js +10 -0
  37. package/dist/entities/web2user-data/linked-account-type.enum.d.ts +6 -0
  38. package/dist/entities/web2user-data/linked-account-type.enum.js +10 -0
  39. package/dist/entities/web2user-data/native-wallet.dto.d.ts +6 -0
  40. package/dist/entities/web2user-data/native-wallet.dto.js +50 -0
  41. package/dist/entities/web2user-data/switch-wallet-dto.d.ts +3 -0
  42. package/dist/entities/web2user-data/switch-wallet-dto.js +22 -0
  43. package/dist/entities/web2user-data/wallet-client-type.enum.d.ts +11 -0
  44. package/dist/entities/web2user-data/wallet-client-type.enum.js +15 -0
  45. package/dist/entities/web2user-data/web2user-account.d.ts +10 -0
  46. package/dist/entities/web2user-data/web2user-account.dto.d.ts +8 -0
  47. package/dist/entities/web2user-data/web2user-account.dto.js +50 -0
  48. package/dist/entities/web2user-data/web2user-account.js +69 -0
  49. package/dist/entities/web2user-data/web2user-shards.dto.d.ts +3 -0
  50. package/dist/entities/web2user-data/web2user-shards.dto.js +24 -0
  51. package/dist/entities/web2user-data/web2user-wallet.d.ts +13 -0
  52. package/dist/entities/web2user-data/web2user-wallet.dto.d.ts +12 -0
  53. package/dist/entities/web2user-data/web2user-wallet.dto.js +71 -0
  54. package/dist/entities/web2user-data/web2user-wallet.js +77 -0
  55. package/dist/entities/web2user-data/web2user.doc.d.ts +17 -0
  56. package/dist/entities/web2user-data/web2user.doc.js +100 -0
  57. package/dist/index.d.ts +0 -1
  58. package/package.json +1 -1
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DexType = exports.AshSwapEndpoints = exports.OneDexEndpoints = exports.QueryPricesSCEndpoints = void 0;
4
+ var QueryPricesSCEndpoints;
5
+ (function (QueryPricesSCEndpoints) {
6
+ QueryPricesSCEndpoints["GET_PRICES"] = "getPrices";
7
+ QueryPricesSCEndpoints["GET_ASH_PRICES"] = "getAshPrices";
8
+ QueryPricesSCEndpoints["GET_ONE_PRICES"] = "getOneDexPrices";
9
+ QueryPricesSCEndpoints["GET_XEXCHANGE_PRICES"] = "getExchangePrices";
10
+ QueryPricesSCEndpoints["GET_MARKETS"] = "getMarkets";
11
+ QueryPricesSCEndpoints["GET_MARKETS_INFO"] = "getMarketsInfo";
12
+ QueryPricesSCEndpoints["GET_MARKET_MEMBERS"] = "getMarketMembers";
13
+ QueryPricesSCEndpoints["GET_MARKET_MEMBERS_INFO"] = "getMarketMembersInfo";
14
+ QueryPricesSCEndpoints["GET_MEMBER_INFO"] = "getMemberInfo";
15
+ QueryPricesSCEndpoints["GET_MARKET_MEMBER_INFO"] = "getMarketMemberInfo";
16
+ QueryPricesSCEndpoints["GET_MARKET_INFO"] = "getMarketInfo";
17
+ })(QueryPricesSCEndpoints || (exports.QueryPricesSCEndpoints = QueryPricesSCEndpoints = {}));
18
+ var OneDexEndpoints;
19
+ (function (OneDexEndpoints) {
20
+ OneDexEndpoints["GET_MAIN_PAIR_TOKENS"] = "getMainPairTokens";
21
+ OneDexEndpoints["GET_LAST_PAIR_ID"] = "getLastPairId";
22
+ OneDexEndpoints["VIEW_PAIRS_PAGINATED"] = "viewPairsPaginated";
23
+ })(OneDexEndpoints || (exports.OneDexEndpoints = OneDexEndpoints = {}));
24
+ var AshSwapEndpoints;
25
+ (function (AshSwapEndpoints) {
26
+ AshSwapEndpoints["GET_ASH_SWAP_STABLE_POOLS"] = "getAshSwapStablePools";
27
+ AshSwapEndpoints["GET_ASH_SWAP_V2_POOLS"] = "getAshSwapV2Pools";
28
+ })(AshSwapEndpoints || (exports.AshSwapEndpoints = AshSwapEndpoints = {}));
29
+ var DexType;
30
+ (function (DexType) {
31
+ DexType["XExchange"] = "XExchange";
32
+ DexType["OneDex"] = "OneDex";
33
+ DexType["AshSwap"] = "AshSwap";
34
+ })(DexType || (exports.DexType = DexType = {}));
@@ -0,0 +1,9 @@
1
+ export declare enum TokenCategory {
2
+ ALL = "all",
3
+ TRADE = "trade",
4
+ STAKING = "staking",
5
+ P2P = "p2p",
6
+ FIAT = "fiat",
7
+ MINTING = "minting",
8
+ USER_INVENTORY = "userInventory"
9
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TokenCategory = void 0;
4
+ var TokenCategory;
5
+ (function (TokenCategory) {
6
+ TokenCategory["ALL"] = "all";
7
+ TokenCategory["TRADE"] = "trade";
8
+ TokenCategory["STAKING"] = "staking";
9
+ TokenCategory["P2P"] = "p2p";
10
+ TokenCategory["FIAT"] = "fiat";
11
+ TokenCategory["MINTING"] = "minting";
12
+ TokenCategory["USER_INVENTORY"] = "userInventory";
13
+ })(TokenCategory || (exports.TokenCategory = TokenCategory = {}));
@@ -0,0 +1,16 @@
1
+ export declare class TokenDataDoc {
2
+ id: string;
3
+ identifier: string;
4
+ collection: string;
5
+ dataType: string;
6
+ decimals: number;
7
+ name: string;
8
+ type: string;
9
+ category: string[];
10
+ svgUrl: string;
11
+ pngUrl: string;
12
+ ticker: string;
13
+ _ts: number;
14
+ usdPrice?: number;
15
+ constructor(props?: Partial<TokenDataDoc>);
16
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TokenDataDoc = void 0;
4
+ class TokenDataDoc {
5
+ constructor(props) {
6
+ this.category = ['userInventory'];
7
+ Object.assign(this, props);
8
+ }
9
+ }
10
+ exports.TokenDataDoc = TokenDataDoc;
@@ -0,0 +1,6 @@
1
+ export declare enum LinkedAccountType {
2
+ WALLET = "wallet",
3
+ PASSKEY = "passkey",
4
+ GOOGLE = "google_oauth",
5
+ APPLE = "apple_oauth"
6
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LinkedAccountType = void 0;
4
+ var LinkedAccountType;
5
+ (function (LinkedAccountType) {
6
+ LinkedAccountType["WALLET"] = "wallet";
7
+ LinkedAccountType["PASSKEY"] = "passkey";
8
+ LinkedAccountType["GOOGLE"] = "google_oauth";
9
+ LinkedAccountType["APPLE"] = "apple_oauth";
10
+ })(LinkedAccountType || (exports.LinkedAccountType = LinkedAccountType = {}));
@@ -0,0 +1,6 @@
1
+ import { Web2WalletDto } from './web2user-wallet.dto';
2
+ export declare class NativeWalletDto {
3
+ readonly shards: string[];
4
+ readonly wallet: Web2WalletDto;
5
+ isActive: boolean;
6
+ }
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.NativeWalletDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const class_transformer_1 = require("class-transformer");
15
+ const class_validator_1 = require("class-validator");
16
+ const web2user_wallet_dto_1 = require("./web2user-wallet.dto");
17
+ class NativeWalletDto {
18
+ }
19
+ exports.NativeWalletDto = NativeWalletDto;
20
+ __decorate([
21
+ (0, swagger_1.ApiProperty)({
22
+ description: 'Array of wallet shards',
23
+ type: [String],
24
+ minItems: 4,
25
+ maxItems: 4,
26
+ example: ['shard1', 'shard2', 'shard3', 'shard4'],
27
+ }),
28
+ (0, class_validator_1.IsArray)(),
29
+ (0, class_validator_1.IsString)({ each: true }),
30
+ (0, class_validator_1.ArrayMinSize)(4),
31
+ (0, class_validator_1.ArrayMaxSize)(4),
32
+ __metadata("design:type", Array)
33
+ ], NativeWalletDto.prototype, "shards", void 0);
34
+ __decorate([
35
+ (0, swagger_1.ApiProperty)({
36
+ description: 'Web2 wallet information',
37
+ type: () => web2user_wallet_dto_1.Web2WalletDto,
38
+ }),
39
+ (0, class_validator_1.ValidateNested)(),
40
+ (0, class_transformer_1.Type)(() => web2user_wallet_dto_1.Web2WalletDto),
41
+ (0, class_validator_1.IsNotEmptyObject)(),
42
+ __metadata("design:type", web2user_wallet_dto_1.Web2WalletDto)
43
+ ], NativeWalletDto.prototype, "wallet", void 0);
44
+ __decorate([
45
+ (0, swagger_1.ApiProperty)({
46
+ description: 'Wether the backed up wallet shall become active',
47
+ }),
48
+ (0, class_validator_1.IsBoolean)(),
49
+ __metadata("design:type", Boolean)
50
+ ], NativeWalletDto.prototype, "isActive", void 0);
@@ -0,0 +1,3 @@
1
+ export declare class SwitchWalletDto {
2
+ address: string;
3
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.SwitchWalletDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const class_validator_1 = require("class-validator");
15
+ class SwitchWalletDto {
16
+ }
17
+ exports.SwitchWalletDto = SwitchWalletDto;
18
+ __decorate([
19
+ (0, swagger_1.ApiProperty)({ description: 'New active address' }),
20
+ (0, class_validator_1.IsString)(),
21
+ __metadata("design:type", String)
22
+ ], SwitchWalletDto.prototype, "address", void 0);
@@ -0,0 +1,11 @@
1
+ export declare enum WalletClientType {
2
+ XOXNO = "xoxno",
3
+ X_PORTAL = "xPortal",
4
+ WEBWALLET = "webwallet",
5
+ MAIAR_V2 = "maiar_v2",
6
+ SUI = "sui",
7
+ LEDGER = "ledger",
8
+ EXTENSION = "extension",
9
+ NATIVE = "native",
10
+ ZK_LOGIN = "zkLogin"
11
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WalletClientType = void 0;
4
+ var WalletClientType;
5
+ (function (WalletClientType) {
6
+ WalletClientType["XOXNO"] = "xoxno";
7
+ WalletClientType["X_PORTAL"] = "xPortal";
8
+ WalletClientType["WEBWALLET"] = "webwallet";
9
+ WalletClientType["MAIAR_V2"] = "maiar_v2";
10
+ WalletClientType["SUI"] = "sui";
11
+ WalletClientType["LEDGER"] = "ledger";
12
+ WalletClientType["EXTENSION"] = "extension";
13
+ WalletClientType["NATIVE"] = "native";
14
+ WalletClientType["ZK_LOGIN"] = "zkLogin";
15
+ })(WalletClientType || (exports.WalletClientType = WalletClientType = {}));
@@ -0,0 +1,10 @@
1
+ import { LinkedAccountType } from './linked-account-type.enum';
2
+ export declare class Web2UserAccount {
3
+ type: LinkedAccountType;
4
+ subject: string;
5
+ name?: string;
6
+ profilePicture?: string;
7
+ email?: string;
8
+ username?: string;
9
+ constructor(props: Web2UserAccount);
10
+ }
@@ -0,0 +1,8 @@
1
+ import { LinkedAccountType } from './linked-account-type.enum';
2
+ export declare class Web2UserAccountDto {
3
+ type: LinkedAccountType;
4
+ subject: string;
5
+ profilePicture?: string;
6
+ email?: string;
7
+ username?: string;
8
+ }
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.Web2UserAccountDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const class_validator_1 = require("class-validator");
15
+ const linked_account_type_enum_1 = require("./linked-account-type.enum");
16
+ class Web2UserAccountDto {
17
+ }
18
+ exports.Web2UserAccountDto = Web2UserAccountDto;
19
+ __decorate([
20
+ (0, swagger_1.ApiProperty)({
21
+ enum: linked_account_type_enum_1.LinkedAccountType,
22
+ enumName: 'LinkedAccountType',
23
+ description: 'Type of the linked account',
24
+ }),
25
+ (0, class_validator_1.IsEnum)(linked_account_type_enum_1.LinkedAccountType),
26
+ __metadata("design:type", String)
27
+ ], Web2UserAccountDto.prototype, "type", void 0);
28
+ __decorate([
29
+ (0, swagger_1.ApiProperty)({ description: 'Unique identifier for the account' }),
30
+ (0, class_validator_1.IsString)(),
31
+ __metadata("design:type", String)
32
+ ], Web2UserAccountDto.prototype, "subject", void 0);
33
+ __decorate([
34
+ (0, swagger_1.ApiPropertyOptional)({ description: "URL of the user's profile picture" }),
35
+ (0, class_validator_1.IsOptional)(),
36
+ (0, class_validator_1.IsString)(),
37
+ __metadata("design:type", String)
38
+ ], Web2UserAccountDto.prototype, "profilePicture", void 0);
39
+ __decorate([
40
+ (0, swagger_1.ApiPropertyOptional)({ description: "User's email address" }),
41
+ (0, class_validator_1.IsOptional)(),
42
+ (0, class_validator_1.IsString)(),
43
+ __metadata("design:type", String)
44
+ ], Web2UserAccountDto.prototype, "email", void 0);
45
+ __decorate([
46
+ (0, swagger_1.ApiPropertyOptional)({ description: "User's username" }),
47
+ (0, class_validator_1.IsOptional)(),
48
+ (0, class_validator_1.IsString)(),
49
+ __metadata("design:type", String)
50
+ ], Web2UserAccountDto.prototype, "username", void 0);
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.Web2UserAccount = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const linked_account_type_enum_1 = require("./linked-account-type.enum");
15
+ class Web2UserAccount {
16
+ constructor(props) {
17
+ Object.assign(this, props);
18
+ }
19
+ }
20
+ exports.Web2UserAccount = Web2UserAccount;
21
+ __decorate([
22
+ (0, swagger_1.ApiProperty)({
23
+ enum: linked_account_type_enum_1.LinkedAccountType,
24
+ enumName: 'LinkedAccountType',
25
+ description: 'Type of linked account',
26
+ example: linked_account_type_enum_1.LinkedAccountType.GOOGLE,
27
+ }),
28
+ __metadata("design:type", String)
29
+ ], Web2UserAccount.prototype, "type", void 0);
30
+ __decorate([
31
+ (0, swagger_1.ApiProperty)({
32
+ type: String,
33
+ description: 'User ID from the provider',
34
+ example: '123456789',
35
+ }),
36
+ __metadata("design:type", String)
37
+ ], Web2UserAccount.prototype, "subject", void 0);
38
+ __decorate([
39
+ (0, swagger_1.ApiPropertyOptional)({
40
+ type: String,
41
+ description: "User's name",
42
+ example: 'John Doe',
43
+ }),
44
+ __metadata("design:type", String)
45
+ ], Web2UserAccount.prototype, "name", void 0);
46
+ __decorate([
47
+ (0, swagger_1.ApiPropertyOptional)({
48
+ type: String,
49
+ description: "URL of the user's profile picture",
50
+ example: 'https://example.com/profile.jpg',
51
+ }),
52
+ __metadata("design:type", String)
53
+ ], Web2UserAccount.prototype, "profilePicture", void 0);
54
+ __decorate([
55
+ (0, swagger_1.ApiPropertyOptional)({
56
+ type: String,
57
+ description: "User's email address",
58
+ example: 'john.doe@example.com',
59
+ }),
60
+ __metadata("design:type", String)
61
+ ], Web2UserAccount.prototype, "email", void 0);
62
+ __decorate([
63
+ (0, swagger_1.ApiPropertyOptional)({
64
+ type: String,
65
+ description: "User's username",
66
+ example: 'johndoe123',
67
+ }),
68
+ __metadata("design:type", String)
69
+ ], Web2UserAccount.prototype, "username", void 0);
@@ -0,0 +1,3 @@
1
+ export declare class Web2UserShardsDto {
2
+ shards: string[];
3
+ }
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.Web2UserShardsDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ class Web2UserShardsDto {
15
+ }
16
+ exports.Web2UserShardsDto = Web2UserShardsDto;
17
+ __decorate([
18
+ (0, swagger_1.ApiProperty)({
19
+ description: 'Shards of the user',
20
+ type: String,
21
+ isArray: true,
22
+ }),
23
+ __metadata("design:type", Array)
24
+ ], Web2UserShardsDto.prototype, "shards", void 0);
@@ -0,0 +1,13 @@
1
+ import { LinkedAccountType } from './linked-account-type.enum';
2
+ import { WalletClientType } from './wallet-client-type.enum';
3
+ export declare class Web2UserWallet {
4
+ type: LinkedAccountType.WALLET;
5
+ address: string;
6
+ index?: number;
7
+ signature?: string;
8
+ chain: string;
9
+ walletClientType: WalletClientType;
10
+ recoveryMethod?: string;
11
+ id?: string;
12
+ constructor(props: Partial<Web2UserWallet>);
13
+ }
@@ -0,0 +1,12 @@
1
+ import { LinkedAccountType } from './linked-account-type.enum';
2
+ import { WalletClientType } from './wallet-client-type.enum';
3
+ export declare class Web2WalletDto {
4
+ type: LinkedAccountType;
5
+ address: string;
6
+ chain: string;
7
+ signature?: string;
8
+ authToken?: string;
9
+ walletClientType: WalletClientType;
10
+ index?: number;
11
+ recoveryMethod?: string;
12
+ }
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.Web2WalletDto = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const class_validator_1 = require("class-validator");
15
+ const linked_account_type_enum_1 = require("./linked-account-type.enum");
16
+ const wallet_client_type_enum_1 = require("./wallet-client-type.enum");
17
+ class Web2WalletDto {
18
+ }
19
+ exports.Web2WalletDto = Web2WalletDto;
20
+ __decorate([
21
+ (0, swagger_1.ApiProperty)({
22
+ enum: linked_account_type_enum_1.LinkedAccountType,
23
+ enumName: 'LinkedAccountType',
24
+ description: 'Type of linked account',
25
+ }),
26
+ (0, class_validator_1.IsEnum)(linked_account_type_enum_1.LinkedAccountType),
27
+ __metadata("design:type", String)
28
+ ], Web2WalletDto.prototype, "type", void 0);
29
+ __decorate([
30
+ (0, swagger_1.ApiProperty)({ description: 'Wallet address' }),
31
+ (0, class_validator_1.IsString)(),
32
+ __metadata("design:type", String)
33
+ ], Web2WalletDto.prototype, "address", void 0);
34
+ __decorate([
35
+ (0, swagger_1.ApiProperty)({ description: 'Blockchain network' }),
36
+ (0, class_validator_1.IsString)(),
37
+ __metadata("design:type", String)
38
+ ], Web2WalletDto.prototype, "chain", void 0);
39
+ __decorate([
40
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Signature for authentication' }),
41
+ (0, class_validator_1.IsOptional)(),
42
+ (0, class_validator_1.IsString)(),
43
+ __metadata("design:type", String)
44
+ ], Web2WalletDto.prototype, "signature", void 0);
45
+ __decorate([
46
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Authentication token' }),
47
+ (0, class_validator_1.IsOptional)(),
48
+ (0, class_validator_1.IsString)(),
49
+ __metadata("design:type", String)
50
+ ], Web2WalletDto.prototype, "authToken", void 0);
51
+ __decorate([
52
+ (0, swagger_1.ApiProperty)({
53
+ enum: wallet_client_type_enum_1.WalletClientType,
54
+ description: 'Type of wallet client',
55
+ enumName: 'WalletClientType',
56
+ }),
57
+ (0, class_validator_1.IsEnum)(wallet_client_type_enum_1.WalletClientType),
58
+ __metadata("design:type", String)
59
+ ], Web2WalletDto.prototype, "walletClientType", void 0);
60
+ __decorate([
61
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Index of the wallet', type: Number }),
62
+ (0, class_validator_1.IsOptional)(),
63
+ (0, class_validator_1.IsNumber)(),
64
+ __metadata("design:type", Number)
65
+ ], Web2WalletDto.prototype, "index", void 0);
66
+ __decorate([
67
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Method used for wallet recovery' }),
68
+ (0, class_validator_1.IsOptional)(),
69
+ (0, class_validator_1.IsString)(),
70
+ __metadata("design:type", String)
71
+ ], Web2WalletDto.prototype, "recoveryMethod", void 0);
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.Web2UserWallet = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const class_validator_1 = require("class-validator");
15
+ const uuid_1 = require("uuid");
16
+ const linked_account_type_enum_1 = require("./linked-account-type.enum");
17
+ const wallet_client_type_enum_1 = require("./wallet-client-type.enum");
18
+ class Web2UserWallet {
19
+ constructor(props) {
20
+ Object.assign(this, props);
21
+ this.id = (0, uuid_1.v4)();
22
+ }
23
+ }
24
+ exports.Web2UserWallet = Web2UserWallet;
25
+ __decorate([
26
+ (0, swagger_1.ApiProperty)({
27
+ enum: linked_account_type_enum_1.LinkedAccountType,
28
+ enumName: 'LinkedAccountType',
29
+ }),
30
+ (0, class_validator_1.IsEnum)(linked_account_type_enum_1.LinkedAccountType),
31
+ __metadata("design:type", String)
32
+ ], Web2UserWallet.prototype, "type", void 0);
33
+ __decorate([
34
+ (0, swagger_1.ApiProperty)({ description: 'Wallet address' }),
35
+ (0, class_validator_1.IsString)(),
36
+ __metadata("design:type", String)
37
+ ], Web2UserWallet.prototype, "address", void 0);
38
+ __decorate([
39
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Wallet index' }),
40
+ (0, class_validator_1.IsOptional)(),
41
+ (0, class_validator_1.IsNumber)(),
42
+ __metadata("design:type", Number)
43
+ ], Web2UserWallet.prototype, "index", void 0);
44
+ __decorate([
45
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Signature for the wallet' }),
46
+ (0, class_validator_1.IsOptional)(),
47
+ (0, class_validator_1.IsString)(),
48
+ __metadata("design:type", String)
49
+ ], Web2UserWallet.prototype, "signature", void 0);
50
+ __decorate([
51
+ (0, swagger_1.ApiProperty)({ description: 'Blockchain network' }),
52
+ (0, class_validator_1.IsString)(),
53
+ __metadata("design:type", String)
54
+ ], Web2UserWallet.prototype, "chain", void 0);
55
+ __decorate([
56
+ (0, swagger_1.ApiProperty)({
57
+ enum: wallet_client_type_enum_1.WalletClientType,
58
+ description: 'Type of wallet client',
59
+ enumName: 'WalletClientType',
60
+ }),
61
+ (0, class_validator_1.IsEnum)(wallet_client_type_enum_1.WalletClientType),
62
+ __metadata("design:type", String)
63
+ ], Web2UserWallet.prototype, "walletClientType", void 0);
64
+ __decorate([
65
+ (0, swagger_1.ApiPropertyOptional)({ description: 'Method used for wallet recovery' }),
66
+ (0, class_validator_1.IsOptional)(),
67
+ (0, class_validator_1.IsString)(),
68
+ __metadata("design:type", String)
69
+ ], Web2UserWallet.prototype, "recoveryMethod", void 0);
70
+ __decorate([
71
+ (0, swagger_1.ApiPropertyOptional)({
72
+ description: 'Unique identifier for the wallet',
73
+ }),
74
+ (0, class_validator_1.IsOptional)(),
75
+ (0, class_validator_1.IsString)(),
76
+ __metadata("design:type", String)
77
+ ], Web2UserWallet.prototype, "id", void 0);
@@ -0,0 +1,17 @@
1
+ import { Web2UserAccount } from './web2user-account';
2
+ import { Web2UserWallet } from './web2user-wallet';
3
+ export declare class Web2UserDoc {
4
+ createdOn: number;
5
+ id: string;
6
+ linkedAccounts: LinkedAccount[];
7
+ shards: string[];
8
+ hasNativeWallet: boolean;
9
+ wallet?: Web2UserWallet;
10
+ salt: string;
11
+ google?: Web2UserAccount;
12
+ apple?: Web2UserAccount;
13
+ pk: string;
14
+ _ts?: number;
15
+ constructor(props?: Partial<Web2UserDoc>);
16
+ }
17
+ export type LinkedAccount = Web2UserWallet | Web2UserAccount;