import { ExtendedTransactionBuilder } from "../transaction.js"; import TransactionBuilder from "../transaction_builder.js"; import { Service } from "../types.js"; import { AccountIdentity, ConnectionState, Endpoint, RpcRequestOrigin, RpcSubscription, TransactionSuccess } from "./types.js"; export declare class RpcRequest { private origin; private version; private payload; constructor(origin: RpcRequestOrigin, payload?: object, version?: number); } export declare enum AWCStreamChannelState { CONNECTING = 0, OPEN = 1, CLOSING = 2, CLOSED = 3 } export interface AWCStreamChannel { get state(): AWCStreamChannelState; connect(): Promise; close(): Promise; send(data: T): Promise; onReceive: ((data: T) => Promise) | null; onReady: (() => Promise) | null; onClose: ((reason: string) => Promise) | null; } export declare class ArchethicWalletClient { private origin; private client; private _channel; private _connectionStateEventTarget; private _rpcNotificationEventTarget; private static _instance; constructor(channel: AWCStreamChannel); static init(channel: AWCStreamChannel): void; static get instance(): ArchethicWalletClient; setOrigin(origin: RpcRequestOrigin): this; _dispatchConnectionState(state?: ConnectionState): void; connect(): Promise; close(): Promise; _ensuresConnectionAlive(): void; onAccountUpdate(accountName: string, listener: Function): PromiseLike | undefined; _subscribe(method: string, data: object, listener: Function): PromiseLike | undefined; unsubscribe(subscription: RpcSubscription): void; get connectionState(): ConnectionState; onconnectionstatechange(listener: (state: ConnectionState) => void): this; unsubscribeconnectionstatechange(): this; getEndpoint(): Promise; sendTransaction(transaction: TransactionBuilder | ExtendedTransactionBuilder): Promise; signTransactions(serviceName: string, pathSuffix: string, transactions: TransactionBuilder[] | ExtendedTransactionBuilder[]): Promise; addService(name: string): Promise; getAccounts(): Promise; getCurrentAccount(): Promise; getServices(): Promise; keychainDeriveKeypair(serviceName: string, index?: number, pathSuffix?: string): Promise<{ publicKey: string; }>; keychainDeriveAddress(serviceName: string, index?: number, pathSuffix?: string): Promise<{ address: string; }>; onCurrentAccountChange(listener: Function): PromiseLike | undefined; refreshCurrentAccount(): void; }