identityOwner method

Future<String> identityOwner(
  1. String did
)

Request the current owner (its did) for identity did.

Implementation

Future<String> identityOwner(String did) async {
  if (!_matchesExpectedDid(did)) {
    throw Exception('Information about $did cannot be found in this network');
  }
  var identityOwnerFunction = _erc1056contract.function('identityOwner');
  var owner = await web3Client.call(
      contract: _erc1056contract,
      function: identityOwnerFunction,
      params: [_didToAddress(did)]);
  var ownerAddress = owner.first as EthereumAddress;
  return _addressToDid(ownerAddress);
}