<p>A) Not sure if there is a way to do this with the core client. You could do list all your transactions and search through them yourself (see <code>listtransactions</code>).</p>

<p>B) To get the <code>scriptPubKey</code>, you could make a dummy transaction to your multisig address, decode it, and the <code>scriptPubKey</code> will be in the resulting JSON. </p>

<p>To get the <code>redeemScript</code>, use <code>validateaddress</code> to get the public keys (or get them any other way). Then do:</p>

<pre><code>./bitcoin-cli createmultisig 2 '["0233201f4bc6df77f61affdc0b9a8e13c286050b8203453af3788bb3db781d8003", "020c13c8562c579fa79d78fd6dde15924b615c5c5c0904241ac311eb3954377ea0"]'
</code></pre>

<p>This will return something like this:</p>

<pre><code>{
    "address" : "3N5ntrDQAv7M4xqdjnpvzWfpogHnRvtMBm4",
    "redeemScript" : "52210233201f4bc6df77f61affdc0b9a8e13c286050b8203453af3788bb3db781d800321020c13c8562c579fa79d78fd6dde15924b615c5c5c0904241ac311eb3954377ea052ae"
}
</code></pre>

CC BY-SA 3.0
2014-10-29T19:10:41.020Z
2014-10-29T19:10:41.020Z
morsecoder
<p>I am beginning to work with multi-sig transactions, I understand how they work and how to sign raw transactions but how do you go about A) listing the input transactions for this address using bitcoind and B) more importantly, how do you find the redeemScript and scriptPubKey for constructing the transaction.</p>

<bitcoind><multi-signature>
Finding input TX for P2SH addresses
user15777
# Finding input TX for P2SH addresses

(Asked by: username_0 on 2014-05-14)

I am beginning to work with multi-sig transactions, I understand how they work and how to sign raw transactions but how do you go about A) listing the input transactions for this address using bitcoind and B) more importantly, how do you find the redeemScript and scriptPubKey for constructing the transaction.

**Tags:** bitcoind, multi-signature


---

## 1 answers

### Answer by username_1 on 2014-10-29. Score: 1

A) Not sure if there is a way to do this with the core client. You could do list all your transactions and search through them yourself (see `listtransactions`).

B) To get the `scriptPubKey`, you could make a dummy transaction to your multisig address, decode it, and the `scriptPubKey` will be in the resulting JSON.

To get the `redeemScript`, use `validateaddress` to get the public keys (or get them any other way). Then do:

```
./bitcoin-cli createmultisig 2 '["0233201f4bc6df77f61affdc0b9a8e13c286050b8203453af3788bb3db781d8003", "020c13c8562c579fa79d78fd6dde15924b615c5c5c0904241ac311eb3954377ea0"]'

```

This will return something like this:

```
{
    "address" : "3N5ntrDQAv7M4xqdjnpvzWfpogHnRvtMBm4",
    "redeemScript" : "52210233201f4bc6df77f61affdc0b9a8e13c286050b8203453af3788bb3db781d800321020c13c8562c579fa79d78fd6dde15924b615c5c5c0904241ac311eb3954377ea052ae"
}

```


---

