WIP [Reality Keys] Demo

  • このエントリーをはてなブックマークに追加

Procedure Summary

  1. Setup Python Environment
  2. Download Demo Script
  3. Test Demo script
  4. Make YES and NO keys at Reality Keys
  5. Make Bitcoin public and secret keys
  6. Create transactions

1. Setup Environment

Install Python (versionn 2?)

pip install pybitcointools
pip install simplejson

2. Download Demo Script

git clone

3. Test a script

Ran 6 tests in 20.210s


4. Create YES and NO keys

For example, Reality Keys ID is 4352 as below.

5. make Bitcoin keys (public, secret)

python makekeys
Your public key is:
Please send this to the other party.

Your temporary address is:
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:
./ setup <reality_key_id> 049e8ddb0f1900ca24a86eaa981e4dabafc2efa76593b157773a0fae27ca999d73bab49ba44270b437c797ad7e106c062a36286e923bb01c1e595a828be17c8af4 <your_stake_in_satoshis> <their_public_key> <their_stake_in_satoshis>
If you are no:
./ setup <reality_key_id> <their_public_key> <their_stake_in_satoshis>  049e8ddb0f1900ca24a86eaa981e4dabafc2efa76593b157773a0fae27ca999d73bab49ba44270b437c797ad7e106c062a36286e923bb01c1e595a828be17c8af4 <your_stake_in_satoshis>

Secret key is located in…


6. Setup Contract

Use 2-of-2 multi signature address.

A. Create Alice’s keys

python 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.

B. Create Bob’s keys

  • このエントリーをはてなブックマークに追加