Skip to main content

Shared XRPL MPP wire models and helpers

Project description

xrpl-mpp-core

Shared XRPL + MPP HTTP models and helpers.

Install

pip install xrpl-mpp-core

Includes

  • MPP challenge, credential, receipt, and problem-detail models
  • JCS + base64url codecs for Authorization: Payment and Payment-Receipt
  • WWW-Authenticate: Payment parsing/rendering
  • XRPL asset helpers for XRP, RLUSD, and USDC
  • challenge binding, expiry, and body-digest helpers

Example

from xrpl_mpp_core import (
    XRPLChargeMethodDetails,
    XRPLChargeRequest,
    build_payment_challenge,
    parse_payment_challenge,
    render_payment_challenge,
)

challenge = build_payment_challenge(
    secret="replace-with-a-shared-secret",
    realm="merchant.example",
    method="xrpl",
    intent="charge",
    request_model=XRPLChargeRequest(
        amount="1000",
        currency="XRP:native",
        recipient="rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe",
        methodDetails=XRPLChargeMethodDetails(
            network="xrpl:1",
            invoiceId="A" * 64,
        ),
    ),
    expires_in_seconds=300,
)

header_value = render_payment_challenge(challenge)
decoded = parse_payment_challenge(header_value)

Use xrpl-mpp-core directly when you need to generate or validate MPP HTTP headers without pulling in the facilitator, middleware, or client runtime packages.

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_core-0.1.4.tar.gz (11.3 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_core-0.1.4-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for xrpl_mpp_core-0.1.4.tar.gz
Algorithm Hash digest
SHA256 848a66e99bdcf4287e2463d2189611961ec35ee8376484b2b0ac20b1dc3abefe
MD5 3c0adb97174c618d8cbf2e8bd1681e0f
BLAKE2b-256 f4021802aed0eed7c23d360810da938a07670a0841ad6cd5073a0c4469834037

See more details on using hashes here.

Provenance

The following attestation bundles were made for xrpl_mpp_core-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_core-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: xrpl_mpp_core-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for xrpl_mpp_core-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6ac43831c4875ce77807fa134529c79d57db46c5cfd3354b4044b0fe325e64ae
MD5 276b50a5ec96fc34899046b210d861b1
BLAKE2b-256 924f10330fa3fb9008dd31d03aa1276d6d2c51bb5b2633de4a8d0bdae5124463

See more details on using hashes here.

Provenance

The following attestation bundles were made for xrpl_mpp_core-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