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

import "cosmos/msg/v1/msg.proto";
import "gogoproto/gogo.proto";
import "provenance/metadata/v1/metadata.proto";
import "provenance/metadata/v1/objectstore.proto";
import "provenance/metadata/v1/p8e/p8e.proto";
import "provenance/metadata/v1/scope.proto";
import "provenance/metadata/v1/specification.proto";

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

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

// Msg defines the Metadata Msg service.
service Msg {
  option (cosmos.msg.v1.service) = true;

  // ---- Primary Data Management -----

  // WriteScope adds or updates a scope.
  rpc WriteScope(MsgWriteScopeRequest) returns (MsgWriteScopeResponse);
  // DeleteScope deletes a scope and all associated Records, Sessions.
  rpc DeleteScope(MsgDeleteScopeRequest) returns (MsgDeleteScopeResponse);

  // AddScopeDataAccess adds data access AccAddress to scope
  rpc AddScopeDataAccess(MsgAddScopeDataAccessRequest) returns (MsgAddScopeDataAccessResponse);
  // DeleteScopeDataAccess removes data access AccAddress from scope
  rpc DeleteScopeDataAccess(MsgDeleteScopeDataAccessRequest) returns (MsgDeleteScopeDataAccessResponse);

  // AddScopeOwner adds new owner parties to a scope
  rpc AddScopeOwner(MsgAddScopeOwnerRequest) returns (MsgAddScopeOwnerResponse);
  // DeleteScopeOwner removes owner parties (by addresses) from a scope
  rpc DeleteScopeOwner(MsgDeleteScopeOwnerRequest) returns (MsgDeleteScopeOwnerResponse);

  // UpdateValueOwners sets the value owner of one or more scopes.
  rpc UpdateValueOwners(MsgUpdateValueOwnersRequest) returns (MsgUpdateValueOwnersResponse);

  // MigrateValueOwner updates all scopes that have one value owner to have a another value owner.
  rpc MigrateValueOwner(MsgMigrateValueOwnerRequest) returns (MsgMigrateValueOwnerResponse);

  // WriteSession adds or updates a session context.
  rpc WriteSession(MsgWriteSessionRequest) returns (MsgWriteSessionResponse);

  // WriteRecord adds or updates a record.
  rpc WriteRecord(MsgWriteRecordRequest) returns (MsgWriteRecordResponse);
  // DeleteRecord deletes a record.
  rpc DeleteRecord(MsgDeleteRecordRequest) returns (MsgDeleteRecordResponse);

  // ---- Specification Management -----

  // WriteScopeSpecification adds or updates a scope specification.
  rpc WriteScopeSpecification(MsgWriteScopeSpecificationRequest) returns (MsgWriteScopeSpecificationResponse);
  // DeleteScopeSpecification deletes a scope specification.
  rpc DeleteScopeSpecification(MsgDeleteScopeSpecificationRequest) returns (MsgDeleteScopeSpecificationResponse);

  // WriteContractSpecification adds or updates a contract specification.
  rpc WriteContractSpecification(MsgWriteContractSpecificationRequest) returns (MsgWriteContractSpecificationResponse);
  // DeleteContractSpecification deletes a contract specification.
  rpc DeleteContractSpecification(MsgDeleteContractSpecificationRequest)
      returns (MsgDeleteContractSpecificationResponse);

  // AddContractSpecToScopeSpec adds contract specification to a scope specification.
  rpc AddContractSpecToScopeSpec(MsgAddContractSpecToScopeSpecRequest) returns (MsgAddContractSpecToScopeSpecResponse);
  // DeleteContractSpecFromScopeSpec deletes a contract specification from a scope specification.
  rpc DeleteContractSpecFromScopeSpec(MsgDeleteContractSpecFromScopeSpecRequest)
      returns (MsgDeleteContractSpecFromScopeSpecResponse);

  // WriteRecordSpecification adds or updates a record specification.
  rpc WriteRecordSpecification(MsgWriteRecordSpecificationRequest) returns (MsgWriteRecordSpecificationResponse);
  // DeleteRecordSpecification deletes a record specification.
  rpc DeleteRecordSpecification(MsgDeleteRecordSpecificationRequest) returns (MsgDeleteRecordSpecificationResponse);

  // ---- Object Store Locator Management -----

  // BindOSLocator binds an owner address to a uri.
  rpc BindOSLocator(MsgBindOSLocatorRequest) returns (MsgBindOSLocatorResponse);
  // DeleteOSLocator deletes an existing ObjectStoreLocator record.
  rpc DeleteOSLocator(MsgDeleteOSLocatorRequest) returns (MsgDeleteOSLocatorResponse);
  // ModifyOSLocator updates an ObjectStoreLocator record by the current owner.
  rpc ModifyOSLocator(MsgModifyOSLocatorRequest) returns (MsgModifyOSLocatorResponse);

  // SetAccountData associates some basic data with a metadata address.
  // Currently, only scope ids are supported.
  rpc SetAccountData(MsgSetAccountDataRequest) returns (MsgSetAccountDataResponse);

  // AddNetAssetValues sets the net asset value for a scope.
  rpc AddNetAssetValues(MsgAddNetAssetValuesRequest) returns (MsgAddNetAssetValuesResponse);
}

