• Builds a signature wrapper for Coinbase Smart Wallets by decomposing a hex signature into r, s, v components and encoding them in the format expected by the smart contract.

    All signatures on Coinbase Smart Wallets must be wrapped in this format to identify which owner signed and provide the signature data.

    Parameters

    • params: { ownerIndex: bigint; signatureHex: `0x${string}` }

      The signature parameters

      • ownerIndex: bigint

        The index of the owner that signed (from MultiOwnable.ownerAtIndex)

      • signatureHex: `0x${string}`

        The hex signature to wrap (65 bytes: r + s + v)

    Returns `0x${string}`

    The encoded signature wrapper in the format expected by the smart contract