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
nameOrIdName or id
passwordOrWifSender password or wif from account
assetForFeeId of asset which is pay fee
completionCallback 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
nameOrIdName or id
completionCallback 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
nameOrIdName or id
passwordOrWifSender password or wif from account
toEthAddressReceiver eth address
amountAmount
completionCallback 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
nameOrIdName or id
completionCallback 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
nameOrIdName or id
completionCallback in which return Withdrawals objects or error.
View on GitHub
EthFacade Protocol Reference