// MsgWriteScopeRequest is the request type for the Msg/WriteScope RPC method.
message MsgWriteScopeRequest {
  option (cosmos.msg.v1.signer)      = "signers";
  option (gogoproto.equal)           = false;
  option (gogoproto.goproto_getters) = false;

  // scope is the Scope you want added or updated.
  Scope scope = 1 [(gogoproto.nullable) = false];
  // signers is the list of address of those signing this request.
  repeated string signers = 2;

  // scope_uuid is an optional uuid string, e.g. "91978ba2-5f35-459a-86a7-feca1b0512e0"
  // If provided, it will be used to generate the MetadataAddress for the scope which will override the scope_id in the
  // provided scope. If not provided (or it is an empty string), nothing special happens.
  // If there is a value in scope.scope_id that is different from the one created from this uuid, an error is returned.
  string scope_uuid = 3;

  // spec_uuid is an optional scope specification uuid string, e.g. "dc83ea70-eacd-40fe-9adf-1cf6148bf8a2"
  // If provided, it will be used to generate the MetadataAddress for the scope specification which will override the
  // specification_id in the provided scope. If not provided (or it is an empty string), nothing special happens.
  // If there is a value in scope.specification_id that is different from the one created from this uuid, an error is
  // returned.
  string spec_uuid = 4;

  // usd_mills value of scope in usd mills (1234 = $1.234) used for net asset value
  uint64 usd_mills = 5;
}

// MsgWriteScopeResponse is the response type for the Msg/WriteScope RPC method.
message MsgWriteScopeResponse {
  // scope_id_info contains information about the id/address of the scope that was added or updated.
  ScopeIdInfo scope_id_info = 1;
}

// MsgDeleteScopeRequest is the request type for the Msg/DeleteScope RPC method.
message MsgDeleteScopeRequest {
  option (cosmos.msg.v1.signer)      = "signers";
  option (gogoproto.equal)           = false;
  option (gogoproto.goproto_getters) = false;

  // Unique ID for the scope to delete
  bytes           scope_id = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "MetadataAddress"];
  repeated string signers  = 2;
}

// MsgDeleteScopeResponse is the response type for the Msg/DeleteScope RPC method.
message MsgDeleteScopeResponse {}

// MsgAddScopeDataAccessRequest is the request to add data access AccAddress to scope
message MsgAddScopeDataAccessRequest {
  option (cosmos.msg.v1.signer)      = "signers";
  option (gogoproto.equal)           = false;
  option (gogoproto.goproto_getters) = false;

  // scope MetadataAddress for updating data access
  bytes scope_id = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "MetadataAddress"];

  // AccAddress addresses to be added to scope
  repeated string data_access = 2;
  // signers is the list of address of those signing this request.
  repeated string signers = 3;
}

// MsgAddScopeDataAccessResponse is the response for adding data access AccAddress to scope
message MsgAddScopeDataAccessResponse {}

