Repository navigation
feat(agentkit): add Curade action provider for x402-paid prediction-market and funding data - #1622
Open
sryantrabot wants to merge 13 commits into
Open
sryantrabot wants to merge 13 commits into
sryantrabot wants to merge 13 commits into
Conversation
…curade/curadeActionProvider.ts
…curade/schemas.ts
…curade/curadeActionProvider.test.ts
…ent-Signature (x402 v2)
…r (live 402 body is empty); amount field name; trim ad-speak
…tUsdc caveat; amount field
…atches live server); drop unused wallet mock
🟡 Heimdall Review Status
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
curadeaction provider undertypescript/agentkit/src/action-providers/curade/, following the existing provider layout (modeled on the defillama/dtelecom providers).What it does
curade_polymarket_odds— GET /v1/polymarket/odds (limit/q params), $0.005/callcurade_polymarket_disagreement— GET /v1/polymarket/disagreement, $0.02/callcurade_polymarket_package— GET /v1/polymarket/package (market param), $2.00 one-time purchasecurade_hyperliquid_funding— GET /v1/funding/current, $0.001/callPayment-Requiredresponse header (the body is empty), and the tools decode and surface it verbatim instead of throwing. The provider never signs payments — pair it with AgentKit'sx402ActionProvider(or any x402 client), then retry the identical request with the payment header named by the challenge'serrorfield (our challenge readsPayment-Signature header is required). If agents should buy the $2.00 package, raisex402ActionProvider'smaxPaymentUsdcabove its 1.0 USDC default.Files
curadeActionProvider.ts/schemas.ts/index.ts/README.md— the provider (fetch-only; no wallet params, mirroring the defillama provider shape)curadeActionProvider.test.ts— colocated jest tests with mockedglobal.fetch(402 challenge decoded from the Payment-Required header, 200 passthrough, HTTP-error and fetch-failure strings, query-param building).changeset/curade-action-provider.md— patch bump per CONTRIBUTING-TYPESCRIPT (new action provider)typescript/agentkit/src/action-providers/index.ts(alphabetical: between compound and defillama)No new dependencies (uses global
fetch+ existingzod).