use of com.hederahashgraph.api.proto.java.TokenGetNftInfosQuery in project hedera-services by hashgraph.
the class GetTokenNftInfosAnswer method responseGiven.
@Override
public Response responseGiven(Query query, StateView view, ResponseCodeEnum validity, long cost) {
TokenGetNftInfosQuery op = query.getTokenGetNftInfos();
TokenGetNftInfosResponse.Builder response = TokenGetNftInfosResponse.newBuilder();
ResponseType type = op.getHeader().getResponseType();
if (type == COST_ANSWER) {
response.setHeader(costAnswerHeader(NOT_SUPPORTED, 0L));
} else {
response.setHeader(answerOnlyHeader(NOT_SUPPORTED));
}
return Response.newBuilder().setTokenGetNftInfos(response).build();
}
use of com.hederahashgraph.api.proto.java.TokenGetNftInfosQuery in project hedera-services by hashgraph.
the class HapiGetTokenNftInfos method getTokenNftInfosQuery.
private Query getTokenNftInfosQuery(HapiApiSpec spec, Transaction payment, boolean costOnly) {
var id = TxnUtils.asTokenId(token, spec);
TokenGetNftInfosQuery getTokenNftInfosQuery = TokenGetNftInfosQuery.newBuilder().setHeader(costOnly ? answerCostHeader(payment) : answerHeader(payment)).setTokenID(id).setStart(start).setEnd(end).build();
return Query.newBuilder().setTokenGetNftInfos(getTokenNftInfosQuery).build();
}
Aggregations