I want to try doing some OMC related project, but due to the fact that the only API for OMC is provided by omnicha.in and is going to change "soon" with no estimates, I thought of hosting omnicoind RPC server on machine, after looking around a bit, I found there's a ruby gem for bitcoind JSON RPC server here.
So I thought of using it, but I'd like to ask if there would be any problems since it's different algorithm of mining, addresses and keys are different too.
Also does anyone know if there's a place with full list of API provided by JSON RPC server of omnicoind ??
I might write as well try to write a REST API for OMC as practice on using Sinatra.
Thanks in advance.
Have a cool signature? hit me up and I might use it.
(Mar 25, 2015 11:39 AM)severos Wrote: I want to try doing some OMC related project, but due to the fact that the only API for OMC is provided by omnicha.in and is going to change "soon" with no estimates, I thought of hosting omnicoind RPC server on machine, after looking around a bit, I found there's a ruby gem for bitcoind JSON RPC serverhere.
So I thought of using it, but I'd like to ask if there would be any problems since it's different algorithm of mining, addresses and keys are different too.
Also does anyone know if there's a place with full list of API provided by JSON RPC server of omnicoind ??
I might write as well try to write a REST API for OMC as practice on using Sinatra.
Thanks in advance.
You can run "omnicoind help" to get a list of available commands. As for differences, the main differences are probably those:
1) Mining is done with Scrypt instead of SHA 256
2) The address version byte is 0x73 instead of 0x00
3) New addresses are generated to receive change outputs
You can use whatever Bitcoin API script you feel like, most of them work with Omnicoin out of the box.
I've build OmniCoind and tried running:
./OmniCoind help
waited for half an hour and nothing showing in the terminal, but I can clearly see the process running in system monitor :/
Have a cool signature? hit me up and I might use it.
(Mar 25, 2015 09:51 PM)severos Wrote: I've build OmniCoind and tried running:
./OmniCoind help
waited for half an hour and nothing showing in the terminal, but I can clearly see the process running in system monitor :/
Odd...
Well here you go:
Code addmultisigaddress <nrequired> <'["key","key"]'> [account]
addnode <node> <add|remove|onetry>
backupwallet <destination>
createmultisig <nrequired> <'["key","key"]'>
createrawtransaction [{"txid":txid,"vout":n},...] {address:amount,...}
decoderawtransaction <hex string>
dumpprivkey <OmniCoinaddress>
encryptwallet <passphrase>
getaccount <OmniCoinaddress>
getaccountaddress <account>
getaddednodeinfo <dns> [node]
getaddressesbyaccount <account>
getbalance [account] [minconf=1]
getbestblockhash
getblock <hash> [verbose=true]
getblockcount
getblockhash <index>
getblocktemplate [params]
getconnectioncount
getdifficulty
getgenerate
gethashespersec
getinfo
getmininginfo
getnetworkhashps [blocks] [height]
getnewaddress [account]
getpeerinfo
getrawmempool
getrawtransaction <txid> [verbose=0]
getreceivedbyaccount <account> [minconf=1]
getreceivedbyaddress <OmniCoinaddress> [minconf=1]
gettransaction <txid>
gettxout <txid> <n> [includemempool=true]
gettxoutsetinfo
getwork [data]
getworkex [data, coinbase]
help [command]
importprivkey <OmniCoinprivkey> [label] [rescan=true]
keypoolrefill
listaccounts [minconf=1]
listaddressgroupings
listlockunspent
listreceivedbyaccount [minconf=1] [includeempty=false]
listreceivedbyaddress [minconf=1] [includeempty=false]
listsinceblock [blockhash] [target-confirmations]
listtransactions [account] [count=10] [from=0]
listunspent [minconf=1] [maxconf=999999] ["address",...]
lockunspent unlock? [array-of-Objects]
move <fromaccount> <toaccount> <amount> [minconf=1] [comment]
sendfrom <fromaccount> <toOmniCoinaddress> <amount> [minconf=1] [comment] [comment-to]
sendmany <fromaccount> {address:amount,...} [minconf=1] [comment]
sendrawtransaction <hex string>
sendtoaddress <OmniCoinaddress> <amount> [comment] [comment-to]
setaccount <OmniCoinaddress> <account>
setgenerate <generate> [genproclimit]
setmininput <amount>
settxfee <amount>
signmessage <OmniCoinaddress> <message>
signrawtransaction <hex string> [{"txid":txid,"vout":n,"scriptPubKey":hex,"redeemScript":hex},...] [<privatekey1>,...] [sighashtype="ALL"]
stop
submitblock <hex data> [optional-params-obj]
validateaddress <OmniCoinaddress>
verifychain [check level] [num blocks]
verifymessage <OmniCoinaddress> <signature> <message>
All you have to do is: cd /root/.Omnicoind and then run OmniCoind help
It also depends on where you've installed it.
hi there.
(Mar 26, 2015 12:03 PM)Doctor Blue Wrote: Odd...
Well here you go:
Code addmultisigaddress <nrequired> <'["key","key"]'> [account]
addnode <node> <add|remove|onetry>
backupwallet <destination>
createmultisig <nrequired> <'["key","key"]'>
createrawtransaction [{"txid":txid,"vout":n},...] {address:amount,...}
decoderawtransaction <hex string>
dumpprivkey <OmniCoinaddress>
encryptwallet <passphrase>
getaccount <OmniCoinaddress>
getaccountaddress <account>
getaddednodeinfo <dns> [node]
getaddressesbyaccount <account>
getbalance [account] [minconf=1]
getbestblockhash
getblock <hash> [verbose=true]
getblockcount
getblockhash <index>
getblocktemplate [params]
getconnectioncount
getdifficulty
getgenerate
gethashespersec
getinfo
getmininginfo
getnetworkhashps [blocks] [height]
getnewaddress [account]
getpeerinfo
getrawmempool
getrawtransaction <txid> [verbose=0]
getreceivedbyaccount <account> [minconf=1]
getreceivedbyaddress <OmniCoinaddress> [minconf=1]
gettransaction <txid>
gettxout <txid> <n> [includemempool=true]
gettxoutsetinfo
getwork [data]
getworkex [data, coinbase]
help [command]
importprivkey <OmniCoinprivkey> [label] [rescan=true]
keypoolrefill
listaccounts [minconf=1]
listaddressgroupings
listlockunspent
listreceivedbyaccount [minconf=1] [includeempty=false]
listreceivedbyaddress [minconf=1] [includeempty=false]
listsinceblock [blockhash] [target-confirmations]
listtransactions [account] [count=10] [from=0]
listunspent [minconf=1] [maxconf=999999] ["address",...]
lockunspent unlock? [array-of-Objects]
move <fromaccount> <toaccount> <amount> [minconf=1] [comment]
sendfrom <fromaccount> <toOmniCoinaddress> <amount> [minconf=1] [comment] [comment-to]
sendmany <fromaccount> {address:amount,...} [minconf=1] [comment]
sendrawtransaction <hex string>
sendtoaddress <OmniCoinaddress> <amount> [comment] [comment-to]
setaccount <OmniCoinaddress> <account>
setgenerate <generate> [genproclimit]
setmininput <amount>
settxfee <amount>
signmessage <OmniCoinaddress> <message>
signrawtransaction <hex string> [{"txid":txid,"vout":n,"scriptPubKey":hex,"redeemScript":hex},...] [<privatekey1>,...] [sighashtype="ALL"]
stop
submitblock <hex data> [optional-params-obj]
validateaddress <OmniCoinaddress>
verifychain [check level] [num blocks]
verifymessage <OmniCoinaddress> <signature> <message>
Thanks for the list, I found that I can get the list by typing "./Omnicoind -server help" but had to start the server first, also it seems the list is a bit different from this list, just couple missing calls.
I've tried couple gems for using the RPC server and it seems they somewhy don't work, not sure if it's the gem broken (last update was like a year ago) or the connection to server had some problems (which is kinda hard since the server is running and responded to ping requests), guess I'll just wait for omnicha.in to get updated and use their api.
Have a cool signature? hit me up and I might use it.
(Mar 27, 2015 04:32 AM)severos Wrote: Thanks for the list, I found that I can get the list by typing "./Omnicoind -server help" but had to start the server first, also it seems the list is a bit different from this list, just couple missing calls.
I've tried couple gems for using the RPC server and it seems they somewhy don't work, not sure if it's the gem broken (last update was like a year ago) or the connection to server had some problems (which is kinda hard since the server is running and responded to ping requests), guess I'll just wait for omnicha.in to get updated and use their api.
Can you connect via RPC in your browser? (you need to allow your IP in the config)
Also; omnicoind -daemon
(Mar 27, 2015 04:32 AM)severos Wrote: Thanks for the list, I found that I can get the list by typing "./Omnicoind -server help" but had to start the server first, also it seems the list is a bit different from this list, just couple missing calls.
I've tried couple gems for using the RPC server and it seems they somewhy don't work, not sure if it's the gem broken (last update was like a year ago) or the connection to server had some problems (which is kinda hard since the server is running and responded to ping requests), guess I'll just wait for omnicha.in to get updated and use their api.
Yeah, I forgot that I had server=1 in the config and the daemon running.
Omnicoin is behind Bitcoin so we're missing a few features, which is why I didn't refer you to that page :)
(Mar 27, 2015 04:36 AM)Alex™ Wrote: Can you connect via RPC in your browser? (you need to allow your IP in the config)
Also; omnicoind -daemon
I guess I can connect and it's on my local machine.
I mean sending ping it gives response, and when I tried "curl 127.0.0.1" it gave me "Empty reply from sever"
Have a cool signature? hit me up and I might use it.
(Mar 27, 2015 06:26 AM)severos Wrote: I guess I can connect and it's on my local machine.
I mean sending ping it gives response, and when I tried "curl 127.0.0.1" it gave me "Empty reply from sever"
Remember that the Omnicoin RPC is listening on port 4873.
(Mar 27, 2015 06:26 AM)severos Wrote: I guess I can connect and it's on my local machine.
I mean sending ping it gives response, and when I tried "curl 127.0.0.1" it gave me "Empty reply from sever"
Your're just pinging port 80.
curl http://{youruser}:{yourpass}@127.0.0.1:4873/
I forgot to mention that I did set the server to port 9999 (because I didn't know which one was the default) and ping/curl the port 9999, and it was giving me empty response.
I've just tried doing it again with default url and added http:// and the result from curl was:
{"result":null,"error":{"code":-32700,"message":"Parse error"},"id":null}
does this error mean there's something wrong with connection? or it's just that curl doesn't understand omnicoin server or what?
Have a cool signature? hit me up and I might use it.
(Mar 27, 2015 08:46 AM)severos Wrote: I forgot to mention that I did set the server to port 9999 (because I didn't know which one was the default) and ping/curl the port 9999, and it was giving me empty response.
I've just tried doing it again with default url and added http:// and the result from curl was:
{"result":null,"error":{"code":-32700,"message":"Parse error"},"id":null}
does this error mean there's something wrong with connection? or it's just that curl doesn't understand omnicoin server or what?
Nah, pretty sure that means everything's working fine. (about 95% sure)
(Mar 27, 2015 08:46 AM)severos Wrote: I forgot to mention that I did set the server to port 9999 (because I didn't know which one was the default) and ping/curl the port 9999, and it was giving me empty response.
I've just tried doing it again with default url and added http:// and the result from curl was:
{"result":null,"error":{"code":-32700,"message":"Parse error"},"id":null}
does this error mean there's something wrong with connection? or it's just that curl doesn't understand omnicoin server or what?
It says parse error because you didn't give it a message body (command).
(Mar 27, 2015 12:16 PM)Doctor Blue Wrote: It says parse error because you didn't give it a message body (command).
So it's working right? then I guess the gem I used is out dated :/
Have a cool signature? hit me up and I might use it.
|