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