nanocurrency-rpc-bindings
Version:
JavaScript and TypeScript bindings for Nano currency RPC calls
45 lines • 1.18 kB
TypeScript
import { Block, ConfirmationType } from "./nano.types";
export declare enum Topic {
Confirmation = "confirmation",
Votes = "votes",
StoppedElections = "stopped_election",
ActiveDifficulty = "active_difficulty",
Work = "work",
Telemetry = "telemetry",
NewUnconfirmedBlock = "new_unconfirmed_block",
Bootstrap = "bootstrap"
}
export declare enum Action {
Subscribe = "subscribe",
Unsubscribe = "unsubscribe",
Update = "update",
Ping = "ping"
}
export declare type RequestMessage = {
action: string;
topic?: string;
ack?: boolean;
options?: {};
};
export declare enum ActionResponse {
Subscribe = "subscribe",
Unsubscribe = "unsubscribe",
Update = "update",
Pong = "pong"
}
export declare type ResponseMessage = {
time: string;
ack?: string;
id?: string;
};
export declare type ConfirmationMessage = ResponseMessage & {
topic: string;
message: {
account: string;
amount: string;
hash: string;
confirmation_type: ConfirmationType;
block: Block;
};
};
//# sourceMappingURL=websocket.types.d.ts.map