https://docs.nubits.com/hosting-a-data-feed/
Anybody can indicate me how one constructs the signature URL for a data feed?
https://docs.nubits.com/hosting-a-data-feed/
Anybody can indicate me how one constructs the signature URL for a data feed?
Basically you use signmessage (address, message), address being for example an NSR address, the message being any message but here being the json file content that contains your vote. Then the output is a signature you put into a file on Github and then you indicate the URL to this file.
Nope, in your Nu client.
Sounds like we need to add this process to the docs. Iāll create an issue for it.
Well no. One rpc command in nu client.
Well, after some search , this seems to be giving some details ā
Do you have to re-sign your voting data each time it changes?
Do you have to re-sign your voting data each time it changes?
yes
Quite some info here too: https://docs.nubits.com/hosting-a-data-feed/
votenotify configuration
Providing votenotify the path to a script in your
conf file will invoke that script when votes are changed. For feed
providers this can be used to automatically update hosted voting data
when the feed provider manually changes votes. Hereās a sample script
that generates the voting data and vote signature with a supplied NSR
address.
#!/bin/bash
NUD=/path/to/nud
ARGS="-testnet"
VOTE_PATH=/path/to/output/vote.json
SIGNATURE_PATH=/path/to/output/vote.json.signature
ADDRESS=Sā¦
$NUD $ARGS getvote >$VOTE_PATH
$NUD $ARGS signmessage $ADDRESS <$VOTE_PATH >$SIGNATURE_PATH
I guess I will plug into a feed when I cannot do otherwise, since hosting a data feed is quite cumbersome right now.
Which part is cumbersome? I found it easy to set the feed generator overall on win.
Setting up my github account, then running another Nu client, generate my vote and their signature and upload these data each time they change into github
The Nu client must be running with RPC enabled (i.e. having server=1 and an rpcuser and rpcpassword in your nu.conf).
in my case i also set rpcport
The Nu client must be running with RPC enabled (i.e. having server=1 and an rpcuser and rpcpassword in your nu.conf).
As suggested by @cryptog, rpcport/port appear to be also needed. Iām getting a ācouldnāt connect to the serverā error right now.
I reset my nu.conf file.
What value do I have to provide to rpcport and port in it to use the getvote option in windows bash?
Anyone? @sigmike?
I think maybe thereās a misunderstanding here.
You have two clients. The QT app (GUI), and the daemon (headless).
The daemon (nud) runs as an RPC server by default, so you can send commands to it.
The QT (nu) does not have the feature enabled by default. In order to enable RPC commands against the QT app you must add server=1
to your conf file. Then you can run RPC commands against it like you do with the daemon.
Iām not sure why @cryptog is setting the RPC port in his conf file unless he wanted to use a port number besides the default.
You can see all of the default port numbers here: https://docs.nubits.com/rpc-api/
The QT (nu) does not have the feature enabled by default. In order to enable RPC commands against the QT app you must add server=1 to your conf file. Then you can run RPC commands against it like you do with the daemon.
That makes sense! txs
my nu.conf file:
addnode=198.52.199.75
addnode=218.1.18.78
addnode=212.114.48.31
addnode=212.129.19.120
addnode=176.9.113.75
addnode=84.76.78.204
addnode=167.114.116.72
addnode=79.165.43.191
addnode=52.10.23.117
addnode=97.123.141.92
addnode=108.26.50.128
server=1
rpcuser=xxx
rpcpassword=pass
This above should do then.
Now, is below a command against the daemon or the QT app?
āC:\Program Files (x86)\Nu\daemon\nud.exeā getvote > ā¦
That is the daemon, but it must already be running in daemon mode for you to do calls like that. launch it with:
"C:\Program Files (x86)\Nu\daemon\nud.exe --daemon"
Then you should see it as a running process. Then you can do RPC calls with it like in your example.
Sounds great.
ādaemon is not recognized as a command on the bash though.
Weird:
I just ran
Creating data feed
āC:\Program Files (x86)\Nu\daemon\nud.exeā getvote >āC:\MyDataFeed\nu_data_feed\crypto_coiner_nu_data_feed.jsonā
Signing it
āC:\Program Files (x86)\Nu\daemon\nud.exeā signmessage SkQQBagedDma9tTekKLgdSNvZ29Ujyjprg <āC:\MyDataFeed\nu_data_feed\crypto_coiner_nu_data_feed.jsonā >āC:\MyDataFeed\nu_data_feed\crypto_coiner_nu_data_feed.json.signatureā
and it seem to work, as the last time I updated my feed.
But, i did not run āC:\Program Files (x86)\Nu\daemon\nud.exe --daemonā and nud.exe is not running as background process