Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

forgotUsername

List the users associated with a key hash. Useful for username recovery flows.

Signature

function forgotUsername(
  client: Client,
  parameters: {
    keyHash: KeyHash
    limit?: number
    startAfter?: number
    height?: number
  },
): Promise<User[]>

Example

import { createPublicClient, createTransport, testnet } from "@left-curve/sdk"
import type { KeyHash } from "@left-curve/sdk"
 
const client = createPublicClient({ chain: testnet, transport: createTransport() })
const keyHash: KeyHash = "ABCDEF0123456789..."
 
const users = await client.forgotUsername({ keyHash })

Parameters

keyHashKeyHash. Uppercase hex SHA-256 of the public key.

limitnumber, optional. Maximum users to return.

startAfternumber, optional. User index to start after (exclusive).

heightnumber, optional. Block height. Default 0 (latest).

Returns

User[] — list of users; each User contains index, name, keys, and accounts.

See also