algopay-sdk 0.1.0a1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- algopay_sdk-0.1.0a1/.gitignore +15 -0
- algopay_sdk-0.1.0a1/PKG-INFO +102 -0
- algopay_sdk-0.1.0a1/README.md +66 -0
- algopay_sdk-0.1.0a1/algopay/__init__.py +6 -0
- algopay_sdk-0.1.0a1/algopay/client.py +804 -0
- algopay_sdk-0.1.0a1/algopay/core/__init__.py +1 -0
- algopay_sdk-0.1.0a1/algopay/core/algorand_client.py +64 -0
- algopay_sdk-0.1.0a1/algopay/core/config.py +88 -0
- algopay_sdk-0.1.0a1/algopay/core/constants.py +25 -0
- algopay_sdk-0.1.0a1/algopay/core/exceptions.py +119 -0
- algopay_sdk-0.1.0a1/algopay/core/logging.py +36 -0
- algopay_sdk-0.1.0a1/algopay/core/types.py +251 -0
- algopay_sdk-0.1.0a1/algopay/guards/__init__.py +58 -0
- algopay_sdk-0.1.0a1/algopay/guards/base.py +230 -0
- algopay_sdk-0.1.0a1/algopay/guards/budget.py +334 -0
- algopay_sdk-0.1.0a1/algopay/guards/confirm.py +115 -0
- algopay_sdk-0.1.0a1/algopay/guards/manager.py +446 -0
- algopay_sdk-0.1.0a1/algopay/guards/rate_limit.py +172 -0
- algopay_sdk-0.1.0a1/algopay/guards/recipient.py +137 -0
- algopay_sdk-0.1.0a1/algopay/guards/single_tx.py +80 -0
- algopay_sdk-0.1.0a1/algopay/intents/__init__.py +3 -0
- algopay_sdk-0.1.0a1/algopay/intents/service.py +112 -0
- algopay_sdk-0.1.0a1/algopay/ledger/__init__.py +3 -0
- algopay_sdk-0.1.0a1/algopay/ledger/ledger.py +310 -0
- algopay_sdk-0.1.0a1/algopay/payment/__init__.py +4 -0
- algopay_sdk-0.1.0a1/algopay/payment/batch.py +68 -0
- algopay_sdk-0.1.0a1/algopay/payment/router.py +150 -0
- algopay_sdk-0.1.0a1/algopay/protocols/__init__.py +5 -0
- algopay_sdk-0.1.0a1/algopay/protocols/base.py +60 -0
- algopay_sdk-0.1.0a1/algopay/protocols/transfer.py +161 -0
- algopay_sdk-0.1.0a1/algopay/protocols/x402.py +257 -0
- algopay_sdk-0.1.0a1/algopay/storage/__init__.py +43 -0
- algopay_sdk-0.1.0a1/algopay/storage/base.py +63 -0
- algopay_sdk-0.1.0a1/algopay/storage/memory.py +90 -0
- algopay_sdk-0.1.0a1/algopay/storage/redis.py +115 -0
- algopay_sdk-0.1.0a1/algopay/wallet/__init__.py +3 -0
- algopay_sdk-0.1.0a1/algopay/wallet/repository.py +104 -0
- algopay_sdk-0.1.0a1/algopay/wallet/service.py +323 -0
- algopay_sdk-0.1.0a1/algopay/wallet/signer.py +36 -0
- algopay_sdk-0.1.0a1/pyproject.toml +76 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: algopay-sdk
|
|
3
|
+
Version: 0.1.0a1
|
|
4
|
+
Summary: AlgoPay SDK — payment infrastructure for AI agents on Algorand (x402, USDC/ASA, guards)
|
|
5
|
+
Project-URL: Homepage, https://github.com/Algodev-Studio/algopay-sdk
|
|
6
|
+
Project-URL: Documentation, https://github.com/Algodev-Studio/algopay-sdk#readme
|
|
7
|
+
Project-URL: Repository, https://github.com/Algodev-Studio/algopay-sdk
|
|
8
|
+
Project-URL: Issues, https://github.com/Algodev-Studio/algopay-sdk/issues
|
|
9
|
+
Author: AlgoPay contributors
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
Keywords: agent,ai,algopay,algopay-sdk,algorand,asa,payments,usdc,x402
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
21
|
+
Requires-Python: >=3.10
|
|
22
|
+
Requires-Dist: cryptography>=44.0.0
|
|
23
|
+
Requires-Dist: httpx>=0.28.0
|
|
24
|
+
Requires-Dist: py-algorand-sdk>=2.6.0
|
|
25
|
+
Requires-Dist: pydantic>=2.12.0
|
|
26
|
+
Requires-Dist: python-dotenv>=1.2.0
|
|
27
|
+
Requires-Dist: redis>=7.1.0
|
|
28
|
+
Requires-Dist: x402-avm[avm]>=2.0.2
|
|
29
|
+
Provides-Extra: dev
|
|
30
|
+
Requires-Dist: mypy>=1.19.0; extra == 'dev'
|
|
31
|
+
Requires-Dist: pytest-asyncio>=1.3.0; extra == 'dev'
|
|
32
|
+
Requires-Dist: pytest-cov>=7.0.0; extra == 'dev'
|
|
33
|
+
Requires-Dist: pytest>=9.0.0; extra == 'dev'
|
|
34
|
+
Requires-Dist: ruff>=0.14.0; extra == 'dev'
|
|
35
|
+
Description-Content-Type: text/markdown
|
|
36
|
+
|
|
37
|
+
# AlgoPay SDK
|
|
38
|
+
|
|
39
|
+
Python package (**PyPI:** `algopay-sdk`) for **AI agent payments on Algorand**: local wallets, **USDC (ASA)** transfers, **x402** HTTP 402 flows, guards, ledger, and payment intents.
|
|
40
|
+
|
|
41
|
+
> **Status: 0.1.0 alpha (`0.1.0a1` on PyPI when published)** — APIs and behavior may change. Test coverage is still expanding; see **[Testing roadmap → 1.0](docs/TESTING_ROADMAP.md)** before relying on this in production.
|
|
42
|
+
> **Source:** [github.com/Algodev-Studio/algopay-sdk](https://github.com/Algodev-Studio/algopay-sdk)
|
|
43
|
+
|
|
44
|
+
## Install
|
|
45
|
+
|
|
46
|
+
**From PyPI (alpha — pin the version or use `--pre`):**
|
|
47
|
+
|
|
48
|
+
On PyPI the distribution is **`algopay-sdk`**; you still **`import algopay`** in code.
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
pip install "algopay-sdk==0.1.0a1"
|
|
52
|
+
# or: pip install --pre "algopay-sdk>=0.1.0a1,<0.2"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**From a clone (development):**
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pip install -e ".[dev]"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Requirements
|
|
62
|
+
|
|
63
|
+
- Python 3.10+
|
|
64
|
+
|
|
65
|
+
**Environment variables:** see **[docs/ENVIRONMENT.md](docs/ENVIRONMENT.md)** for a full table (`ALGOPAY_NETWORK`, Algod/Indexer URLs, USDC ASA ID, Redis, logging, and example-only vars).
|
|
66
|
+
|
|
67
|
+
Short version:
|
|
68
|
+
|
|
69
|
+
- `ALGOPAY_NETWORK` — `algorand-mainnet` or `algorand-testnet` (default: testnet)
|
|
70
|
+
- Optional: `ALGOD_URL` / `ALGOPAY_ALGOD_URL`, `INDEXER_URL` / `ALGOPAY_INDEXER_URL`, `ALGOPAY_USDC_ASA_ID`
|
|
71
|
+
- Redis: `ALGOPAY_STORAGE_BACKEND=redis`, `ALGOPAY_REDIS_URL`
|
|
72
|
+
|
|
73
|
+
## Quick start
|
|
74
|
+
|
|
75
|
+
```python
|
|
76
|
+
import asyncio
|
|
77
|
+
from algopay import AlgoPay
|
|
78
|
+
from algopay.core.types import Network
|
|
79
|
+
|
|
80
|
+
async def main():
|
|
81
|
+
client = AlgoPay(network=Network.ALGORAND_TESTNET)
|
|
82
|
+
ws = client.wallet.create_wallet_set("my-agent")
|
|
83
|
+
w = client.wallet.create_wallet(ws.id)
|
|
84
|
+
# Fund the address with test ALGO + opt-in to USDC, then:
|
|
85
|
+
# client.wallet.opt_in_usdc(w.id)
|
|
86
|
+
# ... acquire USDC ...
|
|
87
|
+
await client.pay(w.id, "RECEIVER58CHARALGORANDADDRESSAAAAAAAAAAAA", "1.0")
|
|
88
|
+
|
|
89
|
+
asyncio.run(main())
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Documentation
|
|
93
|
+
|
|
94
|
+
- [Environment variables](docs/ENVIRONMENT.md)
|
|
95
|
+
- [Publishing (alpha → PyPI)](docs/PUBLISHING.md)
|
|
96
|
+
- [Testing roadmap & enterprise readiness](docs/TESTING_ROADMAP.md)
|
|
97
|
+
- [Legacy OmniAgentPay / arc-merchant reference](docs/REFERENCE_LEGACY_OMNIAGENTPAY_AND_ARC_MERCHANT.md)
|
|
98
|
+
- `examples/` and the [Algorand x402 scheme](https://github.com/coinbase/x402/blob/main/specs/schemes/exact/scheme_exact_algo.md)
|
|
99
|
+
|
|
100
|
+
## License
|
|
101
|
+
|
|
102
|
+
MIT
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# AlgoPay SDK
|
|
2
|
+
|
|
3
|
+
Python package (**PyPI:** `algopay-sdk`) for **AI agent payments on Algorand**: local wallets, **USDC (ASA)** transfers, **x402** HTTP 402 flows, guards, ledger, and payment intents.
|
|
4
|
+
|
|
5
|
+
> **Status: 0.1.0 alpha (`0.1.0a1` on PyPI when published)** — APIs and behavior may change. Test coverage is still expanding; see **[Testing roadmap → 1.0](docs/TESTING_ROADMAP.md)** before relying on this in production.
|
|
6
|
+
> **Source:** [github.com/Algodev-Studio/algopay-sdk](https://github.com/Algodev-Studio/algopay-sdk)
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
**From PyPI (alpha — pin the version or use `--pre`):**
|
|
11
|
+
|
|
12
|
+
On PyPI the distribution is **`algopay-sdk`**; you still **`import algopay`** in code.
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
pip install "algopay-sdk==0.1.0a1"
|
|
16
|
+
# or: pip install --pre "algopay-sdk>=0.1.0a1,<0.2"
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**From a clone (development):**
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pip install -e ".[dev]"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Requirements
|
|
26
|
+
|
|
27
|
+
- Python 3.10+
|
|
28
|
+
|
|
29
|
+
**Environment variables:** see **[docs/ENVIRONMENT.md](docs/ENVIRONMENT.md)** for a full table (`ALGOPAY_NETWORK`, Algod/Indexer URLs, USDC ASA ID, Redis, logging, and example-only vars).
|
|
30
|
+
|
|
31
|
+
Short version:
|
|
32
|
+
|
|
33
|
+
- `ALGOPAY_NETWORK` — `algorand-mainnet` or `algorand-testnet` (default: testnet)
|
|
34
|
+
- Optional: `ALGOD_URL` / `ALGOPAY_ALGOD_URL`, `INDEXER_URL` / `ALGOPAY_INDEXER_URL`, `ALGOPAY_USDC_ASA_ID`
|
|
35
|
+
- Redis: `ALGOPAY_STORAGE_BACKEND=redis`, `ALGOPAY_REDIS_URL`
|
|
36
|
+
|
|
37
|
+
## Quick start
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
import asyncio
|
|
41
|
+
from algopay import AlgoPay
|
|
42
|
+
from algopay.core.types import Network
|
|
43
|
+
|
|
44
|
+
async def main():
|
|
45
|
+
client = AlgoPay(network=Network.ALGORAND_TESTNET)
|
|
46
|
+
ws = client.wallet.create_wallet_set("my-agent")
|
|
47
|
+
w = client.wallet.create_wallet(ws.id)
|
|
48
|
+
# Fund the address with test ALGO + opt-in to USDC, then:
|
|
49
|
+
# client.wallet.opt_in_usdc(w.id)
|
|
50
|
+
# ... acquire USDC ...
|
|
51
|
+
await client.pay(w.id, "RECEIVER58CHARALGORANDADDRESSAAAAAAAAAAAA", "1.0")
|
|
52
|
+
|
|
53
|
+
asyncio.run(main())
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Documentation
|
|
57
|
+
|
|
58
|
+
- [Environment variables](docs/ENVIRONMENT.md)
|
|
59
|
+
- [Publishing (alpha → PyPI)](docs/PUBLISHING.md)
|
|
60
|
+
- [Testing roadmap & enterprise readiness](docs/TESTING_ROADMAP.md)
|
|
61
|
+
- [Legacy OmniAgentPay / arc-merchant reference](docs/REFERENCE_LEGACY_OMNIAGENTPAY_AND_ARC_MERCHANT.md)
|
|
62
|
+
- `examples/` and the [Algorand x402 scheme](https://github.com/coinbase/x402/blob/main/specs/schemes/exact/scheme_exact_algo.md)
|
|
63
|
+
|
|
64
|
+
## License
|
|
65
|
+
|
|
66
|
+
MIT
|