PHPackages                             redberryproducts/laravel-crypto-wallet - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. redberryproducts/laravel-crypto-wallet

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

redberryproducts/laravel-crypto-wallet
======================================

blockchain service integration for laravel

v1.1.1(1y ago)19312[4 PRs](https://github.com/RedberryProducts/laravel-crypto-wallet/pulls)MITPHPPHP &gt;=8.1CI passing

Since Nov 15Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/RedberryProducts/laravel-crypto-wallet)[ Packagist](https://packagist.org/packages/redberryproducts/laravel-crypto-wallet)[ Docs](https://github.com/RedberryProducts/laravel-crypto-wallet)[ RSS](/packages/redberryproducts-laravel-crypto-wallet/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (18)Versions (16)Used By (0)

Laravel Crypto Wallet
=====================

[](#laravel-crypto-wallet)

Table of Contents
-----------------

[](#table-of-contents)

1. [Introduction](#introduction)
2. [Installation](#installation)
3. [Configuration](#configuration)
4. [Usage](#usage)
5. [Testing](#testing)
6. [Contributing](#contributing)

Introduction
------------

[](#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](#generating-a-wallet)
- [Getting a Wallet](#getting-a-wallet)
- [Listing Wallets](#listing-wallets)
- [Generating Addresses](#generating-addresses)
- [Getting Wallet Transfers](#getting-wallet-transfers)
- [Sending Transactions](#sending-transactions)
- [Getting Maximum Spendable](#getting-maximum-spendable)
- [Consolidating Wallet Balances](#consolidating-wallet-balances)
- [Adding Webhooks](#adding-webhooks)
- [Exchange Rates](#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
------------

[](#installation)

1. **Install via Composer**:

```
composer require redberryproducts/laravel-crypto-wallet
```

Bitgo Express Docker
--------------------

[](#bitgo-express-docker)

To run Bitgo Express locally using Docker, you can use the following commands:

```
docker pull bitgo/express:latest
docker run -it -p 3080:3080 bitgo/express:latest
```

For more information on Bitgo Express Docker, refer to the official [Bitgo Express Docker documentation](https://developers.bitgo.com/guides/get-started/express/install).

Configuration
-------------

[](#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:

```
return [
    'drivers' => [
        'bitgo' => [
            'use_mocks' => env('BITGO_USE_MOCKS', false),
            'testnet' => env('BITGO_TESTNET', true),
            'api_key' => env('BITGO_API_KEY'),
            'express_api_url' => env('BITGO_EXPRESS_API_URL'),
            'default_coin' => env('BITGO_DEFAULT_COIN', 'tbtc4'),//This is not a typo or just a result of a lazy developer :). BitGo is moving to Testnet4, so the Bitcoin testnet is now TBTC4.
            'webhook_callback_url' => env('BITGO_WEBHOOK_CALLBACK'),
        ],
    ],
];
```

**.env Example**:

```
BITGO_USE_MOCKS = false
BITGO_TESTNET = true
BITGO_API_KEY = YOUR-BITGO-API-KEY
BITGO_EXPRESS_API_URL = http://localhost:3080/api/v2/
BITGO_DEFAULT_COIN = tbtc4
BITGO_WEBHOOK_CALLBACK = https://yourapp.com/webhook/bitgo
```

Adjust these environment variables according to your needs.

Usage
-----

[](#usage)

### Bitgo Driver

[](#bitgo-driver)

All Bitgo functionality is encapsulated within the **Bitgo** driver, which is used by default when calling `WalletManager::bitgo()`.

### Wallet Factory

[](#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:

```
use RedberryProducts\CryptoWallet\WalletManager;

$wallet = WalletManager::bitgo();
```

Optionally, you can specify a coin and/or wallet ID:

```
$wallet = WalletManager::bitgo(coin: 'tbtc', walletId: 'my-wallet-id');
```

### Generating a Wallet

[](#generating-a-wallet)

```
$wallet = WalletManager::bitgo(coin: 'tbtc')
    ->generate(
        label: 'Test Wallet',
        passphrase: 'test-passphrase',
        enterpriseId: 'enterprise-id',
    );
```

### Getting a Wallet

[](#getting-a-wallet)

```
$wallet = WalletManager::bitgo(coin: 'tbtc', walletId: 'wallet-id')
        ->get();
```

### Listing Wallets

[](#listing-wallets)

```
$wallets = WalletManager::bitgo()->listAll();
```

### Generating Addresses

[](#generating-addresses)

```
$address = WalletManager::bitgo(coin: 'tbtc', walletId: 'wallet-id')
    ->generateAddress(label: 'My Address');
```

### Getting Wallet Transfers

[](#getting-wallet-transfers)

```
$transfers = WalletManager::bitgo(coin: 'tbtc', walletId: 'wallet-id')
    ->getTransfers();
```

### Sending Transactions

[](#sending-transactions)

**Send to multiple recipients:**

```
use RedberryProducts\CryptoWallet\Drivers\Bitgo\Data\SendTransferToMany\SendToManyRequest;
use RedberryProducts\CryptoWallet\Drivers\Bitgo\Data\SendTransferToMany\Recipient;

$sendTransferData = new SendToManyRequest(
    recipients: [
        new Recipient(address: 'tb1psv9q9zlp94s9jncnlye4kj0acyp56suxf28hn4k34vyrmsrp4qtsc9eqlq', amount: 4368),
    ],

    walletPassphrase: 'test',
    feeRate: 250,
);

$response = WalletManager::bitgo(coin: 'tbtc', walletId: 'wallet-id')
    ->sendTransferToMany(sendToManyRequest: $sendTransferData);
```

### Getting Maximum Spendable

[](#getting-maximum-spendable)

```
$maxSpendable = WalletManager::bitgo(coin: 'tbtc', walletId: 'wallet-id')
    ->getMaximumSpendable([
        'feeRate' => 0,
    ]);
```

### Consolidating Wallet Balances

[](#consolidating-wallet-balances)

```
$result = WalletManager::bitgo(coin: 'tbtc', walletId: 'wallet-id')->consolidate([
    'walletPassphrase' => 'testing-pass',
    'bulk' => true,
    'minValue' => '0',
    'minHeight' => 0,
    'minConfirms' => 0,
]);
```

### Adding Webhooks

[](#adding-webhooks)

When you generate a wallet, you can easily attach a webhook:

```
$webhook = WalletManager::bitgo('tbtc')
    ->generate(
        label: 'wallet with webhook',
        passphrase: 'test-passphrase',
        enterpriseId: 'enterprise-id'
    )
    ->addWebhook(
        numConfirmations: 6,
        callbackUrl: 'https://yourapp.com/webhook/bitgo'
    );
```

Exchange Rates
--------------

[](#exchange-rates)

You can easily fetch current exchange rates using the `ExchangeRateManager`.

Currently, we provide a **Bitgo** driver implementation.

### Fetch All Exchange Rates

[](#fetch-all-exchange-rates)

```
use RedberryProducts\CryptoWallet\ExchangeRateManager;

$rates = ExchangeRateManager::bitgo()->all();
```

### Fetch Exchange Rates for a Specific Coin

[](#fetch-exchange-rates-for-a-specific-coin)

```
use RedberryProducts\CryptoWallet\ExchangeRateManager;

$tbtcRates = ExchangeRateManager::bitgo()->getByCoin('tbtc');
```

Testing
-------

[](#testing)

We use [Pest PHP](https://pestphp.com/) to ensure all functionalities work as expected. You can find our test files under `tests/`. To run the tests:

```
./vendor/bin/pest
# or
php artisan test
```

Contributing
------------

[](#contributing)

1. Fork the repository
2. Create a new branch (`git checkout -b feature/someFeature`)
3. Make your changes
4. Write or update tests
5. Commit your changes (`git commit -m 'feat: Add some feature'`)
6. Push to the branch (`git push origin feature/someFeature`)
7. Create a Pull Request

We welcome all contributions that help improve this package!

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance69

Regular maintenance activity

Popularity17

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 86.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~6 days

Total

10

Last Release

488d ago

Major Versions

v0.2.1 → v1.0.02025-01-04

### Community

Maintainers

![](https://www.gravatar.com/avatar/6290ec275136755908a3a3eabe6d3cee9da7f14c65b8733f61908a68d40891a8?d=identicon)[khomerikiKkote](/maintainers/khomerikiKkote)

![](https://www.gravatar.com/avatar/575834382d0d9a2f525665011b42db95bb50b6ed74e4a2dded51a3b77ac85873?d=identicon)[nikajorjika](/maintainers/nikajorjika)

---

Top Contributors

[![KhomerikiK](https://avatars.githubusercontent.com/u/39499899?v=4)](https://github.com/KhomerikiK "KhomerikiK (116 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (15 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")

---

Tags

laravelcryptowalletbitgokhomeriki

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/redberryproducts-laravel-crypto-wallet/health.svg)

```
[![Health](https://phpackages.com/badges/redberryproducts-laravel-crypto-wallet/health.svg)](https://phpackages.com/packages/redberryproducts-laravel-crypto-wallet)
```

###  Alternatives

[nativephp/mobile

NativePHP for Mobile

82724.0k43](/packages/nativephp-mobile)[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[tonysm/importmap-laravel

Use ESM with importmap to manage modern JavaScript in Laravel without transpiling or bundling.

148399.8k1](/packages/tonysm-importmap-laravel)[bensampo/laravel-embed

Painless responsive embeds for videos, slideshows and more.

142146.8k](/packages/bensampo-laravel-embed)[laracraft-tech/laravel-useful-additions

A collection of useful Laravel additions!

58109.4k](/packages/laracraft-tech-laravel-useful-additions)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
