MPP.Methods.XRPL.Claim (mpp v0.17.0)

Copy Markdown View Source

Payment-channel claim message and signature verification.

The signed message is HashPrefix CLM\0 plus the 32-byte channel ID plus the authorized drops as a big-endian uint64, matching serializePayChanAuthorization / channel_verify (xrpl.org PaymentChannelClaim and channel_verify). secp256k1 signatures are SHA-512Half then canonical low-S ECDSA; Ed25519 keys (ED prefix) sign the raw message bytes.

Summary

Functions

SHA-512Half of the PaymentChannelClaim authorization message.

Verify a claim signature over channel ID and cumulative drops.

Functions

digest(channel_id, amount)

@spec digest(String.t(), non_neg_integer()) :: {:ok, binary()} | {:error, term()}

SHA-512Half of the PaymentChannelClaim authorization message.

verify(channel_id, amount, signature, public_key)

@spec verify(String.t(), non_neg_integer(), String.t(), String.t()) ::
  :ok | {:error, term()}

Verify a claim signature over channel ID and cumulative drops.