syntax = "proto3";
package provlabs.vault.v1;

import "cosmos_proto/cosmos.proto";
import "provlabs/vault/v1/params.proto";

option go_package = "github.com/provlabs/vault/types";

// EventDeposit is an event emitted when assets are deposited into a vault.
message EventDeposit {
  // caller is the address of the account that initiated the deposit.
  string caller = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // owner is the address of the account that will receive the minted shares.
  string owner = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // assets is the coins amount string of the underlying assets that were deposited.
  string assets = 3;
  // shares is the coins amount string of the vault shares that were minted.
  string shares = 4;
  // vault_id is the numerical identifier of the vault.
  uint32 vault_id = 5;
}

// EventWithdraw is an event emitted when assets are withdrawn from a vault.
message EventWithdraw {
  // caller is the address of the account that initiated the withdrawal.
  string caller = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // receiver is the address of the account that will receive the underlying assets.
  string receiver = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // owner is the address of the account from which the shares were burned.
  string owner = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // assets is the coins amount string of the underlying assets that were withdrawn.
  string assets = 4;
  // shares is the coins amount string of the vault shares that were burned.
  string shares = 5;
  // vault_id is the numerical identifier of the vault.
  uint32 vault_id = 6;
}

// EventVaultCreated is an event emitted when a vault is created.
message EventVaultCreated {
  // vault_address is the bech32 address of the vault.
  string vault_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // admin is the address of the account that manages the vault.
  string admin = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // share_denom is the name of the assets created by the vault used for distribution.
  string share_denom = 3;
  // underlying_asset is the vault’s primary collateral and valuation/base denomination.
  string underlying_asset = 4;
}

// EventDenomUnit describes a single denom unit entry that is included in the
// share denom metadata emitted with EventSetShareDenomMetadata.
message EventDenomUnit {
  // denom is the unit name (e.g., "nushare", "ushare").
  string denom = 1;
  // exponent is the base-10 exponent for this unit relative to the base denom.
  // For example, exponent=6 means 1 display unit = 10^6 base units.
  string exponent = 2;
  // aliases lists optional alternative names for this unit. May be empty.
  repeated string aliases = 3;
}

// EventSetShareDenomMetadata is emitted when denom metadata is set for a vault’s
// share denom (via MsgSetShareDenomMetadata).
message EventSetShareDenomMetadata {
  // vault_address is the bech32 address of the vault.
  string vault_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // metadata_base is the base denomination (e.g., "nushare").
  string metadata_base = 2;
  // metadata_description is a human-readable description of the share denom.
  string metadata_description = 3;
  // metadata_display is the display denomination (e.g., "ushare" or "SHARE").
  string metadata_display = 4;
  // metadata_denom_units lists all denom units and their exponents.
  repeated EventDenomUnit metadata_denom_units = 5;
  // administrator is the bech32 address of the signer that set the metadata.
  string administrator = 6;
  // metadata_name is the descriptive name for the share denom.
  string metadata_name = 7;
  // metadata_symbol is the short ticker-style symbol (optional).
  string metadata_symbol = 8;
}

// EventSwapIn is an event emitted when assets are swapped in for vault shares.
message EventSwapIn {
  // owner is the address of the account that initiated the swap.
  string owner = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // amount_in is the amount of underlying assets that were swapped in.
  string amount_in = 2;
  // shares_received is the amount of vault shares that were minted.
  string shares_received = 3;
  // vault_address is the bech32 address of the vault.
  string vault_address = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}

// EventSwapOut is an event emitted when vault shares are swapped out for underlying assets.
message EventSwapOut {
  // owner is the address of the account that initiated the swap.
  string owner = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // shares_burned is the amount of vault shares that were burned.
  string shares_burned = 2;
  // amount_out is the amount of underlying assets that were sent to the recipient.
  string amount_out = 3;
  // vault_address is the bech32 address of the vault.
  string vault_address = 4 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}

