Ejemplo n.º 1
0
        /// <summary>
        /// Converts a network serialized transaction to a PSBT. This should be used only with createrawtransaction and fundrawtransaction
        /// createpsbt and walletcreatefundedpsbt should be used for new applications.
        /// </summary>
        /// <param name="hexString">The hex string of a raw transaction.</param>
        /// <returns></returns>
        public async Task <string> ConvertToPSBT(string hexString)
        {
            ConvertToPSBT convertToPSBT = new ConvertToPSBT {
                HexString = hexString
            };
            string response = await httpRequest.SendReq(MethodName.converttopsbt, convertToPSBT);

            return(response);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Converts a network serialized transaction to a PSBT. This should be used only with createrawtransaction and fundrawtransaction
        ///createpsbt and walletcreatefundedpsbt should be used for new applications.
        /// </summary>
        /// <param name="hexString">The hex string of a raw transaction.</param>
        /// <param name="permitSigData">If true, any signatures in the input will be discarded and conversion
        /// will continue. If false, RPC will fail if any signatures are present.</param>
        /// <param name="iSWitness">Whether the transaction hex is a serialized witness transaction.</param>
        /// <returns></returns>
        public async Task <string> ConvertToPSBT(string hexString, bool permitSigData = false, bool iSWitness = false)
        {
            ConvertToPSBT convertToPSBT = new ConvertToPSBT {
                HexString = hexString, PermitSigData = permitSigData, IsWitness = iSWitness
            };
            string response = await httpRequest.SendReq(MethodName.converttopsbt, convertToPSBT);

            return(response);
        }