Client
Contract user can send the payload for private execution through the send() function of the client and listen for event from the callback() function on the client contract.
Client Interface:
interface IClient {
/// @param _userAddress User Address
/// @param _sourceNetwork Source network of msg
/// @param _routingInfo Routing info for computation
/// @param _payloadHash Payload hash
/// @param _info ExecutionInfo struct
function send(
address _userAddress,
string memory _sourceNetwork,
string memory _routingInfo,
bytes32 _payloadHash,
ExecutionInfo memory _info
) external;
/// @param _taskId Task Id of the computation
/// @param _result Privately computed result
function callback(uint256 _taskId, bytes memory _result) external;
}Data Structs:
For sending a transaction for computation you just have to do a send() call on the client like the below given example:
Last updated