@synonymdev/pubky
    Preparing search index...

    Class Signer

    Holds a user’s Keypair and performs identity operations:

    • signup creates a new homeserver user.
    • signin creates a homeserver session for an existing user.
    • Approve pubkyauth requests
    • Publish PKDNS when signer-bound
    Index
    pkdns: Pkdns

    Get a PKDNS actor bound to this signer's client & keypair (publishing enabled).

    await signer.pkdns.publishHomeserverIfStale(homeserverPk);
    
    publicKey: PublicKey

    Get the public key of this signer.

    • Returns void

    • Approve a pubkyauth:// request URL (encrypts & POSTs the signed AuthToken).

      Parameters

      • pubkyauth_url: string

      Returns Promise<void>

    • Returns void

    • Handle a pubkyauth:// deep link.

      Auth requests are approved through their relay. A direct_signup link creates an account on its target homeserver.

      Parameters

      • pubkyauth_url: string

      Returns Promise<void>

    • Fast sign-in for a returning user. Publishes PKDNS in the background.

      Creates a valid grant-backed homeserver Session with root capabilities. clientId is shown in the user's grant/session list.

      Parameters

      • client_id: string

      Returns Promise<Session>

    • Blocking sign-in. Waits for PKDNS publish to complete (slower; safer).

      Creates a valid grant-backed homeserver Session with root capabilities. clientId is shown in the user's grant/session list.

      Parameters

      • client_id: string

      Returns Promise<Session>

    • Legacy cookie signin. Prefer signin(clientId).

      Returns Promise<Session>

      Prefer signin(clientId).

    • Legacy cookie blocking signin. Prefer signinBlocking(clientId).

      Returns Promise<Session>

      Prefer signinBlocking(clientId).

    • Sign up at a homeserver.

      Creates the account and publishes PKDNS. Call signin(clientId) to create a session.

      Parameters

      • homeserver: PublicKey

        The homeserver’s public key.

      • Optionalsignup_token: string | null

      Returns Promise<void>

      • AuthenticationError (bad/expired token)
      • RequestError (network/server)
    • Legacy cookie signup. Prefer signup() plus signin(clientId).

      Parameters

      • homeserver: PublicKey
      • Optionalsignup_token: string | null

      Returns Promise<Session>

      Prefer signup() followed by signin(clientId).

    • Create a signer from a Keypair (prefer pubky.signer(kp)).

      Parameters

      Returns Signer