Class representing a Bitcoin signer that extends SignerBtc

Hierarchy (view full)

Constructors

  • Creates an instance of BitcoinSigner.

    Parameters

    • client: Client

      The client instance.

    • name: string

      The name of the signer.

    • icon: string

      The icon URL of the signer.

    • preferredNetworks: NetworkPreference[] = ...
    • addressType: "auto" | "p2wpkh" | "p2tr" = "auto"

      The address type.

    • Optional_appUri: string

      The application URI.

    • connectionsRepo: ConnectionsRepo = ...

      The connections repository.

    Returns JoyId.BitcoinSigner

Properties

name: string

The name of the signer.

icon: string

The icon URL of the signer.

addressType: "auto" | "p2wpkh" | "p2tr" = "auto"

The address type.

Methods

  • Disconnects to the signer.

    Returns Promise<void>

    A promise that resolves when the signer is disconnected.

  • Gets the Bitcoin account address.

    Returns Promise<string>

    A promise that resolves to the Bitcoin account address.

  • Gets the Bitcoin public key.

    Returns Promise<`0x${string}`>

    A promise that resolves to the Bitcoin public key.

  • Connects to the provider by requesting authentication.

    Returns Promise<void>

    A promise that resolves when the connection is established.

  • Checks if the signer is connected.

    Returns Promise<boolean>

    A promise that resolves to true if connected, false otherwise.

  • Signs a raw message with the Bitcoin account.

    Parameters

    Returns Promise<string>

    A promise that resolves to the signed message.