raiden-ts
Version:
Raiden Light Client Typescript/Javascript SDK
161 lines (160 loc) • 4.63 kB
TypeScript
import * as t from 'io-ts';
import type { ActionType } from '../utils/actions';
import { Address } from '../utils/types';
export declare const matrixSetup: ((payload: {
server: string;
setup: Readonly<{
userId: string;
accessToken: string;
deviceId: string;
displayName: string;
}>;
}) => {
readonly type: "matrix/setup";
readonly payload: {
server: string;
setup: Readonly<{
userId: string;
accessToken: string;
deviceId: string;
displayName: string;
}>;
};
}) & {
type: "matrix/setup";
codec: t.Mixed;
is: (a: unknown) => a is {
readonly type: "matrix/setup";
readonly payload: {
server: string;
setup: Readonly<{
userId: string;
accessToken: string;
deviceId: string;
displayName: string;
}>;
};
};
error: undefined;
};
export interface matrixSetup extends ActionType<typeof matrixSetup> {
}
export declare const matrixPresence: {
readonly request: ((_: undefined, meta: {
address: Address;
}) => {
readonly type: "matrix/presence/request";
readonly meta: {
address: Address;
};
}) & {
type: "matrix/presence/request";
codec: t.Mixed;
is: (a: unknown) => a is {
readonly type: "matrix/presence/request";
readonly meta: {
address: Address;
};
};
error: undefined;
};
readonly success: ((payload: {
userId: string;
available: boolean;
ts: number;
pubkey: import("../utils/types").HexString<65>;
} & {
caps?: Readonly<{
[x: string]: string | number | boolean | (string | number | boolean | null)[] | null;
}> | undefined;
}, meta: {
address: Address;
}) => {
readonly type: "matrix/presence/success";
readonly payload: {
userId: string;
available: boolean;
ts: number;
pubkey: import("../utils/types").HexString<65>;
} & {
caps?: Readonly<{
[x: string]: string | number | boolean | (string | number | boolean | null)[] | null;
}> | undefined;
};
readonly meta: {
address: Address;
};
}) & {
type: "matrix/presence/success";
codec: t.Mixed;
is: (a: unknown) => a is {
readonly type: "matrix/presence/success";
readonly payload: {
userId: string;
available: boolean;
ts: number;
pubkey: import("../utils/types").HexString<65>;
} & {
caps?: Readonly<{
[x: string]: string | number | boolean | (string | number | boolean | null)[] | null;
}> | undefined;
};
readonly meta: {
address: Address;
};
};
error: undefined;
};
readonly failure: ((payload: unknown, meta: {
address: Address;
}) => {
readonly type: "matrix/presence/failure";
readonly payload: unknown;
readonly meta: {
address: Address;
};
readonly error: true;
}) & {
type: "matrix/presence/failure";
codec: t.Mixed;
is: (a: unknown) => a is {
readonly type: "matrix/presence/failure";
readonly payload: unknown;
readonly meta: {
address: Address;
};
readonly error: true;
};
error: true;
};
};
export declare namespace matrixPresence {
interface request extends ActionType<typeof matrixPresence.request> {
}
interface success extends ActionType<typeof matrixPresence.success> {
}
interface failure extends ActionType<typeof matrixPresence.failure> {
}
}
export declare const rtcChannel: ((payload: RTCDataChannel | undefined, meta: {
address: Address;
}) => {
readonly type: "rtc/channel";
readonly payload: RTCDataChannel | undefined;
readonly meta: {
address: Address;
};
}) & {
type: "rtc/channel";
codec: t.Mixed;
is: (a: unknown) => a is {
readonly type: "rtc/channel";
readonly payload: RTCDataChannel | undefined;
readonly meta: {
address: Address;
};
};
error: undefined;
};
export interface rtcChannel extends ActionType<typeof rtcChannel> {
}