<p>The <code>["key,"key"]</code> part of the documentation means that it expects an array.</p>

<p>You need to call it like this:</p>

<pre><code>$obj = {method  =&gt; 'createmultisig', params =&gt; [2, ["$key1", "$key2"]],};
$res = $client-&gt;call($uri, $obj);
</code></pre>

CC BY-SA 3.0
2015-04-13T22:00:58.593Z
2015-04-13T22:26:20.060Z
2015-04-13T22:26:20.060Z
Nick ODell
<p>I'm trying to create a multisig address with JSON::RPC::Client but I don't know how to pass the parameters. I can pass simple params such as in <code>validateaddress</code> that requires only <code>&lt;bitcoinaddress&gt;</code>. Working example:</p>

<pre><code>$obj = { method  =&gt; 'validateaddress', params =&gt; ["$just_a_bit_address_in_string"],};
$res = $client-&gt;call($uri, $obj);
</code></pre>

<p>But when it comes to other types of parameters such as in <code>createmultisig</code>,  that the required params are <code>&lt; nrequired &gt; &lt;'["key,"key"]'&gt;</code>, I don't know to pass it to <code>$obj</code>. How do I do that?</p>

<development><json-rpc><multi-signature><perl>
How to pass parameters for multisignature addresses from Perl to the JSON::RPC::Client?
brooks
# How to pass parameters for multisignature addresses from Perl to the JSON::RPC::Client?

(Asked by: username_0 on 2015-04-13)

I'm trying to create a multisig address with JSON::RPC::Client but I don't know how to pass the parameters. I can pass simple params such as in validateaddress that requires only . Working example:
$obj = { method  => 'validateaddress', params => ["$just_a_bit_address_in_string"],};
$res = $client->call($uri, $obj);

But when it comes to other types of parameters such as in createmultisig,  that the required params are < nrequired > <'["key,"key"]'>, I don't know to pass it to $obj. How do I do that?

**Tags:** development, json-rpc, multi-signature, perl


---

## 1 answers

### Answer by username_1 on 2015-04-13. Score: 0 | Accepted answer

The ["key,"key"] part of the documentation means that it expects an array.
You need to call it like this:
$obj = {method  => 'createmultisig', params => [2, ["$key1", "$key2"]],};
$res = $client->call($uri, $obj);


---

