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 for Laravel

A Laravel bridge for Lepton Agents — Circle's Agent Stack plus the Arc network. Wrap agent wallets, USDC transfers, on-chain reads, and x402 payments behind injected contracts, so your application code never hardcodes a circle or arc-canteen command.

Built for the Lepton Agents Hackathon.


Table of contents


Requirements

The package does not store credentials. Circle CLI owns the agent session; this package only reads and initiates it. Nothing sensitive enters your .env.


Installation

The service provider and the Lepton facade are auto-discovered. Publish the config if you want to change defaults in a file:


Authentication

Agent wallets authenticate with an email one-time password. Sessions last 7 days, and mainnet and testnet authenticate independently — a valid mainnet session does not authorise a testnet transfer.

First-time login registers the email with Circle and provisions an agent wallet on every supported chain automatically. You do not need to create wallets yourself.

Interactive

Paste the emailed code when prompted. Accept the Terms of Use on first run.

Non-interactive — recommended for agents and scripts

The OTP is the only step that needs a human. Everything around it is scriptable, so this package wraps the split flow:

Check the current session at any time:

From PHP

Never call auth from a queue worker or the settlement path. The OTP requires a human, so login belongs in an operator-run command or an opt-in web flow.


Wallets

Circle distinguishes two wallet types, and the difference decides whether transfers work:

Type Key custody Circle can sign for it? Use
Agent Circle MPC, email OTP Yes Servers, agents, anything that sends USDC
Local Your private key No Development, cast, direct signing

This is the single most common failure: pointing your treasury at a local wallet and wondering why circle wallet transfer reports no agent session is active.

List the agent wallets Circle knows about for a chain:

From PHP, use whichever address your organisation is configured with:

Funding a testnet wallet

On Arc, USDC is the gas token, so a wallet needs USDC to send anything — including a zero-value transfer.


Transfers

All amounts are integer base units. USDC is 6 decimals on the Circle side, so 450.00 USDC is 450_000000. Floats are never used.

Or via the facade, which accepts a decimal string:

Transfer options

Option Effect
chain Chain code, defaults to lepton.arc.chain
rpcUrl Explicit RPC endpoint, overriding the configured one
token ERC-20 contract or mint address. Omit for native USDC
idempotencyKey Reuse a key to make a retry safe
estimate Fee estimate only; does not broadcast

The transfer confirms on-chain before the command returns, so no polling loop is needed — but the returned hash is still a claim. Verify it before treating a payment as settled:

Balances


Reading the chain

The Arc gateway wraps arc-canteen rpc, which gives you JSON-RPC against Arc testnet without needing a Circle session.

rpc() is allowlisted. The Arc proxy rejects some methods by design — a response of method 'trace_block' not allowed by the proxy means the method is not exposed, not that the call is broken. Read-mostly methods plus eth_sendRawTransaction work.

Use Amounts::fromHexQuantity(), not hexdec(). Arc native USDC is 18 decimals, so 20 USDC is 2e19 wei, which exceeds PHP_INT_MAX. hexdec() returns a float there and a cast silently corrupts the value.


Spending limits

Agent wallets carry a spending policy, which is a second, independent enforcement layer on top of your own application rules.

Mainnet only. Circle does not expose spending limits on testnet, so limits() returns declared-only values there. Enforce caps in your own code on testnet.


x402 paid services

Pay for third-party APIs per request. The recipient receives USDC, you receive the response.

Nanopayment balances sit in Circle Gateway:


CLI coverage

This package wraps a focused subset. Anything not listed runs through the Circle CLI directly.

CLI verb Package
wallet transfer WalletGateway::transfer()
wallet balance WalletGateway::balance()
wallet limit WalletGateway::limits()
wallet status AuthGateway::authStatus()
wallet login AuthGateway::beginLogin() / completeLogin()
transaction list WalletGateway::transactions()
services search / inspect / pay X402Gateway
gateway balance X402Gateway::gatewayBalance()
JSON-RPC reads ArcNetworkGateway::rpc()
wallet create, fund, import, sign, swap, execute not wrapped — use the CLI
bridge, contract, earn, blockchain config not wrapped — use the CLI

Configuration

LEPTON_DRIVER defaults to fake when APP_ENV=testing.


Commands


Testing

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

Bindings use scoped(), so they are safe under Laravel Octane and never leak request state between requests.


Arc gotchas


Troubleshooting

No local wallet matches 0x… and no agent session is active The address is not a Circle agent wallet, or you are not logged in for that network. Check with php artisan lepton:login --status, then circle wallet list --type agent --chain ARC-TESTNET.

Transfers fail with an authentication error on testnet You are logged in to mainnet only. Run php artisan lepton:login [email protected] --testnet flow.

method '<x>' not allowed by the proxy The Arc RPC proxy is allowlisted. That method is not exposed by design.

Balance reads as 0 but you have funds You are probably pointing at an arc-canteen local wallet rather than your Circle agent wallet, or querying a chain you are not authenticated for.

A returned tx hash is not on chain Verify it before trusting it:

A stored hash is a claim, not proof.


Further reading


License

MIT.


All versions of lepton-agent with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
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 ...