@pod-network/trade-sdk 0.19.0 → 0.19.1

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.
@@ -10,7 +10,7 @@ export const RESOLUTION_SECONDS = {
10
10
  "1h": 3_600,
11
11
  "4h": 14_400,
12
12
  "1d": 86_400,
13
- "1W": 604_800,
13
+ "1w": 604_800,
14
14
  "1M": 2_592_000, // a nominal 30d month: what the indexer buckets by, not calendar months
15
15
  };
16
16
  /**
@@ -28,7 +28,7 @@ export const RESOLUTION_PAGE_BUCKETS = {
28
28
  "1h": 168, // 1 week
29
29
  "4h": 180, // ~30 days
30
30
  "1d": 365, // ~1 year
31
- "1W": 260, // ~5 years
31
+ "1w": 260, // ~5 years
32
32
  "1M": 120, // ~decade (nominal 30-day buckets, epoch-anchored — see above)
33
33
  };
34
34
  export const RESOLUTIONS = Object.keys(RESOLUTION_SECONDS);
package/dist/datafeed.js CHANGED
@@ -5,7 +5,7 @@ import { toNumber } from "./codec/units.js";
5
5
  import { RESOLUTION_SECONDS } from "./codec/resolution.js";
6
6
  const TV_TO_RESOLUTION = {
7
7
  "1": "1m", "5": "5m", "15": "15m", "30": "30m",
8
- "60": "1h", "240": "4h", "1D": "1d", "1W": "1W", "1M": "1M",
8
+ "60": "1h", "240": "4h", "1D": "1d", "1W": "1w", "1M": "1M",
9
9
  };
10
10
  function toTvBar(b, quoteDecimals = 18) {
11
11
  return {
@@ -2,7 +2,7 @@ export type Hex = `0x${string}`;
2
2
  export type MarketId = Hex;
3
3
  export type Address = Hex;
4
4
  export type Hash = Hex;
5
- export type Resolution = "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "1d" | "1W" | "1M";
5
+ export type Resolution = "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "1d" | "1w" | "1M";
6
6
  /** Inclusive-from, exclusive-to time window in milliseconds. `to` defaults to now. */
