Export translations
Jump to:
navigation
,
search
Settings
Group
Altchain PoP Lifecycle
Altcoin Add VeriBlock
Community FAQ
Community Resource Contributions
Contribute To VeriBlock
Dashboard API
Demo Code
Developer Guide
FAQ
Getting Started
Global Communities
GRPC
GUI Wallet
How to Mine VeriBlock
How VeriBlock PoP vBFI Protects Altchains
HowTo run NodeCore
HowTo run PoW CPU Miner
HowTo run PoW Miner
Main Page
Mining High Noon
Mining Sunrise Phase
Mining Sunset
Network Health
NodeCore Source Code
PoP Miner API
PoW vs PoP Mining
Social Links
VAIF
VAIF Technical FAQ
VeriBlock and Proof-of-Proof FAQ
Language
aa - Afar
ab - Abkhazian
abs - Ambonese Malay
ace - Achinese
ady - Adyghe
ady-cyrl - Adyghe (Cyrillic script)
aeb - Tunisian Arabic
aeb-arab - Tunisian Arabic (Arabic script)
aeb-latn - Tunisian Arabic (Latin script)
af - Afrikaans
ak - Akan
aln - Gheg Albanian
am - Amharic
an - Aragonese
ang - Old English
anp - Angika
ar - Arabic
arc - Aramaic
arn - Mapuche
arq - Algerian Arabic
ary - Moroccan Arabic
arz - Egyptian Arabic
as - Assamese
ase - American Sign Language
ast - Asturian
atj - Atikamekw
av - Avaric
avk - Kotava
awa - Awadhi
ay - Aymara
az - Azerbaijani
azb - South Azerbaijani
ba - Bashkir
ban - Balinese
bar - Bavarian
bbc - Batak Toba
bbc-latn - Batak Toba (Latin script)
bcc - Southern Balochi
bcl - Central Bikol
be - Belarusian
bg - Bulgarian
bgn - Western Balochi
bho - Bhojpuri
bi - Bislama
bjn - Banjar
bm - Bambara
bn - Bangla
bo - Tibetan
bpy - Bishnupriya
bqi - Bakhtiari
br - Breton
brh - Brahui
bs - Bosnian
btm - Batak Mandailing
bto - Iriga Bicolano
bug - Buginese
bxr - Russia Buriat
ca - Catalan
cbk-zam - Chavacano
cdo - Min Dong Chinese
ce - Chechen
ceb - Cebuano
ch - Chamorro
cho - Choctaw
chr - Cherokee
chy - Cheyenne
ckb - Central Kurdish
co - Corsican
cps - Capiznon
cr - Cree
crh - Crimean Turkish
crh-cyrl - Crimean Tatar (Cyrillic script)
crh-latn - Crimean Tatar (Latin script)
cs - Czech
csb - Kashubian
cu - Church Slavic
cv - Chuvash
cy - Welsh
da - Danish
de - German
de-at - Austrian German
de-ch - Swiss High German
de-formal - German (formal address)
din - Dinka
diq - Zazaki
dsb - Lower Sorbian
dtp - Central Dusun
dty - Doteli
dv - Divehi
dz - Dzongkha
ee - Ewe
el - Greek
eml - Emiliano-Romagnolo
en - English
en-ca - Canadian English
en-gb - British English
eo - Esperanto
es - Spanish
es-419 - Latin American Spanish
es-formal - español (formal)
et - Estonian
eu - Basque
ext - Extremaduran
fa - Persian
ff - Fulah
fi - Finnish
fit - Tornedalen Finnish
fj - Fijian
fo - Faroese
fr - French
frc - Cajun French
frp - Arpitan
frr - Northern Frisian
fur - Friulian
fy - Western Frisian
ga - Irish
gag - Gagauz
gan - Gan Chinese
gan-hans - Gan (Simplified)
gan-hant - Gan (Traditional)
gcr - kriyòl gwiyannen
gd - Scottish Gaelic
gl - Galician
glk - Gilaki
gn - Guarani
gom - Goan Konkani
gom-deva - Goan Konkani (Devanagari script)
gom-latn - Goan Konkani (Latin script)
gor - Gorontalo
got - Gothic
grc - Ancient Greek
gu - Gujarati
gv - Manx
ha - Hausa
hak - Hakka Chinese
haw - Hawaiian
he - Hebrew
hi - Hindi
hif - Fiji Hindi
hif-latn - Fiji Hindi (Latin script)
hil - Hiligaynon
ho - Hiri Motu
hr - Croatian
hrx - Hunsrik
hsb - Upper Sorbian
ht - Haitian Creole
hu - Hungarian
hu-formal - magyar (formal)
hy - Armenian
hyw - արեւմտահայերէն
hz - Herero
ia - Interlingua
id - Indonesian
ie - Interlingue
ig - Igbo
ii - Sichuan Yi
ik - Inupiaq
ike-cans - Eastern Canadian (Aboriginal syllabics)
ike-latn - Eastern Canadian (Latin script)
ilo - Iloko
inh - Ingush
io - Ido
is - Icelandic
it - Italian
iu - Inuktitut
ja - Japanese
jam - Jamaican Creole English
jbo - Lojban
jut - Jutish
jv - Javanese
ka - Georgian
kaa - Kara-Kalpak
kab - Kabyle
kbd - Kabardian
kbd-cyrl - Kabardian (Cyrillic script)
kbp - Kabiye
kg - Kongo
khw - Khowar
ki - Kikuyu
kiu - Kirmanjki
kj - Kuanyama
kjp - ဖၠုံလိက်
kk - Kazakh
kk-arab - Kazakh (Arabic script)
kk-cn - Kazakh (China)
kk-cyrl - Kazakh (Cyrillic script)
kk-kz - Kazakh (Kazakhstan)
kk-latn - Kazakh (Latin script)
kk-tr - Kazakh (Turkey)
kl - Kalaallisut
km - Khmer
kn - Kannada
ko - Korean
ko-kp - Korean (North Korea)
koi - Komi-Permyak
kr - Kanuri
krc - Karachay-Balkar
kri - Krio
krj - Kinaray-a
krl - Karelian
ks - Kashmiri
ks-arab - Kashmiri (Arabic script)
ks-deva - Kashmiri (Devanagari script)
ksh - Colognian
ku - Kurdish
ku-arab - Kurdish (Arabic script)
ku-latn - Kurdish (Latin script)
kum - Kumyk
kv - Komi
kw - Cornish
ky - Kyrgyz
la - Latin
lad - Ladino
lb - Luxembourgish
lbe - Lak
lez - Lezghian
lfn - Lingua Franca Nova
lg - Ganda
li - Limburgish
lij - Ligurian
liv - Livonian
lki - Laki
lmo - Lombard
ln - Lingala
lo - Lao
loz - Lozi
lrc - Northern Luri
lt - Lithuanian
ltg - Latgalian
lus - Mizo
luz - Southern Luri
lv - Latvian
lzz - Laz
mai - Maithili
map-bms - Basa Banyumasan
mdf - Moksha
mg - Malagasy
mh - Marshallese
mhr - Eastern Mari
mi - Maori
min - Minangkabau
mk - Macedonian
ml - Malayalam
mn - Mongolian
mni - Manipuri
mnw - ဘာသာ မန်
mo - Moldovan
mr - Marathi
mrj - Western Mari
ms - Malay
mt - Maltese
mus - Creek
mwl - Mirandese
my - Burmese
myv - Erzya
mzn - Mazanderani
na - Nauru
nah - Nāhuatl
nap - Neapolitan
nb - Norwegian Bokmål
nds - Low German
nds-nl - Low Saxon
ne - Nepali
new - Newari
ng - Ndonga
niu - Niuean
nl - Dutch
nl-informal - Nederlands (informeel)
nn - Norwegian Nynorsk
nov - Novial
nrm - Norman
nso - Northern Sotho
nv - Navajo
ny - Nyanja
nys - Nyunga
oc - Occitan
olo - Livvi-Karelian
om - Oromo
or - Odia
os - Ossetic
pa - Punjabi
pag - Pangasinan
pam - Pampanga
pap - Papiamento
pcd - Picard
pdc - Pennsylvania German
pdt - Plautdietsch
pfl - Palatine German
pi - Pali
pih - Norfuk / Pitkern
pl - Polish
pms - Piedmontese
pnb - Western Punjabi
pnt - Pontic
prg - Prussian
ps - Pashto
pt - Portuguese
pt-br - Brazilian Portuguese
qu - Quechua
qug - Chimborazo Highland Quichua
rgn - Romagnol
rif - Riffian
rm - Romansh
rmy - Romani
rn - Rundi
ro - Romanian
roa-tara - Tarantino
ru - Russian
rue - Rusyn
ruq - Megleno-Romanian
ruq-cyrl - Megleno-Romanian (Cyrillic script)
ruq-latn - Megleno-Romanian (Latin script)
rw - Kinyarwanda
sa - Sanskrit
sah - Sakha
sat - Santali
sc - Sardinian
scn - Sicilian
sco - Scots
sd - Sindhi
sdc - Sassarese Sardinian
sdh - Southern Kurdish
se - Northern Sami
sei - Seri
ses - Koyraboro Senni
sg - Sango
sh - Serbo-Croatian
shi - Tachelhit
shi-latn - Tachelhit (Latin script)
shi-tfng - Tachelhit (Tifinagh script)
shn - Shan
shy-latn - Shawiya (Latin script)
si - Sinhala
sk - Slovak
skr - Saraiki
skr-arab - Saraiki (Arabic script)
sl - Slovenian
sli - Lower Silesian
sm - Samoan
sma - Southern Sami
sn - Shona
so - Somali
sq - Albanian
sr - Serbian
sr-ec - Serbian (Cyrillic script)
sr-el - Serbian (Latin script)
srn - Sranan Tongo
ss - Swati
st - Southern Sotho
stq - Saterland Frisian
sty - cебертатар
su - Sundanese
sv - Swedish
sw - Swahili
szl - Silesian
ta - Tamil
tay - Tayal
tcy - Tulu
te - Telugu
tet - Tetum
tg - Tajik
tg-cyrl - Tajik (Cyrillic script)
tg-latn - Tajik (Latin script)
th - Thai
ti - Tigrinya
tk - Turkmen
tl - Tagalog
tly - Talysh
tn - Tswana
to - Tongan
tpi - Tok Pisin
tr - Turkish
tru - Turoyo
ts - Tsonga
tt - Tatar
tt-cyrl - Tatar (Cyrillic script)
tt-latn - Tatar (Latin script)
tum - Tumbuka
tw - Twi
ty - Tahitian
tyv - Tuvinian
tzm - Central Atlas Tamazight
udm - Udmurt
ug - Uyghur
ug-arab - Uyghur (Arabic script)
ug-latn - Uyghur (Latin script)
uk - Ukrainian
ur - Urdu
uz - Uzbek
uz-cyrl - Uzbek (Cyrillic script)
uz-latn - Uzbek (Latin script)
ve - Venda
vec - Venetian
vep - Veps
vi - Vietnamese
vls - West Flemish
vmf - Main-Franconian
vo - Volapük
vot - Votic
wa - Walloon
war - Waray
wo - Wolof
wuu - Wu Chinese
xal - Kalmyk
xh - Xhosa
xmf - Mingrelian
xsy - saisiyat
yi - Yiddish
yo - Yoruba
za - Zhuang
zea - Zeelandic
zgh - Standard Moroccan Tamazight
zh - Chinese
zh-cn - Chinese (China)
zh-hans - Simplified Chinese
zh-hant - Traditional Chinese
zh-hk - Chinese (Hong Kong)
zh-mo - Chinese (Macau)
zh-my - Chinese (Malaysia)
zh-sg - Chinese (Singapore)
zh-tw - Chinese (Taiwan)
zu - Zulu
qqq - Message documentation
Format
Export for off-line translation
Export in native format
Fetch
<languages/> See: [[PoP_Miner_CommandLine]] __TOC__ == Introduction == The VeriBlock PoP Mining software has an embedded HTTP API that makes available some basic functionality for third-party integrations. By default, this HTTP API is bound to 127.0.0.1:8600. Both the host address and port can be configured in the '''ncpop.properties''' file via the properties: ''http.api.address'' and ''http.api.port'', respectively. If running multiple miners on a single machine, each miner will need at least the port configured uniquely or it will be unable to start the embedded HTTP server. Any requests requiring a message body should be formatted as JSON, and conversely all responses will be formatted as JSON as well. NOTE: This requires 0.3.12-rc.5 of the PoP Miner CLI or higher. Sample client to call PoP API: https://github.com/VeriBlock/samples/tree/master/pop/pop-api-client/csharp/PoPClient === Setup the API === # [OPTIONAL] In "ncpop.properties", configure the http.api.address and http.api.port. If not configured, by default these will be 127.0.0.1:8600 # Start the PoP Miner. See: https://wiki.veriblock.org/index.php?title=HowTo_run_PoP_Miner # Ensure the PoP Miner is ready to mine. If the PoP Miner cannot run the "mine" command, then the API will not run the "mine" command either. == API Documentation == === GET /api/config === Lists the effective configuration values. Same as running '''listconfig''' from the command-line. The response will be formatted as a JSON object in which each property name represents the configuration name and the property value represents the configuration value. ==== Response ==== <nowiki> { "auto.mine.round1": "false", "pop.cron.schedule": "", "bitcoin.fee.max": "8000", "bitcoin.fee.perkb": "20000", "http.api.port": "8600", "bitcoin.minrelayfee.enabled": "false", "nodecore.rpc.password": "", "nodecore.rpc.ssl": "false", "nodecore.rpc.cert.chain.path": "", "http.api.address": "127.0.0.1", "bitcoin.network": "mainnet", "nodecore.rpc.host": "127.0.0.1", "pop.action.timeout": "90", "nodecore.rpc.port": "10501", "auto.mine.round4": "false", "auto.mine.round3": "false", "auto.mine.round2": "false" }</nowiki> === PUT /api/config === Updates a single configuration value. Same as running '''setconfig''' from the command-line. ==== Request ==== Request properties: {| class="wikitable" ! style="text-align:left;"| Property ! style="text-align:left;"| Constraint ! style="text-align:left;"| Data Type ! style="text-align:left;"| Description |- |key |Required |String |Represents the name of a configuration property to set. Possible values are listed under GET /api/config. |- |value |Required |String |Represents the value to be set for a given configuration property. The value should be a string but must be convertible to the appropriate type for that configuration property. (E.g. "auto.mine.round1" must have a value of "true" or "false") |} <nowiki> { "key": "auto.mine.round4", "value": "true" }</nowiki> ==== Response ==== A successful request will return a 200 OK status code response with the following body: <nowiki> [ {} ]</nowiki> An unsuccessful action will return a 500 Server Error status code with some explanation for the failure in the body: <nowiki> [ { "details": [ "Property 'pop.action.timeout' requires a positive integer value representing the number of seconds to wait before timing out." ] } ]</nowiki> === GET /api/miner === Lists several miner properties, like the BTC address and amount, and VBK address. The very first time this is called, if the 'y' acknowledgement hasn't been accepted yet, it will also list the wallet seeds. NOTE: pass in '-skipAck' from the command line on startup to bypass the 'y' acknowledgement and therefore automate a fully new instance ==== Response ==== <pre> { "minerAddress": "V9uC3ywS12qW4ESD9783eZXVU3voMo", "bitcoinAddress": "1CRb4b5u2AYdaoovgV9aQWV3kSt9x66rJq", "bitcoinBalance": 0, "walletSeed": [ "1548958861", "cave", "conduct", "pottery" ] } </pre> === GET /api/operations === Lists the current running operations. Same as running '''listoperations''' from the command-line. ==== Response ==== <pre> [ { "operationId": "ce3c3e8b", "endorsedBlockNumber": 22, "state": "RUNNING", "action": "Waiting for transaction to be included in Bitcoin block", "message": "" }, { "operationId": "736be6e4", "endorsedBlockNumber": 22, "state": "RUNNING", "action": "Waiting for transaction to be included in Bitcoin block", "message": "" } ] </pre> === GET /api/operations/:id === Gets the details of the specified operation. Same as running '''getoperation''' from the command-line. ''':id''' is to be substituted with an actual operation ID, e.g. GET /api/operations/797b3b15 ==== Response ==== <nowiki>{ "operationId": "ce3c3e8b", "status": "RUNNING", "currentAction": "WAIT", "miningInstruction": { "publicationData": [ ... ], "endorsedBlockHeader": [ ... ], "lastBitcoinBlock": [ ... ], "minerAddress": [ ... ], "endorsedBlockContextHeaders": [ [ ... ] ] }, "transaction": [ ... ], "submittedTransactionId": "2897ba47dfed819879ebe3c5cdbb17e56fcc15d49e3cb42331d2c683b949aeb3", "merklePath": "", "detail": "", "popTransactionId": "" }</nowiki> === GET /api/lastbitcoinblock === NOTE: Available in latest beta version: [[SegWit_PoP_Miner]] Gets the last known bitcoin block. Same as running '''showlastbitcoinblock''' from the command-line. ==== Response ==== <nowiki>{ "header": "0000002005B2B5EF66F47670478DD6462E020E8F9A49BAD1B4C85F6E36C0D675000000007959A7784C5CF4AE38D3EF8ED8E14548FFE3E87A4E39A37AE233001B83B26C854D4E925DFFFF001DA60E33E8", "hash": "000000001DD4FAC03E838027EB10FCEB031F14AD0DE943B4F8AB82D0B31F3899", "height": 1580114 } </nowiki> === POST /api/quit === NOTE: Available in latest beta version: [[SegWit_PoP_Miner]] Sends a shutdown command to the pop miner. Same as running '''quit''' from the command-line. Since nodecore-pop-0.4.8-dev.24 it's possible to restart the PoP miner by adding the optional restart parameter: "/api/quit?restart=true" ==== Response ==== <nowiki>{ "failed": false, "messages": [] } </nowiki> === POST /api/mine === Begins a new mining operation. Same as running '''mine''' from the command-line. ==== Request ==== Request properties: {| class="wikitable" ! style="text-align:left;"| Property ! style="text-align:left;"| Constraint ! style="text-align:left;"| Data Type ! style="text-align:left;"| Description |- |block |Optional |Integer |Represents a specific block number to endorse in this mining operation. |} <nowiki> { "block": 32040 }</nowiki> By not specifying a block number the most recent VeriBlock block will be endorsed. An empty JSON object must be sent in the body: <nowiki>{}</nowiki> ==== Response ==== If the miner is able to successfully begin a new operation a 200 OK response will be return with the following body: <nowiki>{ "operationId": "c692ed9e", "failed": false, "messages": [ { "code": "V201", "message": "Mining operation started", "details": [ "To view details, run command: getoperation c692ed9e" ], "error": false } ] }</nowiki> If the miner is unable to begin a 200 OK response will be returned, but will contain the following body: <nowiki>{ "failed": true, "messages": [ { "code": "V412", "message": "Miner is not ready", "details": [ "Waiting for connection to NodeCore", "Bitcoin blockchain is not downloaded", "Bitcoin service is not ready" ], "error": true } ] }</nowiki>
Navigation menu
Personal tools
English
Log in
Namespaces
Special page
Variants
Views
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
Special pages
Printable version