iexbase / ripple-api Goto Github PK
View Code? Open in Web Editor NEWA PHP API for interacting with Ripple
License: GNU General Public License v3.0
A PHP API for interacting with Ripple
License: GNU General Public License v3.0
The result of example is:
array:1 [
"result" => array:5 [
"error" => "invalidParams"
"error_code" => 31
"error_message" => "Invalid parameters."
"request" => array:2 [
"command" => "submit"
"tx_blob" => null
]
"status" => "error"
]
]
use IEXBase\RippleAPI\Contracts\TransactionBuilderContract;
use IEXBase\RippleAPI\Support\TransactionType;
include_once 'vendor/autoload.php';
$address = "Wallet address here";
$secretKey = "ss Secret key here";
$ripple = new \IEXBase\RippleAPI\Ripple($address, $secretKey);
try {
$transfer = $ripple->buildTransaction(function (TransactionBuilderContract $item)
{
return $item
->setAmount(1)
->setDestinationTag(1)
->setDestination('Receiver address here')
->setTransactionType(TransactionType::PAYMENT)
->sign();
})->submit();
} catch (Exception $e) {
die($e->getMessage());
}
echo var_dump($transfer);
cURL error 7: Failed to connect to s.altnet.rippletest.net port 51234: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://s.altnet.rippletest.net:51234/
I'm getting this error when trying to trigger a transaction.
Array
(
[result] => Array
(
[error] => invalidParams
[error_code] => 31
[error_message] => Invalid parameters.
[forwarded] => 1
[request] => Array
(
[command] => submit
[tx_blob] =>
)
[status] => error
[type] => response
[warnings] => Array
(
[0] => Array
(
[id] => 1004
[message] => This is a reporting server. The default behavior of a reporting server is to only return validated data. If you are looking for not yet validated data, include "ledger_index : current" in your request, which will cause this server to forward the request to a p2p node. If the forward is successful the response will include "forwarded" : "true"
)
)
)
)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.