@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.
- package/dist/common/owner.dto.d.ts +0 -5
- package/dist/common/socials.d.ts +0 -1
- package/dist/common/statistics.d.ts +0 -1
- package/dist/cosmos-db/cosmos-db-query.d.ts +2 -2
- package/dist/cosmos-db/documents/collection/collectionConfig.d.ts +0 -1
- package/dist/cosmos-db/documents/collection/mintProfile.d.ts +0 -1
- package/dist/cosmos-db/documents/collection/mintStage.d.ts +0 -1
- package/dist/cosmos-db/documents/collection/profile.d.ts +2 -3
- package/dist/cosmos-db/documents/collection/stats.d.ts +0 -1
- package/dist/cosmos-db/documents/lending/lending-nft-attributes.d.ts +0 -1
- package/dist/cosmos-db/documents/lending/lending-token-emode-profile.doc.d.ts +0 -1
- package/dist/cosmos-db/documents/token/nft-details.doc.d.ts +3 -4
- package/dist/cosmos-db/documents/token/nft-metadata-attributes.d.ts +0 -1
- package/dist/cosmos-db/documents/token/token-data.enum.d.ts +1 -1
- package/dist/cosmos-db/documents/token/token-data.enum.js +1 -1
- package/dist/cosmos-db/documents/user/user-creator-profile.doc.d.ts +2 -2
- package/dist/cosmos-db/documents/user/user-creator-profile.doc.js +2 -1
- package/dist/cosmos-db/documents/user/user-deposit.d.ts +0 -1
- package/dist/entities/auth/auth-strategy.enum.d.ts +4 -0
- package/dist/entities/auth/auth-strategy.enum.js +8 -0
- package/dist/entities/auth/login-request.dto.d.ts +8 -0
- package/dist/entities/auth/login-request.dto.js +52 -0
- package/dist/entities/auth/role.enum.d.ts +10 -0
- package/dist/entities/auth/role.enum.js +14 -0
- package/dist/entities/token-data/fiat-tokens.enum.d.ts +10 -0
- package/dist/entities/token-data/fiat-tokens.enum.js +10 -0
- package/dist/entities/token-data/known-mvx-tokens.enum.d.ts +34 -0
- package/dist/entities/token-data/known-mvx-tokens.enum.js +32 -0
- package/dist/entities/token-data/metrics.d.ts +46 -0
- package/dist/entities/token-data/metrics.js +177 -0
- package/dist/entities/token-data/query-prices.enum.d.ts +44 -0
- package/dist/entities/token-data/query-prices.enum.js +34 -0
- package/dist/entities/token-data/token-category.enum.d.ts +9 -0
- package/dist/entities/token-data/token-category.enum.js +13 -0
- package/dist/entities/token-data/token-data.doc.d.ts +16 -0
- package/dist/entities/token-data/token-data.doc.js +10 -0
- package/dist/entities/web2user-data/linked-account-type.enum.d.ts +6 -0
- package/dist/entities/web2user-data/linked-account-type.enum.js +10 -0
- package/dist/entities/web2user-data/native-wallet.dto.d.ts +6 -0
- package/dist/entities/web2user-data/native-wallet.dto.js +50 -0
- package/dist/entities/web2user-data/switch-wallet-dto.d.ts +3 -0
- package/dist/entities/web2user-data/switch-wallet-dto.js +22 -0
- package/dist/entities/web2user-data/wallet-client-type.enum.d.ts +11 -0
- package/dist/entities/web2user-data/wallet-client-type.enum.js +15 -0
- package/dist/entities/web2user-data/web2user-account.d.ts +10 -0
- package/dist/entities/web2user-data/web2user-account.dto.d.ts +8 -0
- package/dist/entities/web2user-data/web2user-account.dto.js +50 -0
- package/dist/entities/web2user-data/web2user-account.js +69 -0
- package/dist/entities/web2user-data/web2user-shards.dto.d.ts +3 -0
- package/dist/entities/web2user-data/web2user-shards.dto.js +24 -0
- package/dist/entities/web2user-data/web2user-wallet.d.ts +13 -0
- package/dist/entities/web2user-data/web2user-wallet.dto.d.ts +12 -0
- package/dist/entities/web2user-data/web2user-wallet.dto.js +71 -0
- package/dist/entities/web2user-data/web2user-wallet.js +77 -0
- package/dist/entities/web2user-data/web2user.doc.d.ts +17 -0
- package/dist/entities/web2user-data/web2user.doc.js +100 -0
- package/dist/index.d.ts +0 -1
- 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,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,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,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,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,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,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,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;
|