/**
 * # Tss Message Transaction
 *
 * ### Keywords
 * The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
 * "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
 * document are to be interpreted as described in
 * [RFC2119](https://www.ietf.org/rfc/rfc2119) and clarified in
 * [RFC8174](https://www.ietf.org/rfc/rfc8174).
 */
syntax = "proto3";

package com.hedera.hapi.services.auxiliary.tss;

// SPDX-License-Identifier: Apache-2.0
option java_package = "com.hedera.hapi.services.auxiliary.tss.legacy";
// <<<pbj.java_package = "com.hedera.hapi.services.auxiliary.tss">>> This comment is special code for setting PBJ Compiler java package

option java_multiple_files = true;

/** A transaction body to to send a Threshold Signature Scheme (TSS)
 * Message.<br/>
 * This is a wrapper around several different TSS message types that a node
 * might communicate with other nodes in the network.
 *
 * - A `TssMessageTransactionBody` MUST identify the hash of the roster
 *   containing the node generating this TssMessage
 * - A `TssMessageTransactionBody` MUST identify the hash of the roster that
 *   the TSS messages is for
 * - A `TssMessageTransactionBody` SHALL contain the specificc TssMessage data
 *   that has been generated by the node for the share_index.
 */
message TssMessageTransactionBody {

  /**
   * A hash of the roster containing the node generating the TssMessage.<br/>
   * This hash uniquely identifies the source roster, which will include
   * an entry for the node generating this TssMessage.
   * <p>
   * This value MUST be set.<br/>
   * This value MUST NOT be empty.<br/>
   * This value MUST contain a valid hash.
   */
  bytes source_roster_hash = 1;

  /**
   * A hash of the roster that the TssMessage is for.
   * <p>
   * This value MUST be set.<br/>
   * This value MUST NOT be empty.<br/>
   * This value MUST contain a valid hash.
   */
  bytes target_roster_hash = 2;

  /**
   * An index to order shares.
   * <p>
   * A share index SHALL establish a global ordering of shares across all
   * shares in the network.<br/>
   * A share index MUST correspond to the index of the public share in the list
   * returned from the TSS library when the share was created for the source
   * roster.
   */
  uint64 share_index = 3;

  /**
   * A byte array.
   * <p>
   * This field SHALL contain the TssMessage data generated by the node
   * for the specified `share_index`.
   */
  bytes tss_message = 4;
}
