Skip to content

Commit c951646

Browse files
vvillait88claude
andcommitted
feat(sdk)!: drop verify_webhook_signature — AgentScore emits no webhooks
Mirrors the node-sdk drop. Removes the speculative HMAC-SHA256 webhook verifier: - agentscore/webhooks.py — deleted - tests/test_webhooks.py — deleted - agentscore/__init__.py — exports removed - README.md — webhook section scrubbed Same rationale as the node side (commit will reference the node-sdk hash): zero outbound webhook emitter in core/api, zero internal consumers, no API endpoint signs anything. The only inbound-webhook handler is the Stripe Identity flow in core/website (uses stripe SDK, not this lib). When AgentScore ships outbound events later, the right move is the official ``standardwebhooks`` PyPI lib (Svix interop spec) rather than re-rolling. Coverage stays at 98.16% (Tier A bar 95%). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 6bae07f commit c951646

4 files changed

Lines changed: 0 additions & 280 deletions

File tree

README.md

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -91,24 +91,6 @@ client.associate_wallet(
9191
)
9292
```
9393

94-
### Verify webhook signatures
95-
96-
For merchants who receive HMAC-signed webhooks (Stripe-pattern `t=<unix>,v1=<hex>` header):
97-
98-
```python
99-
from agentscore import verify_webhook_signature
100-
101-
result = verify_webhook_signature(
102-
payload=raw_request_body, # raw bytes — capture before any JSON parse
103-
signature_header=request.headers.get("X-AgentScore-Signature", ""),
104-
secret=os.environ["AGENTSCORE_WEBHOOK_SECRET"],
105-
)
106-
if not result.valid:
107-
return {"error": result.reason}, 400
108-
```
109-
110-
`reason` distinguishes transient (`timestamp_too_old`, `timestamp_in_future`) from permanent (`signature_mismatch`, `no_signatures`, `malformed_header`) failures. Default tolerance 300s; pass `tolerance_seconds=0` to skip timestamp checking. Uses `hmac.compare_digest` for constant-time comparison.
111-
11294
### Async
11395

11496
All methods have async variants prefixed with `a`:

agentscore/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
WalletAuthRequiresSigningBody,
3232
WalletSignerMismatchBody,
3333
)
34-
from agentscore.webhooks import VerifyWebhookSignatureResult, verify_webhook_signature
3534

3635
__version__ = _pkg_version("agentscore-py")
3736

@@ -63,10 +62,8 @@
6362
"SessionCreateResponse",
6463
"SessionPollResponse",
6564
"VerificationLevel",
66-
"VerifyWebhookSignatureResult",
6765
"WalletAuthRequiresSigningBody",
6866
"WalletSignerMismatchBody",
6967
"__version__",
7068
"is_agentscore_test_address",
71-
"verify_webhook_signature",
7269
]

agentscore/webhooks.py

Lines changed: 0 additions & 128 deletions
This file was deleted.

tests/test_webhooks.py

Lines changed: 0 additions & 131 deletions
This file was deleted.

0 commit comments

Comments
 (0)