JSON RPC transfer object

Discussion of math, cryptography, protocol, and features

JSON RPC transfer object

Postby JeffStrehlow » Wed Dec 03, 2014 5:39 pm

I'm working on a wallet for cryptonote coins and was able to come up with some of the RPC request objects. For example:

JSON.stringify({"jsonrpc": "2.0", "method": "getaddress", "params": {}, "id": 0});

JSON.stringify({"jsonrpc": "2.0", "method": "getbalance", "params": {}, "id": 1});

JSON.stringify({"jsonrpc": "2.0", "method": "incoming_transfers", "params": {"transfer_type": "all"}, "id": 2});

But I'm having difficulty coming up with the one for doing transfers. You guys can help me if you know the API. A transfer would have to be something like this:

JSON.stringify({"jsonrpc": "2.0", "method": "transfer", "params": {??????????}, "id": 3});

I just need to find out the value of the "params" property. It's pretty obvious that the rest above is correct. I'll make a guess and say that "mixin_count" and "payment_id" are JSON properties. If that is the case, this would be part of the solution:

"params": {"mixin_count":5,"payment_id":"64-character hexadecimal string",????????????}


How are the addresses and corresponding amounts shown in the request object?

Suppose I wanted to send 100 coins to address 1g74bk888888888888888888888888888888888888888888888888888888899999gggggssss and 200 coins to address 5djkfre7777777555555555553444444444400000000000008888888888888hgfhjhhhhhhhh, what would the "params" part of the request object look like?

Thankyou for your help!
JeffStrehlow
 
Posts: 2
Joined: Tue Dec 02, 2014 4:15 pm

Re: JSON RPC transfer object

Postby Maurice.P » Thu Dec 04, 2014 8:15 pm

Hi,

We appreciate your interest in the CN technology. Look up the answer to your question here:

https://wiki.bytecoin.org/wiki/Wallet_JSON_RPC_API

There you'll find an example of the similar request.
Maurice.P
 
Posts: 63
Joined: Wed Mar 26, 2014 3:26 pm

Re: JSON RPC transfer object

Postby JeffStrehlow » Sat Dec 06, 2014 1:53 am

Maurice.P wrote:Hi,

We appreciate your interest in the CN technology. Look up the answer to your question here:

https://wiki.bytecoin.org/wiki/Wallet_JSON_RPC_API

There you'll find an example of the similar request.

Fantastic, that's exactly what I need. Thank you very much Maurice.
JeffStrehlow
 
Posts: 2
Joined: Tue Dec 02, 2014 4:15 pm


Return to Technology

Who is online

Users browsing this forum: No registered users and 2 guests

cron