# Raw signing

Raw signing with Ripple Custody (Wallet) lets you sign a pre-encoded transaction, including transaction types that Ripple Custody (Wallet) has no dedicated endpoint for. It works on EVM chains, the XRP Ledger, Solana, TRON, and 1Money, for payloads that the chain's decoder accepts. Bitcoin wallets can't use raw signing: requests fail with `blockchain operation unsupported` (reason `PAL019.011`).

This means you can use a native transaction type that Ripple Custody (Wallet) doesn't support itself, as soon as the decoder that Ripple Custody (Wallet) uses for that chain can decode it. Until then, the API rejects the request with HTTP 400 (reason `PAL010.011` on EVM chains, `PAL010.022` on the XRP Ledger). The XRP Ledger `Batch` and `DelegateSet` types are the exception: Ripple Custody (Wallet) never signs them (see [Unsupported XRP Ledger transaction types](#unsupported-xrp-ledger-transaction-types)). For EVM wallets, you can also sign for chain IDs that Ripple Custody (Wallet) doesn't integrate, but sign-only. See [Cross-chain raw signing (EVM)](#cross-chain-raw-signing-evm).

Raw signing can be enabled and disabled for a wallet from wallet settings.

## Unsupported XRP Ledger transaction types

Ripple Custody (Wallet) doesn't sign these XRP Ledger transaction types:

| Transaction type | Why |
|  --- | --- |
| `Batch` | A batch bundles inner transactions, and policy checks can't see the value that those inner transactions move. |
| `DelegateSet` | A delegation gives another account standing permission to sign transactions for the wallet, outside Ripple Custody (Wallet) signing and policy. This includes a `DelegateSet` with an empty `Permissions` list, which removes a delegation. |


A raw transaction request with either type returns HTTP 400 with the reason `PAL010.022` and creates no transaction. This applies whether you sign and submit, sign only, or sign as one signer on a multi-signed transaction. Don't retry the request.

Disabled by default
Raw signing is a powerful and insecure signing method. It is therefore disabled by default. Please only enable raw signing for individual wallets if you fully understand this feature.

API documentation
See the [Ripple Custody (Wallet) API reference](/products/wallet/api-docs/palisade-api/palisade-api) for the raw signing endpoints. For XRP Ledger transaction types, see [Submit XRP Ledger transactions via the API](/products/wallet/transactions/xrpl/xrpl-via-the-api).

In this section
- [Transaction encoding formats](/products/wallet/transactions/raw-signing/encoding-formats) – Encode `encodedTransaction` for EVM chains, XRP Ledger, Solana, TRON, and 1Money
- [1Money transaction types](/products/wallet/transactions/raw-signing/1money-transaction-types) – Payloads for 1Money token operations


## Automatic chain routing (EVM)

For EVM wallets, the platform automatically detects the target blockchain from the `chainId` field in the encoded transaction and routes to the correct connector. You don't need to specify a `blockchain` parameter — the encoded transaction is the source of truth.

- **Known chain ID** — If the chain ID matches a natively integrated chain (Ethereum, Arbitrum, Polygon, Base, BNB Chain, Avalanche, 1Money), the platform routes the transaction to that chain's connector. The platform supports both `signOnly=true` and `signOnly=false`.
- **Unknown chain ID** — If the chain ID doesn't match any natively integrated chain, the platform treats the transaction as [cross-chain](#cross-chain-raw-signing-evm): it signs only. Only policies that have matchers can authorize it. See [Cross-chain raw signing (EVM)](#cross-chain-raw-signing-evm).


1Money wallets are an exception: raw transactions from a 1Money wallet always execute on 1Money, regardless of the chain ID in the encoded transaction.

Blockchain parameter deprecated
The `blockchain` field on the raw transaction request is deprecated. The platform ignores it for all raw transactions. For EVM wallets, the chain ID in the encoded transaction determines routing — a contradicting `blockchain` value is ignored with no error or warning. Raw transactions from non-EVM wallets and 1Money wallets always execute on the wallet's native blockchain.

### Example: Cross-chain EVM routing

An Ethereum wallet can sign and broadcast an Arbitrum transaction without any override:

```
POST /v2/vaults/{vaultId}/wallets/{walletId}/transactions/raw
{
  "encodedTransaction": "<RLP-encoded transaction with Arbitrum chainId>",
  "signOnly": false
}
```

The platform extracts the Arbitrum chain ID from the encoded transaction, routes to the Arbitrum connector, and broadcasts the transaction.

Fund the target chain
Your address is the same on every EVM chain, but it needs the native token on the target chain. For a transaction that carries value, the platform checks the value (plus the fee, when it's paid in the same asset) against the wallet's available balance of the target chain's native asset. If the balance is too short, the policy check rejects the transaction with `Insufficient available balance for asset ...` (reason `PAL006.031`). A transaction with no value, such as a contract call, skips this check. If the address can't pay for gas, the network rejects the transaction, and the transaction can stay in `PUBLISH_PENDING` without reaching a final status.

## Cross-chain raw signing (EVM)

For EVM wallets, you can raw-sign transactions for chain IDs that Ripple Custody (Wallet) doesn't natively integrate — for example, custom L2s, testnets, or chains Ripple Custody (Wallet) hasn't yet onboarded.

Cross-chain raw signing uses the same raw transaction endpoint. When the platform detects a chain ID that doesn't match any natively integrated chain, it enforces sign-only and evaluates your policies. The request returns the transaction at `REQUESTED`, not the signature. After the policy checks, any approvals, and signing finish, the signature is on the transaction (`signature` and `signedTransaction`, status `SIGNED`), and you read it with a get transaction request. Ripple Custody (Wallet) doesn't broadcast the transaction — you submit the signed transaction to the target chain yourself.

### Requirements

- **EVM-only** — Available for EVM wallets only.
- **Sign-only** — The request must set `signOnly=true`. Ripple Custody (Wallet) rejects requests with `signOnly=false` for an unknown chain ID with HTTP 400 and the reason `PAL010.012`.
- **Policy with matchers required** — Base policies without matchers don't apply to cross-chain transactions, so a base policy alone doesn't authorize the sign. A policy that has matchers applies when all of its matchers match. A `CHAIN_ID` matcher limits a policy to the target chain IDs it lists. A policy whose matchers don't include `CHAIN_ID`, for example one scoped only by user, API credential, or transaction type, applies to cross-chain transactions on any chain ID. Destination matchers match only when the destination address is an address book entry or a wallet in your organization on the wallet's own chain. Otherwise the platform records the destination as external.
- **Natively integrated chain IDs rejected** — Ripple Custody (Wallet) rejects a `CHAIN_ID` matcher value that matches a chain it integrates natively (for example, Ethereum mainnet `1`). Use the standard raw signing flow for those chains.


### Flow

1. Create a policy on the EVM wallet. To limit it to specific chains, include a `CHAIN_ID` matcher for each chain ID you want to allow. See [Policy reference](/products/wallet/governance-and-controls/policies/policy-reference#chain_id) for the matcher format.
2. Submit a raw transaction to the standard raw signing endpoint with `signOnly=true`. Encode the transaction using the EVM format described in [Transaction encoding formats](/products/wallet/transactions/raw-signing/encoding-formats#evm-chains-ethereum-base-polygon-avalanche-arbitrum-bnb-chain), setting the `chainId` field to the target chain ID. Submit the hex without a `0x` prefix.
3. The platform detects the unknown chain ID and evaluates the policy. The request returns the transaction at `REQUESTED`. When the policy checks, any approvals, and signing finish, the signature is on the transaction (status `SIGNED`). Read it with a get transaction request.
4. Submit the signed transaction to the target chain yourself.


No broadcast
Cross-chain raw signing produces a signature only. Ripple Custody (Wallet) has no connector for the target chain and doesn't publish the transaction. You're responsible for broadcasting the transaction — and for funding the address with the target chain's native gas token when you submit it.

## Sign-only transactions

Set `signOnly` to `true` on a raw transaction request to have Ripple Custody (Wallet) sign the transaction without publishing it. The request goes through the same policy checks, approvals, and signing as any other raw transaction, and the transaction ends at `SIGNED`. It never reaches `PUBLISHED` or `CONFIRMED`. You broadcast the signed transaction yourself, through your own node or provider.

Use sign-only when you:

- Broadcast the transaction yourself.
- Sign for an EVM chain that Ripple Custody (Wallet) doesn't integrate. This case requires sign-only. See [Cross-chain raw signing (EVM)](#cross-chain-raw-signing-evm).
- Sign as one signer on an XRP Ledger multi-signed transaction. This case requires sign-only, because Ripple Custody (Wallet) can't submit a multi-signed transaction. See [Transaction encoding formats: XRP Ledger](/products/wallet/transactions/raw-signing/encoding-formats#xrp-ledger).


The create request returns the transaction at `REQUESTED`. When the status is `SIGNED`, read the result with a get transaction request. The fields that hold the result depend on the blockchain:

| Blockchain | Result fields |
|  --- | --- |
| EVM chains | `signedTransaction` holds the signed transaction as hex, RLP-encoded in the same wrapped form that `encodedTransaction` uses. `canonicalSignature` holds the 65-byte signature (r, s, and v) as hex. `hash` holds the transaction hash. |
| Solana and TRON | `signedTransaction` holds the signed transaction as hex. `hash` holds the transaction hash. |
| 1Money | `signedTransaction` holds the hex-encoded JSON of the transaction type, payload, and signature. `hash` holds the transaction hash. |
| XRP Ledger, single-signed | `signedTransaction` holds the signed transaction blob as hex. `canonicalSignature` holds the DER-encoded signature as hex. `hash` holds the transaction hash. |
| XRP Ledger, multi-signed | `canonicalSignature` only. There is no `signedTransaction` or `hash`. |


For examples, see [XRP Ledger](/products/wallet/transactions/raw-signing/encoding-formats#xrp-ledger) and [1Money transaction types](/products/wallet/transactions/raw-signing/1money-transaction-types#example-mint-tokens).

## Sign a plaintext message (beta)

**API reference:** [Create a new sign plaintext transaction](/products/wallet/api-docs/palisade-api/palisade-api/transactions/transactionsservice_signplaintext)

You can also have a wallet sign a plaintext message, without building a transaction. Use it to prove that you control the wallet's address. The API reference marks this endpoint as beta. For the blockchains that support it, see [Supported blockchains and tokens](/products/wallet/vaults-and-wallets/supported-blockchains-and-tokens).

Send `POST /v2/vaults/{vaultId}/wallets/{walletId}/transactions/sign-plaintext` with one required field, `message`, which can be up to 2,048 characters. The request needs an API credential of type `TRANSACTIONS`.

```bash
curl -X POST "https://api.sandbox.palisade.co/v2/vaults/$VAULT_ID/wallets/$WALLET_ID/transactions/sign-plaintext" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "message": "Sign: 1234" }'
```

The response is a transaction with the `action` `PALISADE_SIGN_PLAINTEXT` and a `status` of `REQUESTED`. It's sign-only, so it ends at `SIGNED`. Read `signingHash`, `signature`, and `canonicalSignature` with a get transaction request. Ripple Custody (Wallet) signs the Keccak-256 hash of the message with a blockchain-specific prefix, `\x19<blockchain> Signed Message:\n<length><message>`. Read the prefixed message from `attributes.prefixed_request_data` instead of building it yourself. For how to verify a signature, see [Plaintext signing API is now live](/products/wallet/changelogs/plaintext-signing-api).

A plaintext signing request isn't subject to transaction limit rules, and the wallet doesn't need raw signing enabled.

## Related topics

- [Send assets via the API](/products/wallet/transactions/send-assets#evm-cross-chain-transfers-via-the-api) — Execute a transfer on another EVM chain with the `blockchain` field
- [Track transactions via the API](/products/wallet/transactions/view-and-track-transactions) — Follow a raw transaction to confirmation