这是indexloc提供的服务,不要输入任何密码
Skip to content

[Feat]: TypeScript support for x402_a2a #32

@AkshatGada

Description

@AkshatGada

Is your feature request related to a problem? Please describe.

Currently, the x402_a2a package only provides Python support, which limits adoption for TypeScript/JavaScript developers in the Node.js ecosystem. This creates friction for:

  • Web/Node.js developers wanting to integrate with x402 payment protocol
  • TypeScript applications needing type-safe bindings
  • JavaScript ecosystem tools requiring native npm package support
  • Developers seeking parity with Python implementation features

Describe the solution you'd like

I have already built a complete TypeScript implementation mirroring the Python package:

Implemented modules in typescript/x402_a2a:

  • types.ts: Full type definitions (Task, Message, PaymentPayload)
  • extension.ts: Header-based activation helpers
  • core/utils.ts: Task/Message metadata operations
  • core/protocol.ts: x402 verify/settle delegation
  • core/wallet.ts: Payment signing with maxValue
  • executors/: Server (verify→delegate→settle) and client flows

Key features:

  • Full parity with Python implementation
  • Runtime x402 package integration
  • Type-safe APIs and strict checks
  • Comprehensive test coverage

We can submit a PR for review that includes this complete implementation, along with tests and documentation.

Describe alternatives you've considered

No response

Additional context

I am actively working with the Google Cloud Platform team and have completed the partner support process. Our goal is to contribute meaningfully to the protocol

We have:

  • Filled out the partner support form
  • Tested the implementation against the protocol specifications
  • Ensured compatibility with existing Python behaviors

This implementation will help expand x402's reach into the JavaScript/TypeScript ecosystem while maintaining the protocol's security and reliability standards.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions