Skip to content

Commit

Permalink
upgrade guzzle version and min php version
Browse files Browse the repository at this point in the history
add usage example
  • Loading branch information
lessmore92 committed Jun 11, 2023
1 parent dbbc62b commit e73320f
Show file tree
Hide file tree
Showing 4 changed files with 388 additions and 301 deletions.
30 changes: 30 additions & 0 deletions README.md
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);

```
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
],
"minimum-stability": "dev",
"require": {
"php": ">7",
"php": ">7.2",
"lessmore92/php-ripple-keypairs": "^v1.0",
"lessmore92/php-ripple-binary-codec": "^v1.0",
"guzzlehttp/guzzle": "^6.3"
"guzzlehttp/guzzle": "7.*"
},
"autoload": {
"psr-4": {
Expand Down
Loading

0 comments on commit e73320f

Please sign in to comment.