setFlagsProofType method

MerkleProof setFlagsProofType([
  1. String? proofType
])

Implementation

MerkleProof setFlagsProofType([String? proofType]) {
  proofType = proofType ?? 'branch';
  if (proofType == 'branch') {
    this.flagsNum = this.flagsNum & ~0x08;
  } else if (proofType == 'tree') {
    this.flagsNum = this.flagsNum | 0x08;
  } else {
    throw ('invalid proof type');
  }
  return this;
}