Skip to content

Commit

Permalink
refactor: add support new logs
Browse files Browse the repository at this point in the history
  • Loading branch information
sarvalabs-harshrastogi committed Sep 26, 2024
1 parent 4f5cba0 commit 77243eb
Show file tree
Hide file tree
Showing 23 changed files with 185 additions and 83 deletions.
17 changes: 6 additions & 11 deletions packages/js-moi-providers/lib.cjs/abstract-provider.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,24 @@ import { EventEmitter } from "events";
import { LogicManifest } from "js-moi-manifest";
import { Interaction, Tesseract } from "js-moi-utils";
import { AccountMetaInfo, AccountState, AssetInfo, CallorEstimateIxObject, CallorEstimateOptions, Content, ContentFrom, ContextInfo, Encoding, Filter, FilterDeletionResult, Inspect, InteractionCallResponse, InteractionReceipt, InteractionRequest, InteractionResponse, NodeInfo, Options, Registry, Status, SyncStatus, TDU, type Log, type LogFilter } from "../types/jsonrpc";
type NewTesseractsByAccount = {
export type NewTesseractsByAccount = {
event: "newTesseractsByAccount";
params: string;
};
export type ProviderEvents = keyof WebsocketEventMap | NewTesseractsByAccount;
export type NewLogs = {
event: "newLogs";
params: LogFilter;
};
export type ProviderEvents = keyof WebsocketEventMap | NewTesseractsByAccount | NewLogs;
export interface WebsocketEventMap {
"newTesseracts": [tesseract: Tesseract];
"newTesseractsByAccount": [tesseracts: Tesseract];
"newLogs": [logs: Log];
"newPendingInteractions": [interactionHash: string];
"connect": [];
"debug": [];
"error": [error: unknown];
"close": [];
"reconnect": [attempt: number];
}
export interface WebsocketSubscriptionParams {
"newTesseracts": [];
"newTesseractsByAccount": [address: string];
"newLogs": [];
"newPendingInteractions": [];
}
/**
* Abstract class representing a provider for interacting with the MOI protocol.
* Provides methods for account operations, execution, and querying.
Expand Down Expand Up @@ -69,5 +65,4 @@ export declare abstract class AbstractProvider extends EventEmitter<WebsocketEve
abstract getLogs(filter: LogFilter): Promise<Log[]>;
abstract getSubscription(event: ProviderEvents): Promise<string>;
}
export {};
//# sourceMappingURL=abstract-provider.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/js-moi-providers/lib.cjs/abstract-provider.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 77243eb

Please sign in to comment.