Procedure Summary
- Setup Python Environment
- Download Demo Script
- Test Demo script
- Make YES and NO keys at Reality Keys
- Make Bitcoin public and secret keys
- Create transactions
1. Setup Environment
Install Python (versionn 2?)
pip install pybitcointools
pip install simplejson
2. Download Demo Script
git clone https://github.com/edmundedgar/realitykeys-examples.git
3. Test a script
python test.py
......
----------------------------------------------------------------------
Ran 6 tests in 20.210s
OK
4. Create YES and NO keys
- Go to Reality Keys web site to create YES and NO public keys.
For example, Reality Keys ID is 4352 as below.
https://www.realitykeys.com/exchange/4352
5. make Bitcoin keys (public, secret)
python realitykeysdemo.py makekeys
Your public key is:
049e8ddb0f1900ca24a86eaa981e4dabafc2efa76593b157773a0fae27ca999d73bab49ba44270b437c797ad7e106c062a36286e923bb01c1e595a828be17c8af4
Please send this to the other party.
Your temporary address is:
1GC9Reb3TKZVrKN7YgT6Ry79qQQJYNE82x
Please make payment to this address first.
Next step: Exchange keys, pay your stake to 1GC9Reb3TKZVrKN7YgT6Ry79qQQJYNE82x, have them pay their stake to their address, then one of you runs:
If you are yes:
./realitykeysdemo.py setup 049e8ddb0f1900ca24a86eaa981e4dabafc2efa76593b157773a0fae27ca999d73bab49ba44270b437c797ad7e106c062a36286e923bb01c1e595a828be17c8af4
If you are no:
./realitykeysdemo.py setup 049e8ddb0f1900ca24a86eaa981e4dabafc2efa76593b157773a0fae27ca999d73bab49ba44270b437c797ad7e106c062a36286e923bb01c1e595a828be17c8af4
Secret key is located in…
~/.realitykeysdemo
6. Setup Contract
Use 2-of-2 multi signature address.
A. Create Alice’s keys
python realitykeysdemo.py setup [Reality Key ID] [Alice's public key] [Alice's BTC in Satoshis] [Bob's public key] [Bob's BTC in Satoshis]
You can get Reality Key ID from API or reality key’s web site.