← Digital Assets
XRP transaction policies
Choose which individual payments and batches a key can sign.
Payments and batches
Check payment amounts, destinations, tags, fees, and ledger bounds. Apply rules to each payment in a batch or to the combined amount.
Integration guideEdict exampleshowcase-xrp.edict
authority "showcase-xrp" {
intent = "xrp.transaction"
version = "1"
let XRP = 1000000
approver treasury {
type = "reference"
id = "treasury"
ref = "treasury@sha256:<digest>"
}
approver security {
type = "reference"
id = "security"
ref = "security@sha256:<digest>"
}
policy "reviewed-payments" {
let allowedPayment = (
transaction.type == "payment"
and transaction.fee > 0
and transaction.fee <= 12
and transaction.lastLedgerSequence != null
and transaction.amount != null
and transaction.amount > 0
and transaction.amount <= 10000 * XRP
)
allow if (allowedPayment)
require 2 of [treasury, security] if (
allowedPayment and transaction.amount != null and transaction.amount > 1000 * XRP
)
}
}