generateRbt method

Future<Status> generateRbt({
  1. required String did,
  2. required double tokenCount,
  3. required String accessToken,
  4. required String gateway,
  5. required String imagePath,
  6. required String privateKeyString,
})

Implementation

Future<Status> generateRbt(
    {required String did,
    required double tokenCount,
    required String accessToken,
    required String gateway,
    required String imagePath,
    required String privateKeyString}) async {
  RubixServiceClient stub =
      getConnection(gateway: gateway, accessToken: accessToken);
  var privateKey = KeyPair().privateKeyFromPem(privateKeyString);
  var response =
      await stub.generateRbt(GenerateReq(did: did, tokenCount: tokenCount));

  print(response);
  var signResp = signResponse(
      initiateTransactionResponse: response,
      imagePath: imagePath,
      privateKey: privateKey,
      stub: stub,onlyPrivateKey: true);
  return signResp;
}