receiveBip321 method
Creates a BIP-321 URI using the selected receiving wallet.
Implementation
Future<ReceiveResponse> receiveBip321({
String? walletId,
int? amountMsat,
String? description,
Map<String, dynamic>? metadata,
Duration? timeout,
}) async {
await _initializationFuture;
walletId ??= _repository.getDefaultWalletIdForReceiving();
if (walletId == null) {
throw StateError('No default wallet set');
}
final wallet = await _getWalletForOperation(walletId);
final provider = _providers[wallet.type];
if (provider == null) {
throw ArgumentError('No provider for wallet type: ${wallet.type}');
}
return provider.receiveBip321(
wallet,
amountMsat: amountMsat,
description: description,
metadata: metadata,
timeout: timeout,
);
}