UNPKG

@turnkey/eip-1193-provider

Version:

EIP-1193 Provider for Turnkey.

33 lines 1.54 kB
import { TurnkeyClient } from "@turnkey/http"; import type { TurnkeyBrowserClient } from "@turnkey/sdk-browser"; import type { definitions } from "@turnkey/http/src/__generated__/services/coordinator/public/v1/public_api.types"; export declare function unwrapActivityResult<T extends definitions["v1ActivityResponse"]>(activityResponse: T, { errorMessage }: { errorMessage: string; }): T["activity"]["result"]; export declare function signMessage({ client, message, organizationId, signWith, }: { client: TurnkeyClient | TurnkeyBrowserClient; message: `0x${string}`; organizationId: string; signWith: string; }): Promise<string>; export declare function signTransaction({ client, unsignedTransaction, organizationId, signWith, }: { client: TurnkeyClient | TurnkeyBrowserClient; unsignedTransaction: string; organizationId: string; signWith: string; }): Promise<string>; /** * Checks if the error code corresponds to a disconnected state. * * Determines if provided error code is one of the known * error codes that signify a disconnected state, specifically if the wallet * or organization was not found. * * @param {Object} error - The error object containing the error code. * @param {number} error.code - The error code to check against known disconnected state codes. * @returns {boolean} - Returns true if the error code is for a disconnected state, otherwise false. */ export declare const turnkeyIsDisconnected: (error: { code: number; }) => boolean; //# sourceMappingURL=turnkey.d.ts.map