// EventVaultReconcile is an event emitted when a vault's interest is reconciled.
message EventVaultReconcile {
  // vault_address is the bech32 address of the vault.
  string vault_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // principal_before is the principal amount before applying interest.
  string principal_before = 2;
  // principal_after is the principal amount after applying interest.
  string principal_after = 3;
  // rate is a decimal string (e.g., "0.9" for 90% and "0.9001353" for 90.01353%) representing annual interest rate for the period.
  string rate = 4;
  // time is the payout duration in seconds.
  int64 time = 5;
  // interest_earned is the interest amount (can be positive or negative).
  string interest_earned = 6;
}

// EventVaultInterestChange is an event emitted when a vault's interest rate is changed.
message EventVaultInterestChange {
  // vault_address is the bech32 address of the vault.
  string vault_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // current_rate is a decimal string (e.g., "0.9" for 90% and "0.9001353" for 90.01353%) representing the actual annual interest rate the vault is using.
  string current_rate = 2;
  // desired_rate is a decimal string (e.g., "0.9" for 90% and "0.9001353" for 90.01353%) representing the the annual interest rate the admin wants to use.
  string desired_rate = 3;
}

// EventInterestDeposit is an event emitted when funds are deposited for paying interest.
message EventInterestDeposit {
  // vault_address is the bech32 address of the vault.
  string vault_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // authority is the address (admin or asset manager) that deposited the funds.
  string authority = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // amount is the amount of funds deposited.
  string amount = 3;
}

// EventInterestWithdrawal is an event emitted when unused interest funds are withdrawn.
message EventInterestWithdrawal {
  // vault_address is the bech32 address of the vault.
  string vault_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // authority is the address (admin or asset manager) that withdrew the funds.
  string authority = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // amount is the amount of funds withdrawn.
  string amount = 3;
}

// EventToggleSwapIn is an event emitted when swap-in operations are enabled or disabled for a vault.
message EventToggleSwapIn {
  // vault_address is the bech32 address of the vault.
  string vault_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // admin is the address of the account that toggled the swap-in operations.
  string admin = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // enabled is the new state of swap-in operations.
  bool enabled = 3;
}

// EventToggleSwapOut is an event emitted when swap-out operations are enabled or disabled for a vault.
message EventToggleSwapOut {
  // vault_address is the bech32 address of the vault.
  string vault_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // admin is the address of the account that toggled the swap-out operations.
  string admin = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // enabled is the new state of swap-out operations.
  bool enabled = 3;
}

// EventDepositPrincipalFunds is an event emitted when principal funds are deposited by the authority.
message EventDepositPrincipalFunds {
  // vault_address is the bech32 address of the vault.
  string vault_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // authority is the address (admin or asset manager) that deposited the funds.
  string authority = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // amount is the amount of funds deposited.
  string amount = 3;
}

// EventWithdrawPrincipalFunds is an event emitted when principal funds are withdrawn by the authority.
message EventWithdrawPrincipalFunds {
  // vault_address is the bech32 address of the vault.
  string vault_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // authority is the address (admin or asset manager) that withdrew the funds.
  string authority = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // amount is the amount of funds withdrawn.
  string amount = 3;
}

// EventMinInterestRateUpdated is emitted when the minimum interest rate is updated.
message EventMinInterestRateUpdated {
  // vault_address is the bech32 address of the vault.
  string vault_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // admin is the address of the account that updated the limit.
  string admin = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // min_rate is the newly set minimum annual interest rate as a decimal string (e.g., "0.9" for 90% and "0.9001353" for 90.01353%).
  // An empty string "" represents no minimum.
  string min_rate = 3;
}

// EventMaxInterestRateUpdated is emitted when the maximum interest rate is updated.
message EventMaxInterestRateUpdated {
  // vault_address is the bech32 address of the vault.
  string vault_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // admin is the address of the account that updated the limit.
  string admin = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // max_rate is the newly set maximum annual interest rate as a decimal string (e.g., "0.9" for 90% and "0.9001353" for 90.01353%).
  // An empty string "" represents no maximum.
  string max_rate = 3;
}

