syntax = "proto3";

package protobuf;

import "merkle.proto";


// IBCPacket sends a proven key/value pair from an IBCQueue.
// Depending on the type of message, we require a certain type
// of key (MessageKey at a given height, or StateKey).
//
// Includes src_chain and src_height to look up the proper
// header to verify the merkle proof.
message IBCPacket {
    // chain id it is coming from
    string src_chain = 1;
    // height for the header the proof belongs to
    uint64 src_height = 2;
    // the message type, which determines what key/value mean
    enum MsgType {
        RECEIVE = 0;
        RECEIPT = 1;
        TIMEOUT = 2;
        CLEANUP = 3;
    }
    MsgType msgType = 3;
    // the proof of the message, includes key and value
    MerkleProof proof = 6;
}
