Download the PHP package redberryproducts/laravel-crypto-wallet without Composer
On this page you can find all versions of the php package redberryproducts/laravel-crypto-wallet. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download redberryproducts/laravel-crypto-wallet
More information about redberryproducts/laravel-crypto-wallet
Files in redberryproducts/laravel-crypto-wallet
Package laravel-crypto-wallet
Short Description blockchain service integration for laravel
License MIT
Homepage https://github.com/RedberryProducts/laravel-crypto-wallet
Informations about the package laravel-crypto-wallet
Laravel Crypto Wallet
Table of Contents
- Introduction
- Installation
- Configuration
- Usage
- Testing
- Contributing
Introduction
Laravel Crypto Wallet is a flexible Laravel package that provides a unified factory class for interacting with various crypto wallet drivers. Currently, it supports Bitgo, with plans to add more drivers and introduce a unified facade in future releases.
Our Future Plan:
Enhance Bitgo support, add more drivers, unify the Wallet facade, offer driver selection via configuration—and still let you work directly with each driver.
Note: The unified facade is not yet available, but it will be introduced in a future release
Currently, we support Bitgo for operations such as:
- Generating a Wallet
- Getting a Wallet
- Listing Wallets
- Generating Addresses
- Getting Wallet Transfers
- Sending Transactions
- Getting Maximum Spendable
- Consolidating Wallet Balances
- Adding Webhooks
- Exchange Rates
The package uses a clear, fluent API and is fully testable, making it simpler to integrate cryptocurrency-related features into your Laravel application.
Installation
- Install via Composer:
Bitgo Express Docker
To run Bitgo Express locally using Docker, you can use the following commands:
For more information on Bitgo Express Docker, refer to the official Bitgo Express Docker documentation.
Configuration
By default, the configuration for the Bitgo driver is included under the drivers.bitgo
key. Once published, you’ll find the config at config/cryptowallet.php
. Below is an example of what the Bitgo config might look like:
.env Example:
Adjust these environment variables according to your needs.
Usage
Bitgo Driver
All Bitgo functionality is encapsulated within the Bitgo driver, which is used by default when calling WalletManager::bitgo()
.
Wallet Factory
The core entry point for all wallet-related activities is the WalletManager
class. You can call static methods (like bitgo()
) to instantiate a specific driver. For example:
Optionally, you can specify a coin and/or wallet ID:
Generating a Wallet
Getting a Wallet
Listing Wallets
Generating Addresses
Getting Wallet Transfers
Sending Transactions
Send to multiple recipients:
Getting Maximum Spendable
Consolidating Wallet Balances
Adding Webhooks
When you generate a wallet, you can easily attach a webhook:
Exchange Rates
You can easily fetch current exchange rates using the ExchangeRateManager
.
Currently, we provide a Bitgo driver implementation.
Fetch All Exchange Rates
Fetch Exchange Rates for a Specific Coin
Testing
We use Pest PHP to ensure all functionalities work as expected. You can find our test files under tests/
. To run the tests:
Contributing
- Fork the repository
- Create a new branch (
git checkout -b feature/someFeature
) - Make your changes
- Write or update tests
- Commit your changes (
git commit -m 'feat: Add some feature'
) - Push to the branch (
git push origin feature/someFeature
) - Create a Pull Request
We welcome all contributions that help improve this package!
All versions of laravel-crypto-wallet with dependencies
ext-readline Version *
guzzlehttp/guzzle Version >=7.4
illuminate/contracts Version >=9.0
illuminate/support Version >=9.11
spatie/laravel-data Version ^4.11
spatie/laravel-package-tools Version >=1.9.2