Documentation ¶
Index ¶
Constants ¶
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AccountJson ¶
type AccountJson struct { Acct *EthAccount `json:"acct"` Cj *keystore.CryptoJSON `json:"cj"` }
func EthUnmarshal ¶
func EthUnmarshal(data []byte) (*AccountJson, error)
type Address ¶
type Address [Ed25519AddrLen]byte
func (Address) ID ¶
func (a Address) ID() BeatleAddress
type BTLAccount ¶
type BTLAccount struct { PrivKey ed25519.PrivateKey `json:"-"` PubKey ed25519.PublicKey `json:"-"` ID BeatleAddress `json:"id"` }
func NewAccount ¶
func NewAccount() (acct *BTLAccount, err error)
type BeatleAddress ¶
type BeatleAddress string
func PubKey2ID ¶
func PubKey2ID(pk ed25519.PublicKey) BeatleAddress
func (BeatleAddress) Address ¶
func (ba BeatleAddress) Address() (addr Address, prefix string, ver int, err error)
func (BeatleAddress) DerivePubKey ¶
func (ba BeatleAddress) DerivePubKey() ed25519.PublicKey
func (BeatleAddress) IsValid ¶
func (ba BeatleAddress) IsValid() bool
func (BeatleAddress) String ¶
func (ba BeatleAddress) String() string
type CryptBTLJson ¶
type CryptBTLJson struct { ID BeatleAddress `json:"id"` CipherTxt string `json:"cipher_txt"` }
func BeatlesUnmarshal ¶
func BeatlesUnmarshal(data []byte) (*CryptBTLJson, error)
type EthAccount ¶
type EthAccount struct { PrivKey *ecdsa.PrivateKey `json:"-"` PubKey *ecdsa.PublicKey `json:"-"` EAddr common.Address `json:"-"` SAddr string `json:"s_addr"` }
func NewEthAccount ¶
func NewEthAccount() (acct *EthAccount, err error)
func (*EthAccount) ImportFromMetaMask ¶
func (acct *EthAccount) ImportFromMetaMask(hexString string) (err error)
type TrxAccount ¶
type TrxAccount struct { }
Click to show internal directories.
Click to hide internal directories.