| Crates.io | xrpl-std |
| lib.rs | xrpl-std |
| version | 0.5.0-devnet5 |
| created_at | 2025-08-06 23:53:28.762855+00 |
| updated_at | 2025-08-06 23:53:28.762855+00 |
| description | Standard library for XRPL WebAssembly smart contracts |
| homepage | https://github.com/XRPLF/craft/tree/main/xrpl-std |
| repository | https://github.com/XRPLF/craft |
| max_upload_size | |
| id | 1784497 |
| size | 258,372 |
Standard library for XRPL WebAssembly smart contracts.
This crate provides the core functionality needed to develop smart contracts for the XRP Ledger, including:
Add this to your Cargo.toml:
[dependencies]
xrpl-std = "0.5.0-devnet5"
#![no_std]
use xrpl_std::core::current_tx::escrow_finish;
use xrpl_std::core::current_tx::traits::TransactionCommonFields;
#[no_mangle]
pub extern "C" fn finish() -> i32 {
// Get the current escrow finish transaction
let escrow_finish = escrow_finish::get_current_escrow_finish();
// Access transaction fields
let account = match escrow_finish.get_account() {
Ok(v) => v,
Err(_) => return 0, // Keep escrow locked on error
};
// Make escrow release decision based on account
if account.0 == b"rAuthorizedAccount..." {
1 // Release escrow
} else {
0 // Keep escrow locked
}
}
For more information about developing XRPL smart contracts, see the craft repository.
This project is licensed under the ISC License.