Download the PHP package yukazakiri/lepton-agent without Composer

On this page you can find all versions of the php package yukazakiri/lepton-agent. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package lepton-agent

Lepton Agent SDK for Laravel

Community-maintained, Laravel-first PHP SDK for Circle wallets and the Arc network.

Lepton gives Laravel applications reusable PHP methods instead of duplicating Circle CLI commands, REST requests, authentication, and notification-signature verification in every project. Use injected contracts, a facade, Artisan commands, structured results, and offline fakes behind one application-facing API.

Circle's official SDK catalog lists Node.js and Python server SDKs for Wallets, not PHP/Laravel. This SDK addresses that integration gap; it is not an official Circle product or a claim to be the first community PHP integration.

Release status: SDK hardening release candidate for PHP 8.5 and Laravel 13. REST contract, cryptographic, and failure-path tests run offline. Live Circle wallet creation, transfers, and webhook delivery still need separately authorized testnet validation. Do not treat a passing suite as certification for production funds. See production readiness.

Documentation

Full Astro Starlight documentation lives in docs/: offline quickstart, driver setup, wallet lifecycle, reliable payments, verified notifications, PHP/Artisan reference, and production-readiness gates.

Requires Node.js 22.22+. Default local path is /lepton-agent/. Static hosting and manual GitHub Pages deployment instructions are in the documentation guide.

Contents

Requirements

Installation

Install a version whose requirements and release notes match your application:

Laravel auto-discovers the provider and Lepton facade. Preview versions require an explicit prerelease constraint. Do not change the entire application's minimum stability merely to evaluate this SDK.

Drivers and capabilities

Driver Transport / authentication Scope
fake In-memory ledger; no credentials Offline tests and rehearsals; never real settlement
circle Circle CLI and its email-OTP session Existing Agent Stack integration and CLI wrappers
developer / circle-rest HTTPS REST, API key, registered Entity Secret Developer-Controlled Wallets on ARC-TESTNET or ARC

Unknown driver names fail closed instead of selecting a live signer.

Operation Developer REST driver
Wallet listing, creation, explicit wallet-set creation Supported, network/custody/set validation and bounded pagination
USDC balances Canonical Arc token or native view, exact six-decimal base units, no double-counting
Transfer and fee estimate Separate methods; transfer requires persisted UUID v4 idempotency key
Transfer observation and transaction listing Read-only; CONFIRMED remains pending, missing/unavailable results remain unknown
Message and EIP-712 signing, ABI execution Explicit methods; signing and mutations blocked under dry-run
Faucet funding Testnet request only; Circle account eligibility/rate limits apply, not guaranteed funding
Notification verification Dedicated ECDSA signing-key lookup and raw-body verification
Gateway, CCTP, x402, contract registry Not implemented by REST driver; throws UnsupportedOperation, never invented zero balances

CircleRestGateway::capabilities() lists its supported operations. CLI coverage does not imply REST parity. SDK support is intentionally bounded; applications remain responsible for authorization, durable payment/inbox records, and settlement.

Configuration

The default driver is fake in APP_ENV=testing; otherwise it remains circle. TEST_API_KEY:ID:SECRET and LIVE_API_KEY:ID:SECRET target different environments. The REST driver refuses key/network mismatches. Its authStatus() verifies API read access, not the correctness of the registered signing secret or custody of an arbitrary address.

Keep API keys and Entity Secrets in protected configuration or a secrets manager. Never commit or log them, send them as CLI flags, or store recovery files in the repository. The operator must generate/register the Entity Secret and secure its recovery file; SDK installation never registers, rotates, or resets it.

Mainnet uses LEPTON_CHAIN=ARC and chain ID 5042. A mainnet rollout and each irreversible operation require your application's explicit authority. Existing Agent Stack wallets do not become Developer-Controlled Wallets by changing a key.

PHP SDK usage

Contracts and facade

Contract Purpose
WalletGateway transfer, balance, transactions, limits; compatible with older four-method implementations
WalletManagementGateway wallets, createWallet, fundWallet
TransferObserver resolve accepted provider transaction IDs without resending
TransferEstimator estimateTransfer, never a transfer result
ArcNetworkGateway RPC, network identity, explorer links, native observations
AuthGateway Provider authentication state; OTP only on CLI driver
WebhookVerifier Verify Circle Wallets notifications independently of encryption keys
JsonTransport Injectable HTTPS JSON transport for deterministic tests
CircleGateway, X402Gateway Extended integration surface; consult driver capability matrix

