Versions in this module Expand all Collapse all v1 v1.0.0 Jul 13, 2019 Changes in this version + const DefaultKeyStoreDirectory + const FullShardKeyLength + const KeyLength + const RecipientLength + var ErrGenIdentityKey = errors.New("ErrGenIdentityKey") + func DecodeKeyStoreJSON(keystoreJSONData EncryptedKeyJSON, password string) ([]byte, error) + func IsNeighbor(b1, b2 Branch, shardSize uint32) bool + func Uint32ToBytes(n uint32) []byte + type Account struct + ID uuid.UUID + Identity Identity + QKCAddress Address + func Load(path string, password string) (Account, error) + func NewAccountWithKey(key Key) (Account, error) + func NewAccountWithoutKey() (Account, error) + func (Self *Account) Address() string + func (Self *Account) Dump(password string, includeAddress bool, write bool, directory string) ([]byte, error) + func (Self *Account) MakeKeyStoreJSON(password string) (EncryptedKeyJSON, error) + func (Self *Account) PrivateKey() string + func (Self *Account) UUID() uuid.UUID + type Address struct + FullShardKey uint32 + Recipient Recipient + func CreatAddressFromBytes(bs []byte) (Address, error) + func CreatAddressFromIdentity(identity Identity, fullShardKey uint32) Address + func CreatEmptyAddress(fullShardKey uint32) Address + func CreatRandomAccountWithFullShardKey(fullShardKey uint32) (Address, error) + func CreatRandomAccountWithoutFullShardKey() (Address, error) + func NewAddress(recipient Recipient, fullShardKey uint32) Address + func (Self *Address) AddressInBranch(branch Branch) Address + func (Self *Address) AddressInShard(fullShardKey uint32) Address + func (Self *Address) GetFullShardID(shardSize uint32) (uint32, error) + func (Self *Address) IsEmpty() bool + func (Self *Address) UnmarshalJSON(data []byte) error + func (Self Address) MarshalJSON() (out []byte, err error) + func (Self Address) ToBytes() []byte + func (Self Address) ToHex() string + func (self *Address) GetChainID() uint32 + type Branch struct + Value uint32 + func CreatBranch(shardSize uint32, shardID uint32) (Branch, error) + func NewBranch(value uint32) Branch + func (Self *Branch) GetChainID() uint32 + func (Self *Branch) GetFullShardID() uint32 + func (Self *Branch) GetShardID() uint32 + func (Self *Branch) GetShardSize() uint32 + func (Self *Branch) IsInBranch(fullShardKey uint32) bool + type CoinbaseStats struct + Addr Recipient + Cnt uint32 + type CoinbaseStatses struct + CoinbaseStatsList []CoinbaseStats + type CryptoJSON struct + Cipher string + CipherParams cipherParamsJSON + CipherText string + KDF string + KDFParams map[string]interface{} + MAC string + Version int + type EncryptedKeyJSON struct + Address string + Crypto CryptoJSON + ID string + Version int + type Identity struct + func CreatIdentityFromKey(key Key) (Identity, error) + func CreatRandomIdentity() (Identity, error) + func NewIdentity(recipient Recipient, key Key) Identity + func (Self *Identity) GetDefaultFullShardKey() (uint32, error) + func (Self *Identity) GetKey() Key + func (Self *Identity) GetRecipient() Recipient + type Key [KeyLength]byte + func BytesToIdentityKey(b []byte) Key + func (a *Key) SetBytes(b []byte) + func (a Key) Bytes() []byte + type Recipient = common.Address + func BytesToIdentityRecipient(b []byte) Recipient + func PublicKeyToRecipient(p ecdsa.PublicKey) Recipient + type UnprefixedAddress Address + func (Self *UnprefixedAddress) UnmarshalText(dataWithout0x []byte) error + func (Self UnprefixedAddress) Address() Address + func (Self UnprefixedAddress) MarshalText() (out []byte, err error)