blockfrost / blockfrost-java

Java SDK for the Blockfrost.io API.
Apache License 2.0
11 stars 10 forks source link

AddressService#getAllAddressUtxos does not return datum hashes as outlined in API spec #7

Open will-break-it opened 2 years ago

will-break-it commented 2 years ago

According to the OpenAPI specifications this endpoint should return data_hash, inline_datum and other script output related fields. Unfortunately, it doesn't. Perhaps a new version needs to be released to match the documentation.

bentaye commented 2 years ago

I'd add reference_script_hash to the list of missing fields

This is the class I think, it seems that the 3 fields are missing

public class AddressUtxo {
    /**
     * Transaction hash of the UTXO
     */
    private String txHash;
    /**
     * UTXO index in the transaction
     */
    private Integer outputIndex;
    /**
     * Array of TransactionOutputAmount objects
     */
    private List<TransactionOutputAmount> amount = new ArrayList<TransactionOutputAmount>();
    /**
     * Block number of the UTXO
     */
    private String block;

}

https://github.com/blockfrost/blockfrost-java/blob/master/src/main/java/io/blockfrost/sdk/api/model/AddressUtxo.java

satran004 commented 2 years ago

@bentaye Yes the missing fields need to be added to AddressUtxo.java . You can find the field definitions for this object here in openapi yml https://github.com/blockfrost/openapi/blob/a025b0a994eaea80dcd1a575f54704d7aaffc9da/openapi.yaml#L6950

bentaye commented 2 years ago

I opened a PR here https://github.com/blockfrost/blockfrost-java/pull/8

bentaye commented 2 years ago

@will991 The PR with the new fields have been merge, please check if it is all good now.