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 TransactionReceipt {
  bytes hash = 1;
  TxType tx_type = 2;
  bool success = 3;
  bytes block_hash = 4;
  oneof content {
    SignProxyReceipt sign_proxy_r = 5;
    DepositReceipt deposit_r = 6;
    WithdrawReceipt withdraw_r = 7;
    CreatePairReceipt create_pair_r = 8;
    DisablePairReceipt disable_pair_r = 9;
    LimitOrderReceipt limit_r = 10;
    MarketOrderReceipt market_r = 11;
    CancelOrderReceipt cancel_r = 12;
  }
}

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;
}