// MsgDeleteScopeDataAccessRequest is the request to remove data access AccAddress to scope
message MsgDeleteScopeDataAccessRequest {
  option (cosmos.msg.v1.signer)      = "signers";
  option (gogoproto.equal)           = false;
  option (gogoproto.goproto_getters) = false;

  // scope MetadataAddress for removing data access
  bytes scope_id = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "MetadataAddress"];

  // AccAddress address to be removed from scope
  repeated string data_access = 2;
  // signers is the list of address of those signing this request.
  repeated string signers = 3;
}

// MsgDeleteScopeDataAccessResponse is the response from removing data access AccAddress to scope
message MsgDeleteScopeDataAccessResponse {}

// MsgAddScopeOwnerRequest is the request to add owner AccAddress to scope
message MsgAddScopeOwnerRequest {
  option (cosmos.msg.v1.signer)      = "signers";
  option (gogoproto.equal)           = false;
  option (gogoproto.goproto_getters) = false;

  // scope MetadataAddress for updating data access
  bytes scope_id = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "MetadataAddress"];

  // owner parties to add to the scope
  repeated Party owners = 2 [(gogoproto.nullable) = false];
  // signers is the list of address of those signing this request.
  repeated string signers = 3;
}

// MsgAddScopeOwnerResponse is the response for adding owner AccAddresses to scope
message MsgAddScopeOwnerResponse {}

// MsgDeleteScopeOwnerRequest is the request to remove owner AccAddresses to scope
message MsgDeleteScopeOwnerRequest {
  option (cosmos.msg.v1.signer)      = "signers";
  option (gogoproto.equal)           = false;
  option (gogoproto.goproto_getters) = false;

  // scope MetadataAddress for removing data access
  bytes scope_id = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "MetadataAddress"];

  // AccAddress owner addresses to be removed from scope
  repeated string owners = 2;
  // signers is the list of address of those signing this request.
  repeated string signers = 3;
}

// MsgDeleteScopeOwnerResponse is the response from removing owner AccAddress to scope
message MsgDeleteScopeOwnerResponse {}

// MsgUpdateValueOwnersRequest is the request to update the value owner addresses in one or more scopes.
message MsgUpdateValueOwnersRequest {
  option (cosmos.msg.v1.signer)      = "signers";
  option (gogoproto.equal)           = false;
  option (gogoproto.goproto_getters) = false;

  // scope_ids are the scope metadata addresses of all scopes to be updated.
  repeated bytes scope_ids = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "MetadataAddress"];
  // value_owner_address is the address of the new value owner for the provided scopes.
  string value_owner_address = 2;
  // signers is the list of addresses of those signing this request.
  repeated string signers = 3;
}

// MsgUpdateValueOwnersResponse is the response from updating value owner addresses in one or more scopes.
message MsgUpdateValueOwnersResponse {}

// MsgMigrateValueOwnerRequest is the request to migrate all scopes with one value owner to another value owner.
message MsgMigrateValueOwnerRequest {
  option (cosmos.msg.v1.signer)      = "signers";
  option (gogoproto.equal)           = false;
  option (gogoproto.goproto_getters) = false;

  // existing is the value owner address that is being migrated.
  string existing = 1;
  // proposed is the new value owner address for all of existing's scopes.
  string proposed = 2;
  // signers is the list of addresses of those signing this request.
  repeated string signers = 3;
}

// MsgMigrateValueOwnerResponse is the response from migrating a value owner address.
message MsgMigrateValueOwnerResponse {}

// MsgWriteSessionRequest is the request type for the Msg/WriteSession RPC method.
message MsgWriteSessionRequest {
  option (cosmos.msg.v1.signer)      = "signers";
  option (gogoproto.equal)           = false;
  option (gogoproto.goproto_getters) = false;

  // session is the Session you want added or updated.
  Session session = 1 [(gogoproto.nullable) = false];
  // signers is the list of address of those signing this request.
  repeated string signers = 2;

  // SessionIDComponents is an optional (alternate) way of defining what the session_id should be in the provided
  // session. If provided, it must have both a scope and session_uuid. Those components will be used to create the
  // MetadataAddress for the session which will override the session_id in the provided session. If not provided (or
  // all empty), nothing special happens.
  // If there is a value in session.session_id that is different from the one created from these components, an error is
  // returned.
  SessionIdComponents session_id_components = 3;

  // spec_uuid is an optional contract specification uuid string, e.g. "def6bc0a-c9dd-4874-948f-5206e6060a84"
  // If provided, it will be used to generate the MetadataAddress for the contract specification which will override the
  // specification_id in the provided session. If not provided (or it is an empty string), nothing special happens.
  // If there is a value in session.specification_id that is different from the one created from this uuid, an error is
  // returned.
  string spec_uuid = 4;
}

