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.8.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.11.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

uma_auth_api-0.0.11-py3-none-any.whl (46.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for uma_auth_api-0.0.11.tar.gz
Algorithm Hash digest
SHA256 7acb7518aa3f701f5922c86124920706af736dc8bf2890bee461cca41877d568
MD5 5b5d3ab32ff191e70b5bcb5c5c9081bb
BLAKE2b-256 02894ba6aa868eb78f51bcf21e8a764268c0392b92077ecaabf40c9f4846b18d

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for uma_auth_api-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 541bea53f158dd6d354ce3592ae267f853d2478eebccac77e90c717f169dbaf2
MD5 2e76c9fa7faccfec234ab37d9338092b
BLAKE2b-256 d4e50da9e0f27f2921f11cca6674bb45be5d14f113fa33180387a836b1dd9d65

See more details on using hashes here.

Supported by

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