Gridcoin Research RPC: различия между версиями

Материал из Gridcoin wiki на русском
Перейти к навигации Перейти к поиску
Нет описания правки
Нет описания правки
 
(не показано 6 промежуточных версий этого же участника)
Строка 1: Строка 1:
API для взаимодействия с gridcoinresearchd. В целом аналогично bitcoind.
API для взаимодействия с gridcoinresearchd. В целом аналогично bitcoind.
Информацию о командах можно получить с помощью команд 'help wallet', 'help mining', 'help network' и 'help developer'


== Команды ==
== Команды ==
Строка 9: Строка 11:
|Справка по командам
|Справка по командам
|-
|-
|projects
|help wallet
|Белый список проектов
|Справка по командам, относящимся к кошельку
|-
|help mining
|Справка по командам, относящимся к стейкингу
|-
|help network
|Справка по командам, относящимся к сети
|-
|help developer
|Справка по командам, относящимся к разработке
|-
|addmultisigaddress <nrequired> <'["key","key"]'> [account]
|
|-
|addredeemscript <redeemScript> [account]
|
|-
|backupprivatekeys
|
|-
|backupwallet
|
|-
|burn <amount> [hex string]
|
|-
|burn2 <burnaddress> <burnamount> <burnkey> <burndetail>
|
|-
|checkwallet
|
|-
|createrawtransaction [{"txid":"id","vout":n},...] {"address":amount,"data":"hex",...}
|
|-
|decoderawtransaction <hex string>
|
|-
|decodescript <hex string>
|
|-
|dumpprivkey <gridcoinaddress>
|
|-
|dumpwallet <filename>
|
|-
|encrypt <walletpassphrase>
|
|-
|encryptwallet <passphrase>
|Зашифровать кошелёк указанным паролем
|-
|getaccount <gridcoinaddress>
|
|-
|getaccountaddress <account>
|
|-
|getaddressesbyaccount <account>
|
|-
|getbalance ( "account" minconf includeWatchonly )
|Получить текущий баланс
|-
|getnewaddress [account]
|Получить новый адрес для получения платежей
|-
|getnewpubkey [account]
|
|-
|getrawtransaction <txid> [verbose=bool]
|
|-
|getreceivedbyaccount <account> [minconf=1]
|
|-
|getreceivedbyaddress <Gridcoinaddress> [minconf=1]
|
|-
|gettransaction "txid"
|Получить информации по хэшу транзакции
|-
|getwalletinfo
|Информация о кошельке - версия, баланс, прочее
|-
|importprivkey <gridcoinprivkey> [label] [bool:rescan]
|Импорт приватного ключа
|-
|importwallet <filename>
|Импорт кошелька
|-
|keypoolrefill [new-size]
|
|-
|listaccounts ( minconf includeWatchonly)
|Команда устарела и будет удалена
|-
|listaddressgroupings
|
|-
|listreceivedbyaccount ( minconf includeempty includeWatchonly)
|
|-
|listreceivedbyaddress ( minconf includeempty includeWatchonly)
|
|-
|listsinceblock ( "blockhash" target-confirmations includeWatchonly)
|
|-
|listtransactions ( "account" count from includeWatchonly)
|Получить список транзакций, можно указать количество
|-
|listunspent [minconf=1] [maxconf=9999999]  ["address",...]
|Показать непотраченные монеты и их источники
|-
|makekeypair [prefix]
|
|-
|move <fromaccount> <toaccount> <amount> [minconf=1] [comment]
|
|-
|newburnaddress [burntemplate]
|
|-
|rain [UniValue](UniValue::VARR)
|
|-
|repairwallet
|
|-
|resendtx
|
|-
|reservebalance [<reserve> [amount]]
|
|-
|sendfrom <fromaccount> <toGridcoinaddress> <amount> [minconf=1] [comment] [comment-to]
|
|-
|sendmany <fromaccount> {address:amount,...} [minconf=1] [comment]
|Отправить транзакцию многим получателям
|-
|sendrawtransaction <hex string>
|Отправить произвольную транзакцию
|-
|sendtoaddress <gridcoinaddress> <amount> [comment] [comment-to]
|Отправить указанное количество монет на адрес
|-
|setaccount <gridcoinaddress> <account>
|
|-
|settxfee <amount>
|Установить размер платы за транзакцию
|-
|signmessage <Gridcoinaddress> <message>
|Подписать сообщение
|-
|signrawtransaction <hex string> [{"txid":txid,"vout":n,"scriptPubKey":hex},...] [<privatekey1>,...] [sighashtype="ALL"]
|Подписать произвольную транзакцию
|-
|unspentreport
|
|-
|validateaddress <gridcoinaddress>
|Проверить корректность адреса gridcoin (включая регистр символов)
|-
|validatepubkey <gridcoinpubkey>
|Проверить корректность публичного ключа gridcoin
|-
|verifymessage <Gridcoinaddress> <signature> <message>
|
|-
|walletlock
|Заблокировать кошелёк
|-
|walletpassphrase <passphrase> <timeout> [stakingonly]
|Разблокировать кошелёк на указанное время
|-
|walletpassphrasechange <oldpassphrase> <newpassphrase>
|Сменить пароль кошелька
|
|-
|advertisebeacon
|Отправить транзакцию для подтверждения своего CPID
|-
|beaconreport
|Посмотреть состояние транзакции advertisebeacon
|-
|beaconstatus [cpid]
|
|-
|cpids
|
|-
|currentneuralhash
|
|-
|currentneuralreport
|
|-
|explainmagnitude [bool:force]
|
|-
|getmininginfo
|
|-
|lifetime
|
|-
|magnitude <cpid>
|Всписок всех CPID и ожидаемых вознаграждений
|-
|mymagnitude
|
|-
|neuralreport
|
|-
|proveownership
|
|-
|resetcpids
|
|-
|rsa
|
|-
|rsaweight
|
|-
|staketime
|
|-
|superblockage
|Информация о последнем суперблоке
|-
|superblocks [cpid]
|Информация по суперблокам за последние 14 дней
|-
|syncdpor2
|
|-
|upgradedbeaconreport
|
|-
|validcpids
|
|-
|addnode <node> <add&#124;remove&#124;onetry>
|Добавить ноду вручную
|-
|addpoll <title> <days> <question> <answer1;answer2...> <sharetype> <url>
|Добавить опрос
|-
|askforoutstandingblocks
|
|-
|currenttime
|Текущее время
|-
|decryptphrase <phrase>
|Расшифровать фразу, зашифрованную encryptphrase
|-
|encryptphrase <phrase>
|Зашифровать фразу (интересно, чем?)
|-
|getaddednodeinfo <dns> [node]
|
|-
|getbestblockhash
|
|-
|getblock <hash> [bool:txinfo]
|Получить информацию о блоке по его хэшу
|-
|getblockbynumber <number> [bool:txinfo]
|Получить хэш блока по его номеру
|-
|getblockchaininfo
|Общая информация о блокчейне: число монет, сложность, используется ли тестовая сеть
|-
|getblockcount
|Получить общее число блоков
|-
|getblockhash <index>
|
|-
|getcheckpoint
|
|-
|getconnectioncount
|Получить количество соединений
|-
|getdifficulty
|Получить текущую сложность
|-
|-
|...
|getinfo
|...
|Получить общую информацию о сети и кошельке
|}
 
