Skip to main content

Buyer-side Python SDK for XRPL MPP HTTP payments

Project description

xrpl-mpp-client

Buyer-side SDK for XRPL-backed MPP HTTP retries.

Install

pip install xrpl-mpp-client

Main APIs

  • XRPLPaymentSigner
  • XRPLPaymentTransport
  • wrap_httpx_with_mpp_payment(...)
  • select_payment_challenge(...)
  • build_payment_authorization(...)

Example

import asyncio

from xrpl.wallet import Wallet
from xrpl_mpp_client import XRPLPaymentSigner, wrap_httpx_with_mpp_payment


async def main() -> None:
    signer = XRPLPaymentSigner(
        Wallet.from_seed("sEd..."),
        rpc_url="https://s.altnet.rippletest.net:51234/",
        network="xrpl:1",
    )
    async with wrap_httpx_with_mpp_payment(
        signer,
        asset="XRP:native",
    ) as client:
        response = await client.get("https://merchant.example/premium")
        print(response.status_code)
        print(response.text)


asyncio.run(main())

The client understands both charge and session challenges and reads/writes the MPP HTTP headers directly. For explicit session teardown, reuse the same XRPLPaymentTransport instance and call await transport.close_session("https://merchant.example/path").

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

xrpl_mpp_client-0.1.4.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

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

xrpl_mpp_client-0.1.4-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file xrpl_mpp_client-0.1.4.tar.gz.

File metadata

  • Download URL: xrpl_mpp_client-0.1.4.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for xrpl_mpp_client-0.1.4.tar.gz
Algorithm Hash digest
SHA256 747628d7601c7220fc47f79aaea17aef14d288e70796930f037c5ff845dc990b
MD5 1b29d741ffcd69228ef1859108271eb5
BLAKE2b-256 b23b8c36b0f8f345830e822a4888f81860367f84449983dc5d9b3b4687b5f1b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for xrpl_mpp_client-0.1.4.tar.gz:

Publisher: publish-package.yml on lgcarrier/xrpl-mpp-stack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xrpl_mpp_client-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for xrpl_mpp_client-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e9dc39dd7ba286ac97c3ee78d08bf10285402113e94e3b1437651511d83e03b5
MD5 f095617be0a245065d9e047a397f5e58
BLAKE2b-256 442105cd2a70d0ce90fcafda999a0681a76cee8ec9b77e3b2fa21f0a37bfc5cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for xrpl_mpp_client-0.1.4-py3-none-any.whl:

Publisher: publish-package.yml on lgcarrier/xrpl-mpp-stack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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