<p>There are two ways to do that. First one is that you create a multisig transaction, and send it to an oracle/oracles, along with a request for them to sign the transaction when they discover that an event occured.
After the time comes, the oracle(s) sign the transaction and release it to you.
This is the <a href="http://oracles.li" rel="nofollow">way Orisi works</a></p>

<p>Another way is to send to the oracle(s) a request to look for an event. Then they give you a public key, and you use that public key to lock the transaction. When the time comes, the oracles publish a private key to that public one, and you use it to unlock the transaction. This is the way <a href="https://www.realitykeys.com/" rel="nofollow">RealityKeys</a> work. (although their code is closed source)</p>

<p>The second option is relatively easy to implement, although I'm not sure if there are any open source implementations available at this time.</p>

<p>The first option (signing happening on the oracle's side) is a bit more complicated, but on the other hand it allows for greater granularity of contracts. E.g. you may ask oracles to send 2030-(year-of-event) BTC once the event happens, and return the rest to the sender. The oracles may also manage the funds for the time being - e.g. you can tell them to send funds to a new multisig address if one of the oracles dies / loses it's keys. And there's a code ready to handle all that on <a href="http://github.com/orisi/orisi" rel="nofollow">Orisi's github repo</a>.</p>

<p>For more info you might want to check out <a href="https://github.com/orisi/wiki/wiki/Orisi-White-Paper" rel="nofollow">Orisi / Distributed Oracles whitepaper</a> which deals with example implementation, and Bitcoin Wiki <a href="https://en.bitcoin.it/wiki/Contracts" rel="nofollow">entry on Contracts</a></p>

CC BY-SA 3.0
2014-06-23T17:34:18.080Z
2014-06-23T17:34:18.080Z
kolinko
<p>What are the specific parts of a transaction(s) that need to be signed in the "<a href="https://en.bitcoin.it/wiki/Contracts#Example_4%3a_Using_external_state" rel="nofollow">inheritance scripting sample</a>".  Specifically, can someone provide more detail on what exactly is signed of the transactions?</p>

<p>I'm assuming there are approximately 3 transactions, but unsure of what is signed by whom, and the portion of the Tx that is/isn't signed.</p>

<p>1) The tx that is sent to a new address with the exact amount (published)</p>

<p>2) The tx that is created but with a time of 10 years (not published)</p>

<p>3) The tx that is created but pending some oracle logic (not published)</p>

<p>What I'm interested in is #3 and what does the oracle specifically sign?  What does that Tx look like? </p>

<transactions><script><oracle>
How should a Bitcoin Oracle verify a transaction prior to signing?
makerofthings7
# How should a Bitcoin Oracle verify a transaction prior to signing?

(Asked by: username_0 on 2012-12-31)

What are the specific parts of a transaction(s) that need to be signed in the "[inheritance scripting sample](https://en.bitcoin.it/wiki/Contracts#Example_4%3a_Using_external_state)". Specifically, can someone provide more detail on what exactly is signed of the transactions?

I'm assuming there are approximately 3 transactions, but unsure of what is signed by whom, and the portion of the Tx that is/isn't signed.

1) The tx that is sent to a new address with the exact amount (published)

2) The tx that is created but with a time of 10 years (not published)

3) The tx that is created but pending some oracle logic (not published)

What I'm interested in is #3 and what does the oracle specifically sign? What does that Tx look like?

**Tags:** transactions, script, oracle


---

## 1 answers

### Answer by username_1 on 2014-06-23. Score: 2

There are two ways to do that. First one is that you create a multisig transaction, and send it to an oracle/oracles, along with a request for them to sign the transaction when they discover that an event occured.
After the time comes, the oracle(s) sign the transaction and release it to you.
This is the [way Orisi works](http://oracles.li)

Another way is to send to the oracle(s) a request to look for an event. Then they give you a public key, and you use that public key to lock the transaction. When the time comes, the oracles publish a private key to that public one, and you use it to unlock the transaction. This is the way [RealityKeys](https://www.realitykeys.com/) work. (although their code is closed source)

The second option is relatively easy to implement, although I'm not sure if there are any open source implementations available at this time.

The first option (signing happening on the oracle's side) is a bit more complicated, but on the other hand it allows for greater granularity of contracts. E.g. you may ask oracles to send 2030-(year-of-event) BTC once the event happens, and return the rest to the sender. The oracles may also manage the funds for the time being - e.g. you can tell them to send funds to a new multisig address if one of the oracles dies / loses it's keys. And there's a code ready to handle all that on [Orisi's github repo](http://github.com/orisi/orisi).

For more info you might want to check out [Orisi / Distributed Oracles whitepaper](https://github.com/orisi/wiki/wiki/Orisi-White-Paper) which deals with example implementation, and Bitcoin Wiki [entry on Contracts](https://en.bitcoin.it/wiki/Contracts)


---

