content: // This file is automatically generated, so please do not edit it.
  // @generated by `flutter_rust_bridge`@ 2.9.0.
  
  // ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import
  
  import '../frb_generated.dart';
  import 'error.dart';
  import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
  
  // These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `clone`, `fmt`
  
  /// LNURL utilities for working with Lightning Network URLs
  class Lnurl {
    final String value;
  
    const Lnurl({
      required this.value,
    });
  
    /// LNURL helper to get an invoice from an lnurl string
    Future<String> fetchInvoice({required BigInt msats}) => BoltzCore.instance.api
        .crateApiLnurlLnurlFetchInvoice(that: this, msats: msats);
  
    /// LNURL helper to get an lnurl-w voucher amount
    Future<BigInt> getVoucherMaxAmount() =>
        BoltzCore.instance.api.crateApiLnurlLnurlGetVoucherMaxAmount(
          that: this,
        );
  
    // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class.
    /// Create a new Lnurl instance
    static Future<Lnurl> newInstance({required String value}) =>
        BoltzCore.instance.api.crateApiLnurlLnurlNew(value: value);
  
    /// LNURL helper to validate an lnurl string
    Future<bool> validate() => BoltzCore.instance.api.crateApiLnurlLnurlValidate(
          that: this,
        );
  
    /// LNURL helper to claim an lnurl-w
    Future<void> withdraw({required String invoice}) => BoltzCore.instance.api
        .crateApiLnurlLnurlWithdraw(that: this, invoice: invoice);
  
    @override
    int get hashCode => value.hashCode;
  
    @override
    bool operator ==(Object other) =>
        identical(this, other) ||
        other is Lnurl &&
            runtimeType == other.runtimeType &&
            value == other.value;
  }
  