btcpayserver/BTCPayServer/Data/Payouts/BitcoinLike/AddressClaimDestination.cs
Andrew Camilleri db038723f4
Payout Destination Handling (#2985)
* Payout Destination Handling

fixes #2765
This PR:
* reactivates the BIP21 support for payouts.
* allows LNUrl destinations to be reusable.
* allows addresses to be reused in claims as long as the other claims are in a final state

* Ensure bolt amount matches the payout amount

* fixes

* reduce duplicate parsing of bolt

* make hash the id of bolt

* better bolt11 tostring

* use cached payment request from lnurl
2021-10-22 00:43:02 +09:00

25 lines
693 B
C#

using System;
using NBitcoin;
namespace BTCPayServer.Data
{
public class AddressClaimDestination : IBitcoinLikeClaimDestination
{
public BitcoinAddress _bitcoinAddress;
public AddressClaimDestination(BitcoinAddress bitcoinAddress)
{
if (bitcoinAddress == null)
throw new ArgumentNullException(nameof(bitcoinAddress));
_bitcoinAddress = bitcoinAddress;
}
public BitcoinAddress Address => _bitcoinAddress;
public override string ToString()
{
return _bitcoinAddress.ToString();
}
public string Id => ToString();
public decimal? Amount => null;
}
}