> ## Documentation Index
> Fetch the complete documentation index at: https://docs.onebalance.io/llms.txt
> Use this file to discover all available pages before exploring further.

# FAQ: Signing

> Common questions about transaction signing across different account types, blockchains, and integration patterns

## 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

<Warning>
  **Note**: Using the wrong signing method will cause transaction failures. Kernel 3.3 accounts must sign UserOperation hash, not typed data.
</Warning>

For complete implementation details, code examples, and troubleshooting, see the [Signing Guide](/concepts/signing).

## 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:**

```typescript theme={null}
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](/concepts/signing#solana-account-signing).

## 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](/concepts/signing#eip-7702-account-signing).

## What happens if my wallet already has an EIP-7702 delegation to another contract?

OneBalance won't override pre-existing EIP-7702 delegations. This is by design to prevent potential security issues like double-spend attacks where a prior delegation could manipulate state before our transaction executes.

If your wallet already has a delegation to a different contract, OneBalance will return a [`DELEGATION-001`](/api-reference/error-codes#delegation-001) error during quote generation.

**Workaround:**

* Revoke the existing delegation from your wallet, then retry. OneBalance will automatically delegate to Kernel v3.3 on the next quote execution
* Alternatively, use a different EOA that doesn't have an existing EIP-7702 delegation

<Info>
  This only affects wallets with pre-existing delegations to non-OneBalance contracts. New wallets or wallets without any prior EIP-7702 delegation work without issues.
</Info>

## Getting Help

<CardGroup cols={3}>
  <Card title="Complete Signing Guide" icon="signature" href="/concepts/signing">
    Full implementation guide with code examples for all account types
  </Card>

  <Card title="EIP-7702 Guide" icon="key" href="/guides/eip-7702/getting-started">
    Step-by-step EIP-7702 integration with delegation signing
  </Card>

  <Card title="Solana Guide" icon="code" href="/guides/solana/getting-started">
    Solana-specific signing patterns and troubleshooting
  </Card>
</CardGroup>

<Info>
  For additional support with signing issues:

  * **Intercom chat** (bottom right corner) for instant help
  * **Email**: [support@onebalance.io](mailto:support@onebalance.io)
  * **Discord community** for peer support and updates
</Info>