// EventSwapOutRequested is emitted when a user successfully queues a swap out.
message EventSwapOutRequested {
  // vault_address is the bech32 address of the vault.
  string vault_address = 1;
  // owner is the bech32 address of the user who initiated the swap out.
  string owner = 2;
  // redeem_denom is the denomination of the asset to be redeemed. Always the
  // vault's underlying_asset; retained for event-schema compatibility.
  string redeem_denom = 3;
  // shares is the amount of vault shares the user escrowed for this request.
  string shares = 4;
  // request_id is the unique identifier for this pending swap out request.
  uint64 request_id = 5;
}

// EventSwapOutCompleted is emitted when a pending swap out is successfully processed.
message EventSwapOutCompleted {
  // vault_address is the bech32 address of the vault.
  string vault_address = 1;
  // owner is the bech32 address of the user who received the payout.
  string owner = 2;
  // assets is the amount of assets paid out to the user.
  string assets = 3;
  // request_id is the unique identifier of the swap out request that was completed.
  uint64 request_id = 4;
}

// EventSwapOutRefunded is emitted when a pending swap out fails and the user's
// escrowed shares are returned.
message EventSwapOutRefunded {
  // vault_address is the bech32 address of the vault.
  string vault_address = 1;
  // owner is the bech32 address of the user whose shares were refunded.
  string owner = 2;
  // shares is the amount of vault shares that were returned to the user.
  string shares = 3;
  // request_id is the unique identifier of the swap out request that failed.
  uint64 request_id = 4;
  // reason is a string detailing why the swap out failed.
  string reason = 5;
}

// EventSwapOutRetryScheduled is emitted when a pending swap out could not be
// settled or refunded and was re-keyed to a later retry time. The shares stay
// escrowed, so a rising failure_count signals escrow needing operator attention.
message EventSwapOutRetryScheduled {
  // vault_address is the bech32 address of the vault.
  string vault_address = 1;
  // owner is the bech32 address of the user whose shares remain escrowed.
  string owner = 2;
  // shares is the amount of vault shares still escrowed by the vault.
  string shares = 3;
  // request_id is the unique identifier of the swap out request that failed.
  uint64 request_id = 4;
  // reason is a string detailing why the attempt failed.
  string reason = 5;
  // failure_count is the number of consecutive failed attempts, including this one.
  uint32 failure_count = 6;
  // retry_time is the UNIX timestamp (in seconds) at which the request becomes due again.
  int64 retry_time = 7;
}

// EventPendingSwapOutExpedited is an event emitted when a pending swap-out is expedited by the authority.
message EventPendingSwapOutExpedited {
  // request_id is the numerical identifier of the pending swap-out.
  uint64 request_id = 1;
  // vault is the bech32 address of the vault.
  string vault = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // authority is the address (admin or asset manager) that expedited the swap-out.
  string authority = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}

// EventVaultPaused is emitted when a vault is paused.
message EventVaultPaused {
  // vault_address is the bech32 address of the vault.
  string vault_address = 1;
  // authority is the address (admin or asset manager) that paused the vault.
  string authority = 2;
  // reason is the reason for pausing the vault. For a manual pause (PauseVault
  // tx) this is the user-supplied reason. For an automated auto-pause triggered
  // in the begin/end blocker, this carries the hard-coded reason describing the
  // critical error that forced the pause.
  string reason = 3;
  // total_vault_value is the total value of the vault's assets at the time of pausing.
  string total_vault_value = 4;
  // forced indicates the pause used the force path, waiving the strict
  // reconcile/valuation gate. False for a normal strict pause; true for a
  // forced manual pause and for automated auto-pauses.
  bool forced = 5;
  // forced_error records the reconcile and/or valuation error tolerated by a
  // manual force pause (PauseVault tx). Empty when nothing failed. When
  // non-empty, total_vault_value may be stale or zero. Only the tx path sets
  // this; automated auto-pauses leave it empty and instead encode their error
  // in reason.
  string forced_error = 6;
}

// EventVaultUnpaused is emitted when a vault is unpaused.
message EventVaultUnpaused {
  // vault_address is the bech32 address of the vault.
  string vault_address = 1;
  // authority is the address (admin or asset manager) that unpaused the vault.
  string authority = 2;
  // total_vault_value is the new total value of the vault's assets at the time of unpausing.
  string total_vault_value = 3;
}

