Download the PHP package roberts/web3-laravel without Composer

On this page you can find all versions of the php package roberts/web3-laravel. 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 web3-laravel

Web3 Laravel — protocol‑first, multi‑chain adapters with native EVM JSON‑RPC

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This Laravel package provides a protocol‑first, chain‑agnostic toolkit to create wallets and interact with multiple chains via per‑protocol adapters. It includes a native EVM JSON‑RPC client and built‑in transaction signer (legacy + EIP‑1559). No web3.php dependency.

Supported blockchains

Web3 Laravel is chain‑agnostic with per‑protocol adapters and a router that picks the right one based on the wallet. High‑level support:

See the docs below for per‑chain details and configuration.

Token deployment (multi‑chain)

You can launch fungible tokens via a single, chain-agnostic API. See the full guide with per-chain details, configuration, and examples:

Docs

Installation

You can install the package via composer:

You can publish and run the migrations with:

You can publish the config file with:

This is the contents of the published config file (defaults shown):

Usage (EVM example)

Eloquent-style helpers:

php use Roberts\Web3Laravel\Models\Wallet;

$signer = Wallet::find($signerWalletId); $tx = $signer->createFungibleToken([ 'protocol' => 'solana', // or use 'blockchain_id' to target a specific chain 'name' => 'Example', 'symbol' => 'EXM', 'decimals' => 9, 'initial_supply' => '1000000000', ]); // Track $tx->status and $tx->tx_hash; see docs/deploytokens.md

Wallet ownership (User model)

Wallets are owned by your application’s User model via a nullable owner_id foreign key.

You can also use the built-in ping command to verify connectivity:

Transactions & events

We provide a chain‑agnostic Transaction model with a fully async prepare/submit/confirm pipeline and lifecycle events. See the full guide for details, examples, and per‑protocol behavior:

Additional docs and examples

Features - Core Functionality

RPC & Provider Management: The package should allow for easy configuration of the blockchain's RPC endpoint (like Base). It should handle the instantiation of the Web3 class and its provider, making it available throughout the Laravel application via a Facade or service container.

Wallet Management: A key feature is the ability to securely handle Ethereum wallets. The package should provide a method to:

Generate new wallets with the package's native key engines (secp256k1 and ed25519), without any web3.php dependency.

Encrypt and decrypt private keys using Laravel's built-in Crypt facade, ensuring private keys are never stored in plain text.

Manage multiple wallets, allowing the application to select a specific wallet for a transaction.

Transaction Execution: The package should provide methods for executing both state-changing and read-only functions. This includes:

Sending ETH: A simple method to send Ether from a Laravel-managed wallet to any address on the Base chain.

Calling Contract Functions: A fluent API for calling "view" or "pure" functions that don't modify the blockchain state.

Executing Contract Functions: A secure way to execute state-changing functions that require a signed transaction and gas. This method should handle the signing, nonce management, and broadcasting of the transaction.

Asynchronous Operations: All state-changing transactions are handled as queued jobs. Creating a Transaction model dispatches an event that enqueues a job (SubmitTransaction) to sign and broadcast, preventing the web application from blocking. The model is updated with status and tx_hash automatically.

Additional Features ABI Management: The package could include functionality to retrieve and cache ABIs from the database, block explorers, or local files, making it easy to interact with a contract without manually loading the ABI each time.

Event Listening: It could provide an event listener or a scheduled command to monitor for specific events emitted by a smart contract on the blockchain.

Unit Conversion: Helper functions for converting between different units of currency (like Wei, Gwei, and Ether) would be very useful.

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of web3-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
ext-sodium Version *
ext-gmp Version *
illuminate/contracts Version ^12.0
simplito/elliptic-php Version >=1.0.12
spatie/laravel-package-tools Version ^1.16
tuupola/base58 Version ^2.0
kornrunner/keccak Version ^1.1
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 roberts/web3-laravel contains the following files

Loading the files please wait ...