loopout/asset: add asset rate

This commit is contained in:
sputn1ck 2025-01-22 09:59:52 +01:00
parent fddad8a964
commit 95aae0e800
No known key found for this signature in database
GPG key ID: 671103D881A5F0E4
6 changed files with 632 additions and 380 deletions

View file

@ -6,6 +6,7 @@ import (
"github.com/btcsuite/btcd/btcutil"
"github.com/lightninglabs/loop/loopdb"
"github.com/lightninglabs/loop/swap"
"github.com/lightninglabs/taproot-assets/rfqmath"
"github.com/lightningnetwork/lnd/lntypes"
"github.com/lightningnetwork/lnd/routing/route"
"github.com/lightningnetwork/lnd/zpay32"
@ -228,6 +229,10 @@ type LoopOutRfq struct {
// used to pay for the prepay invoice.
MaxPrepayAssetAmt uint64
// PrepayAssetRate is the rate at which the asset is exchanged for
// bitcoin.
PrepayAssetRate *rfqmath.BigIntFixedPoint
// SwapRfqId is the ID of the swap RFQ.
SwapRfqId []byte
@ -235,6 +240,9 @@ type LoopOutRfq struct {
// to pay for the swap invoice.
MaxSwapAssetAmt uint64
// SwapAssetRate is the rate at which the asset is exchanged for bitcoin.
SwapAssetRate *rfqmath.BigIntFixedPoint
// AssetName is the human readable name of the asset.
AssetName string
}