@@ -89,6 +89,10 @@ export declare class HypersyncClient {
8989 get ( query : Query ) : Promise < QueryResponse >
9090 /** Get blockchain events for a single query */
9191 getEvents ( query : Query ) : Promise < EventResponse >
92+ /** Stream chain height events */
93+ streamHeight ( ) : Promise < HeightStream >
94+ /** Stream blockchain data from the given query */
95+ stream ( query : Query , config : StreamConfig ) : Promise < QueryResponseStream >
9296 /** Get blockchain data for a single query, with rate limit info */
9397 getWithRateLimit ( query : Query ) : Promise < QueryResponseWithRateLimit >
9498 /**
@@ -101,10 +105,6 @@ export declare class HypersyncClient {
101105 * Returns immediately if no rate limit info observed or quota available.
102106 */
103107 waitForRateLimit ( ) : Promise < void >
104- /** Stream chain height events */
105- streamHeight ( ) : Promise < HeightStream >
106- /** Stream blockchain data from the given query */
107- stream ( query : Query , config : StreamConfig ) : Promise < QueryResponseStream >
108108 /** Stream blockchain events from the given query */
109109 streamEvents ( query : Query , config : StreamConfig ) : Promise < EventStream >
110110}
@@ -575,26 +575,6 @@ export interface Query {
575575 joinMode ?: JoinMode
576576}
577577
578- /** Rate limit information from server response headers. */
579- export interface RateLimitInfo {
580- /** Total request quota for the current window. */
581- limit ?: number
582- /** Remaining budget in the current window. */
583- remaining ?: number
584- /** Seconds until the rate limit window resets. */
585- resetSecs ?: number
586- /** Budget consumed per request. */
587- cost ?: number
588- }
589-
590- /** Response from a query that includes rate limit information. */
591- export interface QueryResponseWithRateLimit {
592- /** The query response data. */
593- response : QueryResponse
594- /** Rate limit information from response headers. */
595- rateLimit : RateLimitInfo
596- }
597-
598578/** Response from a blockchain query */
599579export interface QueryResponse {
600580 /** Current height of the source hypersync instance */
@@ -625,6 +605,26 @@ export interface QueryResponseData {
625605 traces : Array < Trace >
626606}
627607
608+ /** Response from a query that includes rate limit information. */
609+ export interface QueryResponseWithRateLimit {
610+ /** The query response data. */
611+ response : QueryResponse
612+ /** Rate limit information from response headers. */
613+ rateLimit : RateLimitInfo
614+ }
615+
616+ /** Rate limit information from server response headers. */
617+ export interface RateLimitInfo {
618+ /** Total request quota for the current window. */
619+ limit ?: number
620+ /** Remaining budget in the current window. */
621+ remaining ?: number
622+ /** Seconds until the rate limit window resets. */
623+ resetSecs ?: number
624+ /** Budget consumed per request. */
625+ cost ?: number
626+ }
627+
628628export type ReconnectingTag = 'Reconnecting' ;
629629
630630export interface RollbackGuard {
@@ -654,6 +654,17 @@ export type SerializationFormat = /** Use JSON serialization (default) */
654654/** Use Cap'n Proto binary serialization */
655655'CapnProto' ;
656656
657+ /**
658+ * Set the log level for the underlying Rust logger.
659+ *
660+ * Accepts values like "info", "warn", "debug", "trace", "error",
661+ * or a full filter directive like "hypersync_client=debug".
662+ * If RUST_LOG env var is set, it takes precedence.
663+ * Must be called before creating any HypersyncClient.
664+ * Only the first call takes effect (logger can only init once per process).
665+ */
666+ export declare function setLogLevel ( level : string ) : void
667+
657668/** Config for hypersync event streaming. */
658669export interface StreamConfig {
659670 /**
0 commit comments