accounts
Version:
Tempo Accounts SDK
46 lines • 1.92 kB
TypeScript
import type { z } from 'zod';
import type { OneOf } from '../../internal/types.js';
import * as Adapter from '../Adapter.js';
import * as WebAuthnCeremony from '../WebAuthnCeremony.js';
import * as Rpc from '../zod/rpc.js';
/**
* Creates a WebAuthn adapter backed by real passkey ceremonies.
*
* Wraps the {@link local} adapter with WebAuthn registration and authentication flows,
* using the provided {@link WebAuthnCeremony} for challenge generation and verification.
*
* @example
* ```ts
* import { webAuthn } from 'accounts'
*
* const provider = Provider.create({
* adapter: webAuthn(),
* })
* ```
*/
export declare function webAuthn(options?: webAuthn.Options): Adapter.Adapter;
export declare namespace webAuthn {
type Options = OneOf<{
/** Ceremony strategy for WebAuthn registration and authentication. @default WebAuthnCeremony.local() */
ceremony?: WebAuthnCeremony.WebAuthnCeremony | undefined;
} | {
/**
* Server Authentication endpoint for WebAuthn ceremonies (shorthand for
* `WebAuthnCeremony.server({ url })`). Accepts the same shape as the
* Provider `auth` capability — only the `url` field is consumed here;
* other fields (`challenge`, `verify`, `logout`, `returnToken`) are
* SIWE-only and ignored by the WebAuthn ceremony.
*/
auth?: z.input<typeof Rpc.wallet_connect.auth> | undefined;
/** @deprecated Use `auth` instead. */
authUrl?: string | undefined;
}> & {
/** 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=webAuthn.d.ts.map