@tangany/waas
Version:
node.js SDK for Tangany Wallet as a Service API
54 lines (53 loc) • 1.38 kB
TypeScript
import { IHateoasLink, IHateoasLinks, ISearchResponse } from "./common";
interface IMonitorBase {
target: "transaction";
description: string;
configuration: {
direction?: "in" | "out";
wallet?: string | string[];
from?: string | string[];
to?: string | string[];
blockNr?: number;
gas?: number;
gasPrice?: string;
gasUsed?: number;
isError?: boolean;
nonce?: number;
timestamp?: number;
value?: string;
};
webhook: {
url: string;
method?: "post" | "get";
};
}
export interface IMonitor extends IMonitorBase {
monitor: string;
blockchain: "ethereum";
network: "mainnet" | "ropsten";
confirmations: number;
status: "active" | "paused" | "deleted" | "halted";
created: string;
updated: string;
invocations: {
transmitted: number;
failed: number;
};
lastInvocation: string;
}
export interface IMonitorCreationProperties extends IMonitorBase {
status?: "active" | "paused";
}
export interface IMonitorSearchParams {
index?: number;
limit?: number;
wallet?: string;
}
export interface IMonitorSearchResponse extends ISearchResponse<IHateoasLinks> {
list: {
monitor: string;
description: string;
links: IHateoasLink<"monitor">[];
}[];
}
export {};