Skip to main content

Which signing method should I use for my account type?

The signing method depends on your account type:
  • Role-Based Accounts: Use signTypedData() to sign EIP-712 structured data
  • Kernel 3.3 Accounts (EIP-7702): Use signMessage() to sign the UserOperation hash directly
  • Solana Accounts: Use wallet’s signTransaction() method on VersionedTransaction objects
Note: Using the wrong signing method will cause transaction failures. Kernel 3.3 accounts must sign UserOperation hash, not typed data.
For complete implementation details, code examples, and troubleshooting, see the Signing Guide.

Why is my Solana transaction signing failing?

Common Solana signing issues include:
  1. Incorrect data format: OneBalance provides base64 dataToSign that must be converted to MessageV0
  2. Wrong signature encoding: Solana signatures must be base58 encoded, not hex
  3. Wallet not connected: Verify wallet connection before attempting to sign
Quick fix pattern:
import { MessageV0, VersionedTransaction } from '@solana/web3.js';
import bs58 from 'bs58';

// Convert base64 to MessageV0, create VersionedTransaction, sign, encode as base58
const message = MessageV0.deserialize(Buffer.from(dataToSign, 'base64'));
const transaction = new VersionedTransaction(message);
const signedTx = await wallet.signTransaction(transaction);
const signature = bs58.encode(Buffer.from(signedTx.signatures[signedTx.signatures.length - 1]));
For complete Solana signing implementation and validation utilities, see the Signing Guide.

How do I handle EIP-7702 delegation signing?

EIP-7702 accounts require two signing steps:
  1. Delegation Signature: Sign authorization tuple using signAuthorization() method
  2. UserOperation Signature: Sign UserOperation hash using signMessage() method
Key requirements:
  • Always check signedTuple.yParity is not null before proceeding
  • Both accountAddress and signerAddress must be the same EOA address
  • Use account type "kernel-v3.3-ecdsa" with deploymentType: "EIP7702"
Critical difference from role-based accounts:
  • Role-based: signTypedData(operation.typedDataToSign)
  • Kernel 3.3 (EIP-7702): signMessage({ message: { raw: userOpHash } })
For complete EIP-7702 delegation implementation with error handling and validation, see the Signing Guide.

Getting Help

For additional support with signing issues:
  • Intercom chat (bottom right corner) for instant help
  • Email: support@onebalance.io
  • Discord community for peer support and updates
I