// EventBridgeAddressSet is emitted when the bridge address for a vault is configured or updated.
message EventBridgeAddressSet {
  // vault_address is the bech32 address of the vault.
  string vault_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // admin is the address of the account that set the bridge address.
  string admin = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // bridge_address is the configured external address allowed to mint/burn shares.
  string bridge_address = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}

// EventBridgeToggled is emitted when the bridge functionality is enabled or disabled for a vault.
message EventBridgeToggled {
  // vault_address is the bech32 address of the vault.
  string vault_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // admin is the address of the account that toggled bridge functionality.
  string admin = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // enabled is the new state of the bridge functionality.
  bool enabled = 3;
}

// EventBridgeMintShares is emitted when shares are minted via the bridge flow.
message EventBridgeMintShares {
  // vault_address is the bech32 address of the vault.
  string vault_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // bridge is the bech32 address of the bridge signer.
  string bridge = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // shares is the amount of shares minted.
  string shares = 3;
}

// EventBridgeBurnShares is emitted when shares are burned via the bridge flow.
message EventBridgeBurnShares {
  // vault_address is the bech32 address of the vault.
  string vault_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // bridge is the bech32 address of the bridge signer.
  string bridge = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // shares is the amount of shares burned.
  string shares = 3;
}

// EventAssetManagerSet is emitted when a vault's asset manager is set or cleared.
message EventAssetManagerSet {
  // vault_address is the address of the vault whose asset manager was updated.
  string vault_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // admin is the address of the admin who performed the update.
  string admin = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // asset_manager is the new asset manager address. If empty, it indicates the asset manager was cleared.
  string asset_manager = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}

// EventWithdrawalDelayUpdated is an event emitted when a vault's withdrawal delay is updated.
message EventWithdrawalDelayUpdated {
  // vault_address is the bech32 address of the vault.
  string vault_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // authority is the address (admin or asset manager) that updated the withdrawal delay.
  string authority = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // withdrawal_delay_seconds is the newly set withdrawal delay in seconds.
  uint64 withdrawal_delay_seconds = 3;
}

// EventVaultFeeCollected is an event emitted when a vault's AUM fee is collected.
message EventVaultFeeCollected {
  // vault_address is the bech32 address of the vault.
  string vault_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // collected_amount is the amount of the technology fee that was actually collected (e.g., "100nhash").
  string collected_amount = 2;
  // requested_amount is the amount of the technology fee that was calculated for the period (e.g., "120nhash").
  string requested_amount = 3;
  // aum_snapshot is the total vault value at the time of fee calculation (e.g., "1000000underlying").
  string aum_snapshot = 4;
  // duration_seconds is the duration for which the fee was calculated.
  int64 duration_seconds = 5;
  // outstanding_amount is the amount of AUM fee that remains unpaid after this collection (e.g., "20nhash").
  string outstanding_amount = 6;
}

// EventParamsUpdated is an event emitted when the module parameters are updated.
message EventParamsUpdated {
  // params are the newly updated module parameters.
  Params params = 1;
}

// EventVaultAUMFeeBipsUpdated is an event emitted when a vault's AUM fee bips are updated.
message EventVaultAUMFeeBipsUpdated {
  // vault_address is the bech32 address of the vault.
  string vault_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // authority is the address (tech fee address) that updated the fee bips.
  string authority = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // aum_fee_bips is the newly set AUM fee bips for the vault.
  uint32 aum_fee_bips = 3;
}

// EventMinSwapInValueUpdated is an event emitted when a vault's minimum swap-in value is updated.
message EventMinSwapInValueUpdated {
  // vault_address is the bech32 address of the vault.
  string vault_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // authority is the address (admin or asset manager) that updated the limit.
  string authority = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // min_swap_in is the newly set minimum swap-in value, measured in the underlying_asset.
  // - Values must be non-negative (>= 0).
  // - An empty string "" or "0" indicates the minimum was cleared / no configured minimum.
  string min_swap_in = 3;
}

