Abis
class Abis
Manages Application Binary Interfaces (ABIs) associated with an EosioTransaction
instance.
-
The serialization provider instance used for ABI deserialization.
Declaration
Swift
public var serializationProvider: EosioSerializationProviderProtocol?
-
Validate an ABI.
Throws
If the ABI is not valid.Declaration
Swift
public func validateAbi(hex: String) throws
Parameters
hex
The ABI as a hex string.
-
Add an ABI encoded as base64.
Throws
If the base64 string is not valid or the ABI is not valid.Declaration
Swift
public func addAbi(name: EosioName, base64: String) throws
Parameters
name
The contract name.
hex
The ABI as a base64 string.
-
Add an ABI encoded as hex.
Throws
If the hex string is not valid or the ABI is not valid.Declaration
Swift
public func addAbi(name: EosioName, hex: String) throws
Parameters
name
The contract name.
hex
The ABI as a hex string.
-
Add an ABI as Data.
Throws
If the ABI is not valid.Declaration
Swift
public func addAbi(name: EosioName, data: Data) throws
Parameters
name
The contract name.
data
The ABI as Data.
-
Array of contract names missing an ABI.
Parameters
names
Contract names to look for.
Return Value
Contract names missing an ABI.
-
Get the hash of the ABI for a contract name.
Throws
If the ABI is not available or not valid.Declaration
Swift
public func hashAbi(name: EosioName) throws -> String
Parameters
name
The contract name.
Return Value
The sha256 hash of the ABI.
-
Hash of ABIs.
Declaration
Swift
public func hashAbis() -> [EosioName : String]
Return Value
Dictionary of the sha256 hashes of the ABIs, keyed by contract name.
-
Get the hex ABI for a contract name.
Throws
If the ABI is not available or not valid.Declaration
Swift
public func hexAbi(name: EosioName) throws -> String
Parameters
name
The contract name.
Return Value
The ABI as hex.
-
The ABIs encoded as hex.
Declaration
Swift
public func hexAbis() -> [EosioName : String]
Return Value
Dictionary of the ABIs encoded as hex, keyed by contract name.
-
The ABIs as json.
Declaration
Swift
public func jsonAbis() throws -> [EosioName : String]
Return Value
Dictionary of the ABIs as json, keyed by contract name.
-
Get the json ABI for a contract name.
Throws
If the ABI is not available or not valid.Declaration
Swift
public func jsonAbi(name: EosioName) throws -> String
Parameters
name
The contract name.
Return Value
The ABI as json.