== Статья для перевода ==
Enter RPC commands in the console visible at menu help - debug window - console. In windows debug console you can type commands from below to get textual answers. Assuming you are running the daemon, typing gridcoinresearchd COMMAND may do the trick.
 
== Help Commands ==
 
*list help
**Displays help on various available list commands
 
*execute help
**Displays help on various available execute commands
 
== Project / Network Information ==
 
 
*list projects
**This command will list all the BOINC projects that are available and valid for Gridcoin Magnitude and PoR (White-Listed Projects).
**Consult http://boinc.berkeley.edu/projects.php if the output from 'list projects' contains some non-verified (information NOT researched and confirmed) BOINC projects.
 
*list network
**Gets the current BOINC projects list and network magnitude (sums of every valid CPIDs magnitude)
**With this command you can see if network averages are increasing/decreasing for a single project. E.g.: if Avg RAC is increasing for a project, it will drop your mag over time as competition heats up for that particular project.
 
*list magnitude
**List magnitude (and more) for every CPID the network knows.
**Here is the list of info shown for every cpid:
*** CPID
*** Magnitude
*** Payment Magnitude
*** Payment Timespan (Days)
*** Magnitude Accuracy
*** Long Term Owed (14 day projection)
*** Long Term Daily Owed (1 day projection)
*** Payments
*** InterestPayments
*** Last Payment Time
*** Current Daily Projection
*** Next Expected Payment
*** Avg Daily Payments
 
