noripple_check - XRPL

This method provides a quick way to check the status of the NoRipple flag on an account's trust lines, which may be useful for token issuers.

Parameters

ParameterTypeRequiredDescription
accountstringYesAccount to check
rolestringYes"gateway" or "user"
transactionsbooleanNoInclude suggested txs
limitnumberNoMaximum problems
ledger_hashstringNoLedger hash
ledger_indexstring/numberNoLedger index

Request Example

bashcurl --location --request POST 'https://shared.eu-central-1.getblock.io/<ACCESS_TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "noripple_check",
    "params": [{
        "account": "rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH",
        "role": "gateway",
        "transactions": true
    }],
    "id": "getblock.io"
}'

noripple_check.js

javascriptconst axios = require('axios');

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

const payload = {
    jsonrpc: '2.0',
    method: 'noripple_check',
    params: [{
        account: 'rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH',
        role: 'gateway',
        transactions: true
    }],
    id: 'getblock.io'
};

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

noripple_check.py

pythonimport requests

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

payload = {
    "jsonrpc": "2.0",
    "method": "noripple_check",
    "params": [{
        "account": "rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH",
        "role": "gateway",
        "transactions": True
    }],
    "id": "getblock.io"
}

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

noripple_check.rs

rustuse 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": "noripple_check",
        "params": [{
            "account": "rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH",
            "role": "gateway",
            "transactions": true
        }],
        "id": "getblock.io"
    });

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

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

Response Example

json{
    "result": {
        "ledger_current_index": 63632030,
        "problems": [],
        "status": "success"
    }
}

Response Parameters

ParameterTypeDescription
problemsarrayIssues found
transactionsarraySuggested fixes

Use Cases

  • Gateway compliance
  • Trust line auditing
  • Token issuer checks

Error Handling

actNotFound

Account not found

invalidParams

Invalid parameters

SDK Integration

xrpl-noripple-check.js

javascriptconst xrpl = require('xrpl');

async function norippleCheck() {
    const client = new xrpl.Client('wss://shared.eu-central-1.getblock.io/<ACCESS_TOKEN>');
    await client.connect();
    
    const response = await client.request({
        command: 'noripple_check',
        account: 'rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH',
        role: 'gateway'
    });
    
    console.log('Problems:', response.result.problems);
    await client.disconnect();
}

norippleCheck();

xrpl-noripple-check.py

pythonfrom xrpl.clients import JsonRpcClient
from xrpl.models.requests import NoRippleCheck

client = JsonRpcClient("https://shared.eu-central-1.getblock.io/<ACCESS_TOKEN>")
request = NoRippleCheck(
    account="rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH",
    role="gateway"
)
response = client.request(request)
print(response.result)