Skip to content

chore: remove legacy createX402Client in favor of SDK paymentHandler#11

Merged
acedatacloud-dev merged 1 commit intomainfrom
chore/remove-legacy-client
Apr 19, 2026
Merged

chore: remove legacy createX402Client in favor of SDK paymentHandler#11
acedatacloud-dev merged 1 commit intomainfrom
chore/remove-legacy-client

Conversation

@acedatacloud-dev
Copy link
Copy Markdown
Member

Follow-up cleanup to #10.

With createX402PaymentHandler now wired into the @acedatacloud/sdk transport,
the standalone createX402Client + post/get wrapper in src/client.ts is
redundant. Every application path should go through the SDK; the few scripts
and tests that need to bypass the SDK already import the low-level
signSolanaPayment / signEVMPayment primitives directly.

Changes

  • delete src/client.ts (createX402Client, post, get, request)
  • drop X402ClientOptions + X402Response from src/types.ts
  • prune the top-level exports in src/index.ts
  • rewrite README.md as a single coherent doc (The old README had been
    stacked, with duplicate sections referencing createX402Client)
  • fix a stale console.log in scripts/test-e2e.ts

Public API after this change

createX402PaymentHandler, X402PaymentHandlerOptions
signSolanaPayment, signEVMPayment
PaymentRequirement, PaymentRequiredResponse, X402PaymentEnvelope
SolanaWalletAdapter, EVMProvider, SolanaPayload, EVMPayload, EVMAuthorization

Verification

  • npm run build → 0 errors
  • grep createX402Client src/ scripts/ README.md → 0 matches

Follow-up to #10. With createX402PaymentHandler now wired into the
@acedatacloud/sdk transport, the standalone createX402Client +
post/get wrapper in src/client.ts is redundant — everyone should go
through the SDK, and the few places that need to bypass the SDK
already import the low-level signSolanaPayment / signEVMPayment
primitives directly.

Changes:
- delete src/client.ts (createX402Client, post, get, request)
- drop X402ClientOptions + X402Response from src/types.ts
- prune the top-level exports in src/index.ts
- rewrite README.md as a single coherent doc (the old README had
  been stacked, with duplicate sections referencing createX402Client)
- fix a stale console.log in scripts/test-e2e.ts

Public API after this change:
  createX402PaymentHandler, X402PaymentHandlerOptions
  signSolanaPayment, signEVMPayment
  PaymentRequirement, PaymentRequiredResponse, X402PaymentEnvelope
  SolanaWalletAdapter, EVMProvider, SolanaPayload, EVMPayload, EVMAuthorization

Build verified (npm run build → 0 errors).
@acedatacloud-dev acedatacloud-dev merged commit 6deacc7 into main Apr 19, 2026
1 check passed
@acedatacloud-dev acedatacloud-dev deleted the chore/remove-legacy-client branch April 19, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant