$address
$address
Account's Address (rXXXXXX.
..)
Account helper for RippleRest
__construct(string $address, string $secret) : \RippleRestAccount
Create a new instance of RippleRestAccount.
string | $address | {@see RippleRestAccount::$address} |
string | $secret | {@see RippleRestAccount::$secret} |
getBalances() : \RippleRestBalance[]
Get an account's existing balances.
This includes XRP balance (which does not include a counterparty) and trustline balances.
if RippleRest server returns an error
if protocol is wrong or network is down
addTrustline(mixed $obj, boolean $allowRippling) : array
Add trustline
mixed | $obj | Either a string representation of trustline limit, Hash containing value, currency, counterparty or a string form value/currency/counterparty. |
boolean | $allowRippling | See here for details |
if secret is missing from the Account object
if RippleRest server returns an error
if protocol is wrong or network is down
getSettings() : \RippleRestAccountSettings
Returns a AccountSettings object for this account.
if RippleRest server returns an error
if protocol is wrong or network is down
setSettings(\RippleRestAccountSettings $obj) : null
Update this account's settings with a AccountSettings object.
\RippleRestAccountSettings | $obj |
if secret is missing from the Account object
if RippleRest server returns an error
if protocol is wrong or network is down
getNotification(string $hash) : \RippleRestNotification
Get notifications.
Clients using notifications to monitor their account activity should pay particular attention to the state
and result
fields. The state
field will either be validated
or failed
and represents the finalized status of that transaction. The result
field will be tesSUCCESS
if the state
was validated. If the transaction failed, result
will contain the rippled
or ripple-lib
error code.
Notifications have next_notification_url
and previous_notification_url
's. Account notifications can be polled by continuously following the next_notification_url
, and handling the resultant notifications, until the next_notification_url
is an empty string. This means that there are no new notifications but, as soon as there are, querying the same URL that produced this notification in the first place will return the same notification but with the next_notification_url
set.
string | $hash |
if RippleRest server returns an error
if protocol is wrong or network is down
getPayment(string $hash) : \RippleRestPayment
Returns an individual payment.
string | $hash | Payment hash or client resource ID |
if RippleRest server returns an error
if protocol is wrong or network is down
findPaymentPaths(mixed $destinationAccount, mixed $destinationAmount, string[] $sourceCurrencies) : \RippleRestPayment[]
Query `rippled` for possible payment "paths" through the Ripple Network to deliver the given amount to the specified `destination_account`. If the `destination_amount` issuer is not specified, paths will be returned for all of the issuers from whom the `destination_account` accepts the given currency.
mixed | $destinationAccount | [String, RippleRestAccount] destination account |
mixed | $destinationAmount | [String, RippleRestAmount] destination amount |
string[] | $sourceCurrencies | an array of source currencies that can be used to constrain the results returned (e.g. |
if RippleRest server returns an error
if protocol is wrong or network is down
createPayment(\RippleRestAccount $destinationAccount, mixed $destinationAmount) : \RippleRestPayment
Create a RippleRestPayment object with some field filled.
\RippleRestAccount | $destinationAccount | destination account |
mixed | $destinationAmount | [String, RippleRestAmount] destination amount |
submitPayment(\RippleRestPaymeng $payment) : string
Submits a payment
\RippleRestPaymeng | $payment | Payment object |
if secret is missing from the Account object
if RippleRest server returns an error
if protocol is wrong or network is down
Client resource ID
queryPayments(array $options) : \Payment[]
Browse historical payments in bulk.
array | $options | (Defaults to null) An assoc array with the following options:
|
if RippleRest server returns an error
if protocol is wrong or network is down