syntax = "proto3";

package exchain.nebula.v1;

import "google/protobuf/descriptor.proto";
import "nebula/ext/options.proto";
import "nebula/v1/transaction.proto";

option csharp_namespace = "ExChain.Nebula.V1";
option go_package = "github.com/exchain/go-exchain/exchain/protocol/nebula/v1";
option java_multiple_files = true;
option java_outer_classname = "ReceiptProto";
option java_package = "org.exchain.nebula.v1";
option php_namespace = "ExChain\\Nebula\\v1";

message TransactionReceiptList {
  repeated TransactionReceipt receipts = 1;
}

message TransactionReceipt {
  bytes hash = 1;
  TxType tx_type = 2;
  bool success = 3;
  uint64 block_height = 4;
  uint64 timestamp = 5;
  oneof content {
    SignProxyReceipt sign_proxy_r = 6;
    DepositReceipt deposit_r = 7;
    WithdrawReceipt withdraw_r = 8;
    CreatePairReceipt create_pair_r = 9;
    DisablePairReceipt disable_pair_r = 10;
    LimitOrderReceipt limit_r = 11;
    MarketOrderReceipt market_r = 12;
    CancelOrderReceipt cancel_r = 13;
    ProtocolTransactionReceipt protocol_r = 14;
  }
}

message SignProxyReceipt {}

message DepositReceipt {}

message WithdrawReceipt {}

message CreatePairReceipt {}

message DisablePairReceipt {

}

message LimitOrderReceipt {
  repeated string done_orders = 1;
  string new_order = 2;
}

message MarketOrderReceipt {
  repeated string done_orders = 1;
  string new_order = 2;
}

message CancelOrderReceipt {
  string order_id = 1;
}

message ProtocolTransactionReceipt {
}