// SessionIDComponents contains fields for the components that make up a session id.
message SessionIdComponents {
  // scope is used to define the scope this session belongs to.
  oneof scope_identifier {
    // scope_uuid is the uuid string for the scope, e.g. "91978ba2-5f35-459a-86a7-feca1b0512e0"
    string scope_uuid = 1;
    // scope_addr is the bech32 address string for the scope, g.g. "scope1qzge0zaztu65tx5x5llv5xc9ztsqxlkwel"
    string scope_addr = 2;
  }
  // session_uuid is a uuid string for identifying this session, e.g. "5803f8bc-6067-4eb5-951f-2121671c2ec0"
  string session_uuid = 3;
}

// MsgWriteSessionResponse is the response type for the Msg/WriteSession RPC method.
message MsgWriteSessionResponse {
  // session_id_info contains information about the id/address of the session that was added or updated.
  SessionIdInfo session_id_info = 1;
}

// MsgWriteRecordRequest is the request type for the Msg/WriteRecord RPC method.
message MsgWriteRecordRequest {
  option (cosmos.msg.v1.signer)      = "signers";
  option (gogoproto.equal)           = false;
  option (gogoproto.goproto_getters) = false;

  // record is the Record you want added or updated.
  Record record = 1 [(gogoproto.nullable) = false];
  // signers is the list of address of those signing this request.
  repeated string signers = 2;

  // SessionIDComponents is an optional (alternate) way of defining what the session_id should be in the provided
  // record. If provided, it must have both a scope and session_uuid. Those components will be used to create the
  // MetadataAddress for the session which will override the session_id in the provided record. If not provided (or
  // all empty), nothing special happens.
  // If there is a value in record.session_id that is different from the one created from these components, an error is
  // returned.
  SessionIdComponents session_id_components = 3;

  // contract_spec_uuid is an optional contract specification uuid string, e.g. "def6bc0a-c9dd-4874-948f-5206e6060a84"
  // If provided, it will be combined with the record name to generate the MetadataAddress for the record specification
  // which will override the specification_id in the provided record. If not provided (or it is an empty string),
  // nothing special happens.
  // If there is a value in record.specification_id that is different from the one created from this uuid and
  // record.name, an error is returned.
  string contract_spec_uuid = 4;

  // parties is the list of parties involved with this record.
  // Deprecated: This field is ignored. The parties are identified in the session and as signers.
  repeated Party parties = 5 [(gogoproto.nullable) = false];
}

// MsgWriteRecordResponse is the response type for the Msg/WriteRecord RPC method.
message MsgWriteRecordResponse {
  // record_id_info contains information about the id/address of the record that was added or updated.
  RecordIdInfo record_id_info = 1;
}

// MsgDeleteRecordRequest is the request type for the Msg/DeleteRecord RPC method.
message MsgDeleteRecordRequest {
  option (cosmos.msg.v1.signer)      = "signers";
  option (gogoproto.equal)           = false;
  option (gogoproto.goproto_getters) = false;

  bytes record_id = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "MetadataAddress"];

  repeated string signers = 2;
}

// MsgDeleteRecordResponse is the response type for the Msg/DeleteRecord RPC method.
message MsgDeleteRecordResponse {}

// MsgWriteScopeSpecificationRequest is the request type for the Msg/WriteScopeSpecification RPC method.
message MsgWriteScopeSpecificationRequest {
  option (cosmos.msg.v1.signer)      = "signers";
  option (gogoproto.equal)           = false;
  option (gogoproto.goproto_getters) = false;

  // specification is the ScopeSpecification you want added or updated.
  ScopeSpecification specification = 1 [(gogoproto.nullable) = false];
  // signers is the list of address of those signing this request.
  repeated string signers = 2;

  // spec_uuid is an optional scope specification uuid string, e.g. "dc83ea70-eacd-40fe-9adf-1cf6148bf8a2"
  // If provided, it will be used to generate the MetadataAddress for the scope specification which will override the
  // specification_id in the provided specification. If not provided (or it is an empty string), nothing special
  // happens.
  // If there is a value in specification.specification_id that is different from the one created from this uuid, an
  // error is returned.
  string spec_uuid = 3;
}

