InformationFacade
public protocol InformationFacade
The interface of the class that provides information about a user’s account
-
Get the objects corresponding to the provided IDs.
Declaration
Swift
func getObjects<T>(type: T.Type, objectsIds: [String], completion: @escaping Completion<[T]>) where T: DecodableParameters
objectsIdsIDs of the objects to retrieve
completionCallback which returns current block data or error
-
Retrieves full signed block
Declaration
Swift
func getBlock(blockNumber: Int, completion: @escaping Completion<Block>)Parameters
blockNumberHeight of the block to be returned
completionCallback which returns Block or error
-
Register new account in blockchain
Declaration
Swift
func registerAccount(name: String, password: String, completion: @escaping Completion<Bool>, noticeHandler: NoticeHandler?)Parameters
nameThe name of new account
passwordThe password wich will be used for create private keys
completionCallback which returns bool result or error
noticeHandlerCallback which returns wher account has been created
-
Account function
Declaration
Swift
func getAccount(nameOrID: String, completion: @escaping Completion<Account>)Parameters
nameOrIDName or id of the account
completionCallback in which the information will return account or error.
-
The function to check if there is an account
Declaration
Swift
func isAccountReserved(nameOrID: String, completion: @escaping Completion<Bool>)Parameters
nameOrIDName or id of the account
completionCallback which returns true if there is such account, false if there is no or error
-
Account balance function
Declaration
Swift
func getBalance(nameOrID: String, asset: String?, completion: @escaping Completion<[AccountBalance]>)Parameters
nameOrIDName or id of the account
assetId of asset
completionCallback which returns balances for a given asset or error
-
Function for getting account history
Note
To get the entire history, you can specify the initial id1.11.0
in the start ID and stop ID and then choose your limitDeclaration
Swift
func getAccountHistroy(nameOrID: String, startId: String, stopId: String, limit: Int, completion: @escaping Completion<[HistoryItem]>)Parameters
nameOrIDName or id of the account
startIdID of the starting element of history
stopIdID of the last element of the story
limitNumber of items in history
completionCallback which returns history for account or error
-
Retrieve the current global property object.
Declaration
Swift
func getGlobalProperties(completion: @escaping Completion<GlobalProperties>)Parameters
completionCallback which returns GlobalProperties or error
View on GitHub
InformationFacade Protocol Reference