set-sdk 0.1.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.
- set_sdk-0.1.0/PKG-INFO +102 -0
- set_sdk-0.1.0/README.md +79 -0
- set_sdk-0.1.0/pyproject.toml +39 -0
- set_sdk-0.1.0/set_sdk/__init__.py +20 -0
- set_sdk-0.1.0/set_sdk/py.typed +0 -0
- set_sdk-0.1.0/set_sdk/set_api.py +1353 -0
- set_sdk-0.1.0/set_sdk/set_direct_deposit.py +381 -0
- set_sdk-0.1.0/set_sdk/webhooks.py +85 -0
- set_sdk-0.1.0/set_sdk.egg-info/PKG-INFO +102 -0
- set_sdk-0.1.0/set_sdk.egg-info/SOURCES.txt +12 -0
- set_sdk-0.1.0/set_sdk.egg-info/dependency_links.txt +1 -0
- set_sdk-0.1.0/set_sdk.egg-info/requires.txt +3 -0
- set_sdk-0.1.0/set_sdk.egg-info/top_level.txt +1 -0
- set_sdk-0.1.0/setup.cfg +4 -0
set_sdk-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: set-sdk
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Official zero-dependency Python SDK for Simple Easy Transactions (SET API, SET Direct Deposit API, and webhook signature verification).
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
Project-URL: Homepage, https://simpleeasytransactions.com/docs/collections/openapi
|
|
7
|
+
Project-URL: Documentation, https://simpleeasytransactions.com/docs/overview/sandbox-key
|
|
8
|
+
Project-URL: Repository, https://github.com/stetenterprises-bot/set-wallet-kit
|
|
9
|
+
Keywords: simple-easy-transactions,set-api,direct-deposit,stablecoins,usdc,payments,webhooks
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
19
|
+
Requires-Python: >=3.9
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
Provides-Extra: ed25519
|
|
22
|
+
Requires-Dist: cryptography>=41.0.0; extra == "ed25519"
|
|
23
|
+
|
|
24
|
+
# `set-sdk`
|
|
25
|
+
|
|
26
|
+
Official zero-dependency Python SDK for [Simple Easy Transactions (SET)](https://simpleeasytransactions.com/docs/collections/openapi). Generated directly from SET's OpenAPI 3.1 specifications with typed method coverage, automatic `Idempotency-Key` headers on `POST` and `PUT` calls, and webhook signature verification.
|
|
27
|
+
|
|
28
|
+
## Install
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pip install set-sdk
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Optional Ed25519 webhook verification and request signing support (`SET-Signature-Ed25519` / `sign_set_request`):
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
pip install "set-sdk[ed25519]"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Requires Python 3.9+ (standard library only for API calls and HMAC-SHA256 `SET-Signature` verification).
|
|
41
|
+
|
|
42
|
+
## Quickstart (Staging Sandbox)
|
|
43
|
+
|
|
44
|
+
Provision an unauthenticated test key on staging (`POST /api/sandbox/keys`):
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
curl -sS -X POST https://wallet-staging.simpleeasytransactions.com/api/sandbox/keys \
|
|
48
|
+
-H 'content-type: application/json' \
|
|
49
|
+
-d '{"product":"set-api"}'
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Use the returned `key` (`set_test_...`) with `SetApiClient`:
|
|
53
|
+
|
|
54
|
+
```python
|
|
55
|
+
import os
|
|
56
|
+
from set_sdk import SetApiClient, SetApiError
|
|
57
|
+
|
|
58
|
+
client = SetApiClient(
|
|
59
|
+
api_key=os.environ["SET_API_KEY"],
|
|
60
|
+
# Defaults to https://wallet-staging.simpleeasytransactions.com
|
|
61
|
+
# Pass base_url="https://wallet.simpleeasytransactions.com" in production.
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
try:
|
|
65
|
+
capabilities = client.get_capabilities()
|
|
66
|
+
print(capabilities["accountType"], capabilities["livemode"])
|
|
67
|
+
|
|
68
|
+
events = client.get_events(limit=10)
|
|
69
|
+
print(events["data"])
|
|
70
|
+
except SetApiError as err:
|
|
71
|
+
print(err.status, err.code, err.message, err.request_id)
|
|
72
|
+
raise
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
For Direct Deposit (`/api/partner/*`), use `SetDirectDepositClient` (and `SetDirectDepositError`):
|
|
76
|
+
|
|
77
|
+
```python
|
|
78
|
+
import os
|
|
79
|
+
from set_sdk import SetDirectDepositClient
|
|
80
|
+
|
|
81
|
+
partner = SetDirectDepositClient(api_key=os.environ["SET_PARTNER_KEY"])
|
|
82
|
+
capabilities = partner.get_capabilities()
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Webhook Verification
|
|
86
|
+
|
|
87
|
+
```python
|
|
88
|
+
import os
|
|
89
|
+
from set_sdk import verify_set_signature
|
|
90
|
+
|
|
91
|
+
valid = verify_set_signature(
|
|
92
|
+
raw_body,
|
|
93
|
+
request_headers.get("SET-Signature"),
|
|
94
|
+
os.environ["SET_WEBHOOK_SECRET"],
|
|
95
|
+
)
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Documentation
|
|
99
|
+
|
|
100
|
+
- [OpenAPI documents](https://simpleeasytransactions.com/docs/collections/openapi)
|
|
101
|
+
- [Get a sandbox key](https://simpleeasytransactions.com/docs/overview/sandbox-key)
|
|
102
|
+
- [Webhooks & signatures](https://simpleeasytransactions.com/docs/overview/webhooks)
|
set_sdk-0.1.0/README.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# `set-sdk`
|
|
2
|
+
|
|
3
|
+
Official zero-dependency Python SDK for [Simple Easy Transactions (SET)](https://simpleeasytransactions.com/docs/collections/openapi). Generated directly from SET's OpenAPI 3.1 specifications with typed method coverage, automatic `Idempotency-Key` headers on `POST` and `PUT` calls, and webhook signature verification.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install set-sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Optional Ed25519 webhook verification and request signing support (`SET-Signature-Ed25519` / `sign_set_request`):
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pip install "set-sdk[ed25519]"
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Requires Python 3.9+ (standard library only for API calls and HMAC-SHA256 `SET-Signature` verification).
|
|
18
|
+
|
|
19
|
+
## Quickstart (Staging Sandbox)
|
|
20
|
+
|
|
21
|
+
Provision an unauthenticated test key on staging (`POST /api/sandbox/keys`):
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
curl -sS -X POST https://wallet-staging.simpleeasytransactions.com/api/sandbox/keys \
|
|
25
|
+
-H 'content-type: application/json' \
|
|
26
|
+
-d '{"product":"set-api"}'
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Use the returned `key` (`set_test_...`) with `SetApiClient`:
|
|
30
|
+
|
|
31
|
+
```python
|
|
32
|
+
import os
|
|
33
|
+
from set_sdk import SetApiClient, SetApiError
|
|
34
|
+
|
|
35
|
+
client = SetApiClient(
|
|
36
|
+
api_key=os.environ["SET_API_KEY"],
|
|
37
|
+
# Defaults to https://wallet-staging.simpleeasytransactions.com
|
|
38
|
+
# Pass base_url="https://wallet.simpleeasytransactions.com" in production.
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
try:
|
|
42
|
+
capabilities = client.get_capabilities()
|
|
43
|
+
print(capabilities["accountType"], capabilities["livemode"])
|
|
44
|
+
|
|
45
|
+
events = client.get_events(limit=10)
|
|
46
|
+
print(events["data"])
|
|
47
|
+
except SetApiError as err:
|
|
48
|
+
print(err.status, err.code, err.message, err.request_id)
|
|
49
|
+
raise
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
For Direct Deposit (`/api/partner/*`), use `SetDirectDepositClient` (and `SetDirectDepositError`):
|
|
53
|
+
|
|
54
|
+
```python
|
|
55
|
+
import os
|
|
56
|
+
from set_sdk import SetDirectDepositClient
|
|
57
|
+
|
|
58
|
+
partner = SetDirectDepositClient(api_key=os.environ["SET_PARTNER_KEY"])
|
|
59
|
+
capabilities = partner.get_capabilities()
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Webhook Verification
|
|
63
|
+
|
|
64
|
+
```python
|
|
65
|
+
import os
|
|
66
|
+
from set_sdk import verify_set_signature
|
|
67
|
+
|
|
68
|
+
valid = verify_set_signature(
|
|
69
|
+
raw_body,
|
|
70
|
+
request_headers.get("SET-Signature"),
|
|
71
|
+
os.environ["SET_WEBHOOK_SECRET"],
|
|
72
|
+
)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Documentation
|
|
76
|
+
|
|
77
|
+
- [OpenAPI documents](https://simpleeasytransactions.com/docs/collections/openapi)
|
|
78
|
+
- [Get a sandbox key](https://simpleeasytransactions.com/docs/overview/sandbox-key)
|
|
79
|
+
- [Webhooks & signatures](https://simpleeasytransactions.com/docs/overview/webhooks)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "set-sdk"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Official zero-dependency Python SDK for Simple Easy Transactions (SET API, SET Direct Deposit API, and webhook signature verification)."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
keywords = ["simple-easy-transactions", "set-api", "direct-deposit", "stablecoins", "usdc", "payments", "webhooks"]
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Development Status :: 4 - Beta",
|
|
15
|
+
"Intended Audience :: Developers",
|
|
16
|
+
"Programming Language :: Python :: 3",
|
|
17
|
+
"Programming Language :: Python :: 3.9",
|
|
18
|
+
"Programming Language :: Python :: 3.10",
|
|
19
|
+
"Programming Language :: Python :: 3.11",
|
|
20
|
+
"Programming Language :: Python :: 3.12",
|
|
21
|
+
"Programming Language :: Python :: 3.13",
|
|
22
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
23
|
+
]
|
|
24
|
+
dependencies = []
|
|
25
|
+
|
|
26
|
+
[project.optional-dependencies]
|
|
27
|
+
ed25519 = ["cryptography>=41.0.0"]
|
|
28
|
+
|
|
29
|
+
[project.urls]
|
|
30
|
+
Homepage = "https://simpleeasytransactions.com/docs/collections/openapi"
|
|
31
|
+
Documentation = "https://simpleeasytransactions.com/docs/overview/sandbox-key"
|
|
32
|
+
Repository = "https://github.com/stetenterprises-bot/set-wallet-kit"
|
|
33
|
+
|
|
34
|
+
[tool.setuptools.packages.find]
|
|
35
|
+
where = ["."]
|
|
36
|
+
include = ["set_sdk*"]
|
|
37
|
+
|
|
38
|
+
[tool.setuptools.package-data]
|
|
39
|
+
set_sdk = ["py.typed"]
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"""Official Python SDK for Simple Easy Transactions (SET)."""
|
|
2
|
+
|
|
3
|
+
from .set_api import DEFAULT_BASE_URL, SetApiClient, SetApiError
|
|
4
|
+
from .set_direct_deposit import SetApiError as SetDirectDepositError
|
|
5
|
+
from .set_direct_deposit import SetDirectDepositClient
|
|
6
|
+
from .webhooks import sign_set_request, verify_set_ed25519_signature, verify_set_signature
|
|
7
|
+
|
|
8
|
+
__version__ = "0.1.0"
|
|
9
|
+
|
|
10
|
+
__all__ = [
|
|
11
|
+
"__version__",
|
|
12
|
+
"DEFAULT_BASE_URL",
|
|
13
|
+
"SetApiClient",
|
|
14
|
+
"SetApiError",
|
|
15
|
+
"SetDirectDepositClient",
|
|
16
|
+
"SetDirectDepositError",
|
|
17
|
+
"verify_set_signature",
|
|
18
|
+
"verify_set_ed25519_signature",
|
|
19
|
+
"sign_set_request",
|
|
20
|
+
]
|
|
File without changes
|