Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Toncenter Client Php Laravel Package

amashukov/toncenter-client-php

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Blockchain Infrastructure for TON: Enables building scalable, typed PHP services interacting with The Open Network (TON) via Toncenter API, reducing boilerplate for wallet operations, balance checks, and contract interactions.
  • Wallet-as-a-Service (WaaS): Accelerates integration of TON wallets (e.g., v4r2) by providing a WalletRpcInterface adapter, eliminating custom RPC logic for getSeqno/sendBoc.
  • Financial Services: Safely handles large TON balances (beyond PHP_INT_MAX) as decimal strings, critical for payment processors, DeFi, or token-gated apps.
  • Decentralized Apps (DApps): Simplifies backend logic for TON-based dApps by abstracting API calls (e.g., runMethod, getTransactions) into strongly typed Value Objects.
  • Build vs. Buy: Replaces ad-hoc Guzzle scripts or custom API wrappers with a maintained, transport-agnostic library, reducing tech debt.
  • Roadmap Priorities:
    • Phase 1: Integrate Toncenter for wallet operations (e.g., fiat-to-TON onramps).
    • Phase 2: Extend to smart contract interactions (e.g., NFT minting, DeFi calls).
    • Phase 3: Add monitoring for 542/429 retries in production.

When to Consider This Package

  • Adopt if:
    • Your PHP backend interacts with TON (e.g., wallets, contracts, or DeFi).
    • You need strong typing for Toncenter responses (avoid manual JSON parsing).
    • Your app handles large balances (>9,223 TON) and requires precision (decimal strings).
    • You want retry logic for transient errors (542, 429) without reinventing middleware.
    • You’re using Symfony or PSR-18 clients (e.g., Guzzle, HTTP Client) and can leverage ToncenterWalletRpc for wallets.
  • Look elsewhere if:
    • You’re not using PHP (this is PHP-only).
    • Your use case requires TON blockchain indexing (consider Tonkeeper API or Jetton API).
    • You need offline TON node operations (e.g., local TON SDK like ton-php).
    • Your team lacks PHP expertise for PSR-18/PSR-17 or GMP extensions (required for bigint parsing).
    • You’re building a frontend-only app (use ton-web-sdk instead).

How to Pitch It (Stakeholders)

For Executives:

*"This package lets us safely and scalably integrate with The Open Network (TON) in PHP with minimal engineering overhead. It handles:

  • Wallet operations (e.g., fiat-to-TON onramps) via a pre-built WalletRpcInterface adapter.
  • Large-value transactions (>9,223 TON) without float precision loss (uses decimal strings).
  • API reliability with built-in retries for Toncenter’s 542/429 errors. By adopting this, we avoid reinventing Toncenter API wrappers, reduce bugs from manual JSON parsing, and future-proof our blockchain interactions. MIT-licensed and PHPStan-validated, it’s production-ready with zero dependents—meaning we’d own its roadmap."*

For Engineers:

*"This is a batteries-included, typed PHP client for Toncenter v2 that:

  1. Unwraps {ok, result} responses into exceptions or Value Objects (no manual envelope checks).
  2. Supports PSR-18 transport (Guzzle, Symfony HTTP Client, etc.) with retry middleware for 542/429.
  3. Handles big numbers as decimal strings (critical for TON balances >9,223).
  4. Includes a ToncenterWalletRpc adapter for ton-wallet-php, so wallet broadcasts work out-of-the-box.
  5. PHPStan L9 clean—no runtime surprises.

Tradeoffs:

  • Requires PHP 8.3+ and ext-gmp (for bigint parsing).
  • No frontend support (use Ton Web SDK instead).
  • Early-stage (0 stars, but MIT-licensed and actively maintained by the author).

Proposal:

  • Use this for TON wallet integrations (e.g., sendBoc, getSeqno).
  • Pair with amashukov/http-client-php for retry/rate-limit middleware.
  • Extend for contract interactions (e.g., runMethod, getTransactions) if needed.

Alternatives:

  • Roll your own Guzzle client (higher maintenance).
  • Use Tonkeeper/Jetton APIs (less control, potential vendor lock-in)."*
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
besmartand-pro/php-quality-config
sentix/ai-chatbot
codifyo/ts-generator-bundle
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor