loginWithPrivateKeys
Log in from raw spending/viewing private keys.
Import
ts
import { loginWithPrivateKeys } from "@0xcurvy/curvy-sdk/actions";Usage
ts
const account = await loginWithPrivateKeys({ s, v, requestingAddress });Signature
ts
function loginWithPrivateKeys(parameters: LoginWithPrivateKeysParameters): Promise<CurvyAccount>Returns
Promise<CurvyAccount>
The action resolves or returns the value shown in the signature.
Parameters
s
- Type:
string - Required: yes
The lowercase Curvy spending private key.
ts
const result = await loginWithPrivateKeys({
s,
v,
requestingAddress,
});v
- Type:
string - Required: yes
The lowercase Curvy viewing private key.
ts
const result = await loginWithPrivateKeys({
s,
v,
requestingAddress,
});requestingAddress
- Type:
HexString - Required: yes
The wallet address requesting access to the registered account.
ts
const result = await loginWithPrivateKeys({
s,
v,
requestingAddress,
});credId
- Type:
ArrayBuffer - Required: no
An optional WebAuthn credential identifier to associate with the session.
ts
const result = await loginWithPrivateKeys({
s,
v,
requestingAddress,
credId,
});config
- Type:
CurvyConfig - Required: no
Curvy config to use. Defaults to the ambient config.
ts
const result = await loginWithPrivateKeys({
s,
v,
requestingAddress,
config,
});Errors
Errors from config resolution and the underlying SDK operation are propagated to the caller.
Related
- Authentication guide
login— Log in (add an existing account) from an account signature.loginWithPasskey— Log in via a passkey PRF output.logout— Remove an account and re-point (or clear) the active account.restoreSession— Rehydrate accounts from the browser keystore after a page refresh.
Source
packages/@0xcurvy/sdk/src/actions/auth/loginWithPrivateKeys.ts