contractlane 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.
- contractlane-1.0.0/PKG-INFO +9 -0
- contractlane-1.0.0/README.md +49 -0
- contractlane-1.0.0/contractlane/__init__.py +83 -0
- contractlane-1.0.0/contractlane/client.py +1262 -0
- contractlane-1.0.0/contractlane.egg-info/PKG-INFO +9 -0
- contractlane-1.0.0/contractlane.egg-info/SOURCES.txt +12 -0
- contractlane-1.0.0/contractlane.egg-info/dependency_links.txt +1 -0
- contractlane-1.0.0/contractlane.egg-info/requires.txt +5 -0
- contractlane-1.0.0/contractlane.egg-info/top_level.txt +1 -0
- contractlane-1.0.0/pyproject.toml +16 -0
- contractlane-1.0.0/setup.cfg +4 -0
- contractlane-1.0.0/setup.py +3 -0
- contractlane-1.0.0/tests/test_client.py +570 -0
- contractlane-1.0.0/tests/test_integration.py +72 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Python SDK
|
|
2
|
+
|
|
3
|
+
Package path: `sdk/python/contractlane`
|
|
4
|
+
|
|
5
|
+
Install from PyPI:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install contractlane==1.0.0
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Build and publish:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
cd sdk/python
|
|
15
|
+
python3 -m pip install --upgrade build twine
|
|
16
|
+
python3 -m build
|
|
17
|
+
python3 -m twine upload dist/*
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Run tests:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
cd sdk/python
|
|
24
|
+
python3 -m pytest -q
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Template Admin Methods
|
|
28
|
+
|
|
29
|
+
Operator/admin wrappers for CEL template authoring are available as thin pass-through calls:
|
|
30
|
+
|
|
31
|
+
- `create_template`
|
|
32
|
+
- `update_template`
|
|
33
|
+
- `publish_template`
|
|
34
|
+
- `archive_template`
|
|
35
|
+
- `clone_template`
|
|
36
|
+
- `get_template_admin`
|
|
37
|
+
- `list_templates_admin`
|
|
38
|
+
- `list_template_shares`
|
|
39
|
+
- `add_template_share`
|
|
40
|
+
- `remove_template_share`
|
|
41
|
+
|
|
42
|
+
CamelCase aliases are also available (for parity with existing SDK style), for example `createTemplate`.
|
|
43
|
+
|
|
44
|
+
Use `idempotency_key` on mutating calls.
|
|
45
|
+
|
|
46
|
+
For lint failures, the SDK preserves deterministic error details from:
|
|
47
|
+
|
|
48
|
+
- `422 TEMPLATE_LINT_FAILED`
|
|
49
|
+
- `SDKError.details` (array/object passthrough)
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
from .client import (
|
|
2
|
+
APIVersion,
|
|
3
|
+
ContractLaneClient,
|
|
4
|
+
PrincipalAuth,
|
|
5
|
+
AgentHmacAuth,
|
|
6
|
+
IncompatibleNodeError,
|
|
7
|
+
SDKError,
|
|
8
|
+
agent_id_from_public_key,
|
|
9
|
+
parse_agent_id,
|
|
10
|
+
is_valid_agent_id,
|
|
11
|
+
hash_commerce_intent_v1,
|
|
12
|
+
sign_commerce_intent_v1,
|
|
13
|
+
verify_commerce_intent_v1,
|
|
14
|
+
hash_commerce_accept_v1,
|
|
15
|
+
sign_commerce_accept_v1,
|
|
16
|
+
verify_commerce_accept_v1,
|
|
17
|
+
hash_delegation_v1,
|
|
18
|
+
sign_delegation_v1,
|
|
19
|
+
verify_delegation_v1,
|
|
20
|
+
evaluate_delegation_constraints,
|
|
21
|
+
build_signature_envelope_v1,
|
|
22
|
+
new_idempotency_key,
|
|
23
|
+
canonicalize,
|
|
24
|
+
sha256_hex,
|
|
25
|
+
canonical_sha256_hex,
|
|
26
|
+
parse_sig_v1,
|
|
27
|
+
normalize_amount_v1,
|
|
28
|
+
parse_amount_v1,
|
|
29
|
+
parse_delegation_v1,
|
|
30
|
+
parse_delegation_revocation_v1,
|
|
31
|
+
parse_proof_bundle_v1,
|
|
32
|
+
new_commerce_intent_v1,
|
|
33
|
+
new_commerce_accept_v1,
|
|
34
|
+
new_delegation_v1,
|
|
35
|
+
new_delegation_revocation_v1,
|
|
36
|
+
sig_v1_sign,
|
|
37
|
+
compute_proof_id,
|
|
38
|
+
verify_proof_bundle_v1,
|
|
39
|
+
VerifyReport,
|
|
40
|
+
VerifyFailureCode,
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
__all__ = [
|
|
44
|
+
"APIVersion",
|
|
45
|
+
"ContractLaneClient",
|
|
46
|
+
"PrincipalAuth",
|
|
47
|
+
"AgentHmacAuth",
|
|
48
|
+
"IncompatibleNodeError",
|
|
49
|
+
"SDKError",
|
|
50
|
+
"agent_id_from_public_key",
|
|
51
|
+
"parse_agent_id",
|
|
52
|
+
"is_valid_agent_id",
|
|
53
|
+
"hash_commerce_intent_v1",
|
|
54
|
+
"sign_commerce_intent_v1",
|
|
55
|
+
"verify_commerce_intent_v1",
|
|
56
|
+
"hash_commerce_accept_v1",
|
|
57
|
+
"sign_commerce_accept_v1",
|
|
58
|
+
"verify_commerce_accept_v1",
|
|
59
|
+
"hash_delegation_v1",
|
|
60
|
+
"sign_delegation_v1",
|
|
61
|
+
"verify_delegation_v1",
|
|
62
|
+
"evaluate_delegation_constraints",
|
|
63
|
+
"build_signature_envelope_v1",
|
|
64
|
+
"new_idempotency_key",
|
|
65
|
+
"canonicalize",
|
|
66
|
+
"sha256_hex",
|
|
67
|
+
"canonical_sha256_hex",
|
|
68
|
+
"parse_sig_v1",
|
|
69
|
+
"normalize_amount_v1",
|
|
70
|
+
"parse_amount_v1",
|
|
71
|
+
"parse_delegation_v1",
|
|
72
|
+
"parse_delegation_revocation_v1",
|
|
73
|
+
"parse_proof_bundle_v1",
|
|
74
|
+
"new_commerce_intent_v1",
|
|
75
|
+
"new_commerce_accept_v1",
|
|
76
|
+
"new_delegation_v1",
|
|
77
|
+
"new_delegation_revocation_v1",
|
|
78
|
+
"sig_v1_sign",
|
|
79
|
+
"compute_proof_id",
|
|
80
|
+
"verify_proof_bundle_v1",
|
|
81
|
+
"VerifyReport",
|
|
82
|
+
"VerifyFailureCode",
|
|
83
|
+
]
|