xrp_dart library
xrpledger Library
This library provides a comprehensive set of tools and utilities for working with the XRPL (XRP Ledger). It supports various XRPL functionalities, including transaction handling, address encoding and decoding, XRPL network interaction through JSON-RPC API, and more.
Features:
- Create all transaction types
- Sign XRP transactions with ED25519 and SECP256K1 algorithms.
- Encoding and decoding of XRPL addresses.
- Interacting with the XRPL network via JSON-RPC API.
- Fee calculation for XRPL transactions.
- X-Address support for enhanced address features.
- Utility functions for managing XRPL data structures.
Classes
- AccountData
- AccountDelete
-
Represents an
AccountDelete transaction [https://xrpl.org/accountdelete.html](https://xrpl.org/accountdelete.html), which deletes an account and any objects it owns in the XRP Ledger, if possible, sending the account's remaining XRP to a specified destination account. See
Deletion of Accounts https://xrpl.org/accounts.html#deletion-of-accounts for the requirements to delete an account. - AccountFlags
- AccountInfo
- AccountingDuration
- AccountSet
- Represents an AccountSet transaction, which modifies the properties of an account in the XRP Ledger.
- Alternatives
- AMMBid
- Bid on an Automated Market Maker's (AMM's) auction slot. If you win, you can trade against the AMM at a discounted fee until you are outbid or 24 hours have passed. If you are outbid before 24 hours have passed, you are refunded part of the cost of your bid based on how much time remains. You bid using the AMM's LP Tokens; the amount of a winning bid is returned to the AMM, decreasing the outstanding balance of LP Tokens.
- AMMCreate
- Create a new Automated Market Maker (AMM) instance for trading a pair of assets (fungible tokens or XRP).
- AMMDelete
- Delete an empty Automated Market Maker (AMM) instance that could not be fully deleted automatically.
- AMMDeposit
- Deposit funds into an Automated Market Maker (AMM) instance and receive the AMM's liquidity provider tokens (LP Tokens) in exchange.
- AMMDepositFlagInterface
- AMMVote
- Vote on the trading fee for an Automated Market Maker (AMM) instance. Up to 8 accounts can vote in proportion to the amount of the AMM's LP Tokens they hold. Each new vote re-calculates the AMM's trading fee based on a weighted average of the votes.
- AMMWithdraw
- Withdraw assets from an Automated Market Maker (AMM) instance by returning the AMM's liquidity provider tokens (LP Tokens).
- AMMWithdrawFlagInterface
- AuthAccount
- CheckCancel
- Represents a `CheckCancel https://xrpl.org/checkcancel.html transaction, which cancels an unredeemed Check, removing it from the ledger without sending any money. The source or the destination of the check can cancel a Check at any time using this transaction type. If the Check has expired, any address can cancel it.
- CheckCash
- Represents a `CheckCash transaction https://xrpl.org/checkcash.html, which redeems a Check object to receive up to the amount authorized by the corresponding CheckCreate transaction. Only the Destination address of a Check can cash it.
- CheckCreate
- Represents a CheckCreate https://xrpl.org/checkcreate.html transaction, which creates a Check object. A Check object is a deferred payment that can be cashed by its intended destination. The sender of this transaction is the sender of the Check.
- Clawback
- The clawback transaction claws back issued funds from token holders.
- CurrencyAmount
- DepositPreauth
- Represents a DepositPreauth transaction, which gives another account pre-approval to deliver payments to the sender of this transaction, if this account is using Deposit Authorization.
- Drops
- EscrowCancel
- Represents an EscrowCancel transaction, which returns escrowed XRP to the sender after the Escrow has expired.
- EscrowCreate
- Represents an `EscrowCreate transaction, which locks up XRP until a specific time or condition is met.
- EscrowFinish
- Represents an EscrowFinish transaction, delivers XRP from a held payment to the recipient.
- Info
- IssuedCurrency
- IssuedCurrencyAmount
- LastClose
- LedgerData
- LedgerInfo
- Levels
- NFTokenAcceptOffer
- The NFTokenOfferAccept transaction is used to accept offers to buy or sell an NFToken. It can either:
- NFTokenBurn
- The NFTokenBurn transaction is used to remove an NFToken object from the NFTokenPage in which it is being held, effectively removing the token from the ledger ("burning" it). If this operation succeeds, the corresponding NFToken is removed. If this operation empties the NFTokenPage holding the NFToken or results in the consolidation, thus removing an NFTokenPage, the owner’s reserve requirement is reduced by one.
- NFTokenCancelOffer
-
The NFTokenCancelOffer transaction deletes existing NFTokenOffer objects.
It is useful if you want to free up space on your account to lower your
reserve requirement.
The transaction can be executed by the account that originally created
the NFTokenOffer, the account in the
Recipient
field of the NFTokenOffer (if present), or any account if the NFTokenOffer has anExpiration
and the NFTokenOffer has already expired. - NFTokenCreateOffer
- The NFTokenCreateOffer transaction creates either an offer to buy an NFT the submitting account does not own, or an offer to sell an NFT the submitting account does own.
- NFTokenCreateOfferFlagInterface
- NFTokenMint
- The NFTokenMint transaction creates an NFToken object and adds it to the relevant NFTokenPage object of the minter. If the transaction is successful, the newly minted token will be owned by the minter account specified by the transaction.
- NFTokenMintFlagInterface
- OfferCancel
- import 'package:xrp_dart/src/xrpl/utilities.dart'; Represents an OfferCancel transaction, which removes an Offer object from the decentralized exchange
- OfferCreate
- Represents an OfferCreate transaction, which executes a limit order in the `decentralized exchange https://xrpl.org/decentralized-exchange.html If the specified exchange cannot be completely fulfilled, it creates an Offer object for the remainder. Offers can be partially fulfilled.
- OfferCreateFlagInterface
- OnChainXRPLMemo
- Payment
-
Represents a Payment https://xrpl.org/payment.html transaction, which
sends value from one account to another. (Depending on the path taken, this
can involve additional exchanges of value, which occur atomically.) This
transaction type can be used for several
types of payments [http://xrpl.local/payment.html#types-of-payments](http://xrpl.local/payment.html#types-of-payments). Payments are also the only way to
create accounts http://xrpl.local/payment.html#creating-accounts. - PaymentChannelClaim
-
Represents a
PaymentChannelClaim <https://xrpl.org/paymentchannelclaim.html>
_ transaction, which claims XRP from apayment channel <https://xrpl.org/payment-channels.html>
_, adjusts channel's expiration, or both. This transaction can be used differently depending on the transaction sender's role in the specified channel. - PaymentChannelClaimFlagInterface
- PaymentChannelCreate
-
Represents a
PaymentChannelCreate <https://xrpl.org/paymentchannelcreate.html>
_ transaction, which creates apayment channel <https://xrpl.org/payment-channels.html>
_ and funds it with XRP. The sender of this transaction is the "source address" of the payment channel. - PaymentChannelFund
-
Represents a
PaymentChannelFund <https://xrpl.org/paymentchannelfund.html>
_ transaction, adds additional XRP to an openpayment channel <https://xrpl.org/payment-channels.html>
_, and optionally updates the expiration time of the channel. Only the source address of the channel can use this transaction. - RipplePathFound
- ServerInfo
- SetRegularKey
- Represents a SetRegularKey transaction, which assigns, changes, or removes a secondary "regular" key pair associated with an account.
- SignerEntry
- Represents one entry in a list of multi-signers authorized to an account.
- SignerListSet
- Represents a SignerListSet transaction, which creates, replaces, or removes a list of signers that can be used to multi-sign a transaction .
- StateAccounting
- TicketCreate
- A TicketCreate transaction sets aside one or more sequence numbers as Tickets.
- TransactionData
- TrustSet
- Represents a TrustSet transaction on the XRP Ledger. Creates or modifies a trust line linking two accounts. See TrustSet
- ValidatedLedger
- XRP
- XRPAddress
- XRPCurrencies
- XRPLastClose
- XRPLedgerState
- XRPLedgerStateAccounting
- XRPLedgerStateAccountingDuration
- XRPLedgerStateDetails
- XRPLedgerValidatedLedger
- XRPLMemo
-
An arbitrary piece of data attached to a transaction. A transaction can
have multiple Memo objects as an array in the Memos field.
Must contain one or more of
memo_data
,memo_format
, andmemo_type
. - XRPLRpc
- XRPL RPC Client
- XRPLSigners
- One Signer in a multi-signature. A multi-signed transaction can have an array of up to 8 Signers, each contributing a signature, in the Signers field.
- XRPLTransactionResult
- XRPLTxJson
- XRPTransaction
-
The base class for all
transaction types [https://xrpl.org/transaction-types.html](https://xrpl.org/transaction-types.html). Represents
fields common to all transaction types https://xrpl.org/transaction-common-fields.html.
Enums
- AccountSetAsfFlag
- Enum for AccountSet Flags.
- AccountSetFlag
- Enum for AccountSet Transaction Flags. Transactions of the AccountSet type support additional values in the Flags field. This enum represents those options. See AccountSet tf Flags
- AMMDepositFlag
- Transactions of the AMMDeposit type support additional values in the Flags field. This enum represents those options.
- AMMWithdrawFlag
- Transactions of the AMMWithdraw type support additional values in the Flags field. This enum represents those options.
- LedgerEntryType
- NFTokenCreateOfferFlag
- Transaction Flags for an NFTokenCreateOffer Transaction.
- NFTokenMintFlag
- Transaction Flags for an NFTokenMint Transaction.
- NoRippleCheckRole
- OfferCreateFlag
- Transactions of the OfferCreate type support additional values in the Flags field. This enum represents those options. `See OfferCreate Flags https://xrpl.org/offercreate.html#offercreate-flags
- PathFindSubcommand
- There are three different modes, or sub-commands, of the path_find command. Specify which one you want with the subcommand parameter: create - Start sending pathfinding information close - Stop sending pathfinding information status - Get the information of the currently-open pathfinding request
- PaymentChannelClaimFlag
- TrustSetFlag
- Transactions of the TrustSet type support additional values in the Flags field. This enum represents those options.
- XrplFeeType
- XRPLTransactionType
Functions
-
generateRandom(
int size) → Uint8List -
Generates a random Uint8List of the specified
size
. -
hash160(
Uint8List buffer) → Uint8List -
Computes the RIPEMD160 hash of the given
buffer
after applying SHA-256 hash. -
hash512(
Uint8List data) → Uint8List -
Computes the SHA-512 hash of the given
data
. -
hash512Half(
Uint8List data) → Uint8List -
Computes the first 32 bytes of the SHA-512 hash of the given
data
.