@@ -86,6 +86,8 @@ service Platform {
8686 returns (GetTokenStatusesResponse );
8787 rpc getTokenDirectPurchasePrices (GetTokenDirectPurchasePricesRequest )
8888 returns (GetTokenDirectPurchasePricesResponse );
89+ rpc getTokenContractInfo (GetTokenContractInfoRequest )
90+ returns (GetTokenContractInfoResponse );
8991 rpc getTokenPreProgrammedDistributions (
9092 GetTokenPreProgrammedDistributionsRequest )
9193 returns (GetTokenPreProgrammedDistributionsResponse );
@@ -1370,6 +1372,27 @@ message GetTokenStatusesResponse {
13701372 oneof version { GetTokenStatusesResponseV0 v0 = 1 ; }
13711373}
13721374
1375+ // Retrieve direct purchase prices defined for one or more tokens.
1376+ //
1377+ // Some tokens can have a direct purchase price defined using
1378+ // `TokenSetPriceForDirectPurchaseTransition` (see `dpp` crate for details).
1379+ // This request retrieves the direct purchase prices for those tokens and
1380+ // returns [GetTokenDirectPurchasePricesResponse].
1381+ message GetTokenDirectPurchasePricesRequest {
1382+ message GetTokenDirectPurchasePricesRequestV0 {
1383+ // List of token IDs to get prices for.
1384+ //
1385+ // The list must not be empty.
1386+ // Token IDs must have 32 bytes and be unique.
1387+ // Results for non-unique token IDs are undefined.
1388+ repeated bytes token_ids = 1 ;
1389+ // Whether to return proofs for the response, or just direct response.
1390+ bool prove = 2 ;
1391+ }
1392+ oneof version { GetTokenDirectPurchasePricesRequestV0 v0 = 1 ; }
1393+ }
1394+
1395+
13731396// Response to GetTokenDirectPurchasePricesRequest, containing information about
13741397// direct purchase prices defined for requested token IDs.
13751398message GetTokenDirectPurchasePricesResponse {
@@ -1419,24 +1442,49 @@ message GetTokenDirectPurchasePricesResponse {
14191442 oneof version { GetTokenDirectPurchasePricesResponseV0 v0 = 1 ; }
14201443}
14211444
1422- // Retrieve direct purchase prices defined for one or more tokens.
1423- //
1424- // Some tokens can have a direct purchase price defined using
1425- // `TokenSetPriceForDirectPurchaseTransition` (see `dpp` crate for details).
1426- // This request retrieves the direct purchase prices for those tokens and
1427- // returns [GetTokenDirectPurchasePricesResponse].
1428- message GetTokenDirectPurchasePricesRequest {
1429- message GetTokenDirectPurchasePricesRequestV0 {
1430- // List of token IDs to get prices for.
1431- //
1432- // The list must not be empty.
1433- // Token IDs must have 32 bytes and be unique.
1434- // Results for non-unique token IDs are undefined.
1435- repeated bytes token_ids = 1 ;
1436- // Whether to return proofs for the response, or just direct response.
1445+ // Request to retrieve token contract info for a specific token ID.
1446+ message GetTokenContractInfoRequest {
1447+ message GetTokenContractInfoRequestV0 {
1448+ // The token ID to retrieve contract info for.
1449+ // Must be exactly 32 bytes.
1450+ bytes token_id = 1 ;
1451+
1452+ // Whether to return a cryptographic proof.
14371453 bool prove = 2 ;
14381454 }
1439- oneof version { GetTokenDirectPurchasePricesRequestV0 v0 = 1 ; }
1455+
1456+ oneof version {
1457+ GetTokenContractInfoRequestV0 v0 = 1 ;
1458+ }
1459+ }
1460+
1461+ // Response to GetTokenContractInfoRequest.
1462+ message GetTokenContractInfoResponse {
1463+ message GetTokenContractInfoResponseV0 {
1464+ // Direct token contract info.
1465+ message TokenContractInfoData {
1466+ // The ID of the contract associated with the token.
1467+ bytes contract_id = 1 ;
1468+
1469+ // The position of the token within the contract.
1470+ uint32 token_contract_position = 2 ;
1471+ }
1472+
1473+ oneof result {
1474+ // Direct token contract data
1475+ TokenContractInfoData data = 1 ;
1476+
1477+ // Cryptographic proof of token contract info
1478+ Proof proof = 2 ;
1479+ }
1480+
1481+ // Metadata about the blockchain state at the time of the query
1482+ ResponseMetadata metadata = 3 ;
1483+ }
1484+
1485+ oneof version {
1486+ GetTokenContractInfoResponseV0 v0 = 1 ;
1487+ }
14401488}
14411489
14421490message GetTokenPreProgrammedDistributionsRequest {
0 commit comments