sdk.models.box.challenge.proto Maven / Gradle / Ivy
The newest version!
syntax = "proto3";
import "scalapb/scalapb.proto";
import "scalapb/validate.proto";
import "validate/validate.proto";
package xyz.stratalab.sdk.models.box;
import 'sdk/models/address.proto';
import 'quivr/models/proposition.proto';
// Challenge is a single field message with its options being
// one of RevealedProposition or PreviousProposition
message Challenge {
oneof proposition {
quivr.models.Proposition revealed = 1;
PreviousProposition previous = 2;
}
// Previousroposition requires two parameters
// the transaction input address and index of the previously
// revealed proposition.
message PreviousProposition {
TransactionInputAddress address = 1;
uint32 index = 2;
}
}
option (scalapb.options) = {
[scalapb.validate.file] {
validate_at_construction: true
}
field_transformations: [
{
when: {options: {[validate.rules] {message: {required: true}}}}
set: {
[scalapb.field] {
required: true
}
}
}
]
};