helium

package module
v0.0.0-...-61460eb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 3 Imported by: 0

README

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.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAddress

func NewAddress(private string) string

func Sign

func Sign(private string, from, to string, amount, fee, nonce uint64, tokenType string, isMax bool) (string, error)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL