mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 05:54:26 +01:00
* GreenField: Wallet API * more work * wip * rough fiunish of transaction sending api * Allow to create tx without broadcasting and small fixes * Refactor Wallet Receive feature ad add greenfield api for address reserve for wallet * add wallet api client * add docs * fix json converter tags * fixes and add wallet tests * fix tests * fix rebase * fixes * just pass the tests already * ugggh * small cleanup * revert int support in numeric string converter and make block id as native number in json * fix LN endpoint * try fix flaky test * Revert "try fix flaky test" This reverts commit 2e0d256325b892f7741325dcbab01196f74d182a. * try fix other flaky test * return proepr error if fee rate could not be fetched * try fix test again * reduce fee related logic for wallet api * try reduce code changes for pr scope * change auth logic for initial release of wallet api
42 lines
1.4 KiB
C#
42 lines
1.4 KiB
C#
using System;
|
|
using BTCPayServer.Client.JsonConverters;
|
|
using BTCPayServer.JsonConverters;
|
|
using Newtonsoft.Json;
|
|
using Newtonsoft.Json.Converters;
|
|
using Newtonsoft.Json.Linq;
|
|
|
|
namespace BTCPayServer.Client.Models
|
|
{
|
|
public class CreateInvoiceRequest
|
|
{
|
|
[JsonConverter(typeof(NumericStringJsonConverter))]
|
|
public decimal Amount { get; set; }
|
|
public string Currency { get; set; }
|
|
public JObject Metadata { get; set; }
|
|
public CheckoutOptions Checkout { get; set; } = new CheckoutOptions();
|
|
|
|
public class CheckoutOptions
|
|
{
|
|
|
|
[JsonConverter(typeof(StringEnumConverter))]
|
|
public SpeedPolicy? SpeedPolicy { get; set; }
|
|
|
|
public string[] PaymentMethods { get; set; }
|
|
|
|
[JsonConverter(typeof(TimeSpanJsonConverter.Minutes))]
|
|
[JsonProperty("expirationMinutes")]
|
|
public TimeSpan? Expiration { get; set; }
|
|
[JsonConverter(typeof(TimeSpanJsonConverter.Minutes))]
|
|
[JsonProperty("monitoringMinutes")]
|
|
public TimeSpan? Monitoring { get; set; }
|
|
|
|
public double? PaymentTolerance { get; set; }
|
|
[JsonProperty("redirectURL")]
|
|
public string RedirectURL { get; set; }
|
|
|
|
public bool? RedirectAutomatically { get; set; }
|
|
public string DefaultLanguage { get; set; }
|
|
}
|
|
}
|
|
}
|