channel_verify - XRPL

Example code for the channel_verify JSON RPC method. Complete guide to using channel_verify JSON-RPC in the GetBlock Web3 documentation.

This method checks the validity of a signature that can be used to redeem a specific amount of XRP from a payment channel.

Parameters

Parameter
Type
Required
Description

channel_id

string

Yes

Channel ID (64 hex)

amount

string

Yes

Amount in drops

public_key

string

Yes

Public key of channel source

signature

string

Yes

Signature to verify

Request Example

cURL
curl --location --request POST 'https://xrp.getblock.io/mainnet/' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "channel_verify",
    "params": [{
        "channel_id": "5DB01B7FFED6B67E6B0414DED11E051D2EE2B7619CE0EAA6286D67A3A4D5BDB3",
        "amount": "1000000",
        "public_key": "aB44YfzW24VDEJQ2UuLPV2PvqcPCSoLnL7y5M1EzhdW4LnK5xMS3",
        "signature": "304402204EF0AFB78AC23ED1C472E74F4299C0C21F1B21D07EFC0A3838A420F76D783A400220154FB11B6F54320666E4C36CA7F686C16A3A0456800BBC43746F34AF50290064"
    }],
    "id": "getblock.io"
}'

Response Example

Returns

Field
Type
Description

signature_verified

boolean

Whether signature is valid

Use Cases

  • Validate channel claims

  • Payment verification

  • Security checks

SDK Integration

Last updated

Was this helpful?