harmony-one / sdk

Javascript SDK of Harmony protocol.
MIT License
92 stars 43 forks source link

Finished draft sdk documentation! update README #17

Closed Renewwen closed 4 years ago

Renewwen commented 4 years ago

Finished draft js-sdk documentation! put Document document creation process to the README.

Renewwen commented 4 years ago

fixed some description issues...

Renewwen commented 4 years ago

three things:

  1. beautify index page
  2. simplify the navigation bar
  3. Add @annotation to each page, prepare for next step work
Renewwen commented 4 years ago

Start to revamp and create examples for our js-SDK.

Specifically, I am starting from the Blockchain class in the harmony-core package. image

Renewwen commented 4 years ago

Position:

harmony-core/Blockchain

New Issues:

The param "returnObject" is not work in functions: getBlockbyHash and getBlockbyNumber

Has revamped:

hmy.blockchain.getBalance()
hmy.blockchain.getBlockNumber()
hmy.blockchain.getBlockByHash()
hmy.blockchain.getBlockByNumber()
hmy.blockchain.getBlockTransactionCountByHash()
hmy.blockchain.getBlockTransactionCountByNumber()
hmy.blockchain.getTransactionByBlockHashAndIndex()
hmy.blockchain.getTransactionByBlockNumberAndIndex()
hmy.blockchain.getTransactionByHash()
hmy.blockchain.getTransactionReceipt()
hmy.blockchain.getCxReceiptByHash()
hmy.blockchain.getCode()
hmy.blockchain.net_peerCount()
hmy.blockchain.net_version()
hmy.blockchain.getProtocolVersion()

Has hidden:

hmy.blockchain.constructor()
hmy.blockchain.setMessage()
hmy.blockchain.getRpcResult()
Renewwen commented 4 years ago

=== 2/7 ===

1. Index pages and hierarchy rebuild

image

2. APIs revamped

image

LeoHChen commented 4 years ago

Resolved the merge conflict in another PR. https://github.com/harmony-one/sdk/pull/20