agent-mediate 0.1.0__py3-none-any.whl
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.
- agent_mediate/__init__.py +201 -0
- agent_mediate/client.py +3353 -0
- agent_mediate/crypto.py +401 -0
- agent_mediate/jcs.py +222 -0
- agent_mediate/protocol.py +2595 -0
- agent_mediate/py.typed +0 -0
- agent_mediate-0.1.0.dist-info/METADATA +90 -0
- agent_mediate-0.1.0.dist-info/RECORD +11 -0
- agent_mediate-0.1.0.dist-info/WHEEL +5 -0
- agent_mediate-0.1.0.dist-info/licenses/LICENSE +176 -0
- agent_mediate-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Agent-Mediate Python SDK (`agent-mediate`).
|
|
3
|
+
"""
|
|
4
|
+
__version__ = "0.1.0"
|
|
5
|
+
|
|
6
|
+
from .client import (
|
|
7
|
+
BASE_MAINNET,
|
|
8
|
+
BASE_SEPOLIA,
|
|
9
|
+
DEFAULT_PRODUCTION_PLATFORM_DIDS,
|
|
10
|
+
PRODUCTION_APEX_URL,
|
|
11
|
+
PRODUCTION_API_URL,
|
|
12
|
+
USDC_ON_BASE,
|
|
13
|
+
AgentMediateClient,
|
|
14
|
+
AgentMediateError,
|
|
15
|
+
HttpResponse,
|
|
16
|
+
PaymentPolicyError,
|
|
17
|
+
PaymentRequiredError,
|
|
18
|
+
TransportLike,
|
|
19
|
+
X402Payer,
|
|
20
|
+
content_hash,
|
|
21
|
+
create_x402_payer,
|
|
22
|
+
discover_respondent,
|
|
23
|
+
is_public_ip_address,
|
|
24
|
+
normalize_base_url,
|
|
25
|
+
)
|
|
26
|
+
from .crypto import (
|
|
27
|
+
AgentKey,
|
|
28
|
+
agent_key_from_pem,
|
|
29
|
+
agent_key_from_seed,
|
|
30
|
+
did_key_from_raw_public_key,
|
|
31
|
+
ed25519_sign,
|
|
32
|
+
ed25519_verify,
|
|
33
|
+
generate_agent_key,
|
|
34
|
+
is_did_key,
|
|
35
|
+
raw_public_key_from_did_key,
|
|
36
|
+
verify_text,
|
|
37
|
+
weak_point_reason,
|
|
38
|
+
)
|
|
39
|
+
from .jcs import MECHANISM_SPEC, RULES_HASH, RULES_VERSION, canonical_json, contract_hash, loads_jcs_json, sha256_hex
|
|
40
|
+
from .protocol import (
|
|
41
|
+
BASE_ANCHOR_MAGIC,
|
|
42
|
+
BODY_REQUIRED_DISPUTE_ACTIONS,
|
|
43
|
+
CLAUSE_TYPE,
|
|
44
|
+
DEFAULT_KEY_HISTORY_TTL_MS,
|
|
45
|
+
DISPUTE_INVITE_TYPE,
|
|
46
|
+
DISPUTE_NOTICE_TYPE,
|
|
47
|
+
DOCUMENT_DOMAIN_V1,
|
|
48
|
+
DOCUMENT_DOMAIN_V2,
|
|
49
|
+
EMPTY_MERKLE_ROOT,
|
|
50
|
+
GENESIS_HASH,
|
|
51
|
+
HONOURS_ATTESTATION_TYPE,
|
|
52
|
+
KEY_HISTORY_TYPE,
|
|
53
|
+
KEY_ROTATION_TYPE,
|
|
54
|
+
MAX_CLOCK_SKEW_SECONDS,
|
|
55
|
+
MAX_KEY_ROTATION_HOPS,
|
|
56
|
+
REQUEST_PROOF_HASH_DOMAIN,
|
|
57
|
+
WEBHOOK_SIGNATURE_TAG,
|
|
58
|
+
build_clause,
|
|
59
|
+
build_did_web_document,
|
|
60
|
+
build_jwks,
|
|
61
|
+
checkpoint_leaf_hash,
|
|
62
|
+
checkpoint_node_hash,
|
|
63
|
+
clause_signing_payload,
|
|
64
|
+
compute_declared_input_commitment,
|
|
65
|
+
compute_outcome_hash,
|
|
66
|
+
compute_proposal_key_commitment,
|
|
67
|
+
compute_request_proof_hash,
|
|
68
|
+
compute_terms_hash,
|
|
69
|
+
content_digest,
|
|
70
|
+
decode_base_anchor_calldata,
|
|
71
|
+
default_platform_key_id,
|
|
72
|
+
derive_party_input_salt,
|
|
73
|
+
derive_proposal_key,
|
|
74
|
+
derive_proposal_salt,
|
|
75
|
+
did_key_from_ed25519_jwk,
|
|
76
|
+
did_web_document_authorizes_key,
|
|
77
|
+
did_web_from_url,
|
|
78
|
+
ed25519_public_jwk_from_did_key,
|
|
79
|
+
encode_base_anchor_calldata,
|
|
80
|
+
mandate_signing_payload,
|
|
81
|
+
sign_agent_card,
|
|
82
|
+
sign_clause,
|
|
83
|
+
sign_document,
|
|
84
|
+
sign_key_rotation,
|
|
85
|
+
sign_mandate,
|
|
86
|
+
sign_request,
|
|
87
|
+
url_from_did_web,
|
|
88
|
+
validate_issues_against_clause_templates,
|
|
89
|
+
verify_agent_card_signature,
|
|
90
|
+
verify_checkpoint_inclusion,
|
|
91
|
+
verify_clause,
|
|
92
|
+
verify_dispute_action_target,
|
|
93
|
+
verify_document,
|
|
94
|
+
verify_document_with_key_history,
|
|
95
|
+
verify_key_history,
|
|
96
|
+
verify_mandate_signature,
|
|
97
|
+
verify_proposal_opening,
|
|
98
|
+
verify_public_audit_chain,
|
|
99
|
+
verify_request,
|
|
100
|
+
verify_request_proof,
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
__all__ = [
|
|
104
|
+
"__version__",
|
|
105
|
+
"AgentKey",
|
|
106
|
+
"AgentMediateClient",
|
|
107
|
+
"AgentMediateError",
|
|
108
|
+
"BASE_ANCHOR_MAGIC",
|
|
109
|
+
"BASE_MAINNET",
|
|
110
|
+
"BASE_SEPOLIA",
|
|
111
|
+
"BODY_REQUIRED_DISPUTE_ACTIONS",
|
|
112
|
+
"CLAUSE_TYPE",
|
|
113
|
+
"DEFAULT_KEY_HISTORY_TTL_MS",
|
|
114
|
+
"DEFAULT_PRODUCTION_PLATFORM_DIDS",
|
|
115
|
+
"DISPUTE_INVITE_TYPE",
|
|
116
|
+
"DISPUTE_NOTICE_TYPE",
|
|
117
|
+
"DOCUMENT_DOMAIN_V1",
|
|
118
|
+
"DOCUMENT_DOMAIN_V2",
|
|
119
|
+
"EMPTY_MERKLE_ROOT",
|
|
120
|
+
"GENESIS_HASH",
|
|
121
|
+
"HONOURS_ATTESTATION_TYPE",
|
|
122
|
+
"HttpResponse",
|
|
123
|
+
"KEY_HISTORY_TYPE",
|
|
124
|
+
"KEY_ROTATION_TYPE",
|
|
125
|
+
"MAX_CLOCK_SKEW_SECONDS",
|
|
126
|
+
"MAX_KEY_ROTATION_HOPS",
|
|
127
|
+
"MECHANISM_SPEC",
|
|
128
|
+
"PaymentPolicyError",
|
|
129
|
+
"PaymentRequiredError",
|
|
130
|
+
"PRODUCTION_APEX_URL",
|
|
131
|
+
"PRODUCTION_API_URL",
|
|
132
|
+
"REQUEST_PROOF_HASH_DOMAIN",
|
|
133
|
+
"RULES_HASH",
|
|
134
|
+
"RULES_VERSION",
|
|
135
|
+
"TransportLike",
|
|
136
|
+
"USDC_ON_BASE",
|
|
137
|
+
"WEBHOOK_SIGNATURE_TAG",
|
|
138
|
+
"X402Payer",
|
|
139
|
+
"agent_key_from_pem",
|
|
140
|
+
"agent_key_from_seed",
|
|
141
|
+
"build_clause",
|
|
142
|
+
"build_did_web_document",
|
|
143
|
+
"build_jwks",
|
|
144
|
+
"canonical_json",
|
|
145
|
+
"checkpoint_leaf_hash",
|
|
146
|
+
"checkpoint_node_hash",
|
|
147
|
+
"clause_signing_payload",
|
|
148
|
+
"compute_declared_input_commitment",
|
|
149
|
+
"compute_outcome_hash",
|
|
150
|
+
"compute_proposal_key_commitment",
|
|
151
|
+
"compute_request_proof_hash",
|
|
152
|
+
"compute_terms_hash",
|
|
153
|
+
"content_digest",
|
|
154
|
+
"content_hash",
|
|
155
|
+
"contract_hash",
|
|
156
|
+
"create_x402_payer",
|
|
157
|
+
"decode_base_anchor_calldata",
|
|
158
|
+
"default_platform_key_id",
|
|
159
|
+
"derive_party_input_salt",
|
|
160
|
+
"derive_proposal_key",
|
|
161
|
+
"derive_proposal_salt",
|
|
162
|
+
"did_key_from_ed25519_jwk",
|
|
163
|
+
"did_key_from_raw_public_key",
|
|
164
|
+
"did_web_document_authorizes_key",
|
|
165
|
+
"did_web_from_url",
|
|
166
|
+
"discover_respondent",
|
|
167
|
+
"ed25519_public_jwk_from_did_key",
|
|
168
|
+
"ed25519_sign",
|
|
169
|
+
"ed25519_verify",
|
|
170
|
+
"encode_base_anchor_calldata",
|
|
171
|
+
"generate_agent_key",
|
|
172
|
+
"is_did_key",
|
|
173
|
+
"is_public_ip_address",
|
|
174
|
+
"loads_jcs_json",
|
|
175
|
+
"mandate_signing_payload",
|
|
176
|
+
"normalize_base_url",
|
|
177
|
+
"raw_public_key_from_did_key",
|
|
178
|
+
"sha256_hex",
|
|
179
|
+
"sign_agent_card",
|
|
180
|
+
"sign_clause",
|
|
181
|
+
"sign_document",
|
|
182
|
+
"sign_key_rotation",
|
|
183
|
+
"sign_mandate",
|
|
184
|
+
"sign_request",
|
|
185
|
+
"url_from_did_web",
|
|
186
|
+
"validate_issues_against_clause_templates",
|
|
187
|
+
"verify_agent_card_signature",
|
|
188
|
+
"verify_checkpoint_inclusion",
|
|
189
|
+
"verify_clause",
|
|
190
|
+
"verify_dispute_action_target",
|
|
191
|
+
"verify_document",
|
|
192
|
+
"verify_document_with_key_history",
|
|
193
|
+
"verify_key_history",
|
|
194
|
+
"verify_mandate_signature",
|
|
195
|
+
"verify_proposal_opening",
|
|
196
|
+
"verify_public_audit_chain",
|
|
197
|
+
"verify_request",
|
|
198
|
+
"verify_request_proof",
|
|
199
|
+
"verify_text",
|
|
200
|
+
"weak_point_reason",
|
|
201
|
+
]
|