use of com.hederahashgraph.api.proto.java.TokenGetAccountNftInfosQuery in project hedera-services by hashgraph.
the class HapiGetAccountNftInfos method getAccountNftInfosQuery.
private Query getAccountNftInfosQuery(HapiApiSpec spec, Transaction payment, boolean costOnly) {
var id = TxnUtils.asId(account, spec);
TokenGetAccountNftInfosQuery getAccountNftInfosQuery = TokenGetAccountNftInfosQuery.newBuilder().setHeader(costOnly ? answerCostHeader(payment) : answerHeader(payment)).setAccountID(id).setStart(start).setEnd(end).build();
return Query.newBuilder().setTokenGetAccountNftInfos(getAccountNftInfosQuery).build();
}
use of com.hederahashgraph.api.proto.java.TokenGetAccountNftInfosQuery in project hedera-services by hashgraph.
the class GetAccountNftInfosAnswer method responseGiven.
@Override
public Response responseGiven(Query query, StateView view, ResponseCodeEnum validity, long cost) {
TokenGetAccountNftInfosQuery op = query.getTokenGetAccountNftInfos();
TokenGetAccountNftInfosResponse.Builder response = TokenGetAccountNftInfosResponse.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().setTokenGetAccountNftInfos(response).build();
}
Aggregations