-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upgrade guzzle version and min php version
add usage example
- Loading branch information
1 parent
dbbc62b
commit e73320f
Showing
4 changed files
with
388 additions
and
301 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,35 @@ | ||
# php-ripple-lib | ||
PHP API for interacting with the XRP Ledger | ||
|
||
Upgrade guzzle to version 7.* | ||
|
||
Min php supported version 7.2 | ||
|
||
## Installation | ||
`composer require lessmore92/php-ripple-lib` | ||
|
||
|
||
## Sample Usage | ||
```php | ||
require_once "vendor/autoload.php"; | ||
|
||
$options = [ | ||
'server' => 'https://s.altnet.rippletest.net:51234', | ||
'timeOut' => 5, | ||
]; | ||
|
||
$api = new \Lessmore92\Ripple\RippleAPI($options); | ||
$server = $api->serverInfo(); | ||
var_dump($server); | ||
|
||
$address = 'rEdhDpVvmryJcMNcFTzXW3hAmiCkUXUru6'; | ||
$balance = $api->accountInfo($address)->balance->toXrp(); | ||
var_dump($balance); | ||
|
||
$txs = $api->accountTx($address, []); | ||
var_dump($txs); | ||
|
||
$fee = $api->getFee(); | ||
var_dump($fee); | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.