All Downloads are FREE. Search and download functionalities are using the official Maven repository.

xyz.stratalab.sdk.models.transaction.IoTransactionValidator.scala Maven / Gradle / Ivy

The newest version!
package xyz.stratalab.sdk.models.transaction

object IoTransactionValidator extends scalapb.validate.Validator[xyz.stratalab.sdk.models.transaction.IoTransaction] {
  def validate(input: xyz.stratalab.sdk.models.transaction.IoTransaction): scalapb.validate.Result =
    scalapb.validate.Result.optional(input.transactionId) { _value =>
      xyz.stratalab.sdk.models.TransactionIdValidator.validate(_value)
    } &&
    scalapb.validate.Result.repeated(input.inputs.iterator) { _value =>
      xyz.stratalab.sdk.models.transaction.SpentTransactionOutputValidator.validate(_value)
    } &&
    scalapb.validate.Result.repeated(input.outputs.iterator) { _value =>
      xyz.stratalab.sdk.models.transaction.UnspentTransactionOutputValidator.validate(_value)
    } &&
    xyz.stratalab.sdk.models.DatumValidator.IoTransactionValidator.validate(input.datum) &&
    scalapb.validate.Result.repeated(input.groupPolicies.iterator) { _value =>
      xyz.stratalab.sdk.models.DatumValidator.GroupPolicyValidator.validate(_value)
    } &&
    scalapb.validate.Result.repeated(input.seriesPolicies.iterator) { _value =>
      xyz.stratalab.sdk.models.DatumValidator.SeriesPolicyValidator.validate(_value)
    } &&
    scalapb.validate.Result.repeated(input.mintingStatements.iterator) { _value =>
      xyz.stratalab.sdk.models.box.AssetMintingStatementValidator.validate(_value)
    } &&
    scalapb.validate.Result.repeated(input.mergingStatements.iterator) { _value =>
      xyz.stratalab.sdk.models.box.AssetMergingStatementValidator.validate(_value)
    } &&
    scalapb.validate.Result.repeated(input.splittingStatements.iterator) { _value =>
      xyz.stratalab.sdk.models.box.AssetSplittingStatementValidator.validate(_value)
    }
  
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy