Skip to content

Latest commit

 

History

History
86 lines (61 loc) · 1.46 KB

File metadata and controls

86 lines (61 loc) · 1.46 KB

API development

Schema based API

In order to keep this API up do date it is build schema based. (resources/zilliqa-schema.json)

Zilliqa JsonRPC Methods are on zilliqa-schema->methods. Implemented in Zilliqa class. Check out the Web3Interface.

To regenerate src/Web3Methods.php and src/Web3Interface.php run

composer run-script generate-methods

Complex Data types are generated zilliqa-schema->objects.

Currently these are:

TransactionCreated
Transaction
Receipt
Exception
Transition
Message
RecentTransactions
TxBlockListings
TxBlockListing
MinerInfo
Shard
TxBlock
TxBlockBody
MicroBlockInfo
TxBlockHeader
DsBlock
DsBlockHeader
BlockchainInfo
ShardingStructure
DSBlockListings
DSBlockListing
Balance

To regenerate run

composer run-script generate-complex-datatypes

Testing

composer install
vendor/bin/phpunit

See phpunit.xml and tests/

Static tests

Based on ZilliqaStaticTest.php

vendor/bin/phpunit --testsuite ZilliqaStatic

or a single test class

vendor/bin/phpunit --filter {FunctionSignatureTest}

API doc generation

The API documentation is auto-generated by doxygen.

doxygen Doxyfile

There is an online version of this API documentation at http://zilliqa-php.org

Doxygen script does some preprocessing which requires GNU-sed on OSX brew install gnu-sed --with-default-names See: https://stackoverflow.com/a/27834828/308533