@xoxno/types 1.0.281 → 1.0.282

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.
@@ -1,3 +1,4 @@
1
+ import { ActivePerpAssetCtxHydrated, ActiveSpotAssetCtx } from './response';
1
2
  export declare class PerpConfig {
2
3
  sigFigs: number;
3
4
  mantissa: number;
@@ -7,13 +8,32 @@ export declare class PerpSingleCoin {
7
8
  decimals: number;
8
9
  symbol: string;
9
10
  }
10
- export declare class PerpBalance extends PerpSingleCoin {
11
- balance: string;
12
- }
13
11
  export declare class PerpCoin {
14
12
  symbol: string;
15
13
  coin: PerpSingleCoin;
16
14
  againstCoin: PerpSingleCoin;
17
- price: number;
18
15
  config: PerpConfig[];
19
16
  }
17
+ export declare class PerpCoinExtended extends PerpCoin {
18
+ ctx: ActivePerpAssetCtxHydrated;
19
+ }
20
+ export declare class PerpSpotCoinExtended extends PerpCoin {
21
+ ctx: ActiveSpotAssetCtx;
22
+ }
23
+ declare type PerpCoinExtendedSlim_base = Pick<PerpCoin, "symbol">;
24
+ export declare type PerpCoinExtendedSlim = PerpCoinExtendedSlim_base & {
25
+ ctx: Pick<ActivePerpAssetCtxHydrated, 'maxLeverage' | 'midPx' | 'markPx' | 'prevDayPx' | 'funding' | 'dayNtlVlm' | 'openInterest'>;
26
+ };
27
+ declare const PerpCoinExtendedSlimNest_base: import("@nestjs/common").Type<Pick<PerpCoin, "symbol">>;
28
+ export declare class PerpCoinExtendedSlimNest extends PerpCoinExtendedSlimNest_base {
29
+ ctx: Pick<ActivePerpAssetCtxHydrated, 'maxLeverage' | 'midPx' | 'markPx' | 'prevDayPx' | 'funding' | 'dayNtlVlm' | 'openInterest'>;
30
+ }
31
+ declare type PerpSpotCoinExtendedSlim_base = Pick<PerpCoin, "symbol">;
32
+ export declare type PerpSpotCoinExtendedSlim = PerpSpotCoinExtendedSlim_base & {
33
+ ctx: Pick<ActiveSpotAssetCtx, 'midPx' | 'markPx' | 'prevDayPx' | 'dayNtlVlm' | 'circulatingSupply'>;
34
+ };
35
+ declare const PerpSpotCoinExtendedSlimNest_base: import("@nestjs/common").Type<Pick<PerpCoin, "symbol">>;
36
+ export declare class PerpSpotCoinExtendedSlimNest extends PerpSpotCoinExtendedSlimNest_base {
37
+ ctx: Pick<ActiveSpotAssetCtx, 'midPx' | 'markPx' | 'prevDayPx' | 'dayNtlVlm' | 'circulatingSupply'>;
38
+ }
39
+ export {};
@@ -9,7 +9,7 @@ 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.PerpCoin = exports.PerpBalance = exports.PerpSingleCoin = exports.PerpConfig = void 0;
12
+ exports.PerpSpotCoinExtendedSlim = exports.PerpCoinExtendedSlim = exports.PerpSpotCoinExtended = exports.PerpCoinExtended = exports.PerpCoin = exports.PerpSingleCoin = exports.PerpConfig = void 0;
13
13
  const swagger_1 = require("@nestjs/swagger");
14
14
  class PerpConfig {
15
15
  }
@@ -37,13 +37,6 @@ __decorate([
37
37
  (0, swagger_1.ApiProperty)(),
38
38
  __metadata("design:type", String)
39
39
  ], PerpSingleCoin.prototype, "symbol", void 0);
40
- class PerpBalance extends PerpSingleCoin {
41
- }
42
- exports.PerpBalance = PerpBalance;
43
- __decorate([
44
- (0, swagger_1.ApiProperty)(),
45
- __metadata("design:type", String)
46
- ], PerpBalance.prototype, "balance", void 0);
47
40
  class PerpCoin {
48
41
  }
49
42
  exports.PerpCoin = PerpCoin;
@@ -59,11 +52,27 @@ __decorate([
59
52
  (0, swagger_1.ApiProperty)(),
60
53
  __metadata("design:type", PerpSingleCoin)
61
54
  ], PerpCoin.prototype, "againstCoin", void 0);
62
- __decorate([
63
- (0, swagger_1.ApiProperty)(),
64
- __metadata("design:type", Number)
65
- ], PerpCoin.prototype, "price", void 0);
66
55
  __decorate([
67
56
  (0, swagger_1.ApiProperty)(),
68
57
  __metadata("design:type", Array)
69
58
  ], PerpCoin.prototype, "config", void 0);
59
+ class PerpCoinExtended extends PerpCoin {
60
+ }
61
+ exports.PerpCoinExtended = PerpCoinExtended;
62
+ class PerpSpotCoinExtended extends PerpCoin {
63
+ }
64
+ exports.PerpSpotCoinExtended = PerpSpotCoinExtended;
65
+ class PerpCoinExtendedSlim extends (0, swagger_1.PickType)(PerpCoin, [
66
+ 'symbol',
67
+ ]) {
68
+ }
69
+ exports.PerpCoinExtendedSlim = PerpCoinExtendedSlim;
70
+ class PerpSpotCoinExtendedSlim extends (0, swagger_1.PickType)(PerpCoin, [
71
+ 'symbol',
72
+ ]) {
73
+ }
74
+ exports.PerpSpotCoinExtendedSlim = PerpSpotCoinExtendedSlim;
75
+
76
+ exports.PerpCoinExtendedSlimNest = PerpCoinExtendedSlim;
77
+
78
+ exports.PerpSpotCoinExtendedSlimNest = PerpSpotCoinExtendedSlim;
@@ -0,0 +1,9 @@
1
+ export declare class MarginTier {
2
+ lowerBound: string;
3
+ maxLeverage: number;
4
+ }
5
+ export declare class MarginTable {
6
+ id: number;
7
+ description: string;
8
+ marginTiers: MarginTier[];
9
+ }
@@ -0,0 +1,39 @@
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.MarginTable = exports.MarginTier = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ class MarginTier {
15
+ }
16
+ exports.MarginTier = MarginTier;
17
+ __decorate([
18
+ (0, swagger_1.ApiProperty)(),
19
+ __metadata("design:type", String)
20
+ ], MarginTier.prototype, "lowerBound", void 0);
21
+ __decorate([
22
+ (0, swagger_1.ApiProperty)(),
23
+ __metadata("design:type", Number)
24
+ ], MarginTier.prototype, "maxLeverage", void 0);
25
+ class MarginTable {
26
+ }
27
+ exports.MarginTable = MarginTable;
28
+ __decorate([
29
+ (0, swagger_1.ApiProperty)(),
30
+ __metadata("design:type", Number)
31
+ ], MarginTable.prototype, "id", void 0);
32
+ __decorate([
33
+ (0, swagger_1.ApiProperty)(),
34
+ __metadata("design:type", String)
35
+ ], MarginTable.prototype, "description", void 0);
36
+ __decorate([
37
+ (0, swagger_1.ApiProperty)(),
38
+ __metadata("design:type", Array)
39
+ ], MarginTable.prototype, "marginTiers", void 0);
@@ -17,6 +17,12 @@ export declare class ActiveAssetPerpEvent {
17
17
  type: PerpEnum.ASSET_CTX;
18
18
  symbol: string;
19
19
  }
20
+ export declare class ActiveSpotAssetsPerpEvent {
21
+ type: PerpEnum.SPOT_ASSET_CTXS;
22
+ }
23
+ export declare class ActiveAssetsPerpEvent {
24
+ type: PerpEnum.ASSET_CTXS;
25
+ }
20
26
  export declare class PerpEvent {
21
- event: L2BookPerpEvent | TradesPerpEvent | ActiveSpotAssetPerpEvent | ActiveAssetPerpEvent;
27
+ event: L2BookPerpEvent | TradesPerpEvent | ActiveSpotAssetPerpEvent | ActiveAssetPerpEvent | ActiveSpotAssetsPerpEvent | ActiveAssetsPerpEvent;
22
28
  }
@@ -9,7 +9,7 @@ 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.PerpEvent = exports.ActiveAssetPerpEvent = exports.ActiveSpotAssetPerpEvent = exports.TradesPerpEvent = exports.L2BookPerpEvent = void 0;
12
+ exports.PerpEvent = exports.ActiveAssetsPerpEvent = exports.ActiveSpotAssetsPerpEvent = exports.ActiveAssetPerpEvent = exports.ActiveSpotAssetPerpEvent = exports.TradesPerpEvent = exports.L2BookPerpEvent = void 0;
13
13
  const swagger_1 = require("@nestjs/swagger");
14
14
  const perp_enum_1 = require("../../enums/perp.enum");
15
15
  class L2BookPerpEvent {
@@ -67,6 +67,20 @@ __decorate([
67
67
  (0, swagger_1.ApiProperty)(),
68
68
  __metadata("design:type", String)
69
69
  ], ActiveAssetPerpEvent.prototype, "symbol", void 0);
70
+ class ActiveSpotAssetsPerpEvent {
71
+ }
72
+ exports.ActiveSpotAssetsPerpEvent = ActiveSpotAssetsPerpEvent;
73
+ __decorate([
74
+ (0, swagger_1.ApiProperty)(),
75
+ __metadata("design:type", String)
76
+ ], ActiveSpotAssetsPerpEvent.prototype, "type", void 0);
77
+ class ActiveAssetsPerpEvent {
78
+ }
79
+ exports.ActiveAssetsPerpEvent = ActiveAssetsPerpEvent;
80
+ __decorate([
81
+ (0, swagger_1.ApiProperty)(),
82
+ __metadata("design:type", String)
83
+ ], ActiveAssetsPerpEvent.prototype, "type", void 0);
70
84
  let PerpEvent = class PerpEvent {
71
85
  };
72
86
  exports.PerpEvent = PerpEvent;
@@ -77,10 +91,12 @@ __decorate([
77
91
  { $ref: (0, swagger_1.getSchemaPath)(TradesPerpEvent) },
78
92
  { $ref: (0, swagger_1.getSchemaPath)(ActiveSpotAssetPerpEvent) },
79
93
  { $ref: (0, swagger_1.getSchemaPath)(ActiveAssetPerpEvent) },
94
+ { $ref: (0, swagger_1.getSchemaPath)(ActiveSpotAssetsPerpEvent) },
95
+ { $ref: (0, swagger_1.getSchemaPath)(ActiveAssetsPerpEvent) },
80
96
  ],
81
97
  }),
82
98
  __metadata("design:type", Object)
83
99
  ], PerpEvent.prototype, "event", void 0);
