Versions in this module Expand all Collapse all v0 v0.0.1 Dec 23, 2020 Changes in this version + const AddressBytesLength + const ContractAccountType + const NormalAccountType + const P2SHAccountType + var PrefixTable = [...]string + type Account interface + GetAddr func() string + GetAddrBytes func() []byte + GetChainId func() uint16 + GetPrefix func() string + GetPriKey func() []byte + GetPriKeyHex func() string + GetPubKey func() []byte + GetPubKeyHex func() string + GetType func() uint8 + type AccountSDK interface + CreateAccount func() (Account, error) + CreateKeyStore func(account Account, password string) (*KeyStore, error) + CreateKeyStoreByPrikey func(prikey []byte, password string) (*KeyStore, error) + GetAccountByEckey func(ec *eckey.EcKey) (Account, error) + GetAddressByPubBytes func(bytes []byte, accountType uint8) []byte + GetBytesAddress func(address string) ([]byte, error) + GetStringAddress func(bytes []byte) string + ImportAccount func(prikey []byte) (Account, error) + ImportFromKeyStore func(keyStoreJson string, password string) (Account, error) + Sign func(account Account, data []byte) ([]byte, error) + ValidAddress func(address string) error + Verify func(pubkey []byte, data []byte, signResult []byte) bool + func GetAccountSDK(chainId uint16, prefix string) AccountSDK + type KeyStore struct + Address string + EncryptedPrivateKey string + Pubkey string + type NerveAccount struct + func (a *NerveAccount) GetAddr() string + func (a *NerveAccount) GetAddrBytes() []byte + func (a *NerveAccount) GetChainId() uint16 + func (a *NerveAccount) GetPrefix() string + func (a *NerveAccount) GetPriKey() []byte + func (a *NerveAccount) GetPriKeyHex() string + func (a *NerveAccount) GetPubKey() []byte + func (a *NerveAccount) GetPubKeyHex() string + func (a *NerveAccount) GetType() uint8 + type NerveAccountSDK struct + func (sdk *NerveAccountSDK) CreateAccount() (Account, error) + func (sdk *NerveAccountSDK) CreateKeyStore(account Account, password string) (*KeyStore, error) + func (sdk *NerveAccountSDK) CreateKeyStoreByPrikey(prikey []byte, password string) (*KeyStore, error) + func (sdk *NerveAccountSDK) GetAccountByEckey(ec *eckey.EcKey) (Account, error) + func (sdk *NerveAccountSDK) GetAddressByPubBytes(bytes []byte, accountType uint8) []byte + func (sdk *NerveAccountSDK) GetBytesAddress(address string) ([]byte, error) + func (sdk *NerveAccountSDK) GetStringAddress(bytes []byte) string + func (sdk *NerveAccountSDK) ImportAccount(prikey []byte) (Account, error) + func (sdk *NerveAccountSDK) ImportFromKeyStore(keyStoreJson string, password string) (account Account, err error) + func (sdk *NerveAccountSDK) PasswordCheck(password string) bool + func (sdk *NerveAccountSDK) Sign(account Account, data []byte) ([]byte, error) + func (sdk *NerveAccountSDK) ValidAddress(address string) error + func (sdk *NerveAccountSDK) Verify(pubkey []byte, data []byte, signResult []byte) bool