EosioAbiProviderProtocol
public protocol EosioAbiProviderProtocol
Protocol for fetching and caching ABIs.
-
Get all ABIs for the given accounts, keyed by account name.
Declaration
Swift
func getAbis(chainId: String, accounts: [EosioName], completion: @escaping (EosioResult<[EosioName : Data], EosioError>) -> Void)
Parameters
chainId
The chain ID.
accounts
An array of account names as
EosioName
s.completion
Calls the completion with an
EosioResult
containing a map of ABIs as Data for all of the given accounts, keyed by the account name. An ABI for each account must be returned, otherwise anEosioResult.failure
type will be returned. -
Get the ABI as
Data
for the specified account name.Declaration
Swift
func getAbi(chainId: String, account: EosioName, completion: @escaping (EosioResult<Data, EosioError>) -> Void)
Parameters
chainId
The chain ID.
account
The account name as an
EosioName
.completion
Calls the completion with an
EosioResult
containing the ABI as Data. AnEosioResult.failure
type will be returned if the specified ABI could not be found or decoded properly.