Manage assets | Contract logic | External data | ||||
---|---|---|---|---|---|---|
Traditional trust-based systems | ||||||
Bitcoin / Ripple | Codius | |||||
Bitcoin / Ripple | Orisi | |||||
Bitcoin / Ripple | Reality Keys | |||||
Counterparty, Ethereum etc | Feed Providers | |||||
TruthCoin |
https://www.realitykeys.com/api/v1/runkeeper/400/?accept_terms_of_service=current
{"no_pubkey": "024e31a070c2c9dff13fbbeccc7ebe394caf3e82eae7092caf5602b55283c98bda", "user_profile": "edochan", "settlement_date": "2014-09-12", "objection_period_secs": 86400, "human_resolution_scheduled_datetime": null, "measurement": "cumulative_distance", "evaluation_method": "ge", "is_user_authenticated": true, "objection_fee_satoshis_paid": 0, "machine_resolution_scheduled_datetime": "2014-09-12 00:00:00", "user_id": "29908850", "goal": "1000", "created_datetime": "2014-09-05 23:14:02", "winner": "No", "value": "1000", "id": 400, "source": "runkeeper", "yes_pubkey": "02c4ec9347fa2cf7ab347a35f9816d4481e18811dfacfce9812b9896b0b4c34c89", "activity": "walking", "objection_fee_satoshis_due": 1000000, "user_name": "edochan", "winner_privkey": "L17zZNj1qfpSNMzRNK7FcfVeza6kwLUsmKA5uuLAChx6dxTnCgNw"}
2 A-pub B-pub 2 OP_CHECKMULTISIG
OP_IF
2 A-pub Yes-pub 2 OP_CHECKMULTISIG
OP_ELSE
2 B-pub No-pub 2 OP_CHECKMULTISIG
OP_ENDIF
0 A-sig Yes-sig 1 [p2sh-script]
0 B-sig No -sig 0 [p2sh-script]
Private key | produces | Public key |
---|---|---|
x-priv | G(x) | x-pub |
y-priv | G(y) | y-pub |
x-priv + y-priv | G(x-priv+y-priv) | x-pub+y-pub |
A-pub + Yes-pub = A-Yes-pub
B-pub + No-pub = B-No-pub
1 A-Yes-pub B-No-pub 2 OP_CHECKMULTISIG
A-priv + Yes-priv = A-Yes-priv
x-priv * Y-pub
==
y-priv * X-pub
shared-secret-x-priv = Hash(x-priv * Y-pub)
shared-secret-x-pub
and pay it.x-priv
can derive shared-secret-x-priv
https://wiki.unsystem.net/en/index.php/DarkWallet/Stealth
Create transaction:
2 BTC out But only 1 BTC in Sign transaction (If you don't know what coins the other party wants to spend, use SIGHASH_ANYONECANPAY) Publish / send / tweet transaction (Can't broadcast yet) |
||
Get transaction, recreate and check
Add funds 1 BTC + 1 BTC = 2 BTC Add signatures Broadcast transaction |