make format everything (#743)

This commit is contained in:
calle 2022-07-16 14:23:03 +02:00 committed by GitHub
parent 69516bb751
commit f4e7d62ca3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
60 changed files with 182 additions and 186 deletions

View File

@ -15,6 +15,16 @@ jobs:
- run: python3 -m venv venv
- run: ./venv/bin/pip install black
- run: make checkblack
isort:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- run: sudo apt-get install python3-venv
- run: python3 -m venv venv
- run: ./venv/bin/pip install isort
- run: make checkisort
prettier:
runs-on: ubuntu-latest
steps:
@ -23,4 +33,4 @@ jobs:
- run: sudo apt-get install python3-venv
- run: python3 -m venv venv
- run: npm install prettier
- run: ./node_modules/.bin/prettier --check lnbits/static/js/*.js lnbits/core/static/js/*.js lnbits/extensions/*/templates/*/*.html ./lnbits/core/templates/core/*.html lnbits/templates/*.html lnbits/extensions/*/static/js/*.js
- run: ./node_modules/.bin/prettier --check lnbits/static/js/*.js lnbits/core/static/js/*.js lnbits/extensions/*/templates/*/*.html ./lnbits/core/templates/core/*.html lnbits/templates/*.html lnbits/extensions/*/static/js/*.js

View File

@ -1,21 +1,19 @@
import asyncio
import uvloop
from starlette.requests import Request
from loguru import logger
from starlette.requests import Request
from .commands import bundle_vendored, migrate_databases, transpile_scss
from .settings import (
DEBUG,
HOST,
LNBITS_COMMIT,
LNBITS_DATA_FOLDER,
LNBITS_DATABASE_URL,
LNBITS_SITE_TITLE,
HOST,
PORT,
WALLET,
LNBITS_DATABASE_URL,
LNBITS_DATA_FOLDER,
)
uvloop.install()

View File

@ -1,15 +1,16 @@
import bitstring # type: ignore
import re
import hashlib
from typing import List, NamedTuple, Optional
from bech32 import bech32_encode, bech32_decode, CHARSET
from ecdsa import SECP256k1, VerifyingKey # type: ignore
from ecdsa.util import sigdecode_string # type: ignore
from binascii import unhexlify
import re
import time
from binascii import unhexlify
from decimal import Decimal
from typing import List, NamedTuple, Optional
import bitstring # type: ignore
import embit
import secp256k1
from bech32 import CHARSET, bech32_decode, bech32_encode
from ecdsa import SECP256k1, VerifyingKey # type: ignore
from ecdsa.util import sigdecode_string # type: ignore
class Route(NamedTuple):

View File

@ -1,18 +1,19 @@
import asyncio
import warnings
import click
import importlib
import re
import os
import re
import warnings
import click
from loguru import logger
from .db import SQLITE, POSTGRES, COCKROACH
from .core import db as core_db, migrations as core_migrations
from .core import db as core_db
from .core import migrations as core_migrations
from .db import COCKROACH, POSTGRES, SQLITE
from .helpers import (
get_valid_extensions,
get_css_vendored,
get_js_vendored,
get_valid_extensions,
url_for_vendored,
)
from .settings import LNBITS_PATH

View File

@ -1,15 +1,15 @@
import json
import datetime
from uuid import uuid4
from typing import List, Optional, Dict, Any
import json
from typing import Any, Dict, List, Optional
from urllib.parse import urlparse
from uuid import uuid4
from lnbits import bolt11
from lnbits.db import Connection, POSTGRES, COCKROACH
from lnbits.db import COCKROACH, POSTGRES, Connection
from lnbits.settings import DEFAULT_WALLET_NAME, LNBITS_ADMIN_USERS
from . import db
from .models import User, Wallet, Payment, BalanceCheck
from .models import BalanceCheck, Payment, User, Wallet
# accounts
# --------

View File

@ -1,15 +1,15 @@
import json
import hmac
import hashlib
from lnbits.helpers import url_for
import hmac
import json
from sqlite3 import Row
from typing import Dict, List, NamedTuple, Optional
from ecdsa import SECP256k1, SigningKey # type: ignore
from lnurl import encode as lnurl_encode # type: ignore
from typing import List, NamedTuple, Optional, Dict
from sqlite3 import Row
from loguru import logger
from pydantic import BaseModel
from loguru import logger
from lnbits.helpers import url_for
from lnbits.settings import WALLET

View File

@ -3,14 +3,12 @@ import json
from binascii import unhexlify
from io import BytesIO
from typing import Dict, Optional, Tuple
from loguru import logger
from urllib.parse import parse_qs, urlparse
import httpx
from lnurl import LnurlErrorResponse
from lnurl import decode as decode_lnurl # type: ignore
from loguru import logger
from lnbits import bolt11
from lnbits.db import Connection

View File

@ -1,7 +1,7 @@
import asyncio
import httpx
from typing import List
import httpx
from loguru import logger
from lnbits.tasks import register_invoice_listener

View File

@ -7,13 +7,11 @@ from typing import Dict, List, Optional, Union
from urllib.parse import ParseResult, parse_qs, urlencode, urlparse, urlunparse
import httpx
from loguru import logger
from fastapi import Header, Query, Request
from fastapi.exceptions import HTTPException
from fastapi.param_functions import Depends
from fastapi.params import Body
from loguru import logger
from pydantic import BaseModel
from pydantic.fields import Field
from sse_starlette.sse import EventSourceResponse

View File

@ -7,11 +7,10 @@ from fastapi.exceptions import HTTPException
from fastapi.params import Depends, Query
from fastapi.responses import FileResponse, RedirectResponse
from fastapi.routing import APIRouter
from loguru import logger
from pydantic.types import UUID4
from starlette.responses import HTMLResponse, JSONResponse
from loguru import logger
from lnbits.core import db
from lnbits.core.models import User
from lnbits.decorators import check_user_exists

View File

@ -4,11 +4,10 @@ from http import HTTPStatus
from urllib.parse import urlparse
from fastapi import HTTPException
from loguru import logger
from starlette.requests import Request
from starlette.responses import HTMLResponse
from loguru import logger
from lnbits import bolt11
from .. import core_app

View File

@ -6,7 +6,6 @@ from contextlib import asynccontextmanager
from typing import Optional
from loguru import logger
from sqlalchemy import create_engine
from sqlalchemy_aio.base import AsyncConnection
from sqlalchemy_aio.strategy import ASYNCIO_STRATEGY # type: ignore

View File

@ -14,9 +14,9 @@ from lnbits.core.crud import get_user, get_wallet_for_key
from lnbits.core.models import User, Wallet
from lnbits.requestvars import g
from lnbits.settings import (
LNBITS_ALLOWED_USERS,
LNBITS_ADMIN_USERS,
LNBITS_ADMIN_EXTENSIONS,
LNBITS_ADMIN_USERS,
LNBITS_ALLOWED_USERS,
)

View File

@ -1,7 +1,8 @@
import httpx
import json
import os
import httpx
fiat_currencies = json.load(
open(
os.path.join(

View File

@ -3,9 +3,8 @@ import math
import traceback
from http import HTTPStatus
from starlette.requests import Request
from loguru import logger
from starlette.requests import Request
from . import bleskomat_ext
from .crud import (

View File

@ -3,13 +3,12 @@ import time
from typing import Dict
from fastapi.params import Query
from loguru import logger
from pydantic import BaseModel, validator
from starlette.requests import Request
from loguru import logger
from lnbits import bolt11
from lnbits.core.services import pay_invoice, PaymentFailure
from lnbits.core.services import PaymentFailure, pay_invoice
from . import db
from .exchange_rates import exchange_rate_providers, fiat_currencies

View File

@ -1,9 +1,8 @@
from http import HTTPStatus
from fastapi import Depends, Query
from starlette.exceptions import HTTPException
from loguru import logger
from starlette.exceptions import HTTPException
from lnbits.core.crud import get_user
from lnbits.decorators import WalletTypeInfo, require_admin_key

View File

@ -1,12 +1,14 @@
from urllib.parse import urlparse, urlunparse, parse_qs, urlencode, ParseResult
from starlette.requests import Request
from fastapi.param_functions import Query
from typing import Optional, Dict
from lnbits.lnurl import encode as lnurl_encode # type: ignore
from lnurl.types import LnurlPayMetadata # type: ignore
from pydantic import BaseModel
import json
from sqlite3 import Row
from typing import Dict, Optional
from urllib.parse import ParseResult, parse_qs, urlencode, urlparse, urlunparse
from fastapi.param_functions import Query
from lnurl.types import LnurlPayMetadata # type: ignore
from pydantic import BaseModel
from starlette.requests import Request
from lnbits.lnurl import encode as lnurl_encode # type: ignore
class CreateCopilotData(BaseModel):

View File

@ -1,8 +1,8 @@
from sqlite3 import Row
from typing import Optional
from fastapi.param_functions import Query
from pydantic import BaseModel
from typing import Optional
class CreateUserData(BaseModel):

View File

@ -1,9 +1,9 @@
from typing import NamedTuple
from sqlite3 import Row
from typing import NamedTuple, Optional
from fastapi.param_functions import Query
from pydantic.main import BaseModel
from pydantic import BaseModel
from typing import Optional
from pydantic.main import BaseModel
class CreateJukeLinkData(BaseModel):

View File

@ -1,7 +1,5 @@
from http import HTTPStatus
# from mmap import MAP_DENYWRITE
from fastapi.param_functions import Depends
from fastapi.params import Query
from starlette.exceptions import HTTPException
@ -15,6 +13,8 @@ from lnbits.decorators import check_user_exists
from . import livestream_ext, livestream_renderer
from .crud import get_livestream_by_track, get_track
# from mmap import MAP_DENYWRITE
@livestream_ext.get("/", response_class=HTMLResponse)
async def index(request: Request, user: User = Depends(check_user_exists)):

View File

@ -3,15 +3,13 @@ import json
from datetime import datetime, timedelta
import httpx
from loguru import logger
from fastapi.params import Query
from lnurl import ( # type: ignore
LnurlErrorResponse,
LnurlPayActionResponse,
LnurlPayResponse,
)
from loguru import logger
from starlette.requests import Request
from starlette.responses import HTMLResponse

View File

@ -1,14 +1,12 @@
from base64 import b64decode
from fastapi.param_functions import Security
from fastapi.security.api_key import APIKeyHeader
from fastapi import Request, status
from fastapi.param_functions import Security
from fastapi.security.api_key import APIKeyHeader
from starlette.exceptions import HTTPException
from lnbits.decorators import WalletTypeInfo, get_key_type # type: ignore
api_key_header_auth = APIKeyHeader(
name="AUTHORIZATION",
auto_error=False,

View File

@ -1,8 +1,10 @@
from lnbits.decorators import check_user_exists
from . import lndhub_ext, lndhub_renderer
from fastapi import Request
from fastapi.params import Depends
from lnbits.core.models import User
from lnbits.decorators import check_user_exists
from . import lndhub_ext, lndhub_renderer
@lndhub_ext.get("/")

View File

@ -1,6 +1,5 @@
import time
import asyncio
import time
from base64 import urlsafe_b64encode
from http import HTTPStatus
@ -13,7 +12,7 @@ from lnbits import bolt11
from lnbits.core.crud import delete_expired_invoices, get_payments
from lnbits.core.services import create_invoice, pay_invoice
from lnbits.decorators import WalletTypeInfo
from lnbits.settings import WALLET, LNBITS_SITE_TITLE
from lnbits.settings import LNBITS_SITE_TITLE, WALLET
from . import lndhub_ext
from .decorators import check_wallet, require_admin_key

View File

@ -1,11 +1,12 @@
from lnbits.core.models import Wallet
from typing import List, Optional, Union
import httpx
from lnbits.core.models import Wallet
from lnbits.helpers import urlsafe_short_hash
from . import db
from .models import CreateFormData, CreateTicketData, Tickets, Forms
import httpx
from .models import CreateFormData, CreateTicketData, Forms, Tickets
async def create_ticket(

View File

@ -1,4 +1,5 @@
from typing import Optional
from fastapi.param_functions import Query
from pydantic import BaseModel

View File

@ -1,30 +1,26 @@
import base64
import hashlib
import hmac
from http import HTTPStatus
from io import BytesIO
from typing import Optional
from embit import bech32
from embit import compact
import base64
from io import BytesIO
import hmac
from embit import bech32, compact
from fastapi import Request
from fastapi.param_functions import Query
from starlette.exceptions import HTTPException
from lnbits.core.services import create_invoice
from lnbits.utils.exchange_rates import fiat_amount_as_satoshis
from lnbits.core.views.api import pay_invoice
from lnbits.utils.exchange_rates import fiat_amount_as_satoshis
from . import lnurldevice_ext
from .crud import (
create_lnurldevicepayment,
get_lnurldevice,
get_lnurldevicepayment,
update_lnurldevicepayment,
get_lnurlpayload,
update_lnurldevicepayment,
)

View File

@ -1,8 +1,9 @@
from typing import List, Optional, Union
from lnbits.db import SQLITE
from . import db
from .models import PayLink, CreatePayLinkData
from .models import CreatePayLinkData, PayLink
async def create_pay_link(data: CreatePayLinkData, wallet_id: str) -> PayLink:

View File

@ -1,12 +1,14 @@
import json
from urllib.parse import urlparse, urlunparse, parse_qs, urlencode, ParseResult
from starlette.requests import Request
from fastapi.param_functions import Query
from typing import Optional, Dict
from lnbits.lnurl import encode as lnurl_encode # type: ignore
from lnurl.types import LnurlPayMetadata # type: ignore
from sqlite3 import Row
from typing import Dict, Optional
from urllib.parse import ParseResult, parse_qs, urlencode, urlparse, urlunparse
from fastapi.param_functions import Query
from lnurl.types import LnurlPayMetadata # type: ignore
from pydantic import BaseModel
from starlette.requests import Request
from lnbits.lnurl import encode as lnurl_encode # type: ignore
class CreatePayLinkData(BaseModel):

View File

@ -1,4 +1,5 @@
import asyncio
from fastapi import APIRouter
from lnbits.db import Database

View File

@ -3,7 +3,7 @@ from typing import List, Optional, Union
from lnbits.helpers import urlsafe_short_hash
from . import db
from .models import lnurlpayout, CreateLnurlPayoutData
from .models import CreateLnurlPayoutData, lnurlpayout
async def create_lnurlpayout(

View File

@ -2,9 +2,7 @@ import asyncio
from http import HTTPStatus
import httpx
from loguru import logger
from starlette.exceptions import HTTPException
from lnbits.core import db as core_db

View File

@ -1,9 +1,10 @@
from typing import List, Optional
from lnbits.db import SQLITE
from . import db
from .models import Item, Shop
from .wordlists import animals
from .models import Shop, Item
async def create_shop(*, wallet_id: str) -> int:

View File

@ -1,6 +1,6 @@
import base64
import struct
import hmac
import struct
import time

View File

@ -1,14 +1,15 @@
import json
import base64
import hashlib
import json
from collections import OrderedDict
from typing import Dict, List, Optional
from typing import Optional, List, Dict
from lnurl import encode as lnurl_encode # type: ignore
from lnurl.types import LnurlPayMetadata # type: ignore
from lnurl.models import LnurlPaySuccessAction, UrlAction # type: ignore
from lnurl.types import LnurlPayMetadata # type: ignore
from pydantic import BaseModel
from starlette.requests import Request
from .helpers import totp
shop_counters: Dict = {}

View File

@ -3,18 +3,18 @@ from datetime import datetime
from http import HTTPStatus
from typing import List
from fastapi import HTTPException, Request
from fastapi.params import Depends, Query
from starlette.responses import HTMLResponse
from lnbits.decorators import check_user_exists
from lnbits.core.models import Payment, User
from lnbits.core.crud import get_standalone_payment
from lnbits.core.models import Payment, User
from lnbits.core.views.api import api_payment
from lnbits.decorators import check_user_exists
from . import offlineshop_ext, offlineshop_renderer
from .models import Item
from .crud import get_item, get_shop
from fastapi import Request, HTTPException
from .models import Item
@offlineshop_ext.get("/", response_class=HTMLResponse)

View File

@ -1,5 +1,8 @@
import json
import httpx
from lnbits.extensions.subdomains.models import Domains
import httpx, json
async def cloudflare_create_subdomain(

View File

@ -16,8 +16,8 @@ def tpos_renderer():
from .tasks import wait_for_paid_invoices
from .views_api import * # noqa
from .views import * # noqa
from .views_api import * # noqa
def tpos_start():

View File

@ -8,10 +8,7 @@ from starlette.responses import HTMLResponse
from lnbits.core.models import User
from lnbits.decorators import check_user_exists
from lnbits.settings import (
LNBITS_CUSTOM_LOGO,
LNBITS_SITE_TITLE,
)
from lnbits.settings import LNBITS_CUSTOM_LOGO, LNBITS_SITE_TITLE
from . import tpos_ext, tpos_renderer
from .crud import get_tpos

View File

@ -2,9 +2,8 @@ from http import HTTPStatus
from fastapi import Query
from fastapi.params import Depends
from starlette.exceptions import HTTPException
from loguru import logger
from starlette.exceptions import HTTPException
from lnbits.core.crud import get_user
from lnbits.core.services import create_invoice

View File

@ -1,8 +1,8 @@
from sqlite3 import Row
from typing import Optional
from fastapi.param_functions import Query
from pydantic import BaseModel
from typing import Optional
class CreateUserData(BaseModel):

View File

@ -1,15 +1,13 @@
import json
import traceback
import httpx
from datetime import datetime
from http import HTTPStatus
from loguru import logger
import httpx
import shortuuid # type: ignore
from fastapi import HTTPException
from fastapi.param_functions import Query
from loguru import logger
from starlette.requests import Request
from starlette.responses import HTMLResponse # type: ignore

View File

@ -1,11 +1,11 @@
from typing import Optional, List, Callable
from functools import partial
from urllib.request import parse_http_list as _parse_list_header
from typing import Callable, List, Optional
from urllib.parse import urlparse
from werkzeug.datastructures import Headers
from urllib.request import parse_http_list as _parse_list_header
from quart import Request
from quart_trio.asgi import TrioASGIHTTPConnection
from werkzeug.datastructures import Headers
class ASGIProxyFix(TrioASGIHTTPConnection):

View File

@ -1,22 +1,20 @@
import time
import asyncio
import time
import traceback
from http import HTTPStatus
from typing import List, Callable
from loguru import logger
from typing import Callable, List
from fastapi.exceptions import HTTPException
from loguru import logger
from lnbits.settings import WALLET
from lnbits.core.crud import (
get_payments,
get_standalone_payment,
delete_expired_invoices,
get_balance_checks,
get_payments,
get_standalone_payment,
)
from lnbits.core.services import redeem_lnurl_withdraw
from lnbits.settings import WALLET
deferred_async: List[Callable] = []

View File

@ -1,9 +1,8 @@
import asyncio
from typing import Callable, NamedTuple
from loguru import logger
import httpx
from loguru import logger
currencies = {
"AED": "United Arab Emirates Dirham",

View File

@ -1,5 +1,5 @@
from abc import ABC, abstractmethod
from typing import NamedTuple, Optional, AsyncGenerator, Coroutine
from typing import AsyncGenerator, Coroutine, NamedTuple, Optional
class StatusResponse(NamedTuple):

View File

@ -5,10 +5,12 @@ except ImportError: # pragma: nocover
import asyncio
import random
import time
from functools import partial, wraps
from os import getenv
from typing import AsyncGenerator, Optional
import time
from lnbits import bolt11 as lnbits_bolt11
from .base import (
InvoiceResponse,
@ -18,7 +20,6 @@ from .base import (
Unsupported,
Wallet,
)
from lnbits import bolt11 as lnbits_bolt11
def async_wrap(func):

View File

@ -5,9 +5,8 @@ import urllib.parse
from os import getenv
from typing import AsyncGenerator, Dict, Optional
from loguru import logger
import httpx
from loguru import logger
from websockets import connect
from websockets.exceptions import (
ConnectionClosed,

View File

@ -1,20 +1,20 @@
import asyncio
from os import getenv
from datetime import datetime
from typing import Optional, Dict, AsyncGenerator
import hashlib
import random
from datetime import datetime
from os import getenv
from typing import AsyncGenerator, Dict, Optional
from loguru import logger
from lnbits.helpers import urlsafe_short_hash
import hashlib
from ..bolt11 import encode, decode
from ..bolt11 import decode, encode
from .base import (
StatusResponse,
InvoiceResponse,
PaymentResponse,
PaymentStatus,
StatusResponse,
Wallet,
)

View File

@ -1,16 +1,16 @@
import asyncio
import json
import httpx
from os import getenv
from typing import Optional, Dict, AsyncGenerator
from typing import AsyncGenerator, Dict, Optional
import httpx
from loguru import logger
from .base import (
StatusResponse,
InvoiceResponse,
PaymentResponse,
PaymentStatus,
StatusResponse,
Wallet,
)

View File

@ -2,11 +2,11 @@
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: lightning.proto
"""Generated protocol buffer code."""
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import enum_type_wrapper
# @@protoc_insertion_point(imports)

View File

@ -1,30 +1,30 @@
imports_ok = True
try:
from google import protobuf
import grpc
from google import protobuf
except ImportError: # pragma: nocover
imports_ok = False
import binascii
import base64
import binascii
import hashlib
from os import environ, error, getenv
from typing import Optional, Dict, AsyncGenerator
from typing import AsyncGenerator, Dict, Optional
from loguru import logger
from .macaroon import load_macaroon, AESCipher
from .macaroon import AESCipher, load_macaroon
if imports_ok:
import lnbits.wallets.lnd_grpc_files.lightning_pb2 as ln
import lnbits.wallets.lnd_grpc_files.lightning_pb2_grpc as lnrpc
from .base import (
StatusResponse,
InvoiceResponse,
PaymentResponse,
PaymentStatus,
StatusResponse,
Wallet,
)

View File

@ -1,23 +1,23 @@
import asyncio
from pydoc import describe
import httpx
import json
import base64
import json
from os import getenv
from typing import Optional, Dict, AsyncGenerator
from pydoc import describe
from typing import AsyncGenerator, Dict, Optional
import httpx
from loguru import logger
from lnbits import bolt11 as lnbits_bolt11
from .macaroon import load_macaroon, AESCipher
from .base import (
StatusResponse,
InvoiceResponse,
PaymentResponse,
PaymentStatus,
StatusResponse,
Wallet,
)
from .macaroon import AESCipher, load_macaroon
class LndRestWallet(Wallet):

View File

@ -1,18 +1,18 @@
import json
import asyncio
from fastapi.exceptions import HTTPException
import httpx
from os import getenv
import json
from http import HTTPStatus
from typing import Optional, Dict, AsyncGenerator
from os import getenv
from typing import AsyncGenerator, Dict, Optional
import httpx
from fastapi.exceptions import HTTPException
from loguru import logger
from .base import (
StatusResponse,
InvoiceResponse,
PaymentResponse,
PaymentStatus,
StatusResponse,
Wallet,
)

View File

@ -1,16 +1,16 @@
import asyncio
import json
import httpx
from os import getenv
from typing import Optional, Dict, AsyncGenerator
from typing import AsyncGenerator, Dict, Optional
import httpx
from loguru import logger
from .base import (
StatusResponse,
InvoiceResponse,
PaymentResponse,
PaymentStatus,
StatusResponse,
Wallet,
)

View File

@ -1 +1 @@
from .macaroon import load_macaroon, AESCipher
from .macaroon import AESCipher, load_macaroon

View File

@ -1,9 +1,9 @@
import base64
import getpass
from hashlib import md5
from Cryptodome import Random
from Cryptodome.Cipher import AES
import base64
from hashlib import md5
import getpass
from loguru import logger
BLOCK_SIZE = 16

View File

@ -1,22 +1,22 @@
import asyncio
from fastapi.exceptions import HTTPException
from lnbits.helpers import url_for
import hmac
import httpx
from http import HTTPStatus
from os import getenv
from typing import Optional, AsyncGenerator
from typing import AsyncGenerator, Optional
import httpx
from fastapi.exceptions import HTTPException
from loguru import logger
from lnbits.helpers import url_for
from .base import (
StatusResponse,
InvoiceResponse,
PaymentResponse,
PaymentStatus,
Wallet,
StatusResponse,
Unsupported,
Wallet,
)

View File

@ -1,17 +1,17 @@
import asyncio
import json
import httpx
import random
from os import getenv
from typing import Optional, AsyncGenerator
from typing import AsyncGenerator, Optional
import httpx
from loguru import logger
from .base import (
StatusResponse,
InvoiceResponse,
PaymentResponse,
PaymentStatus,
StatusResponse,
Wallet,
)