mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-26 15:41:29 +01:00
This allows external services to integrate with the payouts system to process payouts. This is also a step to allow plugins to provide payout processors. * It provides the payment proof through the greenfield payoust api. * It allows you to set the state of a payout outside of the usual flow: * When state is awaiting payment, allow setting to In progess or completed * When state is in progress, allow setting back to awaiting payment
28 lines
1.1 KiB
C#
28 lines
1.1 KiB
C#
using System.Collections.Generic;
|
|
using System.Globalization;
|
|
using NBitcoin;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace BTCPayServer.Data
|
|
{
|
|
public class PayoutTransactionOnChainBlob : IPayoutProof
|
|
{
|
|
[JsonConverter(typeof(NBitcoin.JsonConverters.UInt256JsonConverter))]
|
|
public uint256 TransactionId { get; set; }
|
|
[JsonProperty(ItemConverterType = typeof(NBitcoin.JsonConverters.UInt256JsonConverter), NullValueHandling = NullValueHandling.Ignore)]
|
|
public HashSet<uint256> Candidates { get; set; } = new HashSet<uint256>();
|
|
|
|
[JsonIgnore] public string LinkTemplate { get; set; }
|
|
public string ProofType { get; } = Type;
|
|
public const string Type = "PayoutTransactionOnChainBlob";
|
|
|
|
[JsonIgnore]
|
|
public string Link
|
|
{
|
|
get { return Id != null ? string.Format(CultureInfo.InvariantCulture, LinkTemplate, Id) : null; }
|
|
}
|
|
public bool? Accounted { get; set; }//nullable to be backwards compatible. if null, accounted is true
|
|
[JsonIgnore]
|
|
public string Id { get { return TransactionId?.ToString(); } }
|
|
}
|
|
}
|