@xoxno/types 1.0.117 → 1.0.118
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/entities/token-data/token-data.doc.d.ts +16 -1
- package/dist/entities/token-data/token-data.doc.js +49 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/requests/user-data/token-inventory.d.ts +2 -27
- package/dist/requests/user-data/token-inventory.js +3 -74
- package/package.json +1 -1
- package/dist/entities/token-data/token.dto.d.ts +0 -15
- package/dist/entities/token-data/token.dto.js +0 -96
|
@@ -14,6 +14,21 @@ export declare class TokenDataDoc {
|
|
|
14
14
|
constructor(props?: Partial<TokenDataDoc>);
|
|
15
15
|
}
|
|
16
16
|
export declare class TokenDataDocHydrated extends TokenDataDoc {
|
|
17
|
-
isAshSupported: boolean;
|
|
18
17
|
usdPrice: number;
|
|
18
|
+
isAshSupported: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare class SuiCoinObjectDto {
|
|
21
|
+
objectId: string;
|
|
22
|
+
balance: string;
|
|
23
|
+
digest: string;
|
|
24
|
+
version: string;
|
|
25
|
+
}
|
|
26
|
+
export declare class TokenDataDocWithBalance extends TokenDataDocHydrated {
|
|
27
|
+
nonce: number;
|
|
28
|
+
balance: string;
|
|
29
|
+
shortBalance: number;
|
|
30
|
+
usdValue: number;
|
|
31
|
+
egldValue: number;
|
|
32
|
+
weight: number;
|
|
33
|
+
objects?: SuiCoinObjectDto[];
|
|
19
34
|
}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
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
|
+
};
|
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TokenDataDocHydrated = exports.TokenDataDoc = void 0;
|
|
12
|
+
exports.TokenDataDocWithBalance = exports.SuiCoinObjectDto = exports.TokenDataDocHydrated = exports.TokenDataDoc = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
4
14
|
class TokenDataDoc {
|
|
5
15
|
constructor(props) {
|
|
6
16
|
this.category = ['userInventory'];
|
|
@@ -11,3 +21,41 @@ exports.TokenDataDoc = TokenDataDoc;
|
|
|
11
21
|
class TokenDataDocHydrated extends TokenDataDoc {
|
|
12
22
|
}
|
|
13
23
|
exports.TokenDataDocHydrated = TokenDataDocHydrated;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, swagger_1.ApiProperty)({ example: 12.160648172030305 }),
|
|
26
|
+
__metadata("design:type", Number)
|
|
27
|
+
], TokenDataDocHydrated.prototype, "usdPrice", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, swagger_1.ApiProperty)({ example: false }),
|
|
30
|
+
__metadata("design:type", Boolean)
|
|
31
|
+
], TokenDataDocHydrated.prototype, "isAshSupported", void 0);
|
|
32
|
+
class SuiCoinObjectDto {
|
|
33
|
+
}
|
|
34
|
+
exports.SuiCoinObjectDto = SuiCoinObjectDto;
|
|
35
|
+
class TokenDataDocWithBalance extends TokenDataDocHydrated {
|
|
36
|
+
}
|
|
37
|
+
exports.TokenDataDocWithBalance = TokenDataDocWithBalance;
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, swagger_1.ApiProperty)({ example: 0 }),
|
|
40
|
+
__metadata("design:type", Number)
|
|
41
|
+
], TokenDataDocWithBalance.prototype, "nonce", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, swagger_1.ApiProperty)({ example: '514203000000000000000' }),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], TokenDataDocWithBalance.prototype, "balance", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, swagger_1.ApiProperty)({ example: 514.203 }),
|
|
48
|
+
__metadata("design:type", Number)
|
|
49
|
+
], TokenDataDocWithBalance.prototype, "shortBalance", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, swagger_1.ApiProperty)({ example: 6253.041772002499 }),
|
|
52
|
+
__metadata("design:type", Number)
|
|
53
|
+
], TokenDataDocWithBalance.prototype, "usdValue", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, swagger_1.ApiProperty)({ example: 171.32505804164822 }),
|
|
56
|
+
__metadata("design:type", Number)
|
|
57
|
+
], TokenDataDocWithBalance.prototype, "egldValue", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, swagger_1.ApiProperty)({ example: 83.21 }),
|
|
60
|
+
__metadata("design:type", Number)
|
|
61
|
+
], TokenDataDocWithBalance.prototype, "weight", void 0);
|
package/dist/index.d.ts
CHANGED
|
@@ -140,7 +140,6 @@ export * from './entities/staking-data/staking-summary.dto';
|
|
|
140
140
|
export * from './entities/staking-data/user-staking-summary.dto';
|
|
141
141
|
export * from './entities/token-data/metrics';
|
|
142
142
|
export * from './entities/token-data/token-data.doc';
|
|
143
|
-
export * from './entities/token-data/token.dto';
|
|
144
143
|
export * from './entities/token-data/xoxno-liquid-stats.dto';
|
|
145
144
|
export * from './entities/transactions/transaction-create';
|
|
146
145
|
export * from './entities/transactions/transaction-process-status';
|
package/dist/index.js
CHANGED
|
@@ -156,7 +156,6 @@ __exportStar(require("./entities/staking-data/staking-summary.dto"), exports);
|
|
|
156
156
|
__exportStar(require("./entities/staking-data/user-staking-summary.dto"), exports);
|
|
157
157
|
__exportStar(require("./entities/token-data/metrics"), exports);
|
|
158
158
|
__exportStar(require("./entities/token-data/token-data.doc"), exports);
|
|
159
|
-
__exportStar(require("./entities/token-data/token.dto"), exports);
|
|
160
159
|
__exportStar(require("./entities/token-data/xoxno-liquid-stats.dto"), exports);
|
|
161
160
|
__exportStar(require("./entities/transactions/transaction-create"), exports);
|
|
162
161
|
__exportStar(require("./entities/transactions/transaction-process-status"), exports);
|
|
@@ -1,30 +1,5 @@
|
|
|
1
1
|
import { ActivityChain } from '../../enums/common.enum';
|
|
2
|
-
|
|
3
|
-
pngUrl: string;
|
|
4
|
-
svgUrl: string;
|
|
5
|
-
}
|
|
6
|
-
export declare class SuiCoinObjectDto {
|
|
7
|
-
objectId: string;
|
|
8
|
-
balance: string;
|
|
9
|
-
digest: string;
|
|
10
|
-
version: string;
|
|
11
|
-
}
|
|
12
|
-
export declare class TokenDto {
|
|
13
|
-
nonce: number;
|
|
14
|
-
identifier: string;
|
|
15
|
-
decimals: number;
|
|
16
|
-
balance: string;
|
|
17
|
-
ticker: string;
|
|
18
|
-
name: string;
|
|
19
|
-
shortBalance: number;
|
|
20
|
-
usdPrice: number;
|
|
21
|
-
usdValue: number;
|
|
22
|
-
egldValue: number;
|
|
23
|
-
assets: TokenAssetsDto;
|
|
24
|
-
isAshSupported: boolean;
|
|
25
|
-
weight: number;
|
|
26
|
-
objects?: SuiCoinObjectDto[];
|
|
27
|
-
}
|
|
2
|
+
import { TokenDataDocWithBalance } from '../../entities/token-data/token-data.doc';
|
|
28
3
|
declare class WalletDto {
|
|
29
4
|
usdValue: number;
|
|
30
5
|
egldValue: number;
|
|
@@ -44,7 +19,7 @@ export declare class UserTokenInventoryResponseDto {
|
|
|
44
19
|
wallet: WalletDto;
|
|
45
20
|
esdts: EsdtsDto;
|
|
46
21
|
stables: StablesDto;
|
|
47
|
-
tokens:
|
|
22
|
+
tokens: TokenDataDocWithBalance[];
|
|
48
23
|
chain: ActivityChain;
|
|
49
24
|
}
|
|
50
25
|
export {};
|
|
@@ -9,81 +9,10 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.UserTokenInventoryResponseDto =
|
|
12
|
+
exports.UserTokenInventoryResponseDto = void 0;
|
|
13
13
|
// DTO Type
|
|
14
14
|
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
__decorate([
|
|
18
|
-
(0, swagger_1.ApiProperty)({
|
|
19
|
-
example: 'https://media.xoxno.com/tokens/TIME-84518f/logo.png',
|
|
20
|
-
}),
|
|
21
|
-
__metadata("design:type", String)
|
|
22
|
-
], TokenAssetsDto.prototype, "pngUrl", void 0);
|
|
23
|
-
__decorate([
|
|
24
|
-
(0, swagger_1.ApiProperty)({
|
|
25
|
-
example: 'https://media.xoxno.com/tokens/TIME-84518f/logo.svg',
|
|
26
|
-
}),
|
|
27
|
-
__metadata("design:type", String)
|
|
28
|
-
], TokenAssetsDto.prototype, "svgUrl", void 0);
|
|
29
|
-
class SuiCoinObjectDto {
|
|
30
|
-
}
|
|
31
|
-
exports.SuiCoinObjectDto = SuiCoinObjectDto;
|
|
32
|
-
class TokenDto {
|
|
33
|
-
}
|
|
34
|
-
exports.TokenDto = TokenDto;
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, swagger_1.ApiProperty)({ example: 0 }),
|
|
37
|
-
__metadata("design:type", Number)
|
|
38
|
-
], TokenDto.prototype, "nonce", void 0);
|
|
39
|
-
__decorate([
|
|
40
|
-
(0, swagger_1.ApiProperty)({ example: 'TIME-84518f' }),
|
|
41
|
-
__metadata("design:type", String)
|
|
42
|
-
], TokenDto.prototype, "identifier", void 0);
|
|
43
|
-
__decorate([
|
|
44
|
-
(0, swagger_1.ApiProperty)({ example: 18 }),
|
|
45
|
-
__metadata("design:type", Number)
|
|
46
|
-
], TokenDto.prototype, "decimals", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
(0, swagger_1.ApiProperty)({ example: '514203000000000000000' }),
|
|
49
|
-
__metadata("design:type", String)
|
|
50
|
-
], TokenDto.prototype, "balance", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
(0, swagger_1.ApiProperty)({ example: 'TIME' }),
|
|
53
|
-
__metadata("design:type", String)
|
|
54
|
-
], TokenDto.prototype, "ticker", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
(0, swagger_1.ApiProperty)({ example: 'TIME' }),
|
|
57
|
-
__metadata("design:type", String)
|
|
58
|
-
], TokenDto.prototype, "name", void 0);
|
|
59
|
-
__decorate([
|
|
60
|
-
(0, swagger_1.ApiProperty)({ example: 514.203 }),
|
|
61
|
-
__metadata("design:type", Number)
|
|
62
|
-
], TokenDto.prototype, "shortBalance", void 0);
|
|
63
|
-
__decorate([
|
|
64
|
-
(0, swagger_1.ApiProperty)({ example: 12.160648172030305 }),
|
|
65
|
-
__metadata("design:type", Number)
|
|
66
|
-
], TokenDto.prototype, "usdPrice", void 0);
|
|
67
|
-
__decorate([
|
|
68
|
-
(0, swagger_1.ApiProperty)({ example: 6253.041772002499 }),
|
|
69
|
-
__metadata("design:type", Number)
|
|
70
|
-
], TokenDto.prototype, "usdValue", void 0);
|
|
71
|
-
__decorate([
|
|
72
|
-
(0, swagger_1.ApiProperty)({ example: 171.32505804164822 }),
|
|
73
|
-
__metadata("design:type", Number)
|
|
74
|
-
], TokenDto.prototype, "egldValue", void 0);
|
|
75
|
-
__decorate([
|
|
76
|
-
(0, swagger_1.ApiProperty)({ type: TokenAssetsDto }),
|
|
77
|
-
__metadata("design:type", TokenAssetsDto)
|
|
78
|
-
], TokenDto.prototype, "assets", void 0);
|
|
79
|
-
__decorate([
|
|
80
|
-
(0, swagger_1.ApiProperty)({ example: false }),
|
|
81
|
-
__metadata("design:type", Boolean)
|
|
82
|
-
], TokenDto.prototype, "isAshSupported", void 0);
|
|
83
|
-
__decorate([
|
|
84
|
-
(0, swagger_1.ApiProperty)({ example: 83.21 }),
|
|
85
|
-
__metadata("design:type", Number)
|
|
86
|
-
], TokenDto.prototype, "weight", void 0);
|
|
15
|
+
const token_data_doc_1 = require("../../entities/token-data/token-data.doc");
|
|
87
16
|
class WalletDto {
|
|
88
17
|
}
|
|
89
18
|
__decorate([
|
|
@@ -142,6 +71,6 @@ __decorate([
|
|
|
142
71
|
__metadata("design:type", StablesDto)
|
|
143
72
|
], UserTokenInventoryResponseDto.prototype, "stables", void 0);
|
|
144
73
|
__decorate([
|
|
145
|
-
(0, swagger_1.ApiProperty)({ type:
|
|
74
|
+
(0, swagger_1.ApiProperty)({ type: token_data_doc_1.TokenDataDocWithBalance, isArray: true }),
|
|
146
75
|
__metadata("design:type", Array)
|
|
147
76
|
], UserTokenInventoryResponseDto.prototype, "tokens", void 0);
|
package/package.json
CHANGED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare class TokenDocDto {
|
|
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
|
-
}
|
|
@@ -1,96 +0,0 @@
|
|
|
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.TokenDocDto = void 0;
|
|
13
|
-
// file: dtos/token.dto.ts
|
|
14
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
-
class TokenDocDto {
|
|
16
|
-
}
|
|
17
|
-
exports.TokenDocDto = TokenDocDto;
|
|
18
|
-
__decorate([
|
|
19
|
-
(0, swagger_1.ApiProperty)({
|
|
20
|
-
description: 'ID of the token',
|
|
21
|
-
example: 'EGLD',
|
|
22
|
-
required: false,
|
|
23
|
-
}),
|
|
24
|
-
__metadata("design:type", String)
|
|
25
|
-
], TokenDocDto.prototype, "id", void 0);
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, swagger_1.ApiProperty)({ description: 'Identifier of the token', example: 'EGLD' }),
|
|
28
|
-
__metadata("design:type", String)
|
|
29
|
-
], TokenDocDto.prototype, "identifier", void 0);
|
|
30
|
-
__decorate([
|
|
31
|
-
(0, swagger_1.ApiProperty)({
|
|
32
|
-
description: 'Collection of the token',
|
|
33
|
-
example: 'FungibleTokenInfo',
|
|
34
|
-
required: false,
|
|
35
|
-
}),
|
|
36
|
-
__metadata("design:type", String)
|
|
37
|
-
], TokenDocDto.prototype, "collection", void 0);
|
|
38
|
-
__decorate([
|
|
39
|
-
(0, swagger_1.ApiProperty)({
|
|
40
|
-
description: 'Data type of the token',
|
|
41
|
-
example: 'fungibleTokenProfile',
|
|
42
|
-
}),
|
|
43
|
-
__metadata("design:type", String)
|
|
44
|
-
], TokenDocDto.prototype, "dataType", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
(0, swagger_1.ApiProperty)({ description: 'Decimals of the token', example: 18 }),
|
|
47
|
-
__metadata("design:type", Number)
|
|
48
|
-
], TokenDocDto.prototype, "decimals", void 0);
|
|
49
|
-
__decorate([
|
|
50
|
-
(0, swagger_1.ApiProperty)({ description: 'Name of the token', example: 'EGLD' }),
|
|
51
|
-
__metadata("design:type", String)
|
|
52
|
-
], TokenDocDto.prototype, "name", void 0);
|
|
53
|
-
__decorate([
|
|
54
|
-
(0, swagger_1.ApiProperty)({ description: 'Type of the token', example: 'FungibleESDT' }),
|
|
55
|
-
__metadata("design:type", String)
|
|
56
|
-
], TokenDocDto.prototype, "type", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
(0, swagger_1.ApiProperty)({
|
|
59
|
-
description: 'Categories of the token',
|
|
60
|
-
example: ['all', 'trade', 'staking', 'minting', 'p2p'],
|
|
61
|
-
}),
|
|
62
|
-
__metadata("design:type", Array)
|
|
63
|
-
], TokenDocDto.prototype, "category", void 0);
|
|
64
|
-
__decorate([
|
|
65
|
-
(0, swagger_1.ApiProperty)({
|
|
66
|
-
description: 'SVG URL of the token logo',
|
|
67
|
-
example: 'https://media.xoxno.com/tokens/EGLD/logo.svg',
|
|
68
|
-
}),
|
|
69
|
-
__metadata("design:type", String)
|
|
70
|
-
], TokenDocDto.prototype, "svgUrl", void 0);
|
|
71
|
-
__decorate([
|
|
72
|
-
(0, swagger_1.ApiProperty)({
|
|
73
|
-
description: 'PNG URL of the token logo',
|
|
74
|
-
example: 'https://media.xoxno.com/tokens/EGLD/logo.png',
|
|
75
|
-
}),
|
|
76
|
-
__metadata("design:type", String)
|
|
77
|
-
], TokenDocDto.prototype, "pngUrl", void 0);
|
|
78
|
-
__decorate([
|
|
79
|
-
(0, swagger_1.ApiProperty)({ description: 'Ticker of the token', example: 'EGLD' }),
|
|
80
|
-
__metadata("design:type", String)
|
|
81
|
-
], TokenDocDto.prototype, "ticker", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
(0, swagger_1.ApiProperty)({
|
|
84
|
-
description: 'Timestamp',
|
|
85
|
-
example: 1705933418,
|
|
86
|
-
required: false,
|
|
87
|
-
}),
|
|
88
|
-
__metadata("design:type", Number)
|
|
89
|
-
], TokenDocDto.prototype, "_ts", void 0);
|
|
90
|
-
__decorate([
|
|
91
|
-
(0, swagger_1.ApiProperty)({
|
|
92
|
-
description: 'USD price of the token',
|
|
93
|
-
example: 35.70543073773239,
|
|
94
|
-
}),
|
|
95
|
-
__metadata("design:type", Number)
|
|
96
|
-
], TokenDocDto.prototype, "usdPrice", void 0);
|