Class containing data sent to the Bitcoin wallet as a JSON RPC call.
예제 #1
0
        /// <summary>
        /// Make an JSON RPC request, and return a JSON RPC response object with the result
        /// deserialized as the given type.
        /// </summary>
        /// <typeparam name="T">The type to deserialize the result as.</typeparam>
        /// <param name="walletRequest">The request object.</param>
        /// <returns>A JSON RPC response with the result deserialized as the given type.</returns>
        private DaemonResponse <T> MakeRpcRequest <T>(DaemonRequest walletRequest)
        {
            HttpWebRequest httpWebRequest = MakeHttpRequest(walletRequest);

            return(GetRpcResponse <T>(httpWebRequest));
        }
예제 #2
0
        /// <summary>
        /// Make a raw JSON RPC request with the given request object. Returns raw JSON.
        /// </summary>
        /// <param name="walletRequest">The request object.</param>
        /// <returns>The raw JSON string.</returns>
        public string MakeRawRpcRequest(DaemonRequest walletRequest)
        {
            HttpWebRequest httpWebRequest = MakeHttpRequest(walletRequest);

            return(GetJsonResponse(httpWebRequest));
        }