== CPID Related==
 
*list cpids
**Shows ALL the BOINC projects you have contributed to, even ones that are no longer valid
 
*list validcpids
**Shows ONLY your BOINC projects that are valid, in order to filter down the report to valid cpid projects with Verified RAC > 100 and Verified Team = Gridcoin
 
*list explainmagnitude
**This command breaks down how your CPID's magnitude is calculated.
 
*list rsa
**"list rsa" = "list mymagnitude"
*list mymagnitude
**The list rsa / list mymagnitude commands looks at the last 1440 blocks in the chain and reports the total payments for your CPID.  So that is where "Payments:" come from and THAT is why it changes.
**Long Term Owed: The projected amount of your magnitude * mag multipler * 14.
***This changes as time goes on as your mag gets to be higher accuracy with us (we used weighted square of time to determine your mag).  The numbers in the RSA are consensus numbers for your CPID, with more weight placed on the most recent verified mag by the node.
***long_term_owed = payment_timespan * Cap(research_magnitude*GetMagnitudeMultiplier(locktime), GetMaximumBoincSubsidy(locktime));
**Payment Magnitude Entry: This is only useful if you have a Magnitude > Maxblocksubsidy*.90 (IE 1800 today).  This shows your adjusted lederstrumpf magnitude used in payment calculations.
**Accuracy: That should be the amount of blocks in the chain for this CPID.
**Last Payment Time: The last time the CPID was paid PoR in a block.
**Long Term Owed (14 days) is what you would earn if all things remain the same, i.e. magnitude, etc. It's a guesstimate, as nothing remains totally constant.
**Next Expected Payment is usually half of your total owed up to the daily maximum of 400GRC, in order to break up payments across blocks.
 
*list rsaweight
**retrieve "RSA Weight", "Remote Magnitude", "RSA Owed"
 
*list magnitudecsv
**Creates a magnitude report CSV in %appdata%\GridcoinResearch\Reports or ~/.GridcoinResearch/Reports/
 
*execute resetcpids
**Gridcoin will reload CPIDs from the local BOINC client.  If any new projects are detected, they will then be looked up in the Netsoft XML.  This happens automatically after about 25 minutes, but this can speed up the process.
 
==Staking==
 
*reservebalance true AMOUNT
**By default your client will try to stake with all available coins that have matured for 16 hours in your wallet.
**This command allows you to reserve a set amount of coins that do not stake and are therefore always available for spending.
**<code>Example: reservebalance true 455</code>
 
*getstakinginfo
**"getstakinginfo" = "getmininginfo"
*getmininginfo
**Lists Information on the current block, mining settings, and network difficulty.
**Documentation of Stake Miner and "getmininginfo" explanation.
***https://github.com/gridcoin/Gridcoin-Research/blob/master/doc/stake-miner.txt
==Network/Peer Information==
 
*getinfo
**Information about the current wallet version, balance and network state.
 
*getpeerinfo
**Lists connected peers and their block heights.
 
==Block/Transaction Information==
 
*getblockhash <blockID>
**Returns a hash to identify the specific block.  This can be used to determine whether you are on the same fork as someone else.
 
*getblockbynumber [blockID]
**Returns information related to the specified block
 
*getbalance
**Displays the total balance of the loaded wallet.
 
*getreceivedbyaddress
**Displays the total number of coins received by a Gridcoin address.
 
*listtransactions
**Displays all transactions associated with the loaded wallet.
 
*createrawtransaction [{"txid":txid,"vout":n},...] {address:amount,...}
**Create a raw transaction using specified inputs
 
*signrawtransaction <hex string> [{"txid":txid,"vout":n,"scriptPubKey":hex},...] [<privatekey1>,...] [sighashtype="ALL"]
**Sign a raw transaction
 
== Wallet Related ==
 
*checkwallet
**Checks wallet for corruption.
 
*repairwallet
**Attempts to repair a corrupted wallet if corruption is detected.
 
*walletpassphrase YOURPASSWORD TIMEOUT true
**Unlock encrypted wallet for staking only
 
== Halt / Reboot ==
*stop
**Terminate the Gridcoin client.
 
*execute reboot
**Reboots the Gridcoin client.
 
