mirror of
https://github.com/aljazceru/breez-sdk-liquid.git
synced 2025-12-24 01:14:22 +01:00
* Receive: Add magic routing hint support * Send: add MRH support * Filter out and reject self-transfers * Extract self-transfer validation in own fn * PrepareSendResponse: use onchain fee as fees_sat if MRH present * Use onchain tx fee as payment fee, if MRH used for direct onchain tx * Fix swap fee calculation when MRH is used * Apply boltz-client patch that aborts send if tx broadcast fails * Send with MRH: return pending payment * Receive with MRH: validate BIP21 amount, address * Emit remaining events for MRH Send, Receive * Sync: update swap info and emit events after new tx data is persisted * Extract MRH send into its own send_payment_via_mrh() * Pending Send via swap: store tx fees for pseudo-tx * Fix clippy
60 lines
2.4 KiB
Dart
60 lines
2.4 KiB
Dart
// This file is automatically generated, so please do not edit it.
|
|
// Generated by `flutter_rust_bridge`@ 2.0.0-dev.36.
|
|
|
|
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import
|
|
|
|
import 'frb_generated.dart';
|
|
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
|
|
import 'package:freezed_annotation/freezed_annotation.dart' hide protected;
|
|
part 'error.freezed.dart';
|
|
|
|
@freezed
|
|
sealed class LiquidSdkError with _$LiquidSdkError implements FrbException {
|
|
const LiquidSdkError._();
|
|
|
|
const factory LiquidSdkError.alreadyStarted() = LiquidSdkError_AlreadyStarted;
|
|
const factory LiquidSdkError.generic({
|
|
required String err,
|
|
}) = LiquidSdkError_Generic;
|
|
const factory LiquidSdkError.notStarted() = LiquidSdkError_NotStarted;
|
|
}
|
|
|
|
@freezed
|
|
sealed class PaymentError with _$PaymentError implements FrbException {
|
|
const PaymentError._();
|
|
|
|
const factory PaymentError.alreadyClaimed() = PaymentError_AlreadyClaimed;
|
|
const factory PaymentError.alreadyPaid() = PaymentError_AlreadyPaid;
|
|
const factory PaymentError.paymentInProgress() = PaymentError_PaymentInProgress;
|
|
const factory PaymentError.amountOutOfRange() = PaymentError_AmountOutOfRange;
|
|
const factory PaymentError.generic({
|
|
required String err,
|
|
}) = PaymentError_Generic;
|
|
const factory PaymentError.invalidOrExpiredFees() = PaymentError_InvalidOrExpiredFees;
|
|
const factory PaymentError.insufficientFunds() = PaymentError_InsufficientFunds;
|
|
const factory PaymentError.invalidInvoice({
|
|
required String err,
|
|
}) = PaymentError_InvalidInvoice;
|
|
const factory PaymentError.invalidPreimage() = PaymentError_InvalidPreimage;
|
|
const factory PaymentError.lwkError({
|
|
required String err,
|
|
}) = PaymentError_LwkError;
|
|
const factory PaymentError.pairsNotFound() = PaymentError_PairsNotFound;
|
|
const factory PaymentError.paymentTimeout() = PaymentError_PaymentTimeout;
|
|
const factory PaymentError.persistError() = PaymentError_PersistError;
|
|
const factory PaymentError.receiveError({
|
|
required String err,
|
|
}) = PaymentError_ReceiveError;
|
|
const factory PaymentError.refunded({
|
|
required String err,
|
|
required String refundTxId,
|
|
}) = PaymentError_Refunded;
|
|
const factory PaymentError.selfTransferNotSupported() = PaymentError_SelfTransferNotSupported;
|
|
const factory PaymentError.sendError({
|
|
required String err,
|
|
}) = PaymentError_SendError;
|
|
const factory PaymentError.signerError({
|
|
required String err,
|
|
}) = PaymentError_SignerError;
|
|
}
|