login
Log in (add an existing account) from an account signature.
Verifies the signature, derives the spending/viewing private keys, fetches the Curvy keypairs, runs the pre-login checks (which authenticate), then creates and registers the account.
Import
ts
import { login } from "@0xcurvy/curvy-sdk/actions";Usage
ts
const account = await login({ signature });Signature
ts
function login(parameters: LoginParameters): Promise<CurvyAccount>Returns
Promise<CurvyAccount>
The action resolves or returns the value shown in the signature.
Parameters
signature
- Type:
EvmSignatureData - Required: yes
The EVM authentication signature and its signing address.
ts
const result = await login({
signature,
});config
- Type:
CurvyConfig - Required: no
Curvy config to use. Defaults to the ambient config.
ts
const result = await login({
signature,
config,
});Errors
Errors from config resolution and the underlying SDK operation are propagated to the caller.
Related
- Authentication guide
loginWithPasskey— Log in via a passkey PRF output.loginWithPrivateKeys— Log in from raw spending/viewing private keys.logout— Remove an account and re-point (or clear) the active account.restoreSession— Rehydrate accounts from the browser keystore after a page refresh.