createDID method
Implementation
Future<CreateDIDRes> createDID(
{required String gateway,
required String didImagePath,
required String publicSharePath,
required String publicKey,
required String privateKeyString}) async {
RubixServiceClient stub = getConnection(gateway: gateway, accessToken: "");
var response =
await stub.createDIDChallenge(ChallengeReq(publicKey: publicKey));
var challengeString = response.challenge;
var privateKey = KeyPair().privateKeyFromPem(privateKeyString);
var signContent = Uint8List.fromList(challengeString.codeUnits);
var pvtSign = KeyPair().keySignature(signContent, privateKey);
return _createDID(
gateway: gateway,
didImagePath: didImagePath,
publicSharePath: publicSharePath,
publicKey: publicKey,
signature: pvtSign,
payload: challengeString);
}