UNPKG

accounts

Version:

Tempo Accounts SDK

33 lines 1.29 kB
import * as Adapter from '../Adapter.js'; /** * Creates a local adapter where the app manages keys and signing in-process. * * @example * ```ts * import { local, Provider } from 'accounts' * * const Provider = Provider.create({ * adapter: local({ * loadAccounts: async () => ({ * accounts: [{ address: '0x...' }], * }), * }), * }) * ``` */ export declare function local(options: local.Options): Adapter.Adapter; export declare namespace local { type Options = { /** Create a new account. Optional — omit for login-only flows. */ createAccount?: ((params: Adapter.createAccount.Parameters) => Promise<Adapter.createAccount.ReturnType>) | undefined; /** Discover existing accounts (e.g. WebAuthn assertion). */ loadAccounts: (params?: Adapter.loadAccounts.Parameters | undefined) => Promise<Adapter.loadAccounts.ReturnType>; /** Data URI of the provider icon. @default Black 1×1 SVG. */ icon?: `data:image/${string}` | undefined; /** Display name of the provider (e.g. `"My Wallet"`). @default "Injected Wallet" */ name?: string | undefined; /** Reverse DNS identifier. @default `com.{lowercase name}` */ rdns?: string | undefined; }; } //# sourceMappingURL=local.d.ts.map