Coder Social home page Coder Social logo

warrantree's People

Watchers

 avatar  avatar  avatar

Forkers

iadityam bellyfat

warrantree's Issues

Implementing JSON RPC Methods

First Method Which will call the JSON RPC

def getInfo(self):
        step_one = chain.Chain()
        return unicode(step_one.getInfo())

Second Method Which Executes The JSON RPC Call

def getInfo(self):
        api = Savoir(rpcuser,rpcpasswd,rpchost,rpcport,chainname)
        return api.getinfo()

We are using Savior to make JSON RPC calls to the blockchain network running on a local instance.

There are as many other calls which needs to be implemented such as.


== Blockchain ==
getbestblockhash
getblock hash|height ( verbose )
getblockchaininfo
getblockcount
getblockhash index
getchaintips
getdifficulty
getmempoolinfo
getrawmempool ( verbose )
gettxout txid n ( includemempool )
gettxoutsetinfo
listassets (asset-identifier(s) verbose count start )
listpermissions ("permission(s)" "address(es)" verbose )
liststreams (stream-identifier(s) verbose count start )
verifychain ( checklevel numblocks )

== Control ==
clearmempool 
getblockchainparams ( displaynames )
getinfo
help ( command )
pause "task(s)" 
resume "task(s)" 
setlastblock hash|height 
stop

== Generating ==
getgenerate
gethashespersec
setgenerate generate ( genproclimit )

== Mining ==
getblocktemplate ( "jsonrequestobject" )
getmininginfo
getnetworkhashps ( blocks height )
prioritisetransaction txid priority-delta fee-delta
submitblock hexdata ( "jsonparametersobject" )

== Network ==
addnode "node" add|remove|onetry
getaddednodeinfo dns ( "node" )
getconnectioncount
getnettotals
getnetworkinfo
getpeerinfo
ping

== Rawtransactions ==
appendrawchange tx-hex address ( native-fee )
appendrawdata tx-hex data-hex|object 
createrawtransaction [{"txid":"id","vout":n},...] {"address":amount,...} ( [data] action ) 
decoderawtransaction tx-hex
decodescript script-hex
getrawtransaction txid ( verbose )
sendrawtransaction tx-hex ( allowhighfees )
signrawtransaction tx-hex ( [{"txid":"id","vout":n,"scriptPubKey":"hex","redeemScript":"hex"},...] ["privatekey1",...] sighashtype )

== Util ==
createkeypairs ( count )
createmultisig nrequired ["key",...]
estimatefee nblocks
estimatepriority nblocks
validateaddress address
verifymessage address signature "message"

== Wallet ==
addmultisigaddress nrequired ["key",...] ( "account" )
appendrawexchange hex txid vout ask-assets 
backupwallet "destination"
combineunspent ( "address(es)" minconf maxcombines mininputs maxinputs maxtime )
create stream "stream-name" open ( custom-fields )
createfrom from-address stream "stream-name" open ( custom-fields )
createrawexchange txid vout ask-assets
createrawsendfrom from-address {"address":amount,...} ( [data] action ) 
decoderawexchange tx-hex ( verbose )
disablerawtransaction tx-hex
dumpprivkey address
dumpwallet "filename"
encryptwallet "passphrase"
getaccount address
getaccountaddress "account"
getaddressbalances address ( minconf includeLocked ) 
getaddresses ( verbose )
getaddressesbyaccount "account"
getaddresstransaction address txid ( verbose )
getassetbalances ( "account" minconf includeWatchonly includeLocked )
getassettransaction "asset-identifier" txid ( verbose )
getbalance ( "account" minconf includeWatchonly )
getmultibalances ( "address(es)" assets minconf includeLocked includeWatchonly ) 
getnewaddress ( "account" )
getrawchangeaddress
getreceivedbyaccount "account" ( minconf )
getreceivedbyaddress address ( minconf )
getstreamitem "stream-identifier" txid ( verbose )
gettotalbalances ( minconf includeWatchonly includeLocked )
gettransaction txid ( includeWatchonly )
gettxoutdata txid n ( count-bytes start-byte )
getunconfirmedbalance
getwalletinfo
getwallettransaction txid ( includeWatchonly verbose )
grant "address(es)" "permission(s)" ( native-amount "comment" "comment-to" startblock endblock )
grantfrom from-address "to-address(es)" "permission(s)" ( native-amount "comment" "comment-to" startblock endblock )
grantwithdata "address(es)" "permission(s)" data-hex|object ( native-amount startblock endblock )
Help message not found
importaddress address(es) ( "label" rescan )
importprivkey privkey(s) ( "label" rescan )
importwallet "filename"
issue address "asset-name"|asset-params quantity ( smallest-unit native-amount custom-fields )
issuefrom from-address to-address "asset-name"|asset-params quantity ( smallest-unit native-amount custom-fields )
issuemore address "asset-identifier" quantity ( native-amount custom-fields )
issuemorefrom from-address to-address "asset-identifier" quantity ( native-amount custom-fields )
keypoolrefill ( newsize )
listaccounts ( minconf includeWatchonly)
listaddresses (address(es) verbose count start ) 
listaddressgroupings
listaddresstransactions address ( count skip verbose )
listassettransactions "asset-identifier" ( verbose count start local-ordering )
listlockunspent
listreceivedbyaccount ( minconf includeempty includeWatchonly )
listreceivedbyaddress ( minconf includeempty includeWatchonly )
listsinceblock ( blockhash target-confirmations includeWatchonly )
liststreamitems "stream-identifier" ( verbose count start local-ordering )
liststreamkeyitems "stream-identifier" "key" ( verbose count start local-ordering )
liststreamkeys "stream-identifier" ( key(s) verbose count start local-ordering )
liststreampublisheritems "stream-identifier" address ( verbose count start local-ordering )
liststreampublishers "stream-identifier" ( address(es) verbose count start local-ordering )
listtransactions ( "account" count from includeWatchonly )
listunspent ( minconf maxconf ["address",...] )
listwallettransactions ( count skip includeWatchonly verbose )
lockunspent unlock [{"txid":"txid","vout":n},...]
move "fromaccount" "toaccount" amount ( minconf "comment" )
preparelockunspent asset-quantities ( lock )
preparelockunspentfrom from-address asset-quantities ( lock )
publish "stream-identifier" "key" data-hex
publishfrom from-address "stream-identifier" "key" data-hex
resendwallettransactions
revoke "address(es)" "permission(s)" ( native-amount "comment" "comment-to" )
revokefrom from-address "to-address(es)" "permission(s)" ( native-amount "comment" "comment-to" )
send address amount|asset-quantities ( "comment" "comment-to" )
sendasset address "asset-identifier" asset-qty ( native-amount "comment" "comment-to" )
sendassetfrom from-address to-address "asset-identifier" asset-qty ( native-amount "comment" "comment-to" )
sendfrom from-address to-address amount|asset-quantities ( "comment" "comment-to" )
sendfromaccount "fromaccount" toaddress amount ( minconf "comment" "comment-to" )
sendmany "fromaccount" {"address":amount,...} ( minconf "comment" )
sendwithdata address amount|asset-quantities data-hex|object
sendwithdatafrom from-address to-address amount|asset-quantities data-hex|object
setaccount address "account"
settxfee amount
signmessage address "message"
subscribe entity-identifier(s) ( rescan )
unsubscribe entity-identifier(s)

@apoorvq you can create rest of the methods by following the same pattern design i have used

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.