import { FrameBusRequestsMap, InkeyConfig, InkeyStyleObj, TxEvents, RxEvents, InkeyTxMsgBase, InkeyTxPostMsgDefault, TxMsgConnect, InkeyAccount } from '@thencc/inkey-types'; import { InkeyConfig as InkeyConfig$1 } from '@thencc/inkey-types/src/inkey-types'; import { InkeyResponseBase, InkeySignTxnResponse, TxnForSigning } from '@thencc/inkey-types/src/algonaut-types'; declare class FrameBus { ready: boolean; initing: boolean; destroying: boolean; __v_skip: boolean; walEl: null | HTMLIFrameElement; walElContainer: null | any; walWin: null | Window; onMsgHandler: null | ((event: any) => void); requests: FrameBusRequestsMap; constructor(config?: string | // shortcut for iframe src InkeyConfig); initSrc(src?: string, align?: InkeyConfig['align'], styles?: InkeyStyleObj): Promise; showFrame(routepath?: string): void; hideFrame(): void; setHeight(height: number, unit?: string): void; destroy(): void; isReady(): Promise; setOnDisconnect(f: any): void; onDisconnect(): void; onMessage(event: TxEvents | RxEvents): void; emit(data: T extends InkeyTxMsgBase ? T : InkeyTxPostMsgDefault): T extends InkeyTxMsgBase ? T : InkeyTxPostMsgDefault; emitAsync(data: T extends InkeyTxMsgBase ? T : InkeyTxPostMsgDefault): Promise; /** * Insert styles into the frame container from inkey. * @param css String containing CSS code */ insertStyles(css: string): void; removeStyles(): void; } type InkeySdk = Awaited>; declare const createClient: (config?: InkeyConfig$1) => Promise<{ frameBus: FrameBus; /** * Opens Inkey to allow users to create an account or login with a previously * created account. Must be called before transactions can be signed. * @param payload Optional payload object, can contain `siteName` parameter to display the name of the application. * @returns Promise resolving to an account object of type `{ account: string, username: string }[]` * // return array because we will support arrays of accounts in the future even if we always return 1 for now */ connect(payload?: TxMsgConnect['payload']): Promise; /** * Tells Inkey to close your session & clear local storage. * @returns Success or fail message */ disconnect(): Promise; /** * Shows the Inkey wallet frame */ show(routepath?: string): void; /** * Hides the Inkey wallet frame */ hide(): void; /** * Sends messages to Inkey via FrameBus * @param data Message to send * @returns Whatever Inkey gives us */ ping(data: any, options?: { showFrame?: boolean; }): Promise; /** * Signs unsigned transactions, returns signed txns * @param txns Array of Uint8Array encoded transactions * @returns {Promise} Promise resolving to response object containing signedTxns if successful. Otherwise, provides `error` or `reject` properties. { success, reject, error, signedTxns } */ signTxnsUint8Array(txns: Uint8Array[], connectedAccounts?: InkeyAccount[]): Promise; /** * Sends unsigned transactions to Inkey, awaits signing, returns signed txns * @param txns Array of base64 encoded transactions OR more complex obj array w txn signing type needed * @returns {Promise} Promise resolving to response object containing signedTxns if successful. Otherwise, provides `error` or `reject` properties. { success, reject, error, signedTxns } */ signTxns(txns: string[] | TxnForSigning[], connectedAccounts?: InkeyAccount[]): Promise; }>; export { InkeySdk, createClient };