Skip to main content

This API allows you to authenticate with the UMA server to take actions on a user's wallet. It's the exposed communication layer between the NWC server and the main UMA server.

Project description

OpenAPI generated Python Pydantic Models

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 0.1
  • Generator version: 7.7.0
  • Build package: org.openapitools.codegen.languages.PythonFastAPIServerCodegen

Requirements

Python >= 3.7

Installation & Usage

To install the library, simply run:

pip install uma-auth-api

When handling a request, you can do something like:

from uma_auth.models.pay_invoice_request import PayInvoiceRequest
from uma_auth.models.pay_invoice_response import PayInvoiceResponse

def handle_pay_invoice():
    try:
        request_data = PayInvoiceRequest.from_dict(request.get_json())
    except Exception as e:
        abort_with_error(400, f"Invalid request: {e}")

    invoice = request_data.invoice
    amount = request_data.amount

    # ... actually pay the invoice ...

    return PayInvoiceResponse(preimage=payment_result.preimage).to_dict()

Note that this library only contains request and response model types to help with type safety and encoding/decoding of requests and responses. If you want something more custom for a specific API framework, you can generate your own code using the OpenAPI Generator CLI. There are generators for the following server frameworks:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uma_auth_api-0.0.1.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

uma_auth_api-0.0.1-py3-none-any.whl (31.3 kB view details)

Uploaded Python 3

File details

Details for the file uma_auth_api-0.0.1.tar.gz.

File metadata

  • Download URL: uma_auth_api-0.0.1.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.16

File hashes

Hashes for uma_auth_api-0.0.1.tar.gz
Algorithm Hash digest
SHA256 7d4400384cfaadc41f2de05dfce6f4b7c393a8e75bd19e4cd1118eaab90acf96
MD5 970646b74c10ab31cc668053f912eda3
BLAKE2b-256 822384322014bec46afbae24713560f301ff916b7b20d500d96b59bde4360203

See more details on using hashes here.

File details

Details for the file uma_auth_api-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: uma_auth_api-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 31.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.16

File hashes

Hashes for uma_auth_api-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 da8131610b54f85360d9763c9cfc1bb88a4ed6596633f721b2b52f9109e83c06
MD5 2b510602cb9abed8fc04bdb2e98c00f6
BLAKE2b-256 f10d73489c0a41b25aff598495fc5f132114f2ce885f4461a0e11351b0888962

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page