syntax = "proto3";
package provenance.asset.v1;

option go_package = "github.com/provenance-io/provenance/x/asset/types";

option java_package        = "io.provenance.asset.v1";
option java_multiple_files = true;

import "cosmos_proto/cosmos.proto";

// EventAssetBurned is emitted when an asset is burned.
// This event is triggered by the MsgBurnAsset message handler when an
// asset is successfully burned and removed from circulation.
message EventAssetBurned {
  // class_id is the asset class identifier of the burned asset.
  string class_id = 1;

  // id is the identifier of the burned asset.
  string id = 2;

  // owner is the address of the account that owned the asset before it was burned.
  string owner = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}

// EventAssetClassCreated is emitted when a new asset class is created.
// This event is triggered by the MsgCreateAssetClass message handler when
// an asset class is successfully created.
message EventAssetClassCreated {
  // class_id is the unique identifier of the created asset class.
  string class_id = 1;

  // class_name is the human-readable name of the asset class.
  string class_name = 2;

  // class_symbol is the symbol or ticker for the asset class.
  string class_symbol = 3;
}

// EventAssetCreated is emitted when a new asset is created.
// This event is triggered by the MsgCreateAsset message handler when
// an asset is successfully created and minted.
message EventAssetCreated {
  // class_id is the asset class identifier of the created asset.
  string class_id = 1;

  // id is the identifier of the created asset.
  string id = 2;

  // owner is the address of the account that owns the newly created asset.
  string owner = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}

// EventPoolCreated is emitted when a new pool is created.
// This event is triggered by the MsgCreatePool message handler when
// a pool is successfully created with assets.
message EventPoolCreated {
  // pool is the coin representation of the created pool.
  string pool = 1;

  // asset_count is the number of assets added to the pool.
  uint32 asset_count = 2;

  // owner is the address of the account that created the pool.
  string owner = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}

// EventTokenizationCreated is emitted when a tokenization marker is created.
// This event is triggered by the MsgCreateTokenization message handler when
// a tokenization is successfully created for an asset.
message EventTokenizationCreated {
  // tokenization is the coin representation of the tokenization marker.
  string tokenization = 1;

  // class_id is the asset class identifier of the tokenized asset.
  string class_id = 2;

  // id is the identifier of the tokenized asset.
  string id = 3;

  // owner is the address of the account that created the tokenization.
  string owner = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}

// EventSecuritizationCreated is emitted when a securitization is created.
// This event is triggered by the MsgCreateSecuritization message handler when
// a securitization is successfully created with tranches and pools.
message EventSecuritizationCreated {
  // securitization_id is the unique identifier of the created securitization.
  string securitization_id = 1;

  // tranche_count is the number of tranches in the securitization.
  uint32 tranche_count = 2;

  // pool_count is the number of pools in the securitization.
  uint32 pool_count = 3;

  // owner is the address of the account that created the securitization.
  string owner = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}
