Documentation ¶
Index ¶
- func GenerateBase58PrvKey(a Account) (string, error)
- func GenerateHexPrvKey(a Account) (string, error)
- type Account
- func AccountFromBase58Key(key string) (Account, error)
- func AccountFromBytes(b []byte) (Account, error)
- func AccountFromHexKey(key string) (Account, error)
- func AccountFromKeygenFile(file string) (Account, error)
- func AccountFromMnemonic(mnemonic string, args ...interface{}) (Account, error)
- func AccountFromSeed(seed []byte) (Account, error)
- func GenerateAccount() (Account, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateBase58PrvKey ¶
GenerateBase58PrvKey return base58 private key
func GenerateHexPrvKey ¶
GenerateHexPrvKey return hex private key
Types ¶
type Account ¶
type Account struct { Address common.Address PrivateKey ed25519.PrivateKey }
func AccountFromBase58Key ¶
AccountFromBase58Key generate an account by base58 private key
func AccountFromBytes ¶
AccountFromBytes generate an account by bytes
func AccountFromHexKey ¶
AccountFromHexKey generate an account by hex private key
func AccountFromKeygenFile ¶
AccountFromKeygenFile generate an account by keygen file
func AccountFromMnemonic ¶
AccountFromMnemonic generate an account by mnemonic @params [args]: password--> string @params [args]: path --> bool[true] (default: m/44'/501'/0'/0') @params [args]: path --> string (format: m/44'/501'/0'/0')
func AccountFromSeed ¶
AccountFromSeed generate an account by seed
func GenerateAccount ¶
GenerateAccount Random a new account from ed25519
Click to show internal directories.
Click to hide internal directories.