github.com/InjectiveLabs/sdk-go@v1.53.0/proto/injective/insurance/v1beta1/tx.proto (about)

     1  syntax = "proto3";
     2  package injective.insurance.v1beta1;
     3  
     4  import "gogoproto/gogo.proto";
     5  import "cosmos/base/v1beta1/coin.proto";
     6  import "cosmos/msg/v1/msg.proto";
     7  import "cosmos_proto/cosmos.proto";
     8  import "injective/insurance/v1beta1/insurance.proto";
     9  import "injective/oracle/v1beta1/oracle.proto";
    10  import "amino/amino.proto";
    11  
    12  option go_package = "github.com/InjectiveLabs/injective-core/injective-chain/modules/insurance/types";
    13  
    14  // Msg defines the insurance Msg service.
    15  service Msg {
    16    option (cosmos.msg.v1.service) = true;
    17  
    18    // CreateInsuranceFund defines a method for creating an insurance fund
    19    rpc CreateInsuranceFund(MsgCreateInsuranceFund)
    20        returns (MsgCreateInsuranceFundResponse);
    21  
    22    // Underwrite defines a method for depositing tokens to underwrite an
    23    // insurance fund
    24    rpc Underwrite(MsgUnderwrite) returns (MsgUnderwriteResponse);
    25  
    26    // RequestRedemption defines a method for requesting a redemption of the
    27    // sender's insurance fund tokens
    28    rpc RequestRedemption(MsgRequestRedemption)
    29        returns (MsgRequestRedemptionResponse);
    30  
    31    rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse);
    32  }
    33  
    34  // MsgCreateInsuranceFund a message to create an insurance fund for a derivative
    35  // market.
    36  message MsgCreateInsuranceFund {
    37    option (amino.name) = "insurance/MsgCreateInsuranceFund";
    38    option (gogoproto.equal) = false;
    39    option (gogoproto.goproto_getters) = false;
    40  
    41    option (cosmos.msg.v1.signer) = "sender";
    42  
    43    // Creator of the insurance fund.
    44    string sender = 1;
    45    // Ticker for the derivative market.
    46    string ticker = 2;
    47    // Coin denom to use for the market quote denom
    48    string quote_denom = 3;
    49    // Oracle base currency of the derivative market OR the oracle symbol for the
    50    // binary options market.
    51    string oracle_base = 4;
    52    // Oracle quote currency of the derivative market OR the oracle provider for
    53    // the binary options market.
    54    string oracle_quote = 5;
    55    // Oracle type of the binary options or derivative market
    56    injective.oracle.v1beta1.OracleType oracle_type = 6;
    57    // Expiration time of the derivative market. Should be -1 for perpetual or -2
    58    // for binary options markets.
    59    int64 expiry = 7;
    60    // Initial deposit of the insurance fund
    61    cosmos.base.v1beta1.Coin initial_deposit = 8 [ (gogoproto.nullable) = false ];
    62  }
    63  
    64  message MsgCreateInsuranceFundResponse {}
    65  
    66  // MsgUnderwrite defines a message for depositing coins to underwrite an
    67  // insurance fund
    68  message MsgUnderwrite {
    69    option (amino.name) = "insurance/MsgUnderwrite";
    70    option (gogoproto.equal) = false;
    71    option (gogoproto.goproto_getters) = false;
    72  
    73    option (cosmos.msg.v1.signer) = "sender";
    74  
    75    // Address of the underwriter.
    76    string sender = 1;
    77    // MarketID of the insurance fund.
    78    string market_id = 2;
    79    // Amount of quote_denom to underwrite the insurance fund.
    80    cosmos.base.v1beta1.Coin deposit = 3 [ (gogoproto.nullable) = false ];
    81  }
    82  
    83  message MsgUnderwriteResponse {}
    84  
    85  // MsgRequestRedemption defines a message for requesting a redemption of the
    86  // sender's insurance fund tokens
    87  message MsgRequestRedemption {
    88    option (amino.name) = "insurance/MsgRequestRedemption";
    89    option (gogoproto.equal) = false;
    90    option (gogoproto.goproto_getters) = false;
    91  
    92    option (cosmos.msg.v1.signer) = "sender";
    93  
    94    // Address of the underwriter requesting a redemption.
    95    string sender = 1;
    96    // MarketID of the insurance fund.
    97    string market_id = 2;
    98    // Insurance fund share token amount to be redeemed.
    99    cosmos.base.v1beta1.Coin amount = 3 [ (gogoproto.nullable) = false ];
   100  }
   101  
   102  message MsgRequestRedemptionResponse {}
   103  
   104  message MsgUpdateParams {
   105    option (amino.name) = "insurance/MsgUpdateParams";
   106    option (cosmos.msg.v1.signer) = "authority";
   107  
   108    // authority is the address of the governance account.
   109    string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
   110  
   111    // params defines the insurance parameters to update.
   112    //
   113    // NOTE: All parameters must be supplied.
   114    Params params = 2 [ (gogoproto.nullable) = false ];
   115  }
   116  
   117  message MsgUpdateParamsResponse {}