// MsgWriteScopeSpecificationResponse is the response type for the Msg/WriteScopeSpecification RPC method.
message MsgWriteScopeSpecificationResponse {
  // scope_spec_id_info contains information about the id/address of the scope specification that was added or updated.
  ScopeSpecIdInfo scope_spec_id_info = 1;
}

// MsgDeleteScopeSpecificationRequest is the request type for the Msg/DeleteScopeSpecification RPC method.
message MsgDeleteScopeSpecificationRequest {
  option (cosmos.msg.v1.signer)      = "signers";
  option (gogoproto.equal)           = false;
  option (gogoproto.goproto_getters) = false;

  // MetadataAddress for the scope specification to delete.
  bytes           specification_id = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "MetadataAddress"];
  repeated string signers          = 2;
}

// MsgDeleteScopeSpecificationResponse is the response type for the Msg/DeleteScopeSpecification RPC method.
message MsgDeleteScopeSpecificationResponse {}

// MsgWriteContractSpecificationRequest is the request type for the Msg/WriteContractSpecification RPC method.
message MsgWriteContractSpecificationRequest {
  option (cosmos.msg.v1.signer)      = "signers";
  option (gogoproto.equal)           = false;
  option (gogoproto.goproto_getters) = false;

  // specification is the ContractSpecification you want added or updated.
  ContractSpecification specification = 1 [(gogoproto.nullable) = false];
  // signers is the list of address of those signing this request.
  repeated string signers = 2;

  // spec_uuid is an optional contract specification uuid string, e.g. "def6bc0a-c9dd-4874-948f-5206e6060a84"
  // If provided, it will be used to generate the MetadataAddress for the contract specification which will override the
  // specification_id in the provided specification. If not provided (or it is an empty string), nothing special
  // happens.
  // If there is a value in specification.specification_id that is different from the one created from this uuid, an
  // error is returned.
  string spec_uuid = 3;
}

// MsgWriteContractSpecificationResponse is the response type for the Msg/WriteContractSpecification RPC method.
message MsgWriteContractSpecificationResponse {
  // contract_spec_id_info contains information about the id/address of the contract specification that was added or
  // updated.
  ContractSpecIdInfo contract_spec_id_info = 1;
}

// MsgAddContractSpecToScopeSpecRequest is the request type for the Msg/AddContractSpecToScopeSpec RPC method.
message MsgAddContractSpecToScopeSpecRequest {
  option (cosmos.msg.v1.signer)      = "signers";
  option (gogoproto.equal)           = false;
  option (gogoproto.goproto_getters) = false;

  // MetadataAddress for the contract specification to add.
  bytes contract_specification_id = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "MetadataAddress"];

  // MetadataAddress for the scope specification to add contract specification to.
  bytes           scope_specification_id = 2 [(gogoproto.nullable) = false, (gogoproto.customtype) = "MetadataAddress"];
  repeated string signers                = 3;
}

// MsgAddContractSpecToScopeSpecResponse is the response type for the Msg/AddContractSpecToScopeSpec RPC method.
message MsgAddContractSpecToScopeSpecResponse {}

// MsgDeleteContractSpecFromScopeSpecRequest is the request type for the Msg/DeleteContractSpecFromScopeSpec RPC method.
message MsgDeleteContractSpecFromScopeSpecRequest {
  option (cosmos.msg.v1.signer)      = "signers";
  option (gogoproto.equal)           = false;
  option (gogoproto.goproto_getters) = false;

  // MetadataAddress for the contract specification to add.
  bytes contract_specification_id = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "MetadataAddress"];

  // MetadataAddress for the scope specification to add contract specification to.
  bytes           scope_specification_id = 2 [(gogoproto.nullable) = false, (gogoproto.customtype) = "MetadataAddress"];
  repeated string signers                = 3;
}