7
7
  export interface TimeRange {
8
8
  from: number;
@@ -376,7 +376,7 @@ export interface TxExplorer {
376
376
  chainId?: string;
377
377
  maxFeePerGas?: string;
378
378
  effectiveGasPrice?: string;
379
- /** Null when the tx is in no block (solutions, recovery, an intent whose
379
+ /** Null when the tx is in no block (solutions, an intent whose
380
380
  * auction tick has not run yet); a height once it is sequenced. */
381
381
  blockNumber?: string | null;
382
382
  /** Always null: pod does not order the transactions within a block. */
@@ -60,7 +60,7 @@ export declare function buildCancelOrder(orderbookId: MarketId, orderId: Hash, o
60
60
  /**
61
61
  * A rejected pod transaction. `data`'s shape follows `code`: −32000 validation (string),
62
62
  * 3 execution revert (`Error(string)`, decoded into `reason`), −32003 rejection quorum
63
- * (array), 999 account locked (object).
63
+ * (array).
64
64
  */
65
65
  export declare class PodTxRevertError extends Error {
66
66
  reason: string;
@@ -237,7 +237,7 @@ export interface TxReceipt {
237
237
  status: "success" | "reverted";
238
238
  transactionHash: Hash;
239
239
  /** The height the tx was sequenced at, or `null` when it is in no block —
240
- * `submitSolutions`, recovery txs, and an intent whose auction tick has not
240
+ * `submitSolutions` and an intent whose auction tick has not
241
241
  * run yet. A null height is not a pending state: the receipt is still final. */
242
242
  blockNumber: bigint | null;
243
243
  gasUsed: bigint;
@@ -94,7 +94,7 @@ const ERROR_SELECTOR = "0x08c379a0";
94
94
  /**
95
95
  * A rejected pod transaction. `data`'s shape follows `code`: −32000 validation (string),
96
96
  * 3 execution revert (`Error(string)`, decoded into `reason`), −32003 rejection quorum
97
- * (array), 999 account locked (object).
97
+ * (array).
98
98
  */
99
99
  export class PodTxRevertError extends Error {
100
100
  reason;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pod-network/trade-sdk",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "Read/stream TypeScript SDK for the pod trading indexer: cacheable REST seeds + one multiplexed WebSocket, kept in memory. Framework-agnostic.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -12,7 +12,7 @@ export const RESOLUTION_SECONDS: Record<Resolution, number> = {
12
12
  "1h": 3_600,
13
13
  "4h": 14_400,
14
14
  "1d": 86_400,
15
- "1W": 604_800,
15
+ "1w": 604_800,
16
16
  "1M": 2_592_000, // a nominal 30d month: what the indexer buckets by, not calendar months
17
17
  };
18
18
 
@@ -31,7 +31,7 @@ export const RESOLUTION_PAGE_BUCKETS: Record<Resolution, number> = {
31
31
  "1h": 168, // 1 week
32
32
  "4h": 180, // ~30 days
33
33
  "1d": 365, // ~1 year
34
- "1W": 260, // ~5 years
34
+ "1w": 260, // ~5 years
35
35
  "1M": 120, // ~decade (nominal 30-day buckets, epoch-anchored — see above)
36
36
  };
37
37
 
package/src/datafeed.ts CHANGED
@@ -9,7 +9,7 @@ import { RESOLUTION_SECONDS } from "./codec/resolution.js";
9
9
 
10
10
  const TV_TO_RESOLUTION: Record<string, Resolution> = {
11
11
  "1": "1m", "5": "5m", "15": "15m", "30": "30m",
12
- "60": "1h", "240": "4h", "1D": "1d", "1W": "1W", "1M": "1M",
12
+ "60": "1h", "240": "4h", "1D": "1d", "1W": "1w", "1M": "1M",
13
13
  };
14
14
 
15
15
  interface TvBar { time: number; open: number; high: number; low: number; close: number; volume: number }
@@ -7,7 +7,7 @@ export type Address = Hex;
7
7
  export type Hash = Hex;
8
8
 
9
9
  export type Resolution =
10
- | "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "1d" | "1W" | "1M";
10
+ | "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "1d" | "1w" | "1M";
11
11
 
12
12
  /** Inclusive-from, exclusive-to time window in milliseconds. `to` defaults to now. */
13
13
  export interface TimeRange {
@@ -429,7 +429,7 @@ export interface TxExplorer {
429
429
  chainId?: string;
430
430
  maxFeePerGas?: string;
431
431
  effectiveGasPrice?: string;
432
- /** Null when the tx is in no block (solutions, recovery, an intent whose
432
+ /** Null when the tx is in no block (solutions, an intent whose
433
433
  * auction tick has not run yet); a height once it is sequenced. */
434
434
  blockNumber?: string | null;
435
435
  /** Always null: pod does not order the transactions within a block. */
@@ -160,7 +160,7 @@ const ERROR_SELECTOR = "0x08c379a0";
160
160
  /**
161
161
  * A rejected pod transaction. `data`'s shape follows `code`: −32000 validation (string),
162
162
  * 3 execution revert (`Error(string)`, decoded into `reason`), −32003 rejection quorum
163
- * (array), 999 account locked (object).
163
+ * (array).
164
164
  */
165
165
  export class PodTxRevertError extends Error {
166
166
  constructor(public reason: string, public data?: unknown, public code?: number) {
@@ -563,7 +563,7 @@ export interface TxReceipt {
563
563
  status: "success" | "reverted";
564
564
  transactionHash: Hash;
565
565
  /** The height the tx was sequenced at, or `null` when it is in no block —
566
- * `submitSolutions`, recovery txs, and an intent whose auction tick has not
566
+ * `submitSolutions` and an intent whose auction tick has not
567
567
  * run yet. A null height is not a pending state: the receipt is still final. */
568
568
  blockNumber: bigint | null;
569
569
  gasUsed: bigint;