Documentation ¶
Index ¶
- func FromBJJPubKeyCompToHezBJJAddress(pkComp babyjub.PublicKeyComp) (string, error)
- type Account
- type AccountAPIResponse
- type BJJWallet
- func CreateBJJWalletFromSignedMsg(signedMsg []byte) (bjjWallet BJJWallet, ethAccount accounts.Account, err error)
- func CreateBjjWalletFromHexPvtKey(hexPvtKey string) (bjjWallet BJJWallet, ethAccount accounts.Account, err error)
- func CreateBjjWalletFromMnemonic(mnemonic string) (bjjWallet BJJWallet, ethAccount accounts.Account, err error)
- type Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromBJJPubKeyCompToHezBJJAddress ¶
func FromBJJPubKeyCompToHezBJJAddress(pkComp babyjub.PublicKeyComp) (string, error)
FromBJJPubKeyCompToHezBJJAddress creates a Hermez BJJ account from a BJJ PubKey Compressed
Types ¶
type AccountAPIResponse ¶
type AccountAPIResponse struct { Accounts []Account `json:"accounts"` PendingItems int `json:"pendingItems"` }
func GetAccountInfo ¶
func GetAccountInfo(hezClient client.HermezClient, account string) (hezAccount AccountAPIResponse, err error)
GetAccountInfo connects to a hermez node and pull account data
type BJJWallet ¶
type BJJWallet struct { PrivateKey babyjub.PrivateKey PublicKey babyjub.PublicKeyComp HezBjjAddress string EthAccount accounts.Account HezEthAddress string }
BJJWallet BJJ Wallet
func CreateBJJWalletFromSignedMsg ¶ added in v0.0.4
func CreateBJJWalletFromSignedMsg(signedMsg []byte) (bjjWallet BJJWallet, ethAccount accounts.Account, err error)
CreateBJJWalletFromSignedMsg creates BJJWallet from signed hermez standard message to generate account
type Token ¶
type Token struct { USD float64 `json:"USD"` Decimals int `json:"decimals"` EthereumAddress string `json:"ethereumAddress"` EthereumBlockNum int `json:"ethereumBlockNum"` FiatUpdate time.Time `json:"fiatUpdate"` ID int `json:"id"` ItemID int `json:"itemId"` Name string `json:"name"` Symbol string `json:"symbol"` }
Click to show internal directories.
Click to hide internal directories.