Data feeds can be pulled into the client using a URL that points to the raw JSON voting data. The client accepts JSON voting data using the same format as the setvote RPC command.
In the example below there are two custodian votes, three park rate votes, and two motion votes. Having this data hosted somewhere like http://myvotingdata.com/votes.json allows NuShares holders to enter the URL into their client and pull in the voting data. The client pulls the data every 60 seconds by default, but this can be changed.
Since the client only requires a simple URL to the raw JSON there’s a number of hosting services that can be used to provide the data feed. Here’s an example using github.
One advantage to using a service like this is that a running public history of vote changes will be available in the commit history.
To prevent man-in-the-middle attacks data feed sources may also provide a secondary URL that points to the signature of the voting data, and the NuShares address used to sign it. These two additional pieces of information can help assure that votes have not changed while traveling to the client. The client will throw an error if a change has been noticed and the vote will not be changed.
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.
Example nu.conf file: