eth

package
v0.0.0-...-da2935b Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BcryptSecurityParameter = 12
)

Variables

This section is empty.

Functions

func CreateAccount

func CreateAccount(rootDir, name, password, mnemonic string) string

CreateAccount follow the cosmos hd implementation

func FetchtoSign

func FetchtoSign(rootDir, name, password string) (privKey *ecdsa.PrivateKey, err error)

FetchtoSign Fetch private key for signning

func GetAccount

func GetAccount(node, addr string) string

func GetAccountERC20

func GetAccountERC20(node, addr, tokenAddr string) string

func GetNonceAt

func GetNonceAt(rootDir, node, fromName, password string) int64

GetNonceAt return the nonce at latest block under the sepcific account.

func GetPendingNonceAt

func GetPendingNonceAt(rootDir, node, fromName, password string) int64

GetPendingNonceAt Deprecated in cshare for mobile! PendingNonceAt returns the account nonce of the given account in the pending state. This is the nonce that should be used for the next transaction.

func ListLocalAccount

func ListLocalAccount(rootDir string) string

ListLocalAccount List local account

func RecoverAccount

func RecoverAccount(rootDir, name, password, mnemonic string) string

func SigVerify

func SigVerify(rootDir, name, password string, data2sign []byte)

SigVerify verify the signature

func SpeedTransferERC20

func SpeedTransferERC20(rootDir, node, fromName, password, toAddr, tokenAddr, tokenValue, gasPrice string, GasLimit, pendingNonce int64) string

func SpeedTransferETH

func SpeedTransferETH(rootDir, node, fromName, password, toAddr, gasPrice, amount string, GasLimit, pendingNonce int64) string

SpeedTransferETH Speedup Tnx with Pending nonce

func TransferERC20

func TransferERC20(rootDir, node, fromName, password, toAddr, tokenAddr, tokenValue, gasPrice string, GasLimit int64) string

TransferERC20 Transfer with ERC20 token

func TransferETH

func TransferETH(rootDir, node, fromName, password, toAddr, gasPrice, amount string, GasLimit int64) string

func UnarmorDecryptPrivKey

func UnarmorDecryptPrivKey(armorStr string, passphrase string) (*ecdsa.PrivateKey, error)

UnarmorDecryptPrivKey Unarmor and decrypt the private key.

Types

type KeyOutput

type KeyOutput struct {
	Name     string `json:"name"`
	Type     string `json:"type"`
	Address  string `json:"address"`
	PubKey   string `json:"pubkey"`
	Mnemonic string `json:"mnemonic,omitempty"`
	Denom    string `json:"denom"`
}

type LocalInfo

type LocalInfo struct {
	Name         string `json:"name"`
	PubKey       string `json:"pubkey"`
	PrivKeyArmor string `json:"privkey"`
	Address      string `json:"address"`
}

LocalInfo is the public information about a locally stored key

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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