github.com/Finschia/finschia-sdk@v0.49.1/proto/lbm/collection/v1/tx.proto (about)

     1  syntax = "proto3";
     2  package lbm.collection.v1;
     3  
     4  import "gogoproto/gogo.proto";
     5  
     6  import "lbm/collection/v1/collection.proto";
     7  
     8  option go_package = "github.com/Finschia/finschia-sdk/x/collection";
     9  
    10  option (gogoproto.equal_all) = false;
    11  
    12  // Msg defines the collection Msg service.
    13  service Msg {
    14    // SendFT defines a method to send fungible tokens from one account to another account.
    15    // Fires:
    16    // - EventSent
    17    // - transfer_ft (deprecated, not typed)
    18    rpc SendFT(MsgSendFT) returns (MsgSendFTResponse) {
    19      option deprecated = true;
    20    }
    21  
    22    // OperatorSendFT defines a method to send fungible tokens from one account to another account by the operator.
    23    // Fires:
    24    // - EventSent
    25    // - transfer_ft_from (deprecated, not typed)
    26    rpc OperatorSendFT(MsgOperatorSendFT) returns (MsgOperatorSendFTResponse) {
    27      option deprecated = true;
    28    }
    29  
    30    // SendNFT defines a method to send non-fungible tokens from one account to another account.
    31    // Fires:
    32    // - EventSent
    33    // - transfer_nft (deprecated, not typed)
    34    // - operation_transfer_nft (deprecated, not typed)
    35    rpc SendNFT(MsgSendNFT) returns (MsgSendNFTResponse);
    36  
    37    // OperatorSendNFT defines a method to send non-fungible tokens from one account to another account by the operator.
    38    // Fires:
    39    // - EventSent
    40    // - transfer_nft_from (deprecated, not typed)
    41    // - operation_transfer_nft (deprecated, not typed)
    42    rpc OperatorSendNFT(MsgOperatorSendNFT) returns (MsgOperatorSendNFTResponse);
    43  
    44    // AuthorizeOperator allows one to send tokens on behalf of the holder.
    45    // Fires:
    46    // - EventAuthorizedOperator
    47    // - approve_collection (deprecated, not typed)
    48    rpc AuthorizeOperator(MsgAuthorizeOperator) returns (MsgAuthorizeOperatorResponse);
    49  
    50    // RevokeOperator revokes the authorization of the operator to send the holder's token.
    51    // Fires:
    52    // - EventRevokedOperator
    53    // - disapprove_collection (deprecated, not typed)
    54    rpc RevokeOperator(MsgRevokeOperator) returns (MsgRevokeOperatorResponse);
    55  
    56    // CreateContract defines a method to create a contract for collection.
    57    // it grants `mint`, `burn`, `modify` and `issue` permissions on the contract to its creator.
    58    // Fires:
    59    // - EventCreatedContract
    60    // - create_collection (deprecated, not typed)
    61    rpc CreateContract(MsgCreateContract) returns (MsgCreateContractResponse);
    62  
    63    // IssueFT defines a method to create a class of fungible token.
    64    // Fires:
    65    // - EventCreatedFTClass
    66    // - EventMintedFT
    67    // - issue_ft (deprecated, not typed)
    68    // Note: it does not grant any permissions to its issuer.
    69    rpc IssueFT(MsgIssueFT) returns (MsgIssueFTResponse) {
    70      option deprecated = true;
    71    }
    72  
    73    // IssueNFT defines a method to create a class of non-fungible token.
    74    // Fires:
    75    // - EventCreatedNFTClass
    76    // - issue_nft (deprecated, not typed)
    77    // Note: it DOES grant `mint` and `burn` permissions to its issuer.
    78    rpc IssueNFT(MsgIssueNFT) returns (MsgIssueNFTResponse);
    79  
    80    // MintFT defines a method to mint fungible tokens.
    81    // Fires:
    82    // - EventMintedFT
    83    // - mint_ft (deprecated, not typed)
    84    rpc MintFT(MsgMintFT) returns (MsgMintFTResponse) {
    85      option deprecated = true;
    86    }
    87  
    88    // MintNFT defines a method to mint non-fungible tokens.
    89    // Fires:
    90    // - EventMintedNFT
    91    // - mint_nft (deprecated, not typed)
    92    rpc MintNFT(MsgMintNFT) returns (MsgMintNFTResponse);
    93  
    94    // BurnFT defines a method to burn fungible tokens.
    95    // Fires:
    96    // - EventBurned
    97    // - burn_ft (deprecated, not typed)
    98    // - burn_nft (deprecated, not typed)
    99    // - operation_burn_nft (deprecated, not typed)
   100    rpc BurnFT(MsgBurnFT) returns (MsgBurnFTResponse) {
   101      option deprecated = true;
   102    }
   103  
   104    // OperatorBurnFT defines a method to burn fungible tokens of the holder by the operator.
   105    // Fires:
   106    // - EventBurned
   107    // - burn_ft_from (deprecated, not typed)
   108    // - burn_nft_from (deprecated, not typed)
   109    // - operation_burn_nft (deprecated, not typed)
   110    rpc OperatorBurnFT(MsgOperatorBurnFT) returns (MsgOperatorBurnFTResponse) {
   111      option deprecated = true;
   112    }
   113  
   114    // BurnNFT defines a method to burn non-fungible tokens.
   115    // Fires:
   116    // - EventBurned
   117    // - burn_ft (deprecated, not typed)
   118    // - burn_nft (deprecated, not typed)
   119    // - operation_burn_nft (deprecated, not typed)
   120    rpc BurnNFT(MsgBurnNFT) returns (MsgBurnNFTResponse);
   121  
   122    // OperatorBurnNFT defines a method to burn non-fungible tokens of the holder by the operator.
   123    // Fires:
   124    // - EventBurned
   125    // - burn_ft_from (deprecated, not typed)
   126    // - burn_nft_from (deprecated, not typed)
   127    // - operation_burn_nft (deprecated, not typed)
   128    rpc OperatorBurnNFT(MsgOperatorBurnNFT) returns (MsgOperatorBurnNFTResponse);
   129  
   130    // Modify defines a method to modify metadata.
   131    // Fires:
   132    // - EventModifiedContract
   133    // - modify_collection (deprecated, not typed)
   134    // - EventModifiedTokenClass
   135    // - modify_token_type (deprecated, not typed)
   136    // - modify_token (deprecated, not typed)
   137    // - EventModifiedNFT
   138    rpc Modify(MsgModify) returns (MsgModifyResponse);
   139  
   140    // GrantPermission allows one to mint or burn tokens or modify metadata.
   141    // Fires:
   142    // - EventGranted
   143    // - grant_perm (deprecated, not typed)
   144    rpc GrantPermission(MsgGrantPermission) returns (MsgGrantPermissionResponse);
   145  
   146    // RevokePermission abandons a permission.
   147    // Fires:
   148    // - EventRenounced
   149    // - revoke_perm (deprecated, not typed)
   150    rpc RevokePermission(MsgRevokePermission) returns (MsgRevokePermissionResponse);
   151  
   152    // Attach defines a method to attach a token to another token.
   153    // Fires:
   154    // - EventAttach
   155    // - attach (deprecated, not typed)
   156    // - operation_root_changed (deprecated, not typed)
   157    rpc Attach(MsgAttach) returns (MsgAttachResponse) {
   158      option deprecated = true;
   159    }
   160  
   161    // Detach defines a method to detach a token from another token.
   162    // Fires:
   163    // - EventDetach
   164    // - detach (deprecated, not typed)
   165    // - operation_root_changed (deprecated, not typed)
   166    rpc Detach(MsgDetach) returns (MsgDetachResponse) {
   167      option deprecated = true;
   168    }
   169  
   170    // OperatorAttach defines a method to attach a token to another token by operator.
   171    // Fires:
   172    // - EventAttach
   173    // - attach_from (deprecated, not typed)
   174    // - operation_root_changed (deprecated, not typed)
   175    rpc OperatorAttach(MsgOperatorAttach) returns (MsgOperatorAttachResponse) {
   176      option deprecated = true;
   177    }
   178  
   179    // OperatorDetach defines a method to detach a token from another token by operator.
   180    // Fires:
   181    // - EventDetach
   182    // - detach_from (deprecated, not typed)
   183    // - operation_root_changed (deprecated, not typed)
   184    rpc OperatorDetach(MsgOperatorDetach) returns (MsgOperatorDetachResponse) {
   185      option deprecated = true;
   186    }
   187  }
   188  
   189  // MsgSendFT is the Msg/SendFT request type.
   190  message MsgSendFT {
   191    option deprecated = true;
   192  
   193    // contract id associated with the contract.
   194    string contract_id = 1;
   195    // the address which the transfer is from.
   196    string from = 2;
   197    // the address which the transfer is to.
   198    string to = 3;
   199    // the amount of the transfer.
   200    // Note: amount may be empty.
   201    repeated Coin amount = 4 [(gogoproto.nullable) = false];
   202  }
   203  
   204  // MsgSendFTResponse is the Msg/SendFT response type.
   205  message MsgSendFTResponse {
   206    option deprecated = true;
   207  }
   208  
   209  // MsgOperatorSendFT is the Msg/OperatorSendFT request type.
   210  message MsgOperatorSendFT {
   211    option deprecated = true;
   212  
   213    // contract id associated with the contract.
   214    string contract_id = 1;
   215    // the address of the operator.
   216    string operator = 2;
   217    // the address which the transfer is from.
   218    string from = 3;
   219    // the address which the transfer is to.
   220    string to = 4;
   221    // the amount of the transfer.
   222    // Note: amount may be empty.
   223    repeated Coin amount = 5 [(gogoproto.nullable) = false];
   224  }
   225  
   226  // MsgOperatorSendFTResponse is the Msg/OperatorSendFT response type.
   227  message MsgOperatorSendFTResponse {
   228    option deprecated = true;
   229  }
   230  
   231  // MsgSendNFT is the Msg/SendNFT request type.
   232  message MsgSendNFT {
   233    // contract id associated with the contract.
   234    string contract_id = 1;
   235    // the address which the transfer is from.
   236    string from = 2;
   237    // the address which the transfer is to.
   238    string to = 3;
   239    // the token ids to transfer.
   240    repeated string token_ids = 4;
   241  }
   242  
   243  // MsgSendNFTResponse is the Msg/SendNFT response type.
   244  message MsgSendNFTResponse {}
   245  
   246  // MsgOperatorSendNFT is the Msg/OperatorSendNFT request type.
   247  message MsgOperatorSendNFT {
   248    // contract id associated with the contract.
   249    string contract_id = 1;
   250    // the address of the operator.
   251    string operator = 2;
   252    // the address which the transfer is from.
   253    string from = 3;
   254    // the address which the transfer is to.
   255    string to = 4;
   256    // the token ids to transfer.
   257    repeated string token_ids = 5;
   258  }
   259  
   260  // MsgOperatorSendNFTResponse is the Msg/OperatorSendNFT response type.
   261  message MsgOperatorSendNFTResponse {}
   262  
   263  // MsgAuthorizeOperator is the Msg/AuthorizeOperator request type.
   264  message MsgAuthorizeOperator {
   265    // contract id associated with the contract.
   266    string contract_id = 1;
   267    // address of the holder who allows the manipulation of its token.
   268    string holder = 2;
   269    // address which the manipulation is allowed to.
   270    string operator = 3;
   271  }
   272  
   273  // MsgAuthorizeOperatorResponse is the Msg/AuthorizeOperator response type.
   274  message MsgAuthorizeOperatorResponse {}
   275  
   276  // MsgRevokeOperator is the Msg/RevokeOperator request type.
   277  message MsgRevokeOperator {
   278    // contract id associated with the contract.
   279    string contract_id = 1;
   280    // address of the holder who allows the manipulation of its token.
   281    string holder = 2;
   282    // address which the manipulation is allowed to.
   283    string operator = 3;
   284  }
   285  
   286  // MsgRevokeOperatorResponse is the Msg/RevokeOperator response type.
   287  message MsgRevokeOperatorResponse {}
   288  
   289  // MsgCreateContract is the Msg/CreateContract request type.
   290  //
   291  // Signer: `owner`
   292  message MsgCreateContract {
   293    // address which all the permissions on the contract will be granted to (not a permanent property).
   294    string owner = 1;
   295  
   296    // name defines the human-readable name of the contract.
   297    string name = 2;
   298    // uri for the contract image stored off chain.
   299    string uri = 3;
   300    // meta is a brief description of the contract.
   301    string meta = 4;
   302  }
   303  
   304  // MsgCreateContractResponse is the Msg/CreateContract response type.
   305  message MsgCreateContractResponse {
   306    // id of the new contract.
   307    string contract_id = 1;
   308  }
   309  
   310  // MsgIssueFT is the Msg/IssueFT request type.
   311  //
   312  // Signer: `owner`
   313  message MsgIssueFT {
   314    option deprecated = true;
   315  
   316    // contract id associated with the contract.
   317    string contract_id = 1;
   318    // name defines the human-readable name of the token type.
   319    string name = 2;
   320    // meta is a brief description of the token type.
   321    string meta = 3;
   322    // decimals is the number of decimals which one must divide the amount by to get its user representation.
   323    int32 decimals = 4;
   324    // mintable represents whether the token is allowed to be minted or burnt.
   325    bool mintable = 5;
   326  
   327    // the address of the grantee which must have the permission to issue a token.
   328    string owner = 6;
   329  
   330    // the address to send the minted tokens to. mandatory.
   331    string to = 7;
   332    // the amount of tokens to mint on the issuance.
   333    // Note: if you provide negative amount, a panic may result.
   334    // Note: amount may be zero.
   335    string amount = 8
   336        [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false];
   337  }
   338  
   339  // MsgIssueFTResponse is the Msg/IssueFT response type.
   340  message MsgIssueFTResponse {
   341    option deprecated = true;
   342  
   343    // id of the token.
   344    string token_id = 1;
   345  }
   346  
   347  // MsgIssueNFT is the Msg/IssueNFT request type.
   348  //
   349  // Signer: `owner`
   350  message MsgIssueNFT {
   351    // contract id associated with the contract.
   352    string contract_id = 1;
   353    // name defines the human-readable name of the token type.
   354    string name = 2;
   355    // meta is a brief description of the token type.
   356    string meta = 3;
   357  
   358    // the address of the grantee which must have the permission to issue a token.
   359    string owner = 4;
   360  }
   361  
   362  // MsgIssueNFTResponse is the Msg/IssueNFT response type.
   363  message MsgIssueNFTResponse {
   364    // id of the new token type.
   365    // refer to TokenType for the definition.
   366    string token_type = 1;
   367  }
   368  
   369  // MsgMintFT is the Msg/MintFT request type.
   370  //
   371  // Signer: `from`
   372  message MsgMintFT {
   373    option deprecated = true;
   374  
   375    // contract id associated with the contract.
   376    string contract_id = 1;
   377    // address of the grantee which has the permission for the mint.
   378    string from = 2;
   379    // address which the minted tokens will be sent to.
   380    string to = 3;
   381    // the amount of the mint.
   382    // Note: amount may be empty.
   383    repeated Coin amount = 4 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "Coins"];
   384  }
   385  
   386  // MsgMintFTResponse is the Msg/MintFT response type.
   387  message MsgMintFTResponse {
   388    option deprecated = true;
   389  }
   390  
   391  // MsgMintNFT is the Msg/MintNFT request type.
   392  //
   393  // Signer: `from`
   394  message MsgMintNFT {
   395    // contract id associated with the contract.
   396    string contract_id = 1;
   397    // address of the grantee which has the permission for the mint.
   398    string from = 2;
   399    // address which the minted token will be sent to.
   400    string to = 3;
   401    // parameters for the minted tokens.
   402    repeated MintNFTParam params = 4 [(gogoproto.nullable) = false];
   403  }
   404  
   405  // MsgMintNFTResponse is the Msg/MintNFT response type.
   406  message MsgMintNFTResponse {
   407    // ids of the new non-fungible tokens.
   408    repeated string token_ids = 1;
   409  }
   410  
   411  // MintNFTParam defines a parameter for minting nft.
   412  message MintNFTParam {
   413    // token type or class id of the nft.
   414    // Note: it cannot start with zero.
   415    // refer to TokenType for the definition.
   416    string token_type = 1;
   417    // name defines the human-readable name of the nft (mandatory).
   418    // Note: it has an app-specific limit in length.
   419    string name = 2;
   420    // meta is a brief description of the nft.
   421    // Note: it has an app-specific limit in length.
   422    string meta = 3;
   423  }
   424  
   425  // MsgBurnFT is the Msg/BurnFT request type.
   426  message MsgBurnFT {
   427    option deprecated = true;
   428  
   429    // contract id associated with the contract.
   430    string contract_id = 1;
   431    // address which the tokens will be burnt from.
   432    // Note: it must have the permission for the burn.
   433    string from = 2;
   434    // the amount of the burn.
   435    // Note: amount may be empty.
   436    repeated Coin amount = 3 [(gogoproto.nullable) = false];
   437  }
   438  
   439  // MsgBurnFTResponse is the Msg/BurnFT response type.
   440  message MsgBurnFTResponse {
   441    option deprecated = true;
   442  }
   443  
   444  // MsgOperatorBurnFT is the Msg/OperatorBurnFT request type.
   445  message MsgOperatorBurnFT {
   446    option deprecated = true;
   447  
   448    // contract id associated with the contract.
   449    string contract_id = 1;
   450    // address which triggers the burn.
   451    // Note: it must have the permission for the burn.
   452    // Note: it must have been authorized by from.
   453    string operator = 2;
   454    // address which the tokens will be burnt from.
   455    string from = 3;
   456    // the amount of the burn.
   457    // Note: amount may be empty.
   458    repeated Coin amount = 4 [(gogoproto.nullable) = false];
   459  }
   460  
   461  // MsgOperatorBurnFTResponse is the Msg/OperatorBurnFT response type.
   462  message MsgOperatorBurnFTResponse {
   463    option deprecated = true;
   464  }
   465  
   466  // MsgBurnNFT is the Msg/BurnNFT request type.
   467  message MsgBurnNFT {
   468    // contract id associated with the contract.
   469    string contract_id = 1;
   470    // address which the tokens will be burnt from.
   471    // Note: it must have the permission for the burn.
   472    string from = 2;
   473    // the token ids to burn.
   474    // Note: id cannot start with zero.
   475    repeated string token_ids = 3;
   476  }
   477  
   478  // MsgBurnNFTResponse is the Msg/BurnNFT response type.
   479  message MsgBurnNFTResponse {}
   480  
   481  // MsgOperatorBurnNFT is the Msg/OperatorBurnNFT request type.
   482  message MsgOperatorBurnNFT {
   483    // contract id associated with the contract.
   484    string contract_id = 1;
   485    // address which triggers the burn.
   486    // Note: it must have the permission for the burn.
   487    // Note: it must have been authorized by from.
   488    string operator = 2;
   489    // address which the tokens will be burnt from.
   490    string from = 3;
   491    // the token ids to burn.
   492    // Note: id cannot start with zero.
   493    repeated string token_ids = 4;
   494  }
   495  
   496  // MsgOperatorBurnNFTResponse is the Msg/OperatorBurnNFT response type.
   497  message MsgOperatorBurnNFTResponse {}
   498  
   499  // MsgModify is the Msg/Modify request type.
   500  message MsgModify {
   501    // contract id associated with the contract.
   502    string contract_id = 1;
   503    // the address of the grantee which must have modify permission.
   504    string owner = 2;
   505    // token type of the token.
   506    // refer to TokenType for the definition.
   507    string token_type = 3;
   508    // token index of the token.
   509    // if index is empty, it would modify the corresponding token type.
   510    // if index is not empty, it would modify the corresponding nft.
   511    // Note: if token type is of FTs, the index cannot be empty.
   512    string token_index = 4;
   513    // changes to apply.
   514    // possible attribute keys on modifying collection: name, uri, base_img_uri (deprecated), meta.
   515    // possible attribute keys on modifying token type and token: name, meta.
   516    repeated Attribute changes = 5 [(gogoproto.nullable) = false];
   517  }
   518  
   519  // MsgModifyResponse is the Msg/Modify response type.
   520  message MsgModifyResponse {}
   521  
   522  // MsgGrantPermission is the Msg/GrantPermission request type.
   523  message MsgGrantPermission {
   524    // contract id associated with the contract.
   525    string contract_id = 1;
   526    // address of the granter which must have the permission to give.
   527    string from = 2;
   528    // address of the grantee.
   529    string to = 3;
   530    // permission on the contract.
   531    string permission = 4;
   532  }
   533  
   534  // MsgGrantPermissionResponse is the Msg/GrantPermission response type.
   535  message MsgGrantPermissionResponse {}
   536  
   537  // MsgRevokePermission is the Msg/RevokePermission request type.
   538  message MsgRevokePermission {
   539    // contract id associated with the contract.
   540    string contract_id = 1;
   541    // address of the grantee which abandons the permission.
   542    string from = 2;
   543    // permission on the contract.
   544    string permission = 3;
   545  }
   546  
   547  // MsgRevokePermissionResponse is the Msg/RevokePermission response type.
   548  message MsgRevokePermissionResponse {}
   549  
   550  // MsgAttach is the Msg/Attach request type.
   551  //
   552  // Signer: `from`
   553  message MsgAttach {
   554    option deprecated = true;
   555  
   556    // contract id associated with the contract.
   557    string contract_id = 1;
   558    // address of the owner of the token.
   559    string from = 2;
   560    // token id of the token to attach.
   561    string token_id = 3;
   562    // to token id which one attachs the token to.
   563    string to_token_id = 4;
   564  }
   565  
   566  // MsgAttachResponse is the Msg/Attach response type.
   567  message MsgAttachResponse {
   568    option deprecated = true;
   569  }
   570  
   571  // MsgDetach is the Msg/Detach request type.
   572  //
   573  // Signer: `from`
   574  message MsgDetach {
   575    option deprecated = true;
   576  
   577    // contract id associated with the contract.
   578    string contract_id = 1;
   579    // address of the owner of the token.
   580    string from = 2;
   581    // token id of the token to detach.
   582    string token_id = 3;
   583  }
   584  
   585  // MsgDetachResponse is the Msg/Detach response type.
   586  message MsgDetachResponse {
   587    option deprecated = true;
   588  }
   589  
   590  // MsgOperatorAttach is the Msg/OperatorAttach request type.
   591  message MsgOperatorAttach {
   592    option deprecated = true;
   593  
   594    // contract id associated with the contract.
   595    string contract_id = 1;
   596    // address of the operator.
   597    string operator = 2;
   598    // address of the owner of the token.
   599    string from = 3;
   600    // token id of the token to attach.
   601    string token_id = 4;
   602    // to token id which one attachs the token to.
   603    string to_token_id = 5;
   604  }
   605  
   606  // MsgOperatorAttachResponse is the Msg/OperatorAttach response type.
   607  message MsgOperatorAttachResponse {
   608    option deprecated = true;
   609  }
   610  
   611  // MsgOperatorDetach is the Msg/OperatorDetach request type.
   612  message MsgOperatorDetach {
   613    option deprecated = true;
   614  
   615    // contract id associated with the contract.
   616    string contract_id = 1;
   617    // address of the operator.
   618    string operator = 2;
   619    // address of the owner of the token.
   620    string from = 3;
   621    // token id of the token to detach.
   622    string token_id = 4;
   623  }
   624  
   625  // MsgOperatorDetachResponse is the Msg/OperatorDetach response type.
   626  message MsgOperatorDetachResponse {
   627    option deprecated = true;
   628  }