// EventMinSwapOutValueUpdated is an event emitted when a vault's minimum swap-out value is updated.
message EventMinSwapOutValueUpdated {
  // vault_address is the bech32 address of the vault.
  string vault_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // authority is the address (admin or asset manager) that updated the limit.
  string authority = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // min_swap_out is the newly set minimum swap-out value, measured in the underlying_asset.
  // - Values must be non-negative (>= 0).
  // - An empty string "" or "0" indicates the minimum was cleared / no configured minimum.
  string min_swap_out = 3;
}

// EventMaxSwapInValueUpdated is an event emitted when a vault's maximum swap-in value is updated.
message EventMaxSwapInValueUpdated {
  // vault_address is the bech32 address of the vault.
  string vault_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // authority is the address (admin or asset manager) that updated the limit.
  string authority = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // max_swap_in is the newly set maximum swap-in value, measured in the underlying_asset.
  // - Values must be positive (> 0).
  // - An empty string "" indicates no maximum limit.
  string max_swap_in = 3;
}

// EventMaxSwapOutValueUpdated is an event emitted when a vault's maximum swap-out value is updated.
message EventMaxSwapOutValueUpdated {
  // vault_address is the bech32 address of the vault.
  string vault_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // authority is the address (admin or asset manager) that updated the limit.
  string authority = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // max_swap_out is the newly set maximum swap-out value, measured in the underlying_asset.
  // - Values must be positive (> 0).
  // - An empty string "" indicates no maximum limit.
  string max_swap_out = 3;
}

// EventNAVUpdated is emitted when a vault's internal NAV entry for a denom is created or updated.
message EventNAVUpdated {
  // vault_address is the bech32 address of the vault.
  string vault_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // denom is the asset denomination whose NAV entry was updated.
  string denom = 2;
  // price is the total value of volume units of the denom, denominated in the vault's underlying asset.
  string price = 3;
  // volume is the number of units of the denom that price covers.
  string volume = 4;
  // source identifies the origin of this NAV update.
  string source = 5;
  // signer is the NAV authority address that performed the update.
  string signer = 6 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // updated_block_height is the block height at which the NAV entry was updated.
  int64 updated_block_height = 7;
}

// EventNAVRemoved is emitted when a vault's internal NAV entry for a denom is removed,
// such as when an outbound settlement leaves the vault holding zero of the denom.
message EventNAVRemoved {
  // vault_address is the bech32 address of the vault.
  string vault_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // denom is the asset denomination whose NAV entry was removed.
  string denom = 2;
  // last_price is the total value of last_volume units of the denom recorded
  // before removal, rendered as a coin string.
  string last_price = 3;
  // last_volume is the number of units of the denom that last_price covered.
  string last_volume = 4;
  // signer is the NAV authority address that removed the entry. It is empty when
  // the protocol removed the entry itself, such as an outbound settlement draining
  // the denom.
  string signer = 5 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}

// EventNAVAuthorityUpdated is emitted when a vault's NAV authority is rotated.
message EventNAVAuthorityUpdated {
  // vault_address is the bech32 address of the vault.
  string vault_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // admin is the address of the vault administrator that performed the rotation.
  string admin = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // new_authority is the address that is now authorized to mutate the vault's internal NAV table.
  string new_authority = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"];
}

// EventAssetAccepted is emitted when the asset manager settles a pending
// exchange-module payment whose target is the vault.
message EventAssetAccepted {
  // vault_address is the bech32 address of the vault that settled the payment.
  string vault_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // source is the bech32 address of the account that created the settled payment.
  string source = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // external_id, together with source, identifies the settled payment.
  string external_id = 3;
  // source_amount is the funds the source paid the vault, rendered as a coins string.
  string source_amount = 4;
  // target_amount is the funds the vault paid the source, rendered as a coins string.
  string target_amount = 5;
  // direction indicates whether the asset moved into the vault ("inbound") or
  // out of the vault ("outbound") relative to the vault's underlying asset.
  string direction = 6;
}

// EventAssetRejected is emitted when the asset manager declines a pending
// exchange-module payment whose target is the vault.
message EventAssetRejected {
  // vault_address is the bech32 address of the vault that rejected the payment.
  string vault_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // source is the bech32 address of the account that created the rejected payment.
  string source = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
  // external_id, together with source, identifies the rejected payment.
  string external_id = 3;
}
