Parsing the protoshares blockchain for unspent outputs.
- php 5.x with mysqli support
- mysql server with mysqli support
- json rpc php library http://jsonrpcphp.org/
-
get jsonRPCClient.php from link above
-
create a database
pts_balance
-
create a table
outputs
CREATE TABLE `outputs` (
`block_num` int(11) NOT NULL,
`block_hash` char(64) NOT NULL,
`transaction_hash` char(64) NOT NULL,
`sequence` int(11) NOT NULL,
`address` varchar(34) NOT NULL,
`balance` decimal(16,8) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
- run the first script to fill your mysql database with unspent outputs
$ php update-database.php
- run the second script to create json api with unspent outputs
$ php update-jsonapi.php > path/to/pts-unspent.json
note: the scripts are licensed under the GPLv3. you should have received a copy of the GNU General Public License along with this program. If not, see: http://www.gnu.org/licenses/
written 2014 by vertoe, contact me on freenode IRC or send me a Mail to: [email protected]
forum discussion thread: https://bitsharestalk.org/index.php?topic=2869.0
donations accepted:
BTC 1Bzc7PatbRzXz6EAmvSuBuoWED96qy3zgc
PTS PcDLYukq5RtKyRCeC1Gv5VhAJh88ykzfka
this script is based on a btc script by salfter: https://bitcointalk.org/index.php?topic=117866.0
thanks.