createWitness method

  1. @override
BuMerkleWitness createWitness(
  1. int id, {
  2. required int kind,
  3. required int checkpointId,
  4. required List<int> positions,
})
override

Witnesses positions at checkpointId for kind in context id and returns the witness; throws CryptoException on native failure.

Implementation

@override
BuMerkleWitness createWitness(
  int id, {
  required int kind,
  required int checkpointId,
  required List<int> positions,
}) {
  return api
      .createWitness(
        id,
        kind: kind,
        checkpointId: checkpointId,
        positions: positions,
      )
      .unwrapOrThrowCryptoError();
}