xek-sdk
Version:
SDK for katana blockchain
55 lines (49 loc) • 904 B
Markdown
# XEK SDK
SDK for Katana Blockchain
## Installation
```
npm install xek-sdk
```
## Usage
```
const xekSdk = require('xek-sdk');
```
## API
### XEKSdk
```
createSendTx (from, to, amount, privateKey)
```
### Utils
```
validateAddress(address)
validateBlock(height)
validateTxHash(hash)
isInt(n)
isUint(n)
fromXek(xek)
fromXek(amount)
subtraction(a,b)
bigNumToString(val,base)
encodeUtf8(text)
decode(buf)
```
### API
```
getBlock (height)
getTransaction (txHash)
getAccountDetail (address)
getGetHistoryTransaction ({address, page, limit})
sendTransaction (tx)
```
### Wallet
```
generateWallet(walletName, password)
verifyTransaction(tx)
encryptWallet(privateKey, password)
decryptWallet(cipherText, password)
restoreWallet(mnemonic, walletName, password)
getAddressFromPublicKey(publicKey)
createTx(from, to, amount, sequence, CHAINID)
```
## License
[MIT](https://choosealicense.com/licenses/mit/)