helium-sdk
Helium SDK is used to interact with the Helium blockchain, it contains various functions can be used to web3 wallet.
Installation
go get
To obtain the latest version, simply require the project using :
go get -u github.com/okx/go-wallet-sdk/coins/helium
Usage
New Address
seedHex := "1790962db820729606cd7b255ace1ac5ebb129ac8e9b2d8534d022194ab25b37"
addr = NewAddress(seedHex)
Transfer
to = "13ECKNq99BqN3dHhqXRYsdUHAPCEnfFBJsYVh5aqVSsYB35M3wS"
from = "13Lqwnbh427csevUveZF9n3ra1LnVYQug31RFeENaYgXuK2s8UC"
amount uint64 = 120
fee uint64 = 35000
nonce uint64 = 2
private = "f5e029dd6cca805047ca64e131c0a6cf3bf45c7ad03a7a1e7681963c9b1f3043"
tokenType = "hnt"
isMax = true
signTx, err := Sign(private, from, to, amount, fee, nonce, tokenType, isMax)
if err != nil {
// todo
}
License
Most packages or folder are MIT licensed, see package or folder for the respective license.