> For the complete documentation index, see [llms.txt](https://docs.getblock.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.getblock.io/api-reference/xrp-ledger/sign_for-xrpl.md).

# sign\_for - XRPL

This method provides one signature for a multi-signed transaction. This method is admin-only on public servers.

{% hint style="warning" %}
Note: This method is not available on public RPC endpoints. Use local multi-signing with xrpl.js or xrpl-py instead.
{% endhint %}

### Parameters

| Parameter  | Type   | Required | Description         |
| ---------- | ------ | -------- | ------------------- |
| account    | string | Yes      | Address to sign for |
| tx\_json   | object | Yes      | Transaction to sign |
| secret     | string | No       | Signer's secret     |
| seed       | string | No       | Signer's seed       |
| seed\_hex  | string | No       | Seed in hex         |
| passphrase | string | No       | Passphrase          |
| key\_type  | string | No       | Key algorithm       |

### Request Example

{% tabs %}
{% tab title="cURL" %}
{% code title="curl" %}

```bash
curl --location --request POST 'https://go.getblock.io/<ACCESS_TOKEN>/' \

--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "sign_for",
    "params": [{
        "account": "rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH",
        "tx_json": {
            "TransactionType": "Payment",
            "Account": "rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH",
            "Destination": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
            "Amount": "1000000",
            "Fee": "30"
        },
        "secret": "s..."
    }],
    "id": "getblock.io"
}'
```

{% endcode %}
{% endtab %}

{% tab title="JavaScript (Axios)" %}
{% code title="sign\_for.js" %}

```javascript
const axios = require('axios');

const url = 'https://go.getblock.io/<ACCESS_TOKEN>/';
const headers = {
    'Content-Type': 'application/json'
};

const payload = {
    jsonrpc: '2.0',
    method: 'sign_for',
    params: [{
        account: 'rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH',
        tx_json: {
            TransactionType: 'Payment',
            Account: 'rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH',
            Destination: 'ra5nK24KXen9AHvsdFTKHSANinZseWnPcX',
            Amount: '1000000',
            Fee: '30'
        },
        secret: 's...'
    }],
    id: 'getblock.io'
};

axios.post(url, payload, { headers })
    .then(response => console.log(response.data))
    .catch(error => console.error(error));
```

{% endcode %}
{% endtab %}

{% tab title="Python" %}
{% code title="sign\_for.py" %}

```python
import requests

url = "https://go.getblock.io/<ACCESS_TOKEN>/"
headers = {
    "Content-Type": "application/json"
}

payload = {
    "jsonrpc": "2.0",
    "method": "sign_for",
    "params": [{
        "account": "rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH",
        "tx_json": {
            "TransactionType": "Payment",
            "Account": "rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH",
            "Destination": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
            "Amount": "1000000",
            "Fee": "30"
        },
        "secret": "s..."
    }],
    "id": "getblock.io"
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())
```

{% endcode %}
{% endtab %}

{% tab title="Rust" %}
{% code title="sign\_for.rs" %}

```rust
use reqwest::Client;
use serde_json::json;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = Client::new();
    
    let payload = json!({
        "jsonrpc": "2.0",
        "method": "sign_for",
        "params": [{
            "account": "rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH",
            "tx_json": {
                "TransactionType": "Payment",
                "Account": "rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH",
                "Destination": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
                "Amount": "1000000"
            },
            "secret": "s..."
        }],
        "id": "getblock.io"
    });

    let response = client
        .post("https://go.getblock.io/<ACCESS_TOKEN>/")
        .header("Content-Type", "application/json")
        .json(&payload)
        .send()
        .await?;

    let result: serde_json::Value = response.json().await?;
    println!("{:#?}", result);
    
    Ok(())
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

### Response Example

```json
{
    "result": {
        "error": "notSupported",
        "error_code": 75,
        "error_message": "Signing is not supported by this server.",
        "request": {
            "account": "rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH",
            "command": "sign_for",
            "secret": "<masked>",
            "tx_json": {
                "Account": "rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH",
                "TransactionType": "Payment"
            }
        },
        "status": "error"
    }
}
```

### Response Parameters

| Field    | Type   | Description                |
| -------- | ------ | -------------------------- |
| tx\_blob | string | Transaction with signature |
| tx\_json | object | Transaction JSON           |

### Use Cases

* Multi-signature wallets
* Shared custody
* Organizational accounts

### Recommended: Local Multi-Signing

{% tabs %}
{% tab title="xrpl.js" %}
{% code title="local\_multisign\_xrpl.js" %}

```javascript
const xrpl = require('xrpl');

async function multiSign() {
    const wallet1 = xrpl.Wallet.fromSeed('s...');
    const wallet2 = xrpl.Wallet.fromSeed('s...');
    
    const tx = {
        TransactionType: 'Payment',
        Account: 'rMultiSigAccount...',
        Destination: 'ra5nK24KXen9AHvsdFTKHSANinZseWnPcX',
        Amount: '1000000',
        Fee: '30',
        Sequence: 1,
        SigningPubKey: ''
    };
    
    // Each signer signs
    const sig1 = xrpl.multisign(tx, wallet1);
    const sig2 = xrpl.multisign(tx, wallet2);
    
    // Combine signatures
    const combined = xrpl.combine([sig1, sig2]);
    console.log('Combined:', combined);
}

multiSign();
```

{% endcode %}
{% endtab %}

{% tab title="xrpl-py" %}
{% code title="local\_multisign\_xrpl\_py.py" %}

```python
from xrpl.wallet import Wallet
from xrpl.transaction import multisign

wallet1 = Wallet.from_seed("s...")
wallet2 = Wallet.from_seed("s...")

# See xrpl-py documentation for full multi-sign workflow
```

{% endcode %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.getblock.io/api-reference/xrp-ledger/sign_for-xrpl.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
