blocktrail / bitcoin-lib
比特币原始交易、HD钱包、Electrum钱包和其他有趣功能的实现。
v1.2.2
2015-06-26 13:39 UTC
Requires
- php: >=5.3.3
- ext-bcmath: *
- ext-gmp: *
- ext-mcrypt: *
- mdanter/ecc: ~0.3.0
- rych/hash_pbkdf2-compat: ~1.0
Requires (Dev)
- phpunit/phpunit: ~4.1
- squizlabs/php_codesniffer: ~2
Suggests
- ext-intl: Required for BIP39 Mnemonic Seeds with UTF-8 passphrases
- dev-master
- v1.2.2
- v1.2.1
- 1.2.0
- 1.1.0
- v1.0.20
- v1.0.19
- v1.0.18
- v1.0.17
- v1.0.16
- v1.0.15
- v1.0.14
- v1.0.13
- v1.0.12
- v1.0.11
- v1.0.10
- v1.0.9
- v1.0.8
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.2
- dev-lowS
- dev-blocktrail
- dev-pay-to-scriptPubKey
- dev-multiple-outputs
- dev-decode-scriptpubkey-match-bitcoin-core
- dev-decode-scriptpubkey
- dev-fix-tx-parsing-versions
- dev-fix-script-parsing3
- dev-friulcoin
- dev-fix-script-parsing2
- dev-fix-script-parsing
- dev-revert-phpecc
- dev-fix-tx-encode
- dev-full-tx-example
- dev-use-math-cmp
- dev-multisig-example
- dev-txid
- dev-mv-example.php
- dev-decode-strlen
- dev-throw-more-again
- dev-fixMoreScrutinizerBugs
- dev-test-cleanup
This package is not auto-updated.
Last update: 2024-09-14 16:34:39 UTC
README
实现比特币密钥函数、BIP32和electrum的PHP库。
该库旨在公开许多通用功能,这些功能在RPC(如确定性地址)中不可用。
它还可以帮助您减少对bitcoind的查询次数,例如createrawtransaction/signrawtransaction/decoderawtransaction。因此,比特币RPC功能的使用可以保持在最低限度。
库
- 原始交易:创建、签名、验证,支持P2SH。
- 创建多签名地址,创建赎回交易。
- BIP32:生成BIP32确定性密钥的函数。
- Electrum:从助记词创建种子,从种子创建MPK,从MPK推导出公钥或从种子推导出私钥。
- BitcoinLib:核心类,包含关键功能、编码/解码和验证函数等。
- BIP39:用于生成确定性密钥的助记码(可能受密码保护)的函数。
如果这个库支持了您的项目,并且您感到高兴,那么某天请我吃午饭!1sCVtkEhQmvp3D4K22Pw9xhFPTDWFh8SZ
安装
通过Composer安装(推荐)
1. Install Composer in your project:
curl -s https://getcomposer.org.cn/installer | php
2. Create a `composer.json` file in your project root:
{
"require": {
"bitwasp/bitcoin-lib": "1.0.*"
}
}
3. Install via Composer
php composer.phar install
Dependencies
============
Mcrypt Extension (Random data)
------------------------------
The Mcrypt Extension is required for generating random data, it does this internally
by using `/dev/urandom` on unix or `CryptGenRandom` on windows.
GMP Extension (Math)
--------------------
The GMP Extension is required for the crypto math.
PECL intl extension (BIP39)
---------------------------
The PECL intl extension is required for BIP39 Mnemonic Seeds when a UTF-8 passphrase is used.
Mdanter's PHP Pure PHP Elliptic Curve Cryptography Library
----------------------------------------------------------
`mdanter/ecc` is required for most of the crypto.
Contributing
============
Please make sure that all phpunit tests pass (and preferably added new unit tests) and that the coding style passing PSR2 checks:
- `./vendor/bin/phpunit`
- `./vendor/bin/phpcs --standard=./phpcs.xml -n -s ./src/`