15 Commits

Author SHA1 Message Date
Carson Roscoe
1eb160be6f
feat: discovery layer (#294)
* feat: initial typescript proposal

* feat: initial python proposal

* fix: typescript format/lint/unit tests

* chore: reverted example changes

* feat: added and tested list in useFacilitator

* feat: added list to python facilitator

* fix: removed resource from param

* feat: finalize typescript implementation

* feat: finalize typescript implementation

* feat: lint/format

* fix: unit tests

* fix: lock

* fix: pr feedback

* fix: pr feedback

* fix: removed placeholder data in x402.org's GET discovery/resources
2025-07-30 16:36:21 -07:00
Carson Roscoe
69c0401948
chore: bump x402 package version (#290) 2025-07-16 09:06:20 -07:00
Amanda McDermott
765a9a4782
feat: Add & clean up examples for Python (#287)
* Python pricing example WIP

* Update readme

* Update types, format

* Simplify, don't use http exception shape

* Fix bug where python pkg would set empty fields to nil instead of omitting entirely

* Update readmes, appease linter

* Fix bug where we always try to settle w/ the first payment requirement in the list

* Fix network filtering bug-- settle was always using the first one in the list

* Fix same payment requirements list bug in python example

* Add notes about the client network filter

* Add custom payment selector to the other python client as well

* use json5 for md formatting

* Din't need to recreate util

* Create find_matching_payment_requirements util in python

* Update middlewares, tests
2025-07-15 15:37:47 -04:00
Amanda McDermott
0f436a8b03
fix: Rebuild template after core package update (#286)
* Build template after core pkg update

* format

* Update CONTRIBUTING.md
2025-07-14 18:41:44 -04:00
Amanda McDermott
679389022a
feat: Paywall support for Python (flask & fastapi) (#279)
* WIP python paywall

* Add paywall config

* Fix type errors, add flask to project deps

* Pydantic v2.10 doesn't support serialize_by_alias as a config option

* clean up middlewares

* That was unnecessarily complicated

* per pydantic: use  instead of  on Python < 3.12

* Update paywall to full html file, update path

* Allow users to pass in custom HTML as a string for their paywall

* Validate supported networks

* Don't use type in middleware, but do verify

* Minify paywall html during build process

* Add example that uses new python paywall

* Update env to be mainnet in mainnet example

* Add flask and fastapi fullstack examples

* Correct types

* Update paywall html

* Hide balance on paywall

* Format

* ADd proper logging to fastapi middleware

* Escape strings and guard against prototype pollution

* Automatically copy the paywall file over to the python directory

* Update example lockfiles

* Update python tests

* Update paywall template build steps so python matches TS

* Format and lint
2025-07-11 14:42:18 -07:00
Carson Roscoe
f87717093b
depps: in python updated x402's pydantic depp to >=2.10.3 (#280)
* depps: in python updated x402's pydantic depp to >=2.10.3

* fix: lockfiles
2025-07-10 15:34:01 -07:00
Carson Roscoe
b160924304
ix: removed type which was not needed (#278) 2025-07-09 18:09:20 -07:00
Carson Roscoe
220057a591
E2E Regression Tests (#269)
* feat: initial e2e draft

* feat: implemented axios, express and hono

* feat: implemented fetch and next. Fixed a next bug

* feat: added httpx client

* feat: added requests clients

* feat: added fastapi

* feat: added flask

* feat: added gin

* fix: reinstated full tests

* fix: format

* feat: added README

* chore: log cleanup

* feat: improved logging

* feat: fixed express e2e protected-2 tests
2025-07-06 02:36:14 -07:00
Carson Roscoe
094dcd2b95
chore: bump python package version (#263) 2025-06-27 14:51:44 -07:00
Carson Roscoe
008c45730c
feat: initial flask middleware implementation (#257) 2025-06-25 15:28:33 -07:00
Carson Roscoe
8341f1ccee
chore: bump x402 package (#251) 2025-06-19 17:54:20 -07:00
Carson Roscoe
5693bab6da
feat: expanded support from USDC to any eip-3009 asset (#249)
* feat: expanded support from USDC to any eip-3009 asset

* fix: unit tests
2025-06-19 11:47:28 -07:00
Carson Roscoe
67b35da940
chore: downgraded required python version to >=3.10 (#248) 2025-06-19 09:33:17 -07:00
Carson Roscoe
9288c8d3b0
feat: python x402 mainnet (#247)
* feat: added facilitator config

* initial

* working towards downgrading pydantic

* fix: first mainnet call

* feat: updated cdp-sdk version in example to prod
2025-06-18 16:00:49 -07:00
erikreppel-cb
830976be46
[Draft] Add python support (#215)
* Start types

* Increase tests and fix type issues

* feat: completed fastapi draft and added example (#229)

* feat: fixed fastapi and added example

* chore: tweak README

* feat: python clients (#226)

* feat: httpx client and example

* fix: cleanup httpx example

* feat: added requests example

* feat: unit testing clients & helpers

* chore: format/lint

* chore: correct READMEs of examples

* fix: removed debug logs

* fix: removed artifact code from testing

* chore: removed excess comments

* feat: refactored from web3 to eth_account as accounts

* feat: refactored interfaces per pr feedback

* fix: pr feedback

* chore: rebase & merge

* chore: renamed x402 request exports

* fix: pr feedback

* feat: release GHA and improved readme (#232)

* feat: release GHA and improved readme

* chore: bump to v0.1.1

* chore: renamed PyPi token

---------

Co-authored-by: Carson Roscoe <CarsonRoscoe7@gmail.com>
2025-06-13 15:42:26 -07:00