public SignRawTransactionWithKeyResponse SignRawTransactionWithKey(SignRawTransactionWithKeyRequest request) { #region default values if (request.PrivateKeys.Count == 0) { request.PrivateKeys = null; } if (request.Inputs.Count == 0) { request.Inputs = null; } if (string.IsNullOrWhiteSpace(request.SigHashType)) { request.SigHashType = SigHashType.All; } #endregion return(_rpcConnector.MakeRequest <SignRawTransactionWithKeyResponse>(RpcMethods.signrawtransactionwithkey, request.RawTransactionHex, request.PrivateKeys, request.Inputs, request.SigHashType)); }
public Task <SignRawTransactionWithKeyResponse> SignRawTransactionWithKeyAsync(SignRawTransactionWithKeyRequest request, CancellationToken cancellationToken) { #region default values if (request.PrivateKeys.Count == 0) { request.PrivateKeys = null; } if (request.Inputs.Count == 0) { request.Inputs = null; } if (string.IsNullOrWhiteSpace(request.SigHashType)) { request.SigHashType = SigHashType.All; } #endregion return(_asyncRpcConnector.MakeRequestAsync <SignRawTransactionWithKeyResponse>(RpcMethods.signrawtransactionwithkey, cancellationToken, request.RawTransactionHex, request.PrivateKeys, request.Inputs, request.SigHashType)); }