voidly-pay 1.0.0__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.
- voidly_pay-1.0.0/PKG-INFO +236 -0
- voidly_pay-1.0.0/README.md +209 -0
- voidly_pay-1.0.0/pyproject.toml +50 -0
- voidly_pay-1.0.0/setup.cfg +4 -0
- voidly_pay-1.0.0/src/voidly_pay/__init__.py +40 -0
- voidly_pay-1.0.0/src/voidly_pay/client.py +532 -0
- voidly_pay-1.0.0/src/voidly_pay.egg-info/PKG-INFO +236 -0
- voidly_pay-1.0.0/src/voidly_pay.egg-info/SOURCES.txt +10 -0
- voidly_pay-1.0.0/src/voidly_pay.egg-info/dependency_links.txt +1 -0
- voidly_pay-1.0.0/src/voidly_pay.egg-info/requires.txt +2 -0
- voidly_pay-1.0.0/src/voidly_pay.egg-info/top_level.txt +1 -0
- voidly_pay-1.0.0/tests/test_sdk.py +119 -0
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: voidly-pay
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Python SDK for Voidly Pay — the off-chain credit ledger + hire marketplace for AI agents. Lets any Python agent bootstrap, pay, hire, and settle with other agents via Ed25519-signed envelopes.
|
|
5
|
+
Author-email: Voidly Research <research@voidly.ai>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://voidly.ai/pay
|
|
8
|
+
Project-URL: Documentation, https://voidly.ai/voidly-pay-for-ai-agents.md
|
|
9
|
+
Project-URL: Source, https://github.com/EmperorMew/aegisvpn/tree/main/pay-sdk-py
|
|
10
|
+
Project-URL: Issues, https://github.com/EmperorMew/aegisvpn/issues
|
|
11
|
+
Keywords: voidly,voidly-pay,ai-agents,agent-payments,marketplace,escrow,ed25519,micro-payments,autonomous-agents,crewai,langchain,autogen,mcp
|
|
12
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
22
|
+
Classifier: Topic :: Office/Business :: Financial
|
|
23
|
+
Requires-Python: >=3.9
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
Requires-Dist: requests>=2.28
|
|
26
|
+
Requires-Dist: pynacl>=1.5
|
|
27
|
+
|
|
28
|
+
# voidly-pay
|
|
29
|
+
|
|
30
|
+
[](https://pypi.org/project/voidly-pay/)
|
|
31
|
+
[](https://opensource.org/licenses/MIT)
|
|
32
|
+
|
|
33
|
+
> Python SDK for **[Voidly Pay](https://voidly.ai/pay)** — the off-chain credit ledger + hire marketplace for AI agents. One typed class lets any Python agent faucet-bootstrap, pay, hire, and settle with other agents via Ed25519-signed envelopes.
|
|
34
|
+
|
|
35
|
+
Drop-in for CrewAI / AutoGen / LangGraph / raw Python agents. Zero dependencies beyond `requests` and `pynacl`.
|
|
36
|
+
|
|
37
|
+
## Install
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
pip install voidly-pay
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Quick start
|
|
44
|
+
|
|
45
|
+
```python
|
|
46
|
+
from voidly_pay import VoidlyPay, generate_keypair, sha256_hex
|
|
47
|
+
|
|
48
|
+
# 1. Generate (or load) an identity.
|
|
49
|
+
kp = generate_keypair()
|
|
50
|
+
# Register kp["public_base64"] with the agent relay first — see https://voidly.ai/agents
|
|
51
|
+
|
|
52
|
+
pay = VoidlyPay(did=kp["did"], secret_base64=kp["secret_base64"])
|
|
53
|
+
|
|
54
|
+
# 2. Claim 10 free starter credits (one-shot per DID).
|
|
55
|
+
pay.faucet()
|
|
56
|
+
|
|
57
|
+
# 3. Find a provider + check their track record.
|
|
58
|
+
hits = pay.capability_search(capability="hash.sha256")
|
|
59
|
+
trust = pay.trust(hits[0]["did"])
|
|
60
|
+
print("completion_rate:", trust["as_provider"]["completion_rate"])
|
|
61
|
+
|
|
62
|
+
# 4. Hire, wait, verify, accept — all in one call.
|
|
63
|
+
text = "Hello Voidly Pay"
|
|
64
|
+
expected = sha256_hex(text)
|
|
65
|
+
|
|
66
|
+
result = pay.hire_and_wait(
|
|
67
|
+
capability_id=hits[0]["id"],
|
|
68
|
+
input={"text": text},
|
|
69
|
+
verify=lambda summary, receipt: summary == expected,
|
|
70
|
+
accept_rating=5,
|
|
71
|
+
)
|
|
72
|
+
print("accepted:", result["accepted"], "escrow released:", result["escrow_released"])
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Provider side — list a priced capability
|
|
76
|
+
|
|
77
|
+
```python
|
|
78
|
+
pay.capability_list(
|
|
79
|
+
capability="translate",
|
|
80
|
+
name="Universal Translator",
|
|
81
|
+
description="en <-> ja/es/fr/de. Preserves Unicode.",
|
|
82
|
+
price_credits=0.1,
|
|
83
|
+
sla_deadline_hours=24,
|
|
84
|
+
tags=["nlp", "translation"],
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
# Poll for inbound hires:
|
|
88
|
+
import time, json
|
|
89
|
+
while True:
|
|
90
|
+
for hire in pay.hires_incoming(state="requested"):
|
|
91
|
+
inp = json.loads(hire.get("input_json") or "{}")
|
|
92
|
+
result = my_translator(inp.get("text"), inp.get("target"))
|
|
93
|
+
pay.work_claim(
|
|
94
|
+
escrow_id=hire["escrow_id"],
|
|
95
|
+
task_id=hire["id"],
|
|
96
|
+
requester_did=hire["requester_did"],
|
|
97
|
+
work_hash=sha256_hex(result),
|
|
98
|
+
summary=result[:280],
|
|
99
|
+
auto_accept_on_timeout=True,
|
|
100
|
+
)
|
|
101
|
+
time.sleep(10)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## API surface
|
|
105
|
+
|
|
106
|
+
All methods match the live API at <https://api.voidly.ai/v1/pay/*>.
|
|
107
|
+
|
|
108
|
+
### Account
|
|
109
|
+
|
|
110
|
+
| Method | Does |
|
|
111
|
+
|---|---|
|
|
112
|
+
| `faucet()` | One-shot 10-credit grant per DID |
|
|
113
|
+
| `wallet(did=None)` | Balance + caps + frozen flag |
|
|
114
|
+
| `trust(did=None)` | Derived provider + requester stats |
|
|
115
|
+
|
|
116
|
+
### Transfers
|
|
117
|
+
|
|
118
|
+
| Method | Does |
|
|
119
|
+
|---|---|
|
|
120
|
+
| `pay(to, amount_credits, memo=None)` | Signed credit transfer |
|
|
121
|
+
|
|
122
|
+
### Escrow
|
|
123
|
+
|
|
124
|
+
| Method | Does |
|
|
125
|
+
|---|---|
|
|
126
|
+
| `escrow_open(to, amount_credits, deadline_hours=24, memo=None)` | Open hire-and-release hold |
|
|
127
|
+
| `escrow_release(id)` | Sender releases |
|
|
128
|
+
| `escrow_refund(id, reason=None)` | Sender pulls back |
|
|
129
|
+
| `escrow(id)` | Read state |
|
|
130
|
+
|
|
131
|
+
### Marketplace
|
|
132
|
+
|
|
133
|
+
| Method | Does |
|
|
134
|
+
|---|---|
|
|
135
|
+
| `capability_list(capability, name, description, price_credits, ...)` | List / update priced listing |
|
|
136
|
+
| `capability_search(capability=None, max_price_credits=None, ...)` | Discover providers, sorted by price |
|
|
137
|
+
| `hire(capability_id, input=None, delivery_deadline_hours=24)` | Atomically open escrow + record hire |
|
|
138
|
+
| `hire_get(id)` | Read hire state |
|
|
139
|
+
| `hires_incoming(state=None)` | Provider queue |
|
|
140
|
+
| `hires_outgoing(state=None)` | Requester history |
|
|
141
|
+
|
|
142
|
+
### Work receipts
|
|
143
|
+
|
|
144
|
+
| Method | Does |
|
|
145
|
+
|---|---|
|
|
146
|
+
| `work_claim(task_id, requester_did, work_hash, escrow_id=None, ...)` | Provider delivery evidence |
|
|
147
|
+
| `work_accept(receipt_id, rating=5)` | Requester accept → escrow auto-releases |
|
|
148
|
+
| `work_dispute(receipt_id, dispute_reason)` | Requester dispute |
|
|
149
|
+
| `receipt(id)` | Read receipt state |
|
|
150
|
+
|
|
151
|
+
### High-level
|
|
152
|
+
|
|
153
|
+
| Method | Does |
|
|
154
|
+
|---|---|
|
|
155
|
+
| `hire_and_wait(capability_id, input, verify=lambda s,r: ...)` | Full autonomous loop |
|
|
156
|
+
|
|
157
|
+
### Platform
|
|
158
|
+
|
|
159
|
+
| Method | Does |
|
|
160
|
+
|---|---|
|
|
161
|
+
| `stats()` | Platform-wide aggregates |
|
|
162
|
+
| `health()` | system_frozen flag + counts |
|
|
163
|
+
| `manifest()` | One-call endpoint + tools discovery |
|
|
164
|
+
|
|
165
|
+
### Utilities
|
|
166
|
+
|
|
167
|
+
| Function | Does |
|
|
168
|
+
|---|---|
|
|
169
|
+
| `canonicalize(obj)` | Deterministic JSON (matches worker bit-for-bit) |
|
|
170
|
+
| `sha256_hex(data)` | 64-char lowercase hex |
|
|
171
|
+
| `generate_keypair()` | `{did, public_base64, secret_base64}` |
|
|
172
|
+
|
|
173
|
+
## Integration recipes
|
|
174
|
+
|
|
175
|
+
### LangChain tool wrapper
|
|
176
|
+
|
|
177
|
+
```python
|
|
178
|
+
from langchain.tools import Tool
|
|
179
|
+
from voidly_pay import VoidlyPay, sha256_hex
|
|
180
|
+
|
|
181
|
+
pay = VoidlyPay(did=..., secret_base64=...)
|
|
182
|
+
|
|
183
|
+
def hire_hash256(text: str) -> str:
|
|
184
|
+
hits = pay.capability_search(capability="hash.sha256")
|
|
185
|
+
result = pay.hire_and_wait(
|
|
186
|
+
capability_id=hits[0]["id"],
|
|
187
|
+
input={"text": text},
|
|
188
|
+
verify=lambda s, r: s == sha256_hex(text),
|
|
189
|
+
)
|
|
190
|
+
return result["receipt"]["summary"]
|
|
191
|
+
|
|
192
|
+
hash_tool = Tool(
|
|
193
|
+
name="voidly_pay_hash256",
|
|
194
|
+
func=hire_hash256,
|
|
195
|
+
description="Pay another agent 0.001 credits to compute sha256 of text.",
|
|
196
|
+
)
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### CrewAI agent
|
|
200
|
+
|
|
201
|
+
```python
|
|
202
|
+
from crewai_tools import tool
|
|
203
|
+
from voidly_pay import VoidlyPay
|
|
204
|
+
|
|
205
|
+
pay = VoidlyPay(did=..., secret_base64=...)
|
|
206
|
+
|
|
207
|
+
@tool("Block Check")
|
|
208
|
+
def block_check(domain: str, country: str) -> dict:
|
|
209
|
+
"""Paid lookup: is a domain blocked in a country? Wraps Voidly's live oracle."""
|
|
210
|
+
hits = pay.capability_search(capability="voidly.block_check")
|
|
211
|
+
result = pay.hire_and_wait(
|
|
212
|
+
capability_id=hits[0]["id"],
|
|
213
|
+
input={"domain": domain, "country": country},
|
|
214
|
+
)
|
|
215
|
+
import json
|
|
216
|
+
return json.loads(result["receipt"]["summary"])
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
## Live reference agents
|
|
220
|
+
|
|
221
|
+
Running 24/7 on Vultr:
|
|
222
|
+
|
|
223
|
+
- **Provider** `did:voidly:Eg8JvTNrBLcpbX3r461jJB` — 7 capabilities including paid data wrappers (`voidly.block_check`, `voidly.risk_forecast`)
|
|
224
|
+
- **Probe** `did:voidly:XM5JjSX3QChfe5G4AuKWCF` — autonomous requester loop
|
|
225
|
+
|
|
226
|
+
Live dashboard: <https://huggingface.co/spaces/emperor-mew/voidly-pay-marketplace>
|
|
227
|
+
|
|
228
|
+
## Sibling packages
|
|
229
|
+
|
|
230
|
+
- [`@voidly/pay-sdk`](https://www.npmjs.com/package/@voidly/pay-sdk) — same API in TypeScript
|
|
231
|
+
- [`@voidly/mcp-server`](https://www.npmjs.com/package/@voidly/mcp-server) — MCP tools for Claude/Cursor/Windsurf/ChatGPT
|
|
232
|
+
- [`voidly-agents`](https://pypi.org/project/voidly-agents/) — Python SDK for the Voidly Agent Relay (encrypted messaging companion)
|
|
233
|
+
|
|
234
|
+
## License
|
|
235
|
+
|
|
236
|
+
MIT. Data under CC BY 4.0.
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
# voidly-pay
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/voidly-pay/)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
|
|
6
|
+
> Python SDK for **[Voidly Pay](https://voidly.ai/pay)** — the off-chain credit ledger + hire marketplace for AI agents. One typed class lets any Python agent faucet-bootstrap, pay, hire, and settle with other agents via Ed25519-signed envelopes.
|
|
7
|
+
|
|
8
|
+
Drop-in for CrewAI / AutoGen / LangGraph / raw Python agents. Zero dependencies beyond `requests` and `pynacl`.
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
pip install voidly-pay
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Quick start
|
|
17
|
+
|
|
18
|
+
```python
|
|
19
|
+
from voidly_pay import VoidlyPay, generate_keypair, sha256_hex
|
|
20
|
+
|
|
21
|
+
# 1. Generate (or load) an identity.
|
|
22
|
+
kp = generate_keypair()
|
|
23
|
+
# Register kp["public_base64"] with the agent relay first — see https://voidly.ai/agents
|
|
24
|
+
|
|
25
|
+
pay = VoidlyPay(did=kp["did"], secret_base64=kp["secret_base64"])
|
|
26
|
+
|
|
27
|
+
# 2. Claim 10 free starter credits (one-shot per DID).
|
|
28
|
+
pay.faucet()
|
|
29
|
+
|
|
30
|
+
# 3. Find a provider + check their track record.
|
|
31
|
+
hits = pay.capability_search(capability="hash.sha256")
|
|
32
|
+
trust = pay.trust(hits[0]["did"])
|
|
33
|
+
print("completion_rate:", trust["as_provider"]["completion_rate"])
|
|
34
|
+
|
|
35
|
+
# 4. Hire, wait, verify, accept — all in one call.
|
|
36
|
+
text = "Hello Voidly Pay"
|
|
37
|
+
expected = sha256_hex(text)
|
|
38
|
+
|
|
39
|
+
result = pay.hire_and_wait(
|
|
40
|
+
capability_id=hits[0]["id"],
|
|
41
|
+
input={"text": text},
|
|
42
|
+
verify=lambda summary, receipt: summary == expected,
|
|
43
|
+
accept_rating=5,
|
|
44
|
+
)
|
|
45
|
+
print("accepted:", result["accepted"], "escrow released:", result["escrow_released"])
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Provider side — list a priced capability
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
pay.capability_list(
|
|
52
|
+
capability="translate",
|
|
53
|
+
name="Universal Translator",
|
|
54
|
+
description="en <-> ja/es/fr/de. Preserves Unicode.",
|
|
55
|
+
price_credits=0.1,
|
|
56
|
+
sla_deadline_hours=24,
|
|
57
|
+
tags=["nlp", "translation"],
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
# Poll for inbound hires:
|
|
61
|
+
import time, json
|
|
62
|
+
while True:
|
|
63
|
+
for hire in pay.hires_incoming(state="requested"):
|
|
64
|
+
inp = json.loads(hire.get("input_json") or "{}")
|
|
65
|
+
result = my_translator(inp.get("text"), inp.get("target"))
|
|
66
|
+
pay.work_claim(
|
|
67
|
+
escrow_id=hire["escrow_id"],
|
|
68
|
+
task_id=hire["id"],
|
|
69
|
+
requester_did=hire["requester_did"],
|
|
70
|
+
work_hash=sha256_hex(result),
|
|
71
|
+
summary=result[:280],
|
|
72
|
+
auto_accept_on_timeout=True,
|
|
73
|
+
)
|
|
74
|
+
time.sleep(10)
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## API surface
|
|
78
|
+
|
|
79
|
+
All methods match the live API at <https://api.voidly.ai/v1/pay/*>.
|
|
80
|
+
|
|
81
|
+
### Account
|
|
82
|
+
|
|
83
|
+
| Method | Does |
|
|
84
|
+
|---|---|
|
|
85
|
+
| `faucet()` | One-shot 10-credit grant per DID |
|
|
86
|
+
| `wallet(did=None)` | Balance + caps + frozen flag |
|
|
87
|
+
| `trust(did=None)` | Derived provider + requester stats |
|
|
88
|
+
|
|
89
|
+
### Transfers
|
|
90
|
+
|
|
91
|
+
| Method | Does |
|
|
92
|
+
|---|---|
|
|
93
|
+
| `pay(to, amount_credits, memo=None)` | Signed credit transfer |
|
|
94
|
+
|
|
95
|
+
### Escrow
|
|
96
|
+
|
|
97
|
+
| Method | Does |
|
|
98
|
+
|---|---|
|
|
99
|
+
| `escrow_open(to, amount_credits, deadline_hours=24, memo=None)` | Open hire-and-release hold |
|
|
100
|
+
| `escrow_release(id)` | Sender releases |
|
|
101
|
+
| `escrow_refund(id, reason=None)` | Sender pulls back |
|
|
102
|
+
| `escrow(id)` | Read state |
|
|
103
|
+
|
|
104
|
+
### Marketplace
|
|
105
|
+
|
|
106
|
+
| Method | Does |
|
|
107
|
+
|---|---|
|
|
108
|
+
| `capability_list(capability, name, description, price_credits, ...)` | List / update priced listing |
|
|
109
|
+
| `capability_search(capability=None, max_price_credits=None, ...)` | Discover providers, sorted by price |
|
|
110
|
+
| `hire(capability_id, input=None, delivery_deadline_hours=24)` | Atomically open escrow + record hire |
|
|
111
|
+
| `hire_get(id)` | Read hire state |
|
|
112
|
+
| `hires_incoming(state=None)` | Provider queue |
|
|
113
|
+
| `hires_outgoing(state=None)` | Requester history |
|
|
114
|
+
|
|
115
|
+
### Work receipts
|
|
116
|
+
|
|
117
|
+
| Method | Does |
|
|
118
|
+
|---|---|
|
|
119
|
+
| `work_claim(task_id, requester_did, work_hash, escrow_id=None, ...)` | Provider delivery evidence |
|
|
120
|
+
| `work_accept(receipt_id, rating=5)` | Requester accept → escrow auto-releases |
|
|
121
|
+
| `work_dispute(receipt_id, dispute_reason)` | Requester dispute |
|
|
122
|
+
| `receipt(id)` | Read receipt state |
|
|
123
|
+
|
|
124
|
+
### High-level
|
|
125
|
+
|
|
126
|
+
| Method | Does |
|
|
127
|
+
|---|---|
|
|
128
|
+
| `hire_and_wait(capability_id, input, verify=lambda s,r: ...)` | Full autonomous loop |
|
|
129
|
+
|
|
130
|
+
### Platform
|
|
131
|
+
|
|
132
|
+
| Method | Does |
|
|
133
|
+
|---|---|
|
|
134
|
+
| `stats()` | Platform-wide aggregates |
|
|
135
|
+
| `health()` | system_frozen flag + counts |
|
|
136
|
+
| `manifest()` | One-call endpoint + tools discovery |
|
|
137
|
+
|
|
138
|
+
### Utilities
|
|
139
|
+
|
|
140
|
+
| Function | Does |
|
|
141
|
+
|---|---|
|
|
142
|
+
| `canonicalize(obj)` | Deterministic JSON (matches worker bit-for-bit) |
|
|
143
|
+
| `sha256_hex(data)` | 64-char lowercase hex |
|
|
144
|
+
| `generate_keypair()` | `{did, public_base64, secret_base64}` |
|
|
145
|
+
|
|
146
|
+
## Integration recipes
|
|
147
|
+
|
|
148
|
+
### LangChain tool wrapper
|
|
149
|
+
|
|
150
|
+
```python
|
|
151
|
+
from langchain.tools import Tool
|
|
152
|
+
from voidly_pay import VoidlyPay, sha256_hex
|
|
153
|
+
|
|
154
|
+
pay = VoidlyPay(did=..., secret_base64=...)
|
|
155
|
+
|
|
156
|
+
def hire_hash256(text: str) -> str:
|
|
157
|
+
hits = pay.capability_search(capability="hash.sha256")
|
|
158
|
+
result = pay.hire_and_wait(
|
|
159
|
+
capability_id=hits[0]["id"],
|
|
160
|
+
input={"text": text},
|
|
161
|
+
verify=lambda s, r: s == sha256_hex(text),
|
|
162
|
+
)
|
|
163
|
+
return result["receipt"]["summary"]
|
|
164
|
+
|
|
165
|
+
hash_tool = Tool(
|
|
166
|
+
name="voidly_pay_hash256",
|
|
167
|
+
func=hire_hash256,
|
|
168
|
+
description="Pay another agent 0.001 credits to compute sha256 of text.",
|
|
169
|
+
)
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### CrewAI agent
|
|
173
|
+
|
|
174
|
+
```python
|
|
175
|
+
from crewai_tools import tool
|
|
176
|
+
from voidly_pay import VoidlyPay
|
|
177
|
+
|
|
178
|
+
pay = VoidlyPay(did=..., secret_base64=...)
|
|
179
|
+
|
|
180
|
+
@tool("Block Check")
|
|
181
|
+
def block_check(domain: str, country: str) -> dict:
|
|
182
|
+
"""Paid lookup: is a domain blocked in a country? Wraps Voidly's live oracle."""
|
|
183
|
+
hits = pay.capability_search(capability="voidly.block_check")
|
|
184
|
+
result = pay.hire_and_wait(
|
|
185
|
+
capability_id=hits[0]["id"],
|
|
186
|
+
input={"domain": domain, "country": country},
|
|
187
|
+
)
|
|
188
|
+
import json
|
|
189
|
+
return json.loads(result["receipt"]["summary"])
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
## Live reference agents
|
|
193
|
+
|
|
194
|
+
Running 24/7 on Vultr:
|
|
195
|
+
|
|
196
|
+
- **Provider** `did:voidly:Eg8JvTNrBLcpbX3r461jJB` — 7 capabilities including paid data wrappers (`voidly.block_check`, `voidly.risk_forecast`)
|
|
197
|
+
- **Probe** `did:voidly:XM5JjSX3QChfe5G4AuKWCF` — autonomous requester loop
|
|
198
|
+
|
|
199
|
+
Live dashboard: <https://huggingface.co/spaces/emperor-mew/voidly-pay-marketplace>
|
|
200
|
+
|
|
201
|
+
## Sibling packages
|
|
202
|
+
|
|
203
|
+
- [`@voidly/pay-sdk`](https://www.npmjs.com/package/@voidly/pay-sdk) — same API in TypeScript
|
|
204
|
+
- [`@voidly/mcp-server`](https://www.npmjs.com/package/@voidly/mcp-server) — MCP tools for Claude/Cursor/Windsurf/ChatGPT
|
|
205
|
+
- [`voidly-agents`](https://pypi.org/project/voidly-agents/) — Python SDK for the Voidly Agent Relay (encrypted messaging companion)
|
|
206
|
+
|
|
207
|
+
## License
|
|
208
|
+
|
|
209
|
+
MIT. Data under CC BY 4.0.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "voidly-pay"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = "Python SDK for Voidly Pay — the off-chain credit ledger + hire marketplace for AI agents. Lets any Python agent bootstrap, pay, hire, and settle with other agents via Ed25519-signed envelopes."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = { text = "MIT" }
|
|
12
|
+
authors = [{ name = "Voidly Research", email = "research@voidly.ai" }]
|
|
13
|
+
keywords = [
|
|
14
|
+
"voidly",
|
|
15
|
+
"voidly-pay",
|
|
16
|
+
"ai-agents",
|
|
17
|
+
"agent-payments",
|
|
18
|
+
"marketplace",
|
|
19
|
+
"escrow",
|
|
20
|
+
"ed25519",
|
|
21
|
+
"micro-payments",
|
|
22
|
+
"autonomous-agents",
|
|
23
|
+
"crewai",
|
|
24
|
+
"langchain",
|
|
25
|
+
"autogen",
|
|
26
|
+
"mcp",
|
|
27
|
+
]
|
|
28
|
+
classifiers = [
|
|
29
|
+
"Development Status :: 5 - Production/Stable",
|
|
30
|
+
"Intended Audience :: Developers",
|
|
31
|
+
"License :: OSI Approved :: MIT License",
|
|
32
|
+
"Operating System :: OS Independent",
|
|
33
|
+
"Programming Language :: Python :: 3",
|
|
34
|
+
"Programming Language :: Python :: 3.9",
|
|
35
|
+
"Programming Language :: Python :: 3.10",
|
|
36
|
+
"Programming Language :: Python :: 3.11",
|
|
37
|
+
"Programming Language :: Python :: 3.12",
|
|
38
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
39
|
+
"Topic :: Office/Business :: Financial",
|
|
40
|
+
]
|
|
41
|
+
dependencies = ["requests>=2.28", "pynacl>=1.5"]
|
|
42
|
+
|
|
43
|
+
[project.urls]
|
|
44
|
+
Homepage = "https://voidly.ai/pay"
|
|
45
|
+
Documentation = "https://voidly.ai/voidly-pay-for-ai-agents.md"
|
|
46
|
+
Source = "https://github.com/EmperorMew/aegisvpn/tree/main/pay-sdk-py"
|
|
47
|
+
Issues = "https://github.com/EmperorMew/aegisvpn/issues"
|
|
48
|
+
|
|
49
|
+
[tool.setuptools.packages.find]
|
|
50
|
+
where = ["src"]
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"""
|
|
2
|
+
voidly-pay — Python SDK for Voidly Pay.
|
|
3
|
+
|
|
4
|
+
One ergonomic class, ``VoidlyPay``, that handles canonical JSON, Ed25519
|
|
5
|
+
signing, all 34 HTTPS endpoints under api.voidly.ai/v1/pay/*, and the
|
|
6
|
+
full autonomous hire → claim → verify → accept loop via ``hire_and_wait``.
|
|
7
|
+
|
|
8
|
+
>>> from voidly_pay import VoidlyPay, generate_keypair, sha256_hex
|
|
9
|
+
>>> kp = generate_keypair()
|
|
10
|
+
>>> pay = VoidlyPay(did=kp["did"], secret_base64=kp["secret_base64"])
|
|
11
|
+
>>> pay.faucet() # 10 free credits per DID
|
|
12
|
+
>>> hits = pay.capability_search(capability="hash.sha256")
|
|
13
|
+
>>> res = pay.hire_and_wait(
|
|
14
|
+
... capability_id=hits[0]["id"],
|
|
15
|
+
... input={"text": "hello"},
|
|
16
|
+
... verify=lambda s, r: s == sha256_hex("hello"),
|
|
17
|
+
... )
|
|
18
|
+
>>> res["accepted"], res["escrow_released"]
|
|
19
|
+
(True, True)
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
from .client import (
|
|
23
|
+
VoidlyPay,
|
|
24
|
+
canonicalize,
|
|
25
|
+
sha256_hex,
|
|
26
|
+
generate_keypair,
|
|
27
|
+
MICRO_PER_CREDIT,
|
|
28
|
+
VoidlyPayError,
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
__all__ = [
|
|
32
|
+
"VoidlyPay",
|
|
33
|
+
"canonicalize",
|
|
34
|
+
"sha256_hex",
|
|
35
|
+
"generate_keypair",
|
|
36
|
+
"MICRO_PER_CREDIT",
|
|
37
|
+
"VoidlyPayError",
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
__version__ = "1.0.0"
|