neb.js icon indicating copy to clipboard operation
neb.js copied to clipboard

Neb API arguments check

Open qywang2012 opened this issue 7 years ago • 3 comments

Nebulas currently have a usable js version to create the wallet address and send the transaction. Neb. js implements all the RPC interfaces of the Nebulas, but none of these interfaces currently add parameter validation.

We should add parameter validation to these interfaces and functions.

RPC interfaces:

Functions

  • Transaction: The parameters of the constructor need to be checked.
    • chainID should be valid(1 Mainnet, 100[1/2/...] Testnet)
    • from must be a valid address with a private key
    • nonce must be a number

qywang2012 avatar Apr 04 '18 06:04 qywang2012

Can some guys give help for the parameter check?

qywang2012 avatar Apr 04 '18 06:04 qywang2012

Issue status update: Help is still needed from community :)

ChengOrangeJu avatar May 03 '18 05:05 ChengOrangeJu

can we improve this with a typescript definition file?

catalsdevelop avatar May 28 '18 08:05 catalsdevelop