== Disable Windows Error Reporting ==
 
*execute DISABLE_WINDOWS_ERROR_REPORTING
**Optional feature for windows users : Suppress Windows Error Reporting Dialog : to set this key execute this command from the rpc. This means that when an app crashes on the node, you will not receive the Windows Error Reporting Dialog - Would you like to check the internet for solutions or Debug this program? The program will just end.
**Note: Crash dumps will still be created and stored in the standard location if you set this key.
**This feature was requested August/September 2014 in testnet - its not really needed with a stable client, but may be useful when we go back to testnet.
 
==gridcoinresearchd commands==
{|class="wikitable"
! Command !! Parameters !! Description !! Requires unlocked wallet?
|-
|-
| addmultisigaddress || <nrequired> <'["key","key"]'> [account] || Add a nrequired-to-sign multisignature address to the wallet. Each key is a Gridcoin address or hex-encoded public key. If [account] is specified, assign address to [account]. Returns a string containing the address. || N
|getnettotals
|Информация об оправленных и полученных байтах
|-
|-
| addnode || <node> <add/remove/onetry> ||  Attempts add or remove <node> from the [[List_of_Addnodes|addnode]] list or try a connection to <node> once. || N
|getnetworkinfo
|Информация о сети
|-
|-
| backupwallet || <destination> || Safely copies wallet.dat to destination, which can be a directory or a path with filename. || N
|getpeerinfo
|Информация о соединениях клиента
|-
|-
| createmultisig || <nrequired> <'["key,"key"]'> || Creates a multi-signature address and returns a json object ||
|getrawmempool
|Получить список транзакций в mempool
|-
|-
| createrawtransaction || [{"txid":txid,"vout":n},...] {address:amount,...} ||  Creates a [[Raw Transactions|raw transaction]] spending given inputs. || N
|listallpolldetails
|Показать подробности всех опросов
|-
|-
| decoderawtransaction || <hex string> ||  Produces a human-readable JSON object for a [[Raw Transactions|raw transaction]]. || N
|listallpolls
|Получить список всех опросов (включая устаревшие)
|-
|-
| dumpprivkey || <Gridcoinaddress> || Reveals the private key corresponding to <Gridcoinaddress> || Y
|listpolldetails
|Показать подробности актуальных опросов
|-
|-
| encryptwallet || <passphrase> || Encrypts the wallet with <passphrase>. || N
|listpollresults <pollname> [bool:showexpired]
|Показать результаты опроса
|-
|-
| getaddednodeinfo || <dns> [node] ||  Returns information about the given added node, or all added nodes
|listpolls
(note that onetry addnodes are not listed here)
|Получить список актуальных опросов
If dns is false, only a list of added nodes will be provided,
otherwise connected information will also be available. || N
|-
|-
| getbalance || [account] [minconf=1] || If [account] is not specified, returns the server's total available balance.<br/>If [account] is specified, returns the balance in the account. || N
|memorypool
|
|-
|-
|networktime
|Информация о времени (каком?)
|-
|-
| getblock || <hash> || Returns information about the block with the given hash. || N
|ping
|Похоже, ничего не делает, возвращает пустой ответ
|-
|-
| getblockcount || || Returns the number of blocks in the longest block chain. || N
|showblock <index>
|Информация о блоке по её номеру
|-
|-
| getblockhash || <index> || Returns hash of block in best-block-chain at <index>|| N
|stop
|Остановить клиент и завершить его
|-
|-
| getconnectioncount || || Returns the number of connections to other nodes. || N
|vote <title> <answer1;answer2...>
|
|-
|-
| getdifficulty || || Returns the proof-of-work difficulty as a multiple of the minimum difficulty. || N
|votedetails <pollname>
|
|-
|-
| getinfo || || Returns an object containing various state info. || N
|addkey <action> <keytype> <keyname> <keyvalue>
|
|-
|-
| getmininginfo || || Returns an object containing mining-related information:
|debug <bool>
blocks
|
currentblocksize
currentblocktx
difficulty
stakeweight 
stakeinterest
testnet
Mininginfo
|| N
|-
|-
| getnewaddress || [account] || Returns a new Gridcoin address for receiving payments.  If [account] is specified payments received with the address will be credited to [account]. || N
|debug10 <bool>
|
|-
|-
| getpeerinfo || || Returns data about each connected node. || N
|debug2 <bool>
|
|-
|-
| getrawchangeaddress || [account]|| Returns a new Gridcoin address, for receiving change.  This is for use with raw transactions, NOT normal use. || N
|debug3 <bool>
|
|-
|-
| getrawmempool || ||  Returns all transaction ids in memory pool || N
|debug4 <bool>
|
|-
|-
| getrawtransaction || <txid> [verbose=0] ||  Returns [[Raw Transactions|raw transaction]] representation for given transaction id. || N
|debugnet <bool>
|
|-
|-
| getreceivedbyaccount || [account] [minconf=1] || Returns the total amount received by addresses with [account] in transactions with at least [minconf] confirmations. If [account] not provided return will include all transactions to all accounts. (version 0.3.24) || N
|dportally
|
|-
|-
| getreceivedbyaddress || <Gridcoinaddress> [minconf=1] || Returns the amount received by <Gridcoinaddress> in transactions with at least [minconf] confirmations. It correctly handles the case where someone has sent to the address in multiple transactions. Keep in mind that addresses are only ever used for receiving transactions. Works only for addresses in the local wallet, external addresses will always show 0. || N
|exportstats1 [maxblocks agregate [endblock]]  
|
|-
|-
| gettransaction || <txid> || Returns an object about the given transaction containing:
|forcequorom
* "amount" : total amount of the transaction
|
* "confirmations" :  number of confirmations of the transaction
* "txid" : the transaction ID
* "time" : time associated with the transaction<ref>From block timestamp, unless transaction was already in memory pool then the local time when the client added the transaction to its memory pool</ref>.
* "details" - An array of objects containing:
** "address"
** "category"
** "amount"
** "fee"
|| N
|-
|-
| gettxout || <txid> <n> [includemempool=true] || Returns details about an unspent transaction output (UTXO) || N
|gatherneuralhashes
|
|-
|-
| gettxoutsetinfo ||  || Returns statistics about the unspent transaction output (UTXO) set || N
|genboinckey
|Поучить какой-то ключ BOINC
|-
|-
| [[getwork]] || [data] || If [data] is not specified, returns formatted hash data to work on:
|getblockstats mode [startheight [endheight]]
* "midstate" : precomputed hash state after hashing the first half of the data
|
* "data" : block data
* "hash1" : formatted hash buffer for second hash
* "target" : little endian hash target
If [data] is specified, tries to solve the block and returns true if it was successful.
|| N
|-
|-
| help || [command] || List commands, or get help for a command. || N
|getlistof <keytype>
|
|-
|-
| importprivkey || <Gridcoinprivkey> [label] [rescan=true]|| Adds a private key (as returned by dumpprivkey) to your wallet. This may take a while, as a [[How_to_import_private_keys#Import_Private_key.28s.29|rescan]] is done, looking for existing transactions. '''Optional [rescan] parameter added in 0.8.0.''' Note: There's no need to import public key, as in [[Elliptic_Curve_Digital_Signature_Algorithm|ECDSA]] (unlike RSA) this can be computed from private key. || Y
|getnextproject
|
|-
|-
|getrecentblocks detail count
|
|-
|-
| listaddressgroupings || ||  Returns all addresses in the wallet and info used for coincontrol. || N
|getsupervotes mode superblock
|
|-
|-
| listreceivedbyaccount || [minconf=1] [includeempty=false] || Returns an array of objects containing:
|listdata <keytype>
* "account" : the account of the receiving addresses
|
* "amount" : total amount received by addresses with this account
* "confirmations" : number of confirmations of the most recent transaction included
|| N
|-
|-
| listreceivedbyaddress || [minconf=1] [includeempty=false] || Returns an array of objects containing:
|memorizekeys
* "address" : receiving address
|
* "account" : the account of the receiving address
* "amount" : total amount received by the address
* "confirmations" : number of confirmations of the most recent transaction included
To get a list of accounts on the system, execute:
 
''$ gridcoinresearchd listreceivedbyaddress 0 true''
|| N
|-
|-
| listsinceblock|| [blockhash] [target-confirmations] || Get all transactions in blocks since block [blockhash], or all transactions if omitted. [target-confirmations] intentionally '''does not''' affect the list of returned transactions, but only affects the returned "lastblock" value.[https://github.com/Gridcoin/Gridcoin/pull/199#issuecomment-1514952] || N
|network
|Информация о RAC по проектам
|-
|-
| listtransactions || [account] [count=10] [from=0] || Returns up to [count] most recent transactions skipping the first [from] transactions for account [account]. If [account] not provided it'll return recent transactions from all accounts.
|neuralrequest
 
|
Example, to show 100 transactions for the default account, skipping the last 20:
 
''$ gridcoinresearchd listtransactions "" 100 20''
|| N
|-
|-
| listunspent || [minconf=1] [maxconf=999999] ||  Returns array of unspent transaction inputs in the wallet. || N
|projects
|Список проектов из белого списка
|-
|-
| listlockunspent || ||  Returns list of temporarily unspendable outputs
|readconfig
|
|-
|-
| lockunspent || <unlock?> [array-of-objects] || Updates list of temporarily unspendable outputs
|readdata <key>
|
|-
|-
| sendrawtransaction || <hexstring> ||  Submits [[Raw Transactions|raw transaction]] (serialized, hex-encoded) to local node and network. || N
|refhash <walletaddress>
|
|-
|-
| sendtoaddress || <Gridcoinaddress> <amount> [comment] [comment-to] || <amount> is a real and is rounded to 8 decimal places. Returns the transaction ID <txid> if successful. Comment fields are for sending wallet only and are not sent with the transaction.|| Y
|reorganize <hash>
|
|-
|-
| setaccount || <Gridcoinaddress> <account> || Sets the account associated with the given address. Assigning address that is already assigned to the same account will create a new address associated with that account. || N
|seefile
|
|-
|-
| setgenerate || <generate> [genproclimit] || <generate> is true or false to turn generation on or off.<br/>Generation is limited to [genproclimit] processors, -1 is unlimited. || N
|sendalert <message> <privatekey> <minver> <maxver> <priority> <id> [cancelupto]
|
|-
|-
| settxfee || <amount> || <amount> is a real and is rounded to the nearest 0.00000001 || N
|sendalert2 <privatekey> <id> <subverlist> <cancellist> <expire> <priority> <message>
|
|-
|-
| signmessage || <Gridcoinaddress> <message> || Sign a message with the private key of an address. || Y
|sendblock <blockhash>
|
|-
|-
| signrawtransaction || <hexstring> [{"txid":txid,"vout":n,"scriptPubKey":hex},...] [<privatekey1>,...] ||  Adds signatures to a [[Raw Transactions|raw transaction]] and returns the resulting raw transaction. || Y/N
|sendrawcontract <contract>
|
|-
|-
| stop || || Stop Gridcoin server. || N
|superblockaverage
|
|-
|-
| validateaddress || <Gridcoinaddress> || Return information about <Gridcoinaddress>. || N
|tally
|
|-
|-
| verifymessage || <Gridcoinaddress> <signature> <message> || Verify a signed message. || N
|tallyneural
|
|-
|-
| walletlock ||  || Removes the wallet encryption key from memory, locking the wallet. After calling this method,  you will need to call walletpassphrase again before being able to call any methods which require the wallet to be unlocked. || N
|updatequoromdata
|
|-
|-
| walletpassphrase || <passphrase> <timeout> || Stores the wallet decryption key in memory for <timeout> seconds. || N
|versionreport
|Информация по версиям кошелька в сети
|-
|-
| walletpassphrasechange || <oldpassphrase> <newpassphrase> || Changes the wallet passphrase from <oldpassphrase> to <newpassphrase>. || N
|writedata <key> <value>
|
|}
|}
== Generic List of Commands ==
*execute commands
**Usage: execute <string::itemname> <string::parameter>
**Found in code: https://github.com/gridcoin/Gridcoin-Research/blob/733c1078253e4e17d43c256cb15e730ea73c9b9a/src/rpcblockchain.cpp#L1411
**list of Commands
***restorepoint
***reboot
***neuralrequest
***advertisebeacon
***syncdpor2
***gatherneuralhashes
***beaconstatus
***beaconreport
***neuralreport
***myneuralhash
***superblockage
***unusual - not finished
***neuralhash
***vote <title> <answer>
***addpoll <title> <days> <question>  <answer1;answer2;answer#> <ShareType>
****Sharetype - 1=Magnitude,2=Balance,3=Both,4=CPIDCount,5=ParticipantCount
****note that you must use underscores in place of spaces
***votedetails <title>
***listpolls
***listpolldetails
***listpollresults <title>
***staketime
***testnewcontract
***rac <cpid>
***encrypt <passphrase>
***testboinckey
***genboinckey
***encryptphrase <phrase> - not working that I can tell
***decryptphrase <phrase> - not working that I can tell
***contract - not finished
***wcgtest - a testing command
***syncrac
***dportally
***superblockaverage
***getlistof <keytype>
****beacon
****neuralsecurity
****poll
****project
****vote
****superblock
***listdata <key>
***chainrsa <cpid>- not working that I can tell
***testcpidv2
***testcpidv2
***DISABLE_WINDOWS_ERROR_REPORTING
***testcpid
***reindex
***downloadblocks
***executecode
***volatilecode
***startwireframe
***tally
***testhash
***resetcpids
***backupwallet
***restorewallet
***resendwallettx
***postcpid
***encrypt_deprecated
***findrac
*list commands
**Usage: list <string::itemname>
**Found in code: https://github.com/gridcoin/Gridcoin-Research/blob/733c1078253e4e17d43c256cb15e730ea73c9b9a/src/rpcblockchain.cpp#L3143
**list of Commands
***networktime
***rsaweight
***explainmagnitude
***magnitude
***debug3
***currenttime
***magnitudecsv
***opencontracts
***detailmagnitudecsv
***mymagnitude
***rsa
***projects
***leder <magnitude>
***network
***validcpids
***cpids


== Ссылки ==
== Ссылки ==

Текущая версия от 11:43, 16 августа 2018

API для взаимодействия с gridcoinresearchd. В целом аналогично bitcoind.

Информацию о командах можно получить с помощью команд 'help wallet', 'help mining', 'help network' и 'help developer'

Команды

Команда и параметры Действие
help Справка по командам
help wallet Справка по командам, относящимся к кошельку
help mining Справка по командам, относящимся к стейкингу
help network Справка по командам, относящимся к сети
help developer Справка по командам, относящимся к разработке
addmultisigaddress <nrequired> <'["key","key"]'> [account]
addredeemscript <redeemScript> [account]
backupprivatekeys
backupwallet
burn <amount> [hex string]
burn2 <burnaddress> <burnamount> <burnkey> <burndetail>
checkwallet
createrawtransaction [{"txid":"id","vout":n},...] {"address":amount,"data":"hex",...}
decoderawtransaction <hex string>
decodescript <hex string>
dumpprivkey <gridcoinaddress>
dumpwallet <filename>
encrypt <walletpassphrase>
encryptwallet <passphrase> Зашифровать кошелёк указанным паролем
getaccount <gridcoinaddress>
getaccountaddress <account>
getaddressesbyaccount <account>
getbalance ( "account" minconf includeWatchonly ) Получить текущий баланс
getnewaddress [account] Получить новый адрес для получения платежей
getnewpubkey [account]
getrawtransaction <txid> [verbose=bool]
getreceivedbyaccount <account> [minconf=1]
getreceivedbyaddress <Gridcoinaddress> [minconf=1]
gettransaction "txid" Получить информации по хэшу транзакции
getwalletinfo Информация о кошельке - версия, баланс, прочее
importprivkey <gridcoinprivkey> [label] [bool:rescan] Импорт приватного ключа
importwallet <filename> Импорт кошелька
keypoolrefill [new-size]
listaccounts ( minconf includeWatchonly) Команда устарела и будет удалена
listaddressgroupings
listreceivedbyaccount ( minconf includeempty includeWatchonly)
listreceivedbyaddress ( minconf includeempty includeWatchonly)
listsinceblock ( "blockhash" target-confirmations includeWatchonly)
listtransactions ( "account" count from includeWatchonly) Получить список транзакций, можно указать количество
listunspent [minconf=1] [maxconf=9999999] ["address",...] Показать непотраченные монеты и их источники
makekeypair [prefix]
move <fromaccount> <toaccount> <amount> [minconf=1] [comment]
newburnaddress [burntemplate]
rain [UniValue](UniValue::VARR)
repairwallet
resendtx
reservebalance [<reserve> [amount]]
sendfrom <fromaccount> <toGridcoinaddress> <amount> [minconf=1] [comment] [comment-to]
sendmany <fromaccount> {address:amount,...} [minconf=1] [comment] Отправить транзакцию многим получателям
sendrawtransaction <hex string> Отправить произвольную транзакцию
sendtoaddress <gridcoinaddress> <amount> [comment] [comment-to] Отправить указанное количество монет на адрес
setaccount <gridcoinaddress> <account>
settxfee <amount> Установить размер платы за транзакцию
signmessage <Gridcoinaddress> <message> Подписать сообщение
signrawtransaction <hex string> [{"txid":txid,"vout":n,"scriptPubKey":hex},...] [<privatekey1>,...] [sighashtype="ALL"] Подписать произвольную транзакцию
unspentreport
validateaddress <gridcoinaddress> Проверить корректность адреса gridcoin (включая регистр символов)
validatepubkey <gridcoinpubkey> Проверить корректность публичного ключа gridcoin
verifymessage <Gridcoinaddress> <signature> <message>
walletlock Заблокировать кошелёк
walletpassphrase <passphrase> <timeout> [stakingonly] Разблокировать кошелёк на указанное время
walletpassphrasechange <oldpassphrase> <newpassphrase> Сменить пароль кошелька
advertisebeacon Отправить транзакцию для подтверждения своего CPID
beaconreport Посмотреть состояние транзакции advertisebeacon
beaconstatus [cpid]
cpids
currentneuralhash
currentneuralreport
explainmagnitude [bool:force]
getmininginfo
lifetime
magnitude <cpid> Всписок всех CPID и ожидаемых вознаграждений
mymagnitude
neuralreport
proveownership
resetcpids
rsa
rsaweight
staketime
superblockage Информация о последнем суперблоке
superblocks [cpid] Информация по суперблокам за последние 14 дней
syncdpor2
upgradedbeaconreport
validcpids
addnode <node> <add|remove|onetry> Добавить ноду вручную
addpoll <title> <days> <question> <answer1;answer2...> <sharetype> <url> Добавить опрос
askforoutstandingblocks
currenttime Текущее время
decryptphrase <phrase> Расшифровать фразу, зашифрованную encryptphrase
encryptphrase <phrase> Зашифровать фразу (интересно, чем?)
getaddednodeinfo <dns> [node]
getbestblockhash
getblock <hash> [bool:txinfo] Получить информацию о блоке по его хэшу
getblockbynumber <number> [bool:txinfo] Получить хэш блока по его номеру
getblockchaininfo Общая информация о блокчейне: число монет, сложность, используется ли тестовая сеть
getblockcount Получить общее число блоков
getblockhash <index>
getcheckpoint
getconnectioncount Получить количество соединений
getdifficulty Получить текущую сложность
getinfo Получить общую информацию о сети и кошельке
getnettotals Информация об оправленных и полученных байтах
getnetworkinfo Информация о сети
getpeerinfo Информация о соединениях клиента
getrawmempool Получить список транзакций в mempool
listallpolldetails Показать подробности всех опросов
listallpolls Получить список всех опросов (включая устаревшие)
listpolldetails Показать подробности актуальных опросов
listpollresults <pollname> [bool:showexpired] Показать результаты опроса
listpolls Получить список актуальных опросов
memorypool
networktime Информация о времени (каком?)
ping Похоже, ничего не делает, возвращает пустой ответ
showblock <index> Информация о блоке по её номеру
stop Остановить клиент и завершить его
vote <title> <answer1;answer2...>
votedetails <pollname>
addkey <action> <keytype> <keyname> <keyvalue>
debug <bool>
debug10 <bool>
debug2 <bool>
debug3 <bool>
debug4 <bool>
debugnet <bool>
dportally
exportstats1 [maxblocks agregate [endblock]]
forcequorom
gatherneuralhashes
genboinckey Поучить какой-то ключ BOINC
getblockstats mode [startheight [endheight]]
getlistof <keytype>
getnextproject
getrecentblocks detail count
getsupervotes mode superblock
listdata <keytype>
memorizekeys
network Информация о RAC по проектам
neuralrequest
projects Список проектов из белого списка
readconfig
readdata <key>
refhash <walletaddress>
reorganize <hash>
seefile
sendalert <message> <privatekey> <minver> <maxver> <priority> <id> [cancelupto]
sendalert2 <privatekey> <id> <subverlist> <cancellist> <expire> <priority> <message>
sendblock <blockhash>
sendrawcontract <contract>
superblockaverage
tally
tallyneural
updatequoromdata
versionreport Информация по версиям кошелька в сети
writedata <key> <value>

Ссылки