ault-sdk-ts 0.0.2-alpha.7 → 0.0.2-alpha.8

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/index.cjs CHANGED
@@ -18159,7 +18159,7 @@ function createDexWs(url, options) {
18159
18159
  }
18160
18160
 
18161
18161
  // src/index.ts
18162
- var SDK_VERSION = "0.0.2-alpha.7";
18162
+ var SDK_VERSION = "0.0.2-alpha.8";
18163
18163
  // Annotate the CommonJS export names for ESM import in node:
18164
18164
  0 && (module.exports = {
18165
18165
  AGENT_DEFAULTS,
package/dist/index.js CHANGED
@@ -17888,7 +17888,7 @@ function createDexWs(url, options) {
17888
17888
  }
17889
17889
 
17890
17890
  // src/index.ts
17891
- var SDK_VERSION = "0.0.2-alpha.7";
17891
+ var SDK_VERSION = "0.0.2-alpha.8";
17892
17892
  export {
17893
17893
  AGENT_DEFAULTS,
17894
17894
  AULT_SIGNER_MARKER,
@@ -24,7 +24,23 @@ export interface WsCommandResponse {
24
24
  error?: string;
25
25
  ttl?: number;
26
26
  }
27
- export type PayloadFor<T extends string> = T extends `orderbook:${string}` ? OrderbookResponse : T extends `trades:${string}` ? TradeResponse[] : T extends `ticker:${string}` ? TickerResponse : T extends `chart:${string}` ? OHLCVEntry : T extends `orders:${string}` ? OrderResponse[] : T extends `balances:${string}` ? BalancesResponse : T extends `mytrades:${string}` ? TradeResponse[] : unknown;
27
+ /**
28
+ * Payload for the `chain:block` topic. Emitted once per new block regardless
29
+ * of market activity so subscribers can drive liveness indicators.
30
+ *
31
+ * The block header fields (hash, proposer, tx_count, gas_used, gas_wanted)
32
+ * are optional because older chain versions may not supply them.
33
+ */
34
+ export interface BlockUpdate {
35
+ height: number;
36
+ timestamp: number;
37
+ hash?: string;
38
+ proposer?: string;
39
+ tx_count?: number;
40
+ gas_used?: number;
41
+ gas_wanted?: number;
42
+ }
43
+ export type PayloadFor<T extends string> = T extends `orderbook:${string}` ? OrderbookResponse : T extends `trades:${string}` ? TradeResponse[] : T extends `ticker:${string}` ? TickerResponse : T extends `chart:${string}` ? OHLCVEntry : T extends `orders:${string}` ? OrderResponse[] : T extends `balances:${string}` ? BalancesResponse : T extends `mytrades:${string}` ? TradeResponse[] : T extends "chain:block" ? BlockUpdate : unknown;
28
44
  export interface SubscriptionHandlers<T> {
29
45
  onData: (data: T, message: WsServerMessage<T>) => void;
30
46
  onError?: (error: Error) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ault-sdk-ts",
3
- "version": "0.0.2-alpha.7",
3
+ "version": "0.0.2-alpha.8",
4
4
  "description": "TypeScript SDK for the Ault blockchain with high-level transaction methods and REST query clients",
5
5
  "keywords": [
6
6
  "ault",