// MsgDeleteContractSpecFromScopeSpecResponse is the response type for the Msg/DeleteContractSpecFromScopeSpec RPC
// method.
message MsgDeleteContractSpecFromScopeSpecResponse {}

// MsgDeleteContractSpecificationRequest is the request type for the Msg/DeleteContractSpecification RPC method.
message MsgDeleteContractSpecificationRequest {
  option (cosmos.msg.v1.signer)      = "signers";
  option (gogoproto.equal)           = false;
  option (gogoproto.goproto_getters) = false;

  // MetadataAddress for the contract specification to delete.
  bytes           specification_id = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "MetadataAddress"];
  repeated string signers          = 2;
}

// MsgDeleteContractSpecificationResponse is the response type for the Msg/DeleteContractSpecification RPC method.
message MsgDeleteContractSpecificationResponse {}

// MsgWriteRecordSpecificationRequest is the request type for the Msg/WriteRecordSpecification RPC method.
message MsgWriteRecordSpecificationRequest {
  option (cosmos.msg.v1.signer)      = "signers";
  option (gogoproto.equal)           = false;
  option (gogoproto.goproto_getters) = false;

  // specification is the RecordSpecification you want added or updated.
  RecordSpecification specification = 1 [(gogoproto.nullable) = false];
  // signers is the list of address of those signing this request.
  repeated string signers = 2;

  // contract_spec_uuid is an optional contract specification uuid string, e.g. "def6bc0a-c9dd-4874-948f-5206e6060a84"
  // If provided, it will be combined with the record specification name to generate the MetadataAddress for the record
  // specification which will override the specification_id in the provided specification. If not provided (or it is an
  // empty string), nothing special happens.
  // If there is a value in specification.specification_id that is different from the one created from this uuid and
  // specification.name, an error is returned.
  string contract_spec_uuid = 3;
}

// MsgWriteRecordSpecificationResponse is the response type for the Msg/WriteRecordSpecification RPC method.
message MsgWriteRecordSpecificationResponse {
  // record_spec_id_info contains information about the id/address of the record specification that was added or
  // updated.
  RecordSpecIdInfo record_spec_id_info = 1;
}

// MsgDeleteRecordSpecificationRequest is the request type for the Msg/DeleteRecordSpecification RPC method.
message MsgDeleteRecordSpecificationRequest {
  option (cosmos.msg.v1.signer)      = "signers";
  option (gogoproto.equal)           = false;
  option (gogoproto.goproto_getters) = false;

  // MetadataAddress for the record specification to delete.
  bytes           specification_id = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "MetadataAddress"];
  repeated string signers          = 2;
}

// MsgDeleteRecordSpecificationResponse is the response type for the Msg/DeleteRecordSpecification RPC method.
message MsgDeleteRecordSpecificationResponse {}

// MsgBindOSLocatorRequest is the request type for the Msg/BindOSLocator RPC method.
message MsgBindOSLocatorRequest {
  option (cosmos.msg.v1.signer)      = "locator";
  option (gogoproto.equal)           = false;
  option (gogoproto.goproto_getters) = false;
  // The object locator to bind the address to bind to the URI.
  ObjectStoreLocator locator = 1 [(gogoproto.nullable) = false];
}

// MsgBindOSLocatorResponse is the response type for the Msg/BindOSLocator RPC method.
message MsgBindOSLocatorResponse {
  ObjectStoreLocator locator = 1 [(gogoproto.nullable) = false];
}

// MsgDeleteOSLocatorRequest is the request type for the Msg/DeleteOSLocator RPC method.
message MsgDeleteOSLocatorRequest {
  option (cosmos.msg.v1.signer)      = "locator";
  option (gogoproto.equal)           = false;
  option (gogoproto.goproto_getters) = false;

  // The record being removed
  ObjectStoreLocator locator = 1 [(gogoproto.nullable) = false];
}

// MsgDeleteOSLocatorResponse is the response type for the Msg/DeleteOSLocator RPC method.
message MsgDeleteOSLocatorResponse {
  ObjectStoreLocator locator = 1 [(gogoproto.nullable) = false];
}

