Download the PHP package yuanbenio/universe-php-sdk without Composer
On this page you can find all versions of the php package yuanbenio/universe-php-sdk. 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 universe-php-sdk
YuanBenLian SDK of PHP (v1)
- YuanBenLian API Documentation https://yuanbenlian.com/documents/readme
Translations
- 中文文档
Rely
- secp256k1 : https://github.com/bitcoin-core/secp256k1
- ext-secp256k1: https://github.com/Bit-Wasp/secp256k1-php
- ext-keccak: https://github.com/EricYChu/php-keccak-hash
Attention
ECDH api is destroyed, check the commit of the latest secp256k1 before the merge of 95e99f196fd08a8b2c236ab99d7e7fec8f6dc78f
The dockerfile as a reference
- Dockerfile
Install
from github
- git clone https://github.com/yuanbenio/universe-php-sdk.git
- cd universe-php-sdk
- composer install
from composer
- composer require yuanbenio/universe-php-sdk
YuanBenLian API return code
code | describe |
---|---|
ok | Success |
3001 | Invalid parameter |
3002 | Empty parameter |
3003 | Record does not exist |
3004 | Record already exists |
3005 | Permission denied: please register the public key first |
3006 | Permission denied: please contract Yuanben chain support |
3007 | Incorrect data |
3009 | Data storage fail |
3010 | Data not on YuanBen chain |
3011 | block information is empty |
3012 | Query fail |
3020 | Signature verification fail |
3023 | Parameter verification fail |
3021 | Invalid public key |
3022 | License's parameters are empty |
4001 | Error connecting to redis server |
4002 | Error connecting to the first-level node |
4003 | Broadcast transaction fail |
4004 | ABCI query fail |
4005 | Redis handling error |
5000 | Unknown error |
Data flow diagram
API Document
TestNet address: https://testnet.yuanbenlian.com
Metadata Introduction
name | type | must | comment | source |
---|---|---|---|---|
type | string | Y | eg:image,article,audio,video,custom,private | user-defined |
language | string | Y | 'zh-CN', | default:zh-CN,user-defined |
title | string | N | title | user-defined |
signature | string | Y | sign by secp256k1 | generate by system |
abstract | string | N | Content summary | default:content[:200],user-defined |
category | string | N | eg:"news" | user-defined,if there is content, the system will add five more |
dna | string | Y | metadata dna | generate by system |
parent_dna | string | N | - | user-defined,link an other metadata |
block_hash | string | Y | block_hash on YuanBen chain | user-defined |
block_height | string | Y | block_hash corresponding block_height | user-defined |
created | integer | Y | timestamp, eg:1506302092 | generate by system |
content_hash | string | Y | Keccak256(content) | default:Keccak256(content),user-defined |
extra | TreeMap<String, Object> | N | user-defined content | user-defined |
license | Metadata.License | Y | user-defined | |
license.type | string | Y | the type of license | user-defined |
license.parameters | TreeMap<String, Object> | N | the parameters of license | user-defined |
source | string | N | source link. | user-defined |
data | TreeMap<String, Object> | N | extension data of the type | user-defined |
Quick Start
- Note: If you want to use the YuanBenLian OPENAPI, please contact the YuanBenLian owner to register your public key to the YuanBenLian.
- Note: the API configuration needs to be initialized before using the API method
- Note: If there is an integer used in metadata, please convert to string
Example
create private key
Authorized secondary account
publish article
All versions of universe-php-sdk with dependencies
PHP Build Version
Package Version
Requires
php-64bit Version
>=7.0
ext-gmp Version *
ext-secp256k1 Version ^0.1.0
ext-keccak Version ~0.2
guzzlehttp/guzzle Version ~6.0
bitwasp/buffertools Version ^0.5.0
ext-json Version *
ext-gmp Version *
ext-secp256k1 Version ^0.1.0
ext-keccak Version ~0.2
guzzlehttp/guzzle Version ~6.0
bitwasp/buffertools Version ^0.5.0
ext-json Version *
The package yuanbenio/universe-php-sdk contains the following files
Loading the files please wait ....