Download the PHP package gmajor/substrate-codec-php without Composer
On this page you can find all versions of the php package gmajor/substrate-codec-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package substrate-codec-php
php-scale-codec
PHP implementation of the SCALE (Simple Concatenated Aggregate Little-Endian) codec used in Substrate-based blockchains like Polkadot, Kusama, and Substrate-native chains.
Features
- ✅ Full SCALE codec implementation
- ✅ All primitive types (U8-U128, I8-I128, Bool, String)
- ✅ Compact integer encoding
- ✅ Compound types (Vec, Option, Tuple, Struct, Enum)
- ✅ Metadata v12-v15 support
- ✅ Extrinsic building and signing
- ✅ Event parsing
- ✅ polkadot.js compatible
Installation
Requirements
- PHP 8.2+
- ext-gmp (for large integer handling)
- ext-json
- ext-sodium
Quick Start
Basic Encoding/Decoding
Compact Integers
Boolean
String/Text
Vectors
Options
Structs
Advanced Usage
Metadata Parsing
Extrinsic Building
Working with Large Integers
U64 and U128 return strings for values exceeding PHP_INT_MAX:
Documentation
- API Reference - Complete API documentation
- Types Reference - Detailed type documentation
- Static Analysis - PHPStan configuration
Testing
Compatibility
This library maintains compatibility with polkadot.js SCALE codec. Run compatibility tests:
Benchmarks
Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Run tests:
make test - Run static analysis:
make stan - Run code style:
make sniff - Commit changes:
git commit -am "feat: my feature" - Push and create a PR
License
MIT License. See LICENSE for details.
Related
All versions of substrate-codec-php with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.2
ext-gmp Version *
ext-json Version *
ext-sodium Version *
ext-gmp Version *
ext-json Version *
ext-sodium Version *
The package gmajor/substrate-codec-php contains the following files
Loading the files please wait ...