PHPackages                             tetthys/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. tetthys/wallet

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

tetthys/wallet
==============

Minimal, asset-agnostic wallet contract for crypto assets (BTC, ETH, tokens, etc.).

0.0.1(8mo ago)036MITPHPPHP ^8.1

Since Sep 18Pushed 8mo agoCompare

[ Source](https://github.com/tetthys/wallet)[ Packagist](https://packagist.org/packages/tetthys/wallet)[ RSS](/packages/tetthys-wallet/feed)WikiDiscussions dev Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

tetthys/wallet
==============

[](#tetthyswallet)

Minimal, asset-agnostic wallet contract for crypto assets (BTC, ETH, tokens, etc.).

Provides a clean and minimal `WalletInterface` to abstract wallet operations such as
creating addresses, validating them, querying balances, and sending transfers.

---

✨ Features
----------

[](#-features)

- **Minimal API surface**
    Only the essentials: create address, validate, query balances, transfer.
- **Asset-agnostic**
    Works for coins (BTC/ETH) and tokens (ERC-20, etc.).
- **Safe amount handling**
    All amounts are passed as **decimal strings** to avoid floating-point errors.
- **Extensible via options**
    `transferMany()` accepts optional parameters (`fee_rate`, `nonce`, `gas_limit`, …).
- **Testability**
    Ships with `pestphp/pest` integration and `phpstan` support.

---

📦 Installation
--------------

[](#-installation)

```
composer require tetthys/wallet
```

For development:

```
composer install
composer test
composer analyse
```

---

🚀 Usage
-------

[](#-usage)

```
use Tetthys\Wallet\Contracts\WalletInterface;

/** @var WalletInterface $wallet */

// Create a new address
$addr = $wallet->createAddress('customer:123');

// Validate
if (!$wallet->validateAddress($addr)) {
    throw new \RuntimeException("Invalid address");
}

// Query balances
$spendable = $wallet->getAvailableBalance();   // "0.015"
$received  = $wallet->getReceivedAmount($addr); // "0.010"

// Transfer to many
$txid = $wallet->transferMany(
    [
        ['to' => 'addr1...', 'amount' => '0.004'],
        ['to' => 'addr2...', 'amount' => '0.001', 'memo' => 'invoice#42'],
    ],
    [
        'fee_rate' => 'fast',
        'subtract_fee_from' => [0],
    ]
);
```

---

⚠️ Exceptions
-------------

[](#️-exceptions)

All exceptions extend `\RuntimeException`:

- `AddressCreationException`
- `BalanceQueryException`
- `DepositQueryException`
- `AddressValidationException`
- `TransferException`

---

🧪 Testing
---------

[](#-testing)

```
composer test
```

Runs the Pest test suite inside the package.

---

🔍 Static Analysis
-----------------

[](#-static-analysis)

```
composer analyse
```

Runs PHPStan at max level on `src/`.

---

📂 Project Structure
-------------------

[](#-project-structure)

```
tetthys/wallet
├── src/
│   ├── Contracts/
│   │   └── WalletInterface.php
│   └── Exceptions/
│       ├── AddressCreationException.php
│       ├── BalanceQueryException.php
│       ├── DepositQueryException.php
│       ├── AddressValidationException.php
│       └── TransferException.php
├── tests/
│   └── WalletInterfaceTest.php
├── composer.json
└── README.md

```

---

📜 License
---------

[](#-license)

MIT License. See [LICENSE](LICENSE) file.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance62

Regular maintenance activity

Popularity7

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

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

Unknown

Total

1

Last Release

242d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/858f92afec0ff81e6888c9ae6f363b56ebf82e45a32d9e1b37341569c5d1b267?d=identicon)[tetthys](/maintainers/tetthys)

###  Code Quality

TestsPest

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/tetthys-wallet/health.svg)

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

###  Alternatives

[spatie/url

Parse, build and manipulate URL's

73914.3M97](/packages/spatie-url)[genesisweb/valet-linux-plus

Advanced local development experience for Linux.

18215.3k](/packages/genesisweb-valet-linux-plus)[ibrand/laravel-miniprogram-poster

iBrand's laravel miniprogram poster tool

7216.6k1](/packages/ibrand-laravel-miniprogram-poster)[tonicospinelli/class-generation

Library to create Php Class files

1120.6k1](/packages/tonicospinelli-class-generation)

PHPackages © 2026

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