Skip to content

registerWithPrivateKeys ​

Register a new Curvy handle from raw spending and viewing private keys.

Import ​

ts
import { registerWithPrivateKeys } from "@0xcurvy/curvy-sdk/actions";

Usage ​

ts
const account = await registerWithPrivateKeys({ s, v, handle, userAddress });

Signature ​

ts
function registerWithPrivateKeys(parameters: RegisterWithPrivateKeysParameters): 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 registerWithPrivateKeys({
  s, 
  v,
  handle,
  userAddress,
});

v ​

  • Type: string
  • Required: yes

The lowercase Curvy viewing private key.

ts
const result = await registerWithPrivateKeys({
  s,
  v, 
  handle,
  userAddress,
});

handle ​

  • Type: CurvyId
  • Required: yes

The Curvy handle to register.

ts
const result = await registerWithPrivateKeys({
  s,
  v,
  handle, 
  userAddress,
});

userAddress ​

  • Type: HexString
  • Required: yes

The wallet address that will own the registered handle.

ts
const result = await registerWithPrivateKeys({
  s,
  v,
  handle,
  userAddress, 
});

config ​

  • Type: CurvyConfig
  • Required: no

Curvy config to use. Defaults to the ambient config.

ts
const result = await registerWithPrivateKeys({
  s,
  v,
  handle,
  userAddress,
  config, 
});

Errors ​

Errors from config resolution and the underlying SDK operation are propagated to the caller.

Source ​

packages/@0xcurvy/sdk/src/actions/auth/registerWithPrivateKeys.ts