Lepton::transferDecimal() also accepts exact decimal strings. Integer conversion rejects overflow and malformed precision; never multiply floats to construct units. Circle requires EVM addresses with 0x plus exactly 40 hex characters. Syntax validation is not proof the recipient controls the address.

REST mutations require an explicit persisted UUID v4. An absent key does not generate a fresh identity for you. Timeouts/malformed results are ambiguous; do not create another transfer. Observe the existing provider ID and reconcile the original intent. SDK HTTP transport follows no redirects and automatically retries no mutations. Ciphertext is freshly encrypted for each request that requires it.

Wallet lifecycle

REST wallet-set creation is explicit through Lepton::createWalletSet($name, $options). No “pick the first set” or automatic custody migration occurs. Testnet fundWallet() returns status=requested, not proof of funds received.

Arc chain reads and exact balances

USDC is the gas token on Arc. Native view uses 18 decimals; canonical ERC-20 view at 0x3600000000000000000000000000000000000000 uses six. They expose one balance: never add the two views. SDK balance results floor native sub-micro residuals to six decimals and retain raw observations. Mismatched observations fail closed. Never use hexdec() for quantities above PHP_INT_MAX.

RPC endpoints are explicit HTTPS endpoints. No automatic CLI/network fallback occurs after failure. If a configured provider responds method 'x' not allowed by the proxy, that provider does not expose the method; it is not evidence that a payment failed. Testnet chain ID is 5042002; mainnet is 5042.

Authentication

For LEPTON_DRIVER=circle, mainnet and testnet authenticate independently:

CLI owns the session. Never initiate OTP login inside a worker or settlement path. REST does not implement email OTP; use configured API credentials and the operator's registered Entity Secret instead. No credentials are embedded by SDK.

Verified notifications

The verifier retrieves GET /v2/notifications/publicKey/{keyId}, checks ID, ECDSA_SHA_256 and P-256 key type, and verifies original raw bytes. It validates the envelope, UTC timestamp, configured acceptance window, and subscription. Missing/invalid signatures or unavailable keys fail closed. Entity Secret RSA encryption keys are never used as notification keys.

Consumers must persist a unique notificationId with payloadDigest before acknowledging delivery, then queue observation outside Circle's response deadline. Handle duplicate/out-of-order events without regressing state or resubmitting payments. Keep bounded polling for missed events. Configure the age window for your redelivery policy; stale valid events require recovery, not relaxed signature checks. The SDK does not install a public route or choose a financial database.

A verified notification or hash is a claim, not proof of business settlement. Check successful receipt, matching network/token/sender/recipient/exact amount, and finality. CONFIRMED stays pending; absent/unreachable lookups stay unknown. Provider failure can still incur gas. The SDK never marks an invoice paid.

Artisan commands

lepton:wallet dispatches list/create/fund. lepton:circle and Lepton::runCircle() require LEPTON_ALLOW_RAW_CIRCLE=true and apply only to the CLI driver. Fake outputs must be labeled simulated; faucet requests are not settlement. Do not copy placeholder addresses into a live transfer.

Testing

The fake driver needs no network, no credentials, and no cost:

Bind a fresh fake per test. Gateways use scoped bindings for Octane isolation. JsonTransport can be replaced with deterministic responses; default tests make no live requests. REST request, pagination, identity, state, money, ciphertext, ECDSA verification, and failure paths are covered by tests. Offline pass does not prove provider availability or permission for live operations.

Upgrade notes

This release requires PHP 8.5. Review consumer CI, container, Composer lock, custom gateways, and application adapters before upgrading. WalletGateway retains its original four required methods; async observation and wallet management are optional capability interfaces. Built-in drivers expose those capabilities.

REST callers must now supply persisted UUID v4 mutation keys, explicit wallet sets, supported network, and exact reviewed addresses. Old invalid requests now fail. Raw CLI passthrough, Gateway and x402 operations never fall back from REST to CLI. Keep existing provider IDs and immutable financial records unchanged during upgrades.

Production readiness

Implemented hardening is not certification. Before production use:

Idempotency is not an application outbox. Signature verification is not a durable inbox. A fee estimate/level does not enforce a payer fee ceiling. The driver refuses unsupported ceiling options; consumers requiring bounded fees must keep execution gated until a reviewed transport actually enforces them. Failed, absent, or unreadable evidence must not be called fabricated.

Further reading

License

MIT.


All versions of lepton-agent with dependencies

PHP Build Version
Package Version
Requires php Version ^8.5
ext-curl Version *
ext-openssl Version *
illuminate/contracts Version ^13.0
illuminate/support Version ^13.0
symfony/process Version ^7.0|^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package yukazakiri/lepton-agent contains the following files

Loading the files please wait ...