Exemple #1
0
        /*
         * Creates a multisig address.
         * The pubKeys can be addresses or hex-encoded public keys.
         * Returns the CreateMultiSigResult object that contains the address and redeemScript.
         * Will throw an exception on error.
         */
        public static CreateMultiSigResult CreateMultiSig(int nRequired, string[] pubKeys)
        {
            string arguments = CheckAndCreateMultiSigArgs(nRequired, pubKeys);

            JToken multiSigResult = SimpleJTokenRequest("createmultisig", arguments, false);

            CreateMultiSigResult result = new CreateMultiSigResult();

            result.address      = multiSigResult ["address"].ToString();
            result.redeemScript = multiSigResult ["redeemScript"].ToString();
            return(result);
        }
Exemple #2
0
        /*
         * Creates a multisig address.
         * The pubKeys can be addresses or hex-encoded public keys.
         * Returns the CreateMultiSigResult object that contains the address and redeemScript.
         * Will throw an exception on error.
         */
        public static CreateMultiSigResult CreateMultiSig(int nRequired, string[] pubKeys)
        {
            string arguments = CheckAndCreateMultiSigArgs(nRequired, pubKeys);

            JToken multiSigResult = SimpleJTokenRequest ("createmultisig", arguments, false);

            CreateMultiSigResult result = new CreateMultiSigResult ();

            result.address = multiSigResult ["address"].ToString ();
            result.redeemScript = multiSigResult ["redeemScript"].ToString ();
            return result;
        }