Download the PHP package lineage/php without Composer
On this page you can find all versions of the php package lineage/php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package php
Short Description Composer package for the Lineage blockchain
License MIT
Informations about the package php
Lineage PHP SDK
PHP SDK for the Lineage /v1 REST API: a keyless read client and a key-holding wallet that signs transactions locally.
Installation
Published on Packagist as lineage/php.
Requires PHP >= 8.4, the sodium extension, and Composer.
Configuration
Lineage\Client talks to two hosts:
mempoolHost– accepts writes (items, payments) and answers live queries (balances, supply, transaction status).storageHost– serves stored chain history (blocks, blockchain entries). Can be the same host asmempoolHost, or a dedicated read/storage node.
An optional apiKey is sent as the x-api-key header on every request. An
optional valenceHost is the plaintext mailbox relay that 2-way payments
(make2WayPayment/fetchPending2WayPayment/accept2WayPayment/reject2WayPayment)
exchange DRUID trade offers through; it's only required if you use those methods.
Quickstart
Item metadata
On-chain, an item keeps only its genesis_hash after transfer — its metadata is
dropped on spend. fetchBalance transparently restores it: each item UTXO in the
returned breakdown is enriched with its genesis metadata, resolved from the
storage host (GET /v1/items/{genesis_hash}) and cached per client instance.
Enrichment is best-effort: if the storage host can't resolve an item, that item's
metadata stays null and the balance call still succeeds.
Two-way (DRUID) payments
DRUID-based dual double-entry trades: two parties each pay an asset to the other,
atomically correlated by a shared DRUID, and coordinated out-of-band through a
plaintext valence mailbox host (valenceHost, see Configuration above).
Two-way trades interoperate across all the SDKs and settle atomically through the mempool's DRUID pool, so either party can be on any SDK.
Wire compatibility
Keys and signatures are byte-for-byte compatible across every Lineage SDK — a wallet (mnemonic) created in one derives the same addresses and produces the same signatures in all of them. sdk-js is the reference implementation; BIP39/BIP32 derivation, SHA3-256 addresses, ed25519 signing, and the /v1 transaction serialization (field order is load-bearing — you sign exactly what you submit) all match it exactly.
Testing
The suite asserts against golden test vectors (tests/fixtures/*.json) generated from
sdk-js's own crypto primitives, not a reimplementation of the same logic.
scripts/e2e.php and scripts/e2e-2way.php exercise live production hosts (plus
valence.lineage.to for the latter); both require LINEAGE_E2E_WRITE=1 to write, and
both are excluded from the default CI workflow (.github/workflows/ci.yml).
Lineage SDKs
License
MIT — see LICENSE.
All versions of php with dependencies
ext-sodium Version *
furqansiddiqui/bip39-mnemonic-php Version ^0.1.7
guzzlehttp/guzzle Version ^7.8 || ^8.0
simplito/elliptic-php Version ^1.0