UNPKG

ic-websocket-js

Version:
12 lines (11 loc) 540 B
import { Principal } from "@dfinity/principal"; import type { CanisterWsMessageArguments, CanisterWsOpenArguments } from "./idl"; import { WsAgent } from "./agent"; /** * Calls the ws_open method on the canister. */ export declare const callCanisterWsOpen: (canisterId: Principal, agent: WsAgent, args: CanisterWsOpenArguments) => Promise<void>; /** * Calls the ws_message method on the canister. */ export declare const callCanisterWsMessage: (canisterId: Principal, agent: WsAgent, args: CanisterWsMessageArguments) => Promise<void>;