Encoding

All the data fields are REQUIRED, unless specified otherwise.

The ledger

Transactions

Transactions MUST be encoded using proto3 in the format as defined for message Tx.

NameTypeDescriptionField Number
codebytesTransaction WASM code.1
dataoptional bytesTransaction data (OPTIONAL).2
timestampgoogle.protobuf.TimestampTimestamp of when the transaction was created.3

Proto definitions

syntax = "proto3";

import "google/protobuf/timestamp.proto";

package types;

message Tx {
  bytes code = 1;
  // TODO this optional is useless because it's default on proto3
  optional bytes data = 2;
  google.protobuf.Timestamp timestamp = 3;
}

message Intent {
  bytes data = 1;
  google.protobuf.Timestamp timestamp = 2;
}

message IntentGossipMessage{
  // TODO remove oneof because it's not used so far
  oneof msg {
    Intent intent = 1;
  }
}

message Dkg {
  string data = 1;
}

message DkgGossipMessage{
  oneof dkg_message {
    Dkg dkg = 1;
  }
}