EosioAbiProvider
public class EosioAbiProvider : EosioAbiProviderProtocol
Default implementation of the EosioAbiProviderProtocol. For fetching and caching ABIs.
-
Initialize the ABI Provider.
Declaration
Swift
public init(rpcProvider: EosioRpcProviderProtocol)Parameters
rpcProviderThe RPC provider, which this ABI provider will use to fetch ABIs.
-
Get all ABIs for the given accounts, keyed by account name.
Declaration
Swift
public func getAbis(chainId: String, accounts: [EosioName], completion: @escaping (EosioResult<[EosioName : Data], EosioError>) -> Void)Parameters
chainIdThe chain ID.
accountsAn array of account names as
EosioNames.completionCalls the completion with an
EosioResultcontaining 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.failuretype will be returned. -
Get the ABI as
Datafor the specified account name.Declaration
Swift
public func getAbi(chainId: String, account: EosioName, completion: @escaping (EosioResult<Data, EosioError>) -> Void)Parameters
chainIdThe chain ID.
accountThe account name as an
EosioName.completionCalls the completion with an
EosioResultcontaining the ABI as Data. AnEosioResult.failuretype will be returned if the specified ABI could not be found or decoded properly.
View on GitHub
EosioAbiProvider Class Reference