github.com/Finschia/finschia-sdk@v0.49.1/proto/lbm/collection/v1/query.proto (about) 1 syntax = "proto3"; 2 package lbm.collection.v1; 3 4 import "cosmos/base/query/v1beta1/pagination.proto"; 5 import "google/api/annotations.proto"; 6 import "lbm/collection/v1/collection.proto"; 7 8 import "google/protobuf/any.proto"; 9 10 import "gogoproto/gogo.proto"; 11 12 option go_package = "github.com/Finschia/finschia-sdk/x/collection"; 13 14 // Query defines the gRPC querier service. 15 service Query { 16 // Balance queries the balance of a single token class for a single account. 17 rpc Balance(QueryBalanceRequest) returns (QueryBalanceResponse) { 18 option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}/balances/{address}/{token_id}"; 19 } 20 21 // AllBalances queries the balance of all token classes for a single account. 22 rpc AllBalances(QueryAllBalancesRequest) returns (QueryAllBalancesResponse) { 23 option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}/balances/{address}"; 24 } 25 26 // FTSupply queries the number of tokens from a given contract id and token id. 27 rpc FTSupply(QueryFTSupplyRequest) returns (QueryFTSupplyResponse) { 28 option deprecated = true; 29 option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}/fts/{token_id}/supply"; 30 } 31 32 // FTMinted queries the number of minted tokens from a given contract id and token id. 33 rpc FTMinted(QueryFTMintedRequest) returns (QueryFTMintedResponse) { 34 option deprecated = true; 35 option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}/fts/{token_id}/minted"; 36 } 37 38 // FTBurnt queries the number of burnt tokens from a given contract id and token id. 39 rpc FTBurnt(QueryFTBurntRequest) returns (QueryFTBurntResponse) { 40 option deprecated = true; 41 option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}/fts/{token_id}/burnt"; 42 } 43 44 // NFTSupply queries the number of tokens from a given contract id and token type. 45 rpc NFTSupply(QueryNFTSupplyRequest) returns (QueryNFTSupplyResponse) { 46 option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}/token_types/{token_type}/supply"; 47 } 48 49 // NFTMinted queries the number of minted tokens from a given contract id and token type. 50 rpc NFTMinted(QueryNFTMintedRequest) returns (QueryNFTMintedResponse) { 51 option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}/token_types/{token_type}/minted"; 52 } 53 54 // NFTBurnt queries the number of burnt tokens from a given contract id and token type. 55 rpc NFTBurnt(QueryNFTBurntRequest) returns (QueryNFTBurntResponse) { 56 option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}/token_types/{token_type}/burnt"; 57 } 58 59 // Contract queries a contract metadata based on its contract id. 60 rpc Contract(QueryContractRequest) returns (QueryContractResponse) { 61 option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}"; 62 } 63 64 // TokenClassTypeName queries the fully qualified message type name of a token class from its class id. 65 // 66 // Since: 0.46.0 (finschia) 67 rpc TokenClassTypeName(QueryTokenClassTypeNameRequest) returns (QueryTokenClassTypeNameResponse) { 68 option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}/token_classes/{class_id}/type_name"; 69 } 70 71 // TokenType queries metadata of a token type. 72 rpc TokenType(QueryTokenTypeRequest) returns (QueryTokenTypeResponse) { 73 option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}/token_types/{token_type}"; 74 } 75 76 // Token queries a metadata of a token from its token id. 77 rpc Token(QueryTokenRequest) returns (QueryTokenResponse) { 78 option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}/tokens/{token_id}"; 79 } 80 81 // Root queries the root of a given nft. 82 rpc Root(QueryRootRequest) returns (QueryRootResponse) { 83 option deprecated = true; 84 option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}/nfts/{token_id}/root"; 85 } 86 87 // HasParent queries whether a given nft has its parent. 88 rpc HasParent(QueryHasParentRequest) returns (QueryHasParentResponse) { 89 option deprecated = true; 90 option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}/nfts/{token_id}/has_parent"; 91 } 92 93 // Parent queries the parent of a given nft. 94 rpc Parent(QueryParentRequest) returns (QueryParentResponse) { 95 option deprecated = true; 96 option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}/nfts/{token_id}/parent"; 97 } 98 99 // Children queries the children of a given nft. 100 rpc Children(QueryChildrenRequest) returns (QueryChildrenResponse) { 101 option deprecated = true; 102 option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}/nfts/{token_id}/children"; 103 } 104 105 // GranteeGrants queries all permissions on a given grantee. 106 rpc GranteeGrants(QueryGranteeGrantsRequest) returns (QueryGranteeGrantsResponse) { 107 option (google.api.http).get = "/lbm/collection/v1/contracts/{contract_id}/grants/{grantee}"; 108 } 109 110 // IsOperatorFor queries whether the operator is authorized by the holder. 111 rpc IsOperatorFor(QueryIsOperatorForRequest) returns (QueryIsOperatorForResponse) {} 112 113 // HoldersByOperator queries holders of a given operator. 114 rpc HoldersByOperator(QueryHoldersByOperatorRequest) returns (QueryHoldersByOperatorResponse) {} 115 } 116 117 // QueryBalanceRequest is the request type for the Query/Balance RPC method. 118 message QueryBalanceRequest { 119 // contract id associated with the contract. 120 string contract_id = 1; 121 // address is the address to query the balance for. 122 string address = 2; 123 // token id associated with the token. 124 string token_id = 3; 125 } 126 127 // QueryBalanceResponse is the response type for the Query/Balance RPC method. 128 message QueryBalanceResponse { 129 // balance is the balance of the token. 130 Coin balance = 1 [(gogoproto.nullable) = false]; 131 } 132 133 // QueryAllBalancesRequest is the request type for the Query/AllBalances RPC method. 134 message QueryAllBalancesRequest { 135 // contract id associated with the contract. 136 string contract_id = 1; 137 // address is the address to query the balances for. 138 string address = 2; 139 140 // pagination defines an optional pagination for the request. 141 cosmos.base.query.v1beta1.PageRequest pagination = 3; 142 } 143 144 // QueryAllBalancesResponse is the response type for the Query/AllBalances RPC method. 145 message QueryAllBalancesResponse { 146 // balances is the balalces of all the tokens. 147 repeated Coin balances = 1 [(gogoproto.nullable) = false]; 148 149 // pagination defines the pagination in the response. 150 cosmos.base.query.v1beta1.PageResponse pagination = 2; 151 } 152 153 // QueryFTSupplyRequest is the request type for the Query/FTSupply RPC method. 154 message QueryFTSupplyRequest { 155 option deprecated = true; 156 157 // contract id associated with the contract. 158 string contract_id = 1; 159 // token id associated with the fungible token. 160 string token_id = 2; 161 } 162 163 // QueryFTSupplyResponse is the response type for the Query/FTSupply RPC method. 164 message QueryFTSupplyResponse { 165 option deprecated = true; 166 167 // supply is the supply of the tokens. 168 string supply = 1 169 [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false]; 170 } 171 172 // QueryFTMintedRequest is the request type for the Query/FTMinted RPC method. 173 message QueryFTMintedRequest { 174 option deprecated = true; 175 176 // contract id associated with the contract. 177 string contract_id = 1; 178 // token id associated with the fungible token. 179 string token_id = 2; 180 } 181 182 // QueryFTMintedResponse is the response type for the Query/FTMinted RPC method. 183 message QueryFTMintedResponse { 184 option deprecated = true; 185 186 // minted is the amount of the minted tokens. 187 string minted = 1 188 [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false]; 189 } 190 191 // QueryFTBurntRequest is the request type for the Query/FTBurnt RPC method. 192 message QueryFTBurntRequest { 193 option deprecated = true; 194 195 // contract id associated with the contract. 196 string contract_id = 1; 197 // token id associated with the fungible token. 198 string token_id = 2; 199 } 200 201 // QueryFTBurntResponse is the response type for the Query/FTBurnt RPC method. 202 message QueryFTBurntResponse { 203 option deprecated = true; 204 205 // burnt is the amount of the burnt tokens. 206 string burnt = 1 207 [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false]; 208 } 209 210 // QueryNFTSupplyRequest is the request type for the Query/NFTSupply RPC method. 211 message QueryNFTSupplyRequest { 212 // contract id associated with the contract. 213 string contract_id = 1; 214 // token type associated with the token type. 215 // refer to TokenType for the definition. 216 string token_type = 2; 217 } 218 219 // QueryNFTSupplyResponse is the response type for the Query/NFTSupply RPC method. 220 message QueryNFTSupplyResponse { 221 // supply is the supply of the non-fungible token. 222 string supply = 1 223 [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false]; 224 } 225 226 // QueryNFTMintedRequest is the request type for the Query/NFTMinted RPC method. 227 message QueryNFTMintedRequest { 228 // contract id associated with the contract. 229 string contract_id = 1; 230 // token type associated with the token type. 231 // refer to TokenType for the definition. 232 string token_type = 2; 233 } 234 235 // QueryNFTMintedResponse is the response type for the Query/NFTMinted RPC method. 236 message QueryNFTMintedResponse { 237 // minted is the amount of minted tokens. 238 string minted = 1 239 [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false]; 240 } 241 242 // QueryNFTBurntRequest is the request type for the Query/NFTBurnt RPC method. 243 message QueryNFTBurntRequest { 244 // contract id associated with the contract. 245 string contract_id = 1; 246 // token type associated with the token type. 247 // refer to TokenType for the definition. 248 string token_type = 2; 249 } 250 251 // QueryNFTBurntResponse is the response type for the Query/NFTBurnt RPC method. 252 message QueryNFTBurntResponse { 253 // burnt is the amount of the burnt tokens. 254 string burnt = 1 255 [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false]; 256 } 257 258 // QueryContractRequest is the request type for the Query/Contract RPC method. 259 message QueryContractRequest { 260 // contract id associated with the contract. 261 string contract_id = 1; 262 } 263 264 // QueryContractResponse is the response type for the Query/Contract RPC method. 265 message QueryContractResponse { 266 // contract is the information of the contract. 267 Contract contract = 1 [(gogoproto.nullable) = false]; 268 } 269 270 // QueryTokenClassTypeNameRequest is the request type for the Query/TokenClassTypeName RPC method. 271 // 272 // Since: 0.46.0 (finschia) 273 message QueryTokenClassTypeNameRequest { 274 // contract id associated with the contract. 275 string contract_id = 1; 276 // class id associated with the token class. 277 string class_id = 2; 278 } 279 280 // QueryTokenClassTypeNameResponse is the response type for the Query/TokenClassTypeName RPC method. 281 // 282 // Since: 0.46.0 (finschia) 283 message QueryTokenClassTypeNameResponse { 284 // type name of the token class. 285 string name = 1; 286 } 287 288 // QueryTokenTypeRequest is the request type for the Query/TokenType RPC method. 289 message QueryTokenTypeRequest { 290 // contract id associated with the contract. 291 string contract_id = 1; 292 // token type associated with the token type. 293 // refer to TokenType for the definition. 294 string token_type = 2; 295 } 296 297 // QueryTokenTypeResponse is the response type for the Query/TokenType RPC method. 298 message QueryTokenTypeResponse { 299 // token type is the information of the token type. 300 TokenType token_type = 1 [(gogoproto.nullable) = false]; 301 } 302 303 // QueryTokenRequest is the request type for the Query/Token RPC method. 304 message QueryTokenRequest { 305 // contract id associated with the contract. 306 string contract_id = 1; 307 // token id associated with the fungible token. 308 string token_id = 2; 309 } 310 311 // QueryTokenResponse is the response type for the Query/Token RPC method. 312 message QueryTokenResponse { 313 // information of the token. 314 google.protobuf.Any token = 1 [(gogoproto.nullable) = false]; 315 } 316 317 // QueryRootRequest is the request type for the Query/Root RPC method. 318 message QueryRootRequest { 319 option deprecated = true; 320 321 // contract id associated with the contract. 322 string contract_id = 1; 323 // token id associated with the non-fungible token. 324 string token_id = 2; 325 } 326 327 // QueryRootResponse is the response type for the Query/Root RPC method. 328 message QueryRootResponse { 329 option deprecated = true; 330 331 // root is the information of the root token. 332 // it would return itself if it's the root token. 333 NFT root = 1 [(gogoproto.nullable) = false]; 334 } 335 336 // QueryHasParentRequest is the request type for the Query/HasParent RPC method. 337 message QueryHasParentRequest { 338 option deprecated = true; 339 340 // contract id associated with the contract. 341 string contract_id = 1; 342 // token id associated wit the non-fungible token. 343 string token_id = 2; 344 } 345 346 // QueryHasParentResponse is the response type for the Query/HasParent RPC method. 347 message QueryHasParentResponse { 348 option deprecated = true; 349 350 // whether the token has its parent. 351 bool has_parent = 1; 352 } 353 354 // QueryParentRequest is the request type for the Query/Parent RPC method. 355 message QueryParentRequest { 356 option deprecated = true; 357 358 // contract id associated with the contract. 359 string contract_id = 1; 360 // token id associated wit the non-fungible token. 361 string token_id = 2; 362 } 363 364 // QueryParentResponse is the response type for the Query/Parent RPC method. 365 message QueryParentResponse { 366 option deprecated = true; 367 368 // parent is the information of the parent token. 369 NFT parent = 1 [(gogoproto.nullable) = false]; 370 } 371 372 // QueryChildrenRequest is the request type for the Query/Children RPC method. 373 message QueryChildrenRequest { 374 option deprecated = true; 375 376 // contract id associated with the contract. 377 string contract_id = 1; 378 // token id associated with the non-fungible token. 379 string token_id = 2; 380 381 // pagination defines an optional pagination for the request. 382 cosmos.base.query.v1beta1.PageRequest pagination = 3; 383 } 384 385 // QueryChildrenResponse is the response type for the Query/Children RPC method. 386 message QueryChildrenResponse { 387 option deprecated = true; 388 389 // children is the information of the child tokens. 390 repeated NFT children = 1 [(gogoproto.nullable) = false]; 391 392 // pagination defines the pagination in the response. 393 cosmos.base.query.v1beta1.PageResponse pagination = 2; 394 } 395 396 // QueryGranteeGrantsRequest is the request type for the Query/GranteeGrants RPC method. 397 message QueryGranteeGrantsRequest { 398 // contract id associated with the contract. 399 string contract_id = 1; 400 // the address of the grantee. 401 string grantee = 2; 402 403 // pagination defines an optional pagination for the request. 404 cosmos.base.query.v1beta1.PageRequest pagination = 3; 405 } 406 407 // QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. 408 message QueryGranteeGrantsResponse { 409 repeated Grant grants = 1 [(gogoproto.nullable) = false]; 410 411 // pagination defines the pagination in the response. 412 cosmos.base.query.v1beta1.PageResponse pagination = 2; 413 } 414 415 // QueryIsOperatorForRequest is the request type for the Query/IsOperatorFor RPC method. 416 message QueryIsOperatorForRequest { 417 // contract id associated with the contract. 418 string contract_id = 1; 419 // the address of the operator. 420 string operator = 2; 421 // the address of the token holder. 422 string holder = 3; 423 } 424 425 // QueryIsOperatorForResponse is the response type for the Query/IsOperatorFor RPC method. 426 message QueryIsOperatorForResponse { 427 bool authorized = 1; 428 } 429 430 // QueryHoldersByOperatorRequest is the request type for the Query/HoldersByOperator RPC method. 431 message QueryHoldersByOperatorRequest { 432 // contract id associated with the contract. 433 string contract_id = 1; 434 // address of the operator. 435 string operator = 2; 436 437 // pagination defines an optional pagination for the request. 438 cosmos.base.query.v1beta1.PageRequest pagination = 3; 439 } 440 441 // QueryHoldersByOperatorResponse is the response type for the Query/HoldersByOperator RPC method. 442 message QueryHoldersByOperatorResponse { 443 repeated string holders = 1; 444 445 // pagination defines the pagination in the response. 446 cosmos.base.query.v1beta1.PageResponse pagination = 2; 447 }