// MsgModifyOSLocatorRequest is the request type for the Msg/ModifyOSLocator RPC method.
message MsgModifyOSLocatorRequest {
  option (cosmos.msg.v1.signer)      = "locator";
  option (gogoproto.equal)           = false;
  option (gogoproto.goproto_getters) = false;
  // The object locator to bind the address to bind to the URI.
  ObjectStoreLocator locator = 1 [(gogoproto.nullable) = false];
}

// MsgModifyOSLocatorResponse is the response type for the Msg/ModifyOSLocator RPC method.
message MsgModifyOSLocatorResponse {
  ObjectStoreLocator locator = 1 [(gogoproto.nullable) = false];
}

// MsgSetAccountDataRequest is the request to set/update/delete a scope's account data.
message MsgSetAccountDataRequest {
  option (cosmos.msg.v1.signer)      = "signers";
  option (gogoproto.equal)           = false;
  option (gogoproto.goproto_getters) = false;

  // The identifier to associate the data with.
  // Currently, only scope ids are supported.
  bytes metadata_addr = 1 [(gogoproto.nullable) = false, (gogoproto.customtype) = "MetadataAddress"];
  // The desired accountdata value.
  string value = 2;
  // The signers of this message. Must fulfill owner requirements of the scope.
  repeated string signers = 3;
}

// MsgSetAccountDataResponse is the response from setting/updating/deleting a scope's account data.
message MsgSetAccountDataResponse {}

// MsgWriteP8eContractSpecRequest has been deprecated and is no longer usable.
// Deprecated: This message is no longer part of any endpoint and cannot be used for anything.
message MsgWriteP8eContractSpecRequest {
  option deprecated                  = true;
  option (gogoproto.goproto_getters) = false;
  p8e.ContractSpec contractspec      = 1 [(gogoproto.nullable) = false];
  repeated string  signers           = 2;
}

// MsgWriteP8eContractSpecResponse  has been deprecated and is no longer usable.
// Deprecated: This message is no longer part of any endpoint and cannot be used for anything.
message MsgWriteP8eContractSpecResponse {
  option deprecated                               = true;
  option (gogoproto.goproto_getters)              = false;
  ContractSpecIdInfo        contract_spec_id_info = 1;
  repeated RecordSpecIdInfo record_spec_id_infos  = 2;
}

// MsgP8eMemorializeContractRequest  has been deprecated and is no longer usable.
// Deprecated: This message is no longer part of any endpoint and cannot be used for anything.
message MsgP8eMemorializeContractRequest {
  option deprecated                                              = true;
  option (gogoproto.goproto_getters)                             = false;
  string                                  scope_id               = 1;
  string                                  group_id               = 2;
  string                                  scope_specification_id = 3;
  provenance.metadata.v1.p8e.Recitals     recitals               = 4;
  provenance.metadata.v1.p8e.Contract     contract               = 5;
  provenance.metadata.v1.p8e.SignatureSet signatures             = 6;
  string                                  invoker                = 7;
}

// MsgP8eMemorializeContractResponse  has been deprecated and is no longer usable.
// Deprecated: This message is no longer part of any endpoint and cannot be used for anything.
message MsgP8eMemorializeContractResponse {
  option deprecated                     = true;
  option (gogoproto.goproto_getters)    = false;
  ScopeIdInfo           scope_id_info   = 1;
  SessionIdInfo         session_id_info = 2;
  repeated RecordIdInfo record_id_infos = 3;
}

// MsgAddNetAssetValuesRequest defines the Msg/AddNetAssetValues request type
message MsgAddNetAssetValuesRequest {
  option (cosmos.msg.v1.signer)      = "signers";
  option (gogoproto.equal)           = false;
  option (gogoproto.goproto_getters) = false;

  string          scope_id = 1;
  repeated string signers  = 2;
  // Net asset values to set.
  // The price can use a special "usd" denom, where 1usd = $0.001 and 1000usd = $1.000.
  repeated NetAssetValue net_asset_values = 3 [(gogoproto.nullable) = false];
}

// MsgAddNetAssetValuesResponse defines the Msg/AddNetAssetValue response type
message MsgAddNetAssetValuesResponse {}