84
100
  exports.PerpEvent = PerpEvent = __decorate([
85
- (0, swagger_1.ApiExtraModels)(L2BookPerpEvent, TradesPerpEvent, ActiveSpotAssetPerpEvent, ActiveAssetPerpEvent)
101
+ (0, swagger_1.ApiExtraModels)(L2BookPerpEvent, TradesPerpEvent, ActiveSpotAssetPerpEvent, ActiveAssetPerpEvent, ActiveSpotAssetsPerpEvent, ActiveAssetsPerpEvent)
86
102
  ], PerpEvent);
@@ -1,5 +1,7 @@
1
1
  import { PerpTradesSide } from '../../enums/perp.enum';
2
- import { ActiveAssetPerpEvent, ActiveSpotAssetPerpEvent, L2BookPerpEvent, TradesPerpEvent } from './request';
2
+ import { ActiveAssetPerpEvent, ActiveAssetsPerpEvent, ActiveSpotAssetPerpEvent, ActiveSpotAssetsPerpEvent, L2BookPerpEvent, TradesPerpEvent } from './request';
3
+ import { PerpCoinExtendedSlim, PerpSpotCoinExtendedSlim } from './coins';
4
+ import { MarginTable } from './margin-table';
3
5
  export declare class L2BookPerpResponseSingle {
4
6
  px: string;
5
7
  sz: string;
@@ -39,12 +41,31 @@ export declare class ActivePerpAssetCtx extends AssetCtxCommon {
39
41
  oraclePx: string;
40
42
  impactTxs: string[];
41
43
  }
44
+ export declare class ActivePerpAssetCtxFull extends ActivePerpAssetCtx {
45
+ maxLeverage: number;
46
+ marginTableId: number;
47
+ }
48
+ declare type ActivePerpAssetCtxHydrated_base = Omit<ActivePerpAssetCtxFull, "marginTableId">;
49
+ export declare type ActivePerpAssetCtxHydrated = ActivePerpAssetCtxHydrated_base & {
50
+ marginTable: MarginTable;
51
+ };
52
+ declare const ActivePerpAssetCtxHydratedNest_base: import("@nestjs/common").Type<Omit<ActivePerpAssetCtxFull, "marginTableId">>;
53
+ export declare class ActivePerpAssetCtxHydratedNest extends ActivePerpAssetCtxHydratedNest_base {
54
+ marginTable: MarginTable;
55
+ }
42
56
  export declare class ActiveSpotAssetPerpResponse extends ActiveSpotAssetPerpEvent {
43
57
  ctx: ActiveSpotAssetCtx;
44
58
  }
45
59
  export declare class ActiveAssetPerpResponse extends ActiveAssetPerpEvent {
46
60
  ctx: ActivePerpAssetCtx;
47
61
  }
62
+ export declare class ActiveSpotAssetsPerpResponse extends ActiveSpotAssetsPerpEvent {
63
+ tokens: PerpSpotCoinExtendedSlim[];
64
+ }
65
+ export declare class ActiveAssetsPerpResponse extends ActiveAssetsPerpEvent {
66
+ tokens: PerpCoinExtendedSlim[];
67
+ }
48
68
  export declare class PerpResponse {
49
69
  event: L2BookPerpResponse | TradesPerpResponse | ActiveSpotAssetPerpResponse | ActiveAssetPerpResponse;
50
70
  }
71
+ export {};
@@ -9,7 +9,7 @@ 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.PerpResponse = exports.ActiveAssetPerpResponse = exports.ActiveSpotAssetPerpResponse = exports.ActivePerpAssetCtx = exports.ActiveSpotAssetCtx = exports.AssetCtxCommon = exports.TradesPerpResponse = exports.TradesPerpResponseSingle = exports.L2BookPerpResponse = exports.L2BookPerpResponseSingle = void 0;
12
+ exports.PerpResponse = exports.ActiveAssetsPerpResponse = exports.ActiveSpotAssetsPerpResponse = exports.ActiveAssetPerpResponse = exports.ActiveSpotAssetPerpResponse = exports.ActivePerpAssetCtxHydrated = exports.ActivePerpAssetCtxFull = exports.ActivePerpAssetCtx = exports.ActiveSpotAssetCtx = exports.AssetCtxCommon = exports.TradesPerpResponse = exports.TradesPerpResponseSingle = exports.L2BookPerpResponse = exports.L2BookPerpResponseSingle = void 0;
13
13
  const swagger_1 = require("@nestjs/swagger");
14
14
  const perp_enum_1 = require("../../enums/perp.enum");
15
15
  const request_1 = require("./request");
@@ -134,6 +134,20 @@ __decorate([
134
134
  (0, swagger_1.ApiProperty)(),
135
135
  __metadata("design:type", Array)
136
136
  ], ActivePerpAssetCtx.prototype, "impactTxs", void 0);
137
+ class ActivePerpAssetCtxFull extends ActivePerpAssetCtx {
138
+ }
139
+ exports.ActivePerpAssetCtxFull = ActivePerpAssetCtxFull;
140
+ __decorate([
141
+ (0, swagger_1.ApiProperty)(),
142
+ __metadata("design:type", Number)
143
+ ], ActivePerpAssetCtxFull.prototype, "maxLeverage", void 0);
144
+ __decorate([
145
+ (0, swagger_1.ApiProperty)(),
146
+ __metadata("design:type", Number)
147
+ ], ActivePerpAssetCtxFull.prototype, "marginTableId", void 0);
148
+ class ActivePerpAssetCtxHydrated extends (0, swagger_1.OmitType)(ActivePerpAssetCtxFull, ['marginTableId']) {
149
+ }
150
+ exports.ActivePerpAssetCtxHydrated = ActivePerpAssetCtxHydrated;
137
151
  class ActiveSpotAssetPerpResponse extends request_1.ActiveSpotAssetPerpEvent {
138
152
  }
139
153
  exports.ActiveSpotAssetPerpResponse = ActiveSpotAssetPerpResponse;
@@ -148,6 +162,20 @@ __decorate([
148
162
  (0, swagger_1.ApiProperty)(),
149
163
  __metadata("design:type", ActivePerpAssetCtx)
150
164
  ], ActiveAssetPerpResponse.prototype, "ctx", void 0);
165
+ class ActiveSpotAssetsPerpResponse extends request_1.ActiveSpotAssetsPerpEvent {
166
+ }
167
+ exports.ActiveSpotAssetsPerpResponse = ActiveSpotAssetsPerpResponse;
168
+ __decorate([
169
+ (0, swagger_1.ApiProperty)(),
170
+ __metadata("design:type", Array)
171
+ ], ActiveSpotAssetsPerpResponse.prototype, "tokens", void 0);
172
+ class ActiveAssetsPerpResponse extends request_1.ActiveAssetsPerpEvent {
173
+ }
174
+ exports.ActiveAssetsPerpResponse = ActiveAssetsPerpResponse;
175
+ __decorate([
176
+ (0, swagger_1.ApiProperty)(),
177
+ __metadata("design:type", Array)
178
+ ], ActiveAssetsPerpResponse.prototype, "tokens", void 0);
151
179
  let PerpResponse = class PerpResponse {
152
180
  };
153
181
  exports.PerpResponse = PerpResponse;
@@ -165,3 +193,5 @@ __decorate([
165
193
  exports.PerpResponse = PerpResponse = __decorate([
166
194
  (0, swagger_1.ApiExtraModels)(L2BookPerpResponse, TradesPerpResponse, ActiveSpotAssetPerpResponse, ActiveAssetPerpResponse)
167
195
  ], PerpResponse);
196
+
197
+ exports.ActivePerpAssetCtxHydratedNest = ActivePerpAssetCtxHydrated;
@@ -2,7 +2,9 @@ export declare enum PerpEnum {
2
2
  L2BOOK = "l2Book",
3
3
  TRADES = "trades",
4
4
  SPOT_ASSET_CTX = "activeSpotAssetCtx",
5
- ASSET_CTX = "activeAssetCtx"
5
+ ASSET_CTX = "activeAssetCtx",
6
+ SPOT_ASSET_CTXS = "activeSpotAssetCtxs",
7
+ ASSET_CTXS = "activeAssetCtxs"
6
8
  }
7
9
  export declare enum PerpTradesSide {
8
10
  A = "A",
@@ -7,6 +7,8 @@ var PerpEnum;
7
7
  PerpEnum["TRADES"] = "trades";
8
8
  PerpEnum["SPOT_ASSET_CTX"] = "activeSpotAssetCtx";
9
9
  PerpEnum["ASSET_CTX"] = "activeAssetCtx";
10
+ PerpEnum["SPOT_ASSET_CTXS"] = "activeSpotAssetCtxs";
11
+ PerpEnum["ASSET_CTXS"] = "activeAssetCtxs";
10
12
  })(PerpEnum || (exports.PerpEnum = PerpEnum = {}));
11
13
  var PerpTradesSide;
12
14
  (function (PerpTradesSide) {
package/dist/index.d.ts CHANGED
@@ -131,6 +131,7 @@ export * from './entities/notification-data/notification-template';
131
131
  export * from './entities/notification-data/push-notification.doc';
132
132
  export * from './entities/notification-data/tag-priority';
133
133
  export * from './entities/perp/coins';
134
+ export * from './entities/perp/margin-table';
134
135
  export * from './entities/perp/request';
135
136
  export * from './entities/perp/response';
136
137
  export * from './entities/search-data/collection-data-search.type';
package/dist/index.js CHANGED
@@ -147,6 +147,7 @@ __exportStar(require("./entities/notification-data/notification-template"), expo
147
147
  __exportStar(require("./entities/notification-data/push-notification.doc"), exports);
148
148
  __exportStar(require("./entities/notification-data/tag-priority"), exports);
149
149
  __exportStar(require("./entities/perp/coins"), exports);
150
+ __exportStar(require("./entities/perp/margin-table"), exports);
150
151
  __exportStar(require("./entities/perp/request"), exports);
151
152
  __exportStar(require("./entities/perp/response"), exports);
152
153
  __exportStar(require("./entities/search-data/collection-data-search.type"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xoxno/types",
3
- "version": "1.0.281",
3
+ "version": "1.0.282",
4
4
  "description": "Shared types and utilities for XOXNO API.",
5
5
  "exports": {
6
6
  ".": {