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

sdk.models.box.attestation.proto Maven / Gradle / Ivy

There is a newer version: 0.1.5
Show newest version
syntax = "proto3";
import "scalapb/scalapb.proto";
import "scalapb/validate.proto";



package org.plasmalabs.sdk.models.box;

import 'validate/validate.proto';

import 'sdk/models/box/lock.proto';
import 'sdk/models/box/challenge.proto';
import 'quivr/models/proof.proto';
import 'quivr/models/shared.proto';

// encapsulates the lock and responses are used to satisfy locks (may be successful or unsuccessful)
message Attestation {
    oneof value {
        Predicate predicate = 1;
        Image image = 2;
        Commitment commitment = 3;
    }

    message Predicate {
        org.plasmalabs.sdk.models.box.Lock.Predicate lock = 1 [(validate.rules).message.required = true];
        // list of optional values (proofs used to attempt to satisfy the challenges contained in the predicate lock)
        repeated quivr.models.Proof responses = 2;
    }
    message Image {
        org.plasmalabs.sdk.models.box.Lock.Image lock = 1 [(validate.rules).message.required = true];
        // list of optional values
        repeated Challenge known = 2;
        // list of optional values
        repeated quivr.models.Proof responses = 3;
    }
    message Commitment {
        org.plasmalabs.sdk.models.box.Lock.Commitment lock = 1 [(validate.rules).message.required = true];
        // list of claim propositions that must be proven as memebrs of the root commitment and be suitably satisfied by the given proofs
        repeated Challenge known = 2;
        // list of witnesses for proving membership of claimed propositions
        repeated quivr.models.Witness witness = 3;
        // list of optional values
        repeated quivr.models.Proof responses = 4;
    }
    
}

option (scalapb.options) = {
  [scalapb.validate.file] {
    validate_at_construction: true
  }
  field_transformations: [
    {
      when: {options: {[validate.rules] {message: {required: true}}}}
      set: {
        [scalapb.field] {
          required: true
        }
      }
    }
  ]
};




© 2015 - 2025 Weber Informatics LLC | Privacy Policy