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

UMA Auth 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.10.tar.gz (19.9 kB view details)

Uploaded Source

Built Distribution

uma_auth_api-0.0.10-py3-none-any.whl (45.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: uma_auth_api-0.0.10.tar.gz
  • Upload date:
  • Size: 19.9 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.10.tar.gz
Algorithm Hash digest
SHA256 2ac1c51df5e95c72369df7d779703ce0bd9c83b81a436b020d473771718e8c26
MD5 335b823a5ba4bcc07c34fc481e8597e2
BLAKE2b-256 bd6f35bb82de62a600bcabf11b7f102839b0f21f93ad82b743b6a763ca3aed38

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for uma_auth_api-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 0fae8f7327a77b9d5e663a1460893e41d60bf358a1763c0fd1bc36f067770344
MD5 4d9d248135fa622b8f501a6a516ea5a6
BLAKE2b-256 02c35c65532840a5484d20ed897bd8136ec08314508f97cfe5792144f5d69c48

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