You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.
// Generate L2 txs easy mode (fee and nonce calculated on behalf of the user)funcNewTransferToIdx(from, to, amount) common.PoolL2TxfuncNewTransferToEthAddr(from, to, amount) common.PoolL2TxfuncNewTransferToBJJ(from, to, amount) common.PoolL2TxfuncNewExit(from, to, amount) common.PoolL2Tx// Generate L2 txs pro mode (fee and nonce set manually by the user)funcNewTransferToIdxAdvanced(from, to, amount, nonce, fee) common.PoolL2TxfuncNewTransferToEthAddrAdvanced(from, to, amount, nonce, fee) common.PoolL2TxfuncNewTransferToBJJAdvanced(from, to, amount, nonce, fee) common.PoolL2TxfuncNewExitAdvanced(from, to, amount, nonce, fee) common.PoolL2Tx
Method for requesting tx:
funcRequestTx(tx, requestedTx) error
Method for signing:
funcSign(tx, chainID, privateKey) error
Create an atomic group (set the RqOffset, and AtomicGroupID....):
funcNewAtomicGroup(txs) common.AtomicGroup
Note that all this methods are extremly easy to implement except NewAtomicGroup that it's a bit tricky due to protocol limitations on the RqOffset. Implementing this would result in a cleaner SDK where:
Wallet and transactions are separated
Atomic and non atomic txs are used in the same way
Service providers (for swaps) and users have clear paths for their use cases
Use hermez-node structs as much as possible to avoid confusion with similar structs and easier to maintain
The text was updated successfully, but these errors were encountered:
Have methods for creating transactions:
Method for requesting tx:
Method for signing:
Create an atomic group (set the RqOffset, and AtomicGroupID....):
Note that all this methods are extremly easy to implement except
NewAtomicGroup
that it's a bit tricky due to protocol limitations on the RqOffset. Implementing this would result in a cleaner SDK where:hermez-node
structs as much as possible to avoid confusion with similar structs and easier to maintainThe text was updated successfully, but these errors were encountered: