EthFacade
public protocol EthFacade
The interface of the class that allows you to work with sidechain part of blockchain.
-
Create eth account address in ETH network
Remark
Default asset is
1.3.0
Declaration
Swift
func generateEthAddress(nameOrId: String, passwordOrWif: PassOrWif, assetForFee: String?, completion: @escaping Completion<Bool>, noticeHandler: NoticeHandler?)
Parameters
nameOrId
Name or id
passwordOrWif
Sender password or wif from account
assetForFee
Id of asset which is pay fee
completion
Callback in which the information will return whether the transaction was successful.
-
Get created ETH addresses
Declaration
Swift
func getEthAddress(nameOrId: String, completion: @escaping Completion<EthAddress?>)
Parameters
nameOrId
Name or id
completion
Callback in which the information will return EthAddress object (if it created) or error
-
Send ETH to Ethereum network to ethAddress
Declaration
Swift
func withdrawalEth(nameOrId: String, passwordOrWif: PassOrWif, toEthAddress: String, amount: UInt, assetForFee: String?, completion: @escaping Completion<Bool>, noticeHandler: NoticeHandler?)
Parameters
nameOrId
Name or id
passwordOrWif
Sender password or wif from account
toEthAddress
Receiver eth address
amount
Amount
completion
Callback in which the information will return whether the transaction was successful.
-
Returns all approved deposits, for the given account id or name.
Declaration
Swift
func getAccountDeposits(nameOrId: String, completion: @escaping Completion<[DepositEth]>)
Parameters
nameOrId
Name or id
completion
Callback in which return Deposits objects or error.
-
Returns all approved withdrawals, for the given account id or name.
Declaration
Swift
func getAccountWithdrawals(nameOrId: String, completion: @escaping Completion<[WithdrawalEth]>)
Parameters
nameOrId
Name or id
completion
Callback in which return Withdrawals objects or error.