diff --git a/README.md b/README.md index bd589cb..c4ebb52 100644 --- a/README.md +++ b/README.md @@ -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); + +``` diff --git a/composer.json b/composer.json index ca3c826..d15c32c 100644 --- a/composer.json +++ b/composer.json @@ -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": { diff --git a/composer.lock b/composer.lock index dd8c1c6..86c2c05 100644 --- a/composer.lock +++ b/composer.lock @@ -4,76 +4,118 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0e7b4e67c401145a30310799db77013c", + "content-hash": "2ee4386964c97d94d4f8d5a96acf9f19", "packages": [ { "name": "guzzlehttp/guzzle", - "version": "6.5.x-dev", + "version": "7.7.x-dev", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "e8ed4dbf49b260ff129ff0e0400718c3269971bf" + "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/e8ed4dbf49b260ff129ff0e0400718c3269971bf", - "reference": "e8ed4dbf49b260ff129ff0e0400718c3269971bf", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/fb7566caccf22d74d1ab270de3551f72a58399f5", + "reference": "fb7566caccf22d74d1ab270de3551f72a58399f5", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.6.1", - "php": ">=5.5", - "symfony/polyfill-intl-idn": "^1.17.0" + "guzzlehttp/promises": "^1.5.3 || ^2.0", + "guzzlehttp/psr7": "^1.9.1 || ^2.4.5", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" }, "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.1", "ext-curl": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", - "psr/log": "^1.1" + "php-http/client-integration-tests": "dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999", + "php-http/message-factory": "^1.1", + "phpunit/phpunit": "^8.5.29 || ^9.5.23", + "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", "psr/log": "Required for using the Log middleware" }, + "default-branch": true, "type": "library", "extra": { - "branch-alias": { - "dev-master": "6.5-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "autoload": { - "psr-4": { - "GuzzleHttp\\": "src/" - }, "files": [ "src/functions_include.php" - ] + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" } ], "description": "Guzzle is a PHP HTTP client library", - "homepage": "http://guzzlephp.org/", "keywords": [ "client", "curl", "framework", "http", "http client", + "psr-18", + "psr-7", "rest", "web service" ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/6.5" + "source": "https://github.com/guzzle/guzzle/tree/7.7.0" }, "funding": [ { @@ -85,64 +127,70 @@ "type": "github" }, { - "url": "https://github.com/alexeyshockov", - "type": "github" - }, - { - "url": "https://github.com/gmponos", - "type": "github" - }, - { - "url": "https://github.com/sagikazarmark", - "type": "github" + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" } ], - "time": "2020-07-02T06:52:04+00:00" + "time": "2023-05-21T14:04:53+00:00" }, { "name": "guzzlehttp/promises", - "version": "dev-master", + "version": "2.0.x-dev", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "ddfeedfff2a52661429437da0702979f708e6ac6" + "reference": "4a94655427efd6906ed3eb628c79693291264713" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/ddfeedfff2a52661429437da0702979f708e6ac6", - "reference": "ddfeedfff2a52661429437da0702979f708e6ac6", + "url": "https://api.github.com/repos/guzzle/promises/zipball/4a94655427efd6906ed3eb628c79693291264713", + "reference": "4a94655427efd6906ed3eb628c79693291264713", "shasum": "" }, "require": { - "php": ">=5.5" + "php": "^7.2.5 || ^8.0" }, "require-dev": { - "symfony/phpunit-bridge": "^4.4 || ^5.1" + "bamarni/composer-bin-plugin": "^1.8.1", + "phpunit/phpunit": "^8.5.29 || ^9.5.23" }, "default-branch": true, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.4-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "autoload": { "psr-4": { "GuzzleHttp\\Promise\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" } ], "description": "Guzzle promises library", @@ -151,66 +199,107 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/master" + "source": "https://github.com/guzzle/promises/tree/2.0" }, - "time": "2020-10-19T16:50:15+00:00" + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "time": "2023-05-21T19:15:14+00:00" }, { "name": "guzzlehttp/psr7", - "version": "1.x-dev", + "version": "2.6.x-dev", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "f47ece9e6e8ce74e3be04bef47f46061dc18c095" + "reference": "b635f279edd83fc275f822a1188157ffea568ff6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/f47ece9e6e8ce74e3be04bef47f46061dc18c095", - "reference": "f47ece9e6e8ce74e3be04bef47f46061dc18c095", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/b635f279edd83fc275f822a1188157ffea568ff6", + "reference": "b635f279edd83fc275f822a1188157ffea568ff6", "shasum": "" }, "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0", - "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.1 || ^2.0", + "ralouphie/getallheaders": "^3.0" }, "provide": { + "psr/http-factory-implementation": "1.0", "psr/http-message-implementation": "1.0" }, "require-dev": { - "ext-zlib": "*", - "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.10" + "bamarni/composer-bin-plugin": "^1.8.1", + "http-interop/http-factory-tests": "^0.9", + "phpunit/phpunit": "^8.5.29 || ^9.5.23" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", "extra": { - "branch-alias": { - "dev-master": "1.7-dev" + "bamarni-bin": { + "bin-links": true, + "forward-command": false } }, "autoload": { "psr-4": { "GuzzleHttp\\Psr7\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, { "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" } ], "description": "PSR-7 message implementation that also provides common utility methods", @@ -226,9 +315,23 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/1.x" + "source": "https://github.com/guzzle/psr7/tree/2.5.0" }, - "time": "2020-12-08T11:45:39+00:00" + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "time": "2023-04-17T16:11:26+00:00" }, { "name": "lessmore92/base-x", @@ -335,16 +438,16 @@ }, { "name": "lessmore92/php-ripple-address-codec", - "version": "v1.0.1", + "version": "v1.0.3", "source": { "type": "git", "url": "https://github.com/lessmore92/php-ripple-address-codec.git", - "reference": "b09681f3e3ba66ada4453520a976e284a8499e99" + "reference": "43c05caca5dd6370b4b3e8b5edb79640f39e8110" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lessmore92/php-ripple-address-codec/zipball/b09681f3e3ba66ada4453520a976e284a8499e99", - "reference": "b09681f3e3ba66ada4453520a976e284a8499e99", + "url": "https://api.github.com/repos/lessmore92/php-ripple-address-codec/zipball/43c05caca5dd6370b4b3e8b5edb79640f39e8110", + "reference": "43c05caca5dd6370b4b3e8b5edb79640f39e8110", "shasum": "" }, "require": { @@ -381,27 +484,27 @@ ], "support": { "issues": "https://github.com/lessmore92/php-ripple-address-codec/issues", - "source": "https://github.com/lessmore92/php-ripple-address-codec/tree/v1.0.1" + "source": "https://github.com/lessmore92/php-ripple-address-codec/tree/v1.0.3" }, - "time": "2021-01-16T22:30:46+00:00" + "time": "2022-01-30T20:14:22+00:00" }, { "name": "lessmore92/php-ripple-binary-codec", - "version": "v1.0.0", + "version": "v1.0.1", "source": { "type": "git", "url": "https://github.com/lessmore92/php-ripple-binary-codec.git", - "reference": "419293ca5e592093aae68429e1d2bddbf0afbb13" + "reference": "af5f60f6589f0943f387d9522db63884873c9749" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lessmore92/php-ripple-binary-codec/zipball/419293ca5e592093aae68429e1d2bddbf0afbb13", - "reference": "419293ca5e592093aae68429e1d2bddbf0afbb13", + "url": "https://api.github.com/repos/lessmore92/php-ripple-binary-codec/zipball/af5f60f6589f0943f387d9522db63884873c9749", + "reference": "af5f60f6589f0943f387d9522db63884873c9749", "shasum": "" }, "require": { "lessmore92/buffer": "v1.0.0", - "lessmore92/php-ripple-address-codec": "v1.0.1", + "lessmore92/php-ripple-address-codec": "^v1.0", "php": ">7", "simplito/bn-php": "~1.1.0" }, @@ -431,27 +534,27 @@ ], "support": { "issues": "https://github.com/lessmore92/php-ripple-binary-codec/issues", - "source": "https://github.com/lessmore92/php-ripple-binary-codec/tree/v1.0.0" + "source": "https://github.com/lessmore92/php-ripple-binary-codec/tree/v1.0.1" }, - "time": "2021-01-18T18:47:04+00:00" + "time": "2021-06-22T19:25:49+00:00" }, { "name": "lessmore92/php-ripple-keypairs", - "version": "v1.0.0", + "version": "v1.0.1", "source": { "type": "git", "url": "https://github.com/lessmore92/php-ripple-keypairs.git", - "reference": "b1b85fbfadb260a79240727a8e82fd9f1ab67faf" + "reference": "466de1c61aa8aa9ea33a592212513f00f23b3ee2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lessmore92/php-ripple-keypairs/zipball/b1b85fbfadb260a79240727a8e82fd9f1ab67faf", - "reference": "b1b85fbfadb260a79240727a8e82fd9f1ab67faf", + "url": "https://api.github.com/repos/lessmore92/php-ripple-keypairs/zipball/466de1c61aa8aa9ea33a592212513f00f23b3ee2", + "reference": "466de1c61aa8aa9ea33a592212513f00f23b3ee2", "shasum": "" }, "require": { "lessmore92/buffer": "v1.0.0", - "lessmore92/php-ripple-address-codec": "v1.0.1", + "lessmore92/php-ripple-address-codec": "^v1.0", "php": ">7", "simplito/bn-php": "~1.1.0", "simplito/elliptic-php": "^1.0" @@ -484,9 +587,118 @@ ], "support": { "issues": "https://github.com/lessmore92/php-ripple-keypairs/issues", - "source": "https://github.com/lessmore92/php-ripple-keypairs/tree/v1.0.0" + "source": "https://github.com/lessmore92/php-ripple-keypairs/tree/v1.0.1" }, - "time": "2021-01-18T18:46:09+00:00" + "time": "2021-06-22T19:24:51+00:00" + }, + { + "name": "psr/http-client", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/0955afe48220520692d2d09f7ab7e0f93ffd6a31", + "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "support": { + "source": "https://github.com/php-fig/http-client/tree/1.0.2" + }, + "time": "2023-04-10T20:12:12+00:00" + }, + { + "name": "psr/http-factory", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "6d70f402f0eddb2b154b22950b5381bbf5b28469" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/6d70f402f0eddb2b154b22950b5381bbf5b28469", + "reference": "6d70f402f0eddb2b154b22950b5381bbf5b28469", + "shasum": "" + }, + "require": { + "php": ">=7.0.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-factory/tree/master" + }, + "time": "2023-05-17T18:32:11+00:00" }, { "name": "psr/http-message", @@ -494,22 +706,22 @@ "source": { "type": "git", "url": "https://github.com/php-fig/http-message.git", - "reference": "efd67d1dc14a7ef4fc4e518e7dee91c271d524e4" + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/efd67d1dc14a7ef4fc4e518e7dee91c271d524e4", - "reference": "efd67d1dc14a7ef4fc4e518e7dee91c271d524e4", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": "^7.2 || ^8.0" }, "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -524,7 +736,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for HTTP messages", @@ -538,9 +750,9 @@ "response" ], "support": { - "source": "https://github.com/php-fig/http-message/tree/master" + "source": "https://github.com/php-fig/http-message/tree/2.0" }, - "time": "2019-08-29T13:16:46+00:00" + "time": "2023-04-04T09:54:51+00:00" }, { "name": "ralouphie/getallheaders", @@ -626,16 +838,16 @@ }, { "name": "simplito/bn-php", - "version": "1.1.2", + "version": "1.1.3", "source": { "type": "git", "url": "https://github.com/simplito/bn-php.git", - "reference": "e852fcd27e4acbc32459606d7606e45a85e42465" + "reference": "189167f940cdb681288a967b0f4d66de81adcd97" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/simplito/bn-php/zipball/e852fcd27e4acbc32459606d7606e45a85e42465", - "reference": "e852fcd27e4acbc32459606d7606e45a85e42465", + "url": "https://api.github.com/repos/simplito/bn-php/zipball/189167f940cdb681288a967b0f4d66de81adcd97", + "reference": "189167f940cdb681288a967b0f4d66de81adcd97", "shasum": "" }, "require": { @@ -664,22 +876,22 @@ "description": "Big number implementation compatible with bn.js", "support": { "issues": "https://github.com/simplito/bn-php/issues", - "source": "https://github.com/simplito/bn-php/tree/1.1.2" + "source": "https://github.com/simplito/bn-php/tree/1.1.3" }, - "time": "2018-04-12T11:07:43+00:00" + "time": "2022-08-12T18:58:14+00:00" }, { "name": "simplito/elliptic-php", - "version": "1.0.7", + "version": "1.0.10", "source": { "type": "git", "url": "https://github.com/simplito/elliptic-php.git", - "reference": "a2612c8289270bd00086d1c070efc3fca9d7abce" + "reference": "a6228f480c729cf8efe2650a617c8500e981716d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/simplito/elliptic-php/zipball/a2612c8289270bd00086d1c070efc3fca9d7abce", - "reference": "a2612c8289270bd00086d1c070efc3fca9d7abce", + "url": "https://api.github.com/repos/simplito/elliptic-php/zipball/a6228f480c729cf8efe2650a617c8500e981716d", + "reference": "a6228f480c729cf8efe2650a617c8500e981716d", "shasum": "" }, "require": { @@ -716,6 +928,7 @@ "EdDSA", "cryptography", "curve", + "curve25519-weier", "ecc", "ecdh", "elliptic", @@ -728,217 +941,40 @@ ], "support": { "issues": "https://github.com/simplito/elliptic-php/issues", - "source": "https://github.com/simplito/elliptic-php/tree/1.0.7" + "source": "https://github.com/simplito/elliptic-php/tree/1.0.10" }, - "time": "2021-01-12T11:40:37+00:00" + "time": "2022-08-12T19:00:25+00:00" }, { - "name": "symfony/polyfill-intl-idn", - "version": "dev-main", + "name": "symfony/deprecation-contracts", + "version": "2.5.x-dev", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "0eb8293dbbcd6ef6bf81404c9ce7d95bcdf34f44" + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "80d075412b557d41002320b96a096ca65aa2c98d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/0eb8293dbbcd6ef6bf81404c9ce7d95bcdf34f44", - "reference": "0eb8293dbbcd6ef6bf81404c9ce7d95bcdf34f44", - "shasum": "" - }, - "require": { - "php": ">=7.1", - "symfony/polyfill-intl-normalizer": "^1.10", - "symfony/polyfill-php72": "^1.10" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "default-branch": true, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.22-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Idn\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Laurent Bassin", - "email": "laurent@bassin.info" - }, - { - "name": "Trevor Rowbotham", - "email": "trevor.rowbotham@pm.me" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "idn", - "intl", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.22.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-01-07T16:49:33+00:00" - }, - { - "name": "symfony/polyfill-intl-normalizer", - "version": "dev-main", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "6e971c891537eb617a00bb07a43d182a6915faba" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/6e971c891537eb617a00bb07a43d182a6915faba", - "reference": "6e971c891537eb617a00bb07a43d182a6915faba", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "default-branch": true, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.22-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's Normalizer class and related functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "intl", - "normalizer", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.22.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-01-07T17:09:11+00:00" - }, - { - "name": "symfony/polyfill-php72", - "version": "dev-main", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", - "reference": "cc6e6f9b39fe8075b3dabfbaf5b5f645ae1340c9", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/80d075412b557d41002320b96a096ca65aa2c98d", + "reference": "80d075412b557d41002320b96a096ca65aa2c98d", "shasum": "" }, "require": { "php": ">=7.1" }, - "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.22-dev" + "dev-main": "2.5-dev" }, "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - }, "files": [ - "bootstrap.php" + "function.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -955,16 +991,10 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.22.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/2.5" }, "funding": [ { @@ -980,7 +1010,7 @@ "type": "tidelift" } ], - "time": "2021-01-07T16:49:33+00:00" + "time": "2023-01-24T14:02:46+00:00" } ], "packages-dev": [], @@ -990,8 +1020,8 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">7" + "php": ">7.2" }, "platform-dev": [], - "plugin-api-version": "2.0.0" + "plugin-api-version": "2.3.0" } diff --git a/test.php b/test.php new file mode 100644 index 0000000..a95161a --- /dev/null +++ b/test.php @@ -0,0 +1,27 @@ +
+ '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);