Documentation ¶
Index ¶
- func BjjToString(bjj babyjub.PublicKeyComp) string
- func IdxToHez(idx hezcommon.Idx, tokenSymbol string) string
- type APITx
- func ExecuteL2Transaction(hezClient client.HermezClient, apiTx APITx) (apiTxReturn APITx, serverResponse string, err error)
- func L2Transfer(hezClient client.HermezClient, senderBjjWallet account.BJJWallet, ...) (apiTxReturn APITx, serverResponse string, err error)
- func MarshalTransaction(itemToTransfer string, senderAcctDetails account.AccountAPIResponse, ...) (apiTxRequest APITx, err error)
- func NewHermezAPITxRequest(poolTx *hezcommon.PoolL2Tx, token hezcommon.Token) APITx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BjjToString ¶
func BjjToString(bjj babyjub.PublicKeyComp) string
BjjToString convert the BJJ public key to string
Types ¶
type APITx ¶
type APITx struct { TxID hezcommon.TxID `json:"id" binding:"required"` Type string `json:"type"` TokenID uint32 `json:"tokenId"` FromIdx string `json:"fromAccountIndex" binding:"required"` ToIdx string `json:"toAccountIndex"` ToEthAddr string `json:"toHezEthereumAddress"` ToBJJ string `json:"toBjj"` Amount string `json:"amount" binding:"required"` Fee uint64 `json:"fee"` Nonce uint64 `json:"nonce"` Signature string `json:"signature"` }
APITx is a representation of a transaction API request.
func ExecuteL2Transaction ¶
func ExecuteL2Transaction(hezClient client.HermezClient, apiTx APITx) (apiTxReturn APITx, serverResponse string, err error)
ExecuteL2Transaction submits L2 transaction to the actual coordinator endpoint
func L2Transfer ¶ added in v0.0.3
func L2Transfer(hezClient client.HermezClient, senderBjjWallet account.BJJWallet, receipientAddress string, tokenSymbolToTransfer string, amount *big.Int, feeRangeSelectedID int, ethereumChainID int) (apiTxReturn APITx, serverResponse string, err error)
L2Transfer perform token or ETH transfer within Hermez network (we say L2 or Layer2)
func MarshalTransaction ¶
func MarshalTransaction(itemToTransfer string, senderAcctDetails account.AccountAPIResponse, receipientAcctDetails account.AccountAPIResponse, senderBjjWallet account.BJJWallet, amount *big.Int, feeSelector int, ethereumChainID int) (apiTxRequest APITx, err error)
MarshalTransaction marshal transaction information into a Hermez transaction API request
Click to show internal directories.
Click to hide internal directories.