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

sdk.models.event.proto Maven / Gradle / Ivy

The newest version!
syntax = "proto3";
import "scalapb/scalapb.proto";
import "scalapb/validate.proto";



package org.plasmalabs.sdk.models;

import 'validate/validate.proto';

import 'quivr/models/shared.proto';
import 'sdk/models/transaction/schedule.proto';
import 'sdk/models/address.proto';
import 'sdk/models/box/asset.proto';
import 'sdk/models/identifier.proto';

import 'google/protobuf/wrappers.proto';
import "google/protobuf/struct.proto";

// Events are uniquely identifiable occurrences of state mutations within the blockchain protocol.
// Each event is associated with certain data that may be updated every tick.
message Event {
  oneof value {
    // hard fork
    Eon eon = 1;
    // configuration change
    Era era = 2;
    // length of time in slots where stake updates occur
    Epoch epoch = 3;
    // Header created
    Header header = 4;
    //IO Transaction
    IoTransaction ioTransaction = 5;
    // Group policy
    GroupPolicy groupPolicy = 6;
    // Series policy
    SeriesPolicy seriesPolicy = 7;
  }

  message Eon {
    uint64 beginSlot = 1;
    uint64 height = 2;
  }

  message Era {
    uint64 beginSlot = 1;
    uint64 height = 2;
  }

  message Epoch {
    uint64 beginSlot = 1;
    uint64 height = 2;
  }

  message Header {
    uint64 height = 1;
  }

  message IoTransaction {
    //the range of acceptable slots the transaction can be accepted into
    org.plasmalabs.sdk.models.transaction.Schedule schedule = 1 [(validate.rules).message.required = true];
    quivr.models.SmallData metadata = 4 [(validate.rules).message.required = true];
  }

  message GroupPolicy {
    // Identifies the group policy for humans (do not confuse with the actual group identifier)
    string label = 1;
    // The address of a UTXO. The UTXO contains the LVLs that are paid for minting the group constructor token.
    TransactionOutputAddress registrationUtxo = 2 [(validate.rules).message.required = true];
    // An optional series identifier. When this series identifier is defined, this groups that implement this policy can only be used to mint assets with the aforementioned series identifier
    SeriesId fixedSeries = 3;
  }

  message SeriesPolicy {
    // The human readable name of this series. (do not confuse with the actual series identifier)
    string label = 1;
    // This is an optional field. When provided it fixes the quantity of tokens that will be minted when this series is consumed,
    // and the series constructor is burned by the minting transaction.
    // When not provided, the series constructor is not burned, thus making the token supply unlimited.
    google.protobuf.UInt32Value tokenSupply = 2;
    // The address of a UTXO. The UTXO contains the LVLs that are paid for minting the series constructor token.
    TransactionOutputAddress registrationUtxo = 3 [(validate.rules).message.required = true];
    // Describes the behavior of the quantity field of the assets minted using the series constructor derived from this policy.
    sdk.models.box.QuantityDescriptorType quantityDescriptor = 4;
    //Describes the fungibility of the assets minted using the series constructor token derived from this policy.
    sdk.models.box.FungibilityType fungibility = 5;
    // Describes the schema of the data stored in the metadata field of the Asset Minting Statement.
    google.protobuf.Struct ephemeralMetadataScheme = 6;
    // Describes the schema of the data stored in the Asset Token.
    google.protobuf.Struct permanentMetadataScheme = 7;
  }
}

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 - 2024 Weber Informatics LLC | Privacy Policy