@arkade-os/sdk Documentation - v0.4.36
    Preparing search index...

    Interface BatchSignableIdentity

    Identity that supports signing multiple PSBTs in a single wallet interaction. Browser wallet providers that support batch signing (e.g. Xverse, UniSat, OKX) should implement this interface to reduce the number of confirmation popups from N+1 to 1 during Arkade send transactions.

    Contract:

    • Implementations MUST return exactly one Transaction per request, in the same order as the input array. The SDK validates this at runtime and will throw if the lengths do not match.
    • Implementations MUST preserve any partial signatures already present on the input PSBTs and only ADD their own — never drop, replace, or normalize away foreign signatures. The pending-tx recovery path (Wallet.finalizePendingTxs) hands signMultiple checkpoint PSBTs that already carry the server's tapScriptSig and relies on that server signature surviving alongside the freshly added user signature. A provider that discards the pre-existing server sig produces checkpoints that fail server-side finalization, stranding the transaction in the pending state.
    interface BatchSignableIdentity {
        compressedPublicKey(): Promise<Uint8Array<ArrayBufferLike>>;
        sign(tx: Transaction, inputIndexes?: number[]): Promise<Transaction>;
        signerSession(): SignerSession;
        signMessage(
            message: Uint8Array,
            signatureType: "schnorr" | "ecdsa",
        ): Promise<Uint8Array<ArrayBufferLike>>;
        signMultiple(requests: SignRequest[]): Promise<Transaction[]>;
        xOnlyPublicKey(): Promise<Uint8Array<ArrayBufferLike>>;
    }

    Hierarchy (View Summary)

    Index

    Methods

    • Sign an arbitrary message using the requested signature type.

      Parameters

      • message: Uint8Array
      • signatureType: "schnorr" | "ecdsa"

      Returns Promise<Uint8Array<ArrayBufferLike>>

    • Sign multiple transactions in a single wallet interaction.

      Must preserve pre-existing partial signatures on each input PSBT (see the interface-level contract) and return one signed Transaction per request, in request order.

      Parameters

      • requests: SignRequest[]

        Transactions and optional input indexes to sign

      Returns Promise<Transaction[]>

      Signed transactions in the same order as the input requests

    • Returns the x-only public key used by Taproot scripts.

      Returns Promise<Uint8Array<ArrayBufferLike>>