@syldel/hl-shared-types 0.0.4 → 0.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/README.md CHANGED
@@ -2,8 +2,9 @@
2
2
 
3
3
  Ce package centralise les définitions TypeScript pour l'écosystème **Hyperliquid**. Il sert de source de vérité unique pour les interfaces d'API, les types de la blockchain (L1) et les DTOs de communication entre le Gateway, le Bot de trading et l'application mobile.
4
4
 
5
- <p style="display: flex; justify-content: center; gap: 24px;">
5
+ <p align="center">
6
6
  <a href="https://www.typescriptlang.org/" target="_blank"><img src="https://i.postimg.cc/28V1jRWW/typescript.png" alt="Typescript" height="120" /></a>
7
+ &nbsp;&nbsp;&nbsp;&nbsp;
7
8
  <a href="https://app.hyperliquid.xyz/" target="_blank"><img src="https://i.postimg.cc/prPKc0cg/HL-symbol-mint-green.png" alt="Hyperliquid" height="120" /></a>
8
9
  </p>
9
10
 
@@ -1,5 +1,6 @@
1
1
  export * from './actions/index';
2
2
  export * from './common/index';
3
+ export * from './infos/index';
3
4
  export * from './orders/index';
4
5
  export * from './params/index';
5
6
  export * from './responses/index';
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./actions/index"), exports);
18
18
  __exportStar(require("./common/index"), exports);
19
+ __exportStar(require("./infos/index"), exports);
19
20
  __exportStar(require("./orders/index"), exports);
20
21
  __exportStar(require("./params/index"), exports);
21
22
  __exportStar(require("./responses/index"), exports);
@@ -0,0 +1,22 @@
1
+ import { DecimalString, Timestamp } from '../common';
2
+ /** Intervalles supportés pour les bougies Hyperliquid */
3
+ export type CandleInterval = '1m' | '3m' | '5m' | '15m' | '30m' | '1h' | '2h' | '4h' | '8h' | '12h' | '1d' | '3d' | '1w' | '1M';
4
+ /** Réponse brute d'une bougie (Candle) selon l'API Hyperliquid */
5
+ export interface CandleSnapshot {
6
+ t: Timestamp;
7
+ T: Timestamp;
8
+ s: string;
9
+ i: CandleInterval;
10
+ o: DecimalString;
11
+ c: DecimalString;
12
+ h: DecimalString;
13
+ l: DecimalString;
14
+ v: DecimalString;
15
+ n: number;
16
+ }
17
+ export interface CandleSnapshotRequest {
18
+ coin: string;
19
+ interval: CandleInterval;
20
+ startTime: Timestamp;
21
+ endTime?: Timestamp;
22
+ }
@@ -0,0 +1,2 @@
1
+ export * from './candle.interfaces';
2
+ export * from './portfolio.interfaces';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./candle.interfaces"), exports);
18
+ __exportStar(require("./portfolio.interfaces"), exports);
@@ -0,0 +1,15 @@
1
+ import { DecimalString, Timestamp } from '../common';
2
+ /** Un point de donnée : [Timestamp, Valeur] */
3
+ export type PortfolioPoint = [Timestamp, DecimalString];
4
+ /** Données de portfolio pour une période donnée */
5
+ export interface PortfolioStats {
6
+ accountValueHistory: PortfolioPoint[];
7
+ pnlHistory: PortfolioPoint[];
8
+ vlm: DecimalString;
9
+ }
10
+ /** Labels de périodes supportés par Hyperliquid */
11
+ export type PortfolioPeriod = 'day' | 'week' | 'month' | 'allTime' | 'perpDay' | 'perpWeek' | 'perpMonth' | 'perpAllTime';
12
+ /** * La réponse est un tableau de tuples : [Période, Stats]
13
+ * Exemple: ["day", { accountValueHistory: [...], ... }]
14
+ */
15
+ export type PortfolioResponse = [PortfolioPeriod, PortfolioStats][];
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +1,2 @@
1
1
  export * from './signature.interfaces';
2
+ export * from './params.interfaces';
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./signature.interfaces"), exports);
18
+ __exportStar(require("./params.interfaces"), exports);
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syldel/hl-shared-types",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "Shared TypeScript interfaces and types for Hyperliquid integration.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",