Skip to content
SpartanCoin -

SpartanCoin API Reference (JSON-RPC)

1. Command Control

2. PHP



C++ SPNCXX is specially written for SpartanCoin JSON-RPC integrating into Application. It is very easy to integrate that.

SPNCXX Project

// 1. include spncxx client header.
#Include <spncxx/client.hxx>

// 2. Create a connection to the SpartanCoin Wallet or blockchain RPC server.
auto conn = spn::connection("", "55883", "rpc-username", "rpc-password");
Notice that spn::connection returns
such a c++ future object: std::future>
You are not suggested to create the spn::Client object directly because
it is not safe.

// 3. Get the spn::Client shared ptr.
auto client = conn.get();
// The get of that future returns std::shared_ptr object.

// 4. Request RPC Command to query blockchain data.
double diff = client->getdifficulty();

More: Using SPNCXX to write SpartanCoin Blockchain Based Application



No Trackbacks


Display comments as Linear | Threaded

No comments

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.

Form options

Submitted comments will be subject to moderation before being displayed.