@aleph-sdk/monorepo
    Preparing search index...

    Class ExternalSignerWallet

    Wraps any async sign function as a BaseProviderWallet so it can be used with ETHAccount and EVMAccount. Intended for embedded/smart-wallet signers (e.g. Privy) that are not backed by a standard ethers.js wallet or Web3 provider.

    The caller must supply:

    • address — the account's on-chain address (SA for smart wallets)
    • provider — a standard JSON-RPC provider for balance/chain queries
    • signMessage — the signing function (e.g. smartWalletClient.signMessage)

    Hierarchy

    • BaseProviderWallet
      • ExternalSignerWallet
    Index

    Constructors

    • Parameters

      • address: string
      • provider: JsonRpcProvider
      • signMessage: (message: string | Buffer<ArrayBufferLike>) => Promise<string>

      Returns ExternalSignerWallet

    Properties

    address: string
    provider: JsonRpcProvider

    Provider property

    Methods

    • Connects the Provider and fetch an account

      Returns Promise<void>

    • Gets the currently selected network chainID

      Returns Promise<number>

    • Asks the provider for a public key

      Returns Promise<string>

    • Asks the provider if its Metamask or not. This can be false positive.

      Returns boolean

    • Signs a message using the Provider

      Parameters

      • data: string | Buffer<ArrayBufferLike>

        The message to sign

      Returns Promise<string>