curry method

Future<Program> curry({
  1. required List<Program> args,
})

Curry the program with args

Implementation

Future<Program> curry({required List<Program> args}) async {
  final programArgs = await Future.wait(args
      .map(
        (e) async => e.serializeToHex(),
      )
      .toList());

  final programBytes = await api.programCurry(
    serProgramBytes: await _programBytes,
    argsStr: programArgs,
  );

  return Program._(
    sourceType: _ProgramSourceType.bytes,
    sourceValue: programBytes,
  );
}