GithubHelp home page GithubHelp logo

iexbase / ripple-api Goto Github PK

View Code? Open in Web Editor NEW
9.0 9.0 9.0 51 KB

A PHP API for interacting with Ripple

License: GNU General Public License v3.0

PHP 100.00%
php ripple ripple-lib rippleapi rippled

ripple-api's People

Contributors

serderovsh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ripple-api's Issues

invalidParams in examples/payment-transaction.php

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"
  ]
]

Script failed to connect to Testnet and Livenet.

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/

invalidParams - Submitting transaction

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"
                        )

                )

        )

)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.