🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

uma-auth-api

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uma-auth-api

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.

0.0.11
PyPI
Maintainers
1

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:

Keywords

OpenAPI UMA Auth API

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts