abstract class Client {
public abstract init(params: {
metadata?: AppMetadata;
}): Promise<void>;
public abstract connect(params: {
requiredNamespaces: Map<string, ProposalNamespace>;
relays?: RelayProtocolOptions[];
pairingTopic: string;
}): Promise<Sequence>;
public abstract setNamespaceConfig(params: NamespaceConfig) : Promise<void>;
public abstract approveSession(params: {
id: number;
namespaces: Map<string, SessionNamespace>;
relayProtocol?: string;
}): Promise<Sequence>;
public abstract rejectSession(params: {
proposerPublicKey: string;
reason: Reason;
}): Promise<void>;
public abstract updateSession(params: {
topic: string;
namespaces: Map<string, SessionNamespace>;
}): Promise<void>;
public abstract extendSession(params: {
topic: string;
}): Promise<void>;
public abstract request(params: {
topic: string;
request: RequestArguments;
chainId: string;
}): Promise<any>;
public abstract respondSessionRequest(params: {
topic: string;
response: JsonRpcResponse;
}): Promise<void>;
public abstract emitSessionEvent(params: {
topic: string;
event: SessionEvent;
chainId: string;
}): Promise<void>;
public abstract ping(params: {
topic: string;
}): Promise<void>;
public abstract disconnectSession(params: {
topic: string;
reason: Reason;
}): Promise<void>;
public abstract authenticate(params: {
chains: string[];
domain: string;
nonce: string;
uri: string;
type?: CacaoHeader["t"];
nbf?: string;
exp?: string;
statement?: string;
requestId?: string;
resources?: string[];
expiry?: number;
pairingTopic?: string;
methods?: string[];
}): Promise<{
uri: string,
response: Promise<{
auths?: Cacao[];
session: SessionTypes.Struct;
}>
}>;
public abstract approveSessionAuthenticate(params: {
id: number;
auths: Cacao[];
}): Promise<void>;
public abstract rejectSessionAuthenticate(params: {
id: number;
reason: Reason;
}): Promise<void>;
public abstract getPendingAuthRequests(): Promise<Record<number, PendingRequest>>;
public abstract formatAuthMessage(authPayload: PayloadParams, iss: string): Promise<string>;
public abstract on("session_proposal", (sessionProposal: SessionProposal, verifyContext: VerifyContext) => {}): void;
public abstract on("session_request", (sessionRequest: SessionRequest, verifyContext: VerifyContext) => {}): void;
public abstract on("session_event", (sessionEvent: SessionEvent) => {}): void;
public abstract on("session_delete", (sessionDelete: { id: number, topic: string }) => {}): void;
public abstract on("session_authenticate", (sessionAuthenticateRequest: SessionAuthenticateRequest) => {}): void;
}