Functions

/// Generate a Unique Hash for Event
function actionHash(DataTypes.SVO memory svo) external pure returns (bytes32);

/// Register New Action
// function actionAdd(DataTypes.SVO memory svo) external returns (bytes32);
function actionAdd(DataTypes.SVO memory svo, string memory uri) external returns (bytes32);

/// Register New Actions in a Batch
function actionAddBatch(DataTypes.SVO[] memory svos, string[] memory uris) external returns (bytes32);

/// Update URI for Action
function actionSetURI(bytes32 guid, string memory uri) external;

/// Get Action by GUID
function actionGet(bytes32 guid) external view returns (DataTypes.SVO memory);

/// Get Action's URI
function actionGetURI(bytes32 guid) external view returns (string memory);

/// Get Action's URI
function actionGetConfirmation(bytes32 guid) external view returns (DataTypes.Confirmation memory);

Events

/// Action Added
// event ActionAdded(uint256 indexed id, bytes32 indexed guid, string subject, string verb, string object, string tool, string affected);
event ActionAdded(uint256 indexed id, bytes32 indexed guid, string subject, string verb, string object, string tool);

/// Action URI Updated
event ActionURI(bytes32 indexed guid, string uri);

/// Action Confirmation Updated
event Confirmation(bytes32 indexed guid, string ruling, bool evidence, uint witness);

Example:

let action = {
  subject: "founder",     //Accused Role
  verb: "breach",
  object: "contract",
  tool: "",
//  affected: "investor",  //Plaintiff / Beneficiary
};
let confirmation = {
  ruling: "judge",  //Decision Maker
  evidence: true, //Require Evidence
  witness: 1,  //Minimal number of witnesses
};
let uri = "TEST_URI";

//Add Action
let tx = await actionContract.actionAdd(action, confirmation, uri);

//Get GUID for Action
let actionGUID = await actionContract.actionHash(action); //Gets hash if exists or not

//Fetch Action's Struct
let actionRet = await actionContract.actionGet(actionGUID);