Skip to content

Commit

Permalink
Update output metadata in bindings (#1685)
Browse files Browse the repository at this point in the history
Co-authored-by: Thibault Martinez <[email protected]>
  • Loading branch information
Thoralf-M and thibault-martinez authored Nov 27, 2023
1 parent 65aacac commit a116dbf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 28 deletions.
24 changes: 8 additions & 16 deletions bindings/nodejs/lib/types/models/api/output-metadata-response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,27 @@ export interface IOutputMetadataResponse {
*/
transactionId: HexEncodedString;
/**
* The index for the output.
* The index of the output within the corresponding transaction.
*/
outputIndex: number;
/**
* Is the output spent.
* Tells if the output is spent in a confirmed transaction or not.
*/
isSpent: boolean;
/**
* The milestone index at which this output was spent.
* The current latest commitment id for which the request was made.
*/
milestoneIndexSpent?: number;
latestCommitmentId: HexEncodedString;
/**
* The milestone timestamp this output was spent.
* The commitment ID of the slot at which this output was spent.
*/
milestoneTimestampSpent?: number;
commitmentIdSpent?: HexEncodedString;
/**
* The transaction this output was spent with.
*/
transactionIdSpent?: HexEncodedString;
/**
* The milestone index at which this output was booked into the ledger.
* The commitment ID at which the output was included into the ledger.
*/
milestoneIndexBooked: number;
/**
* The milestone timestamp this output was booked in the ledger.
*/
milestoneTimestampBooked: number;
/**
* The ledger index at which these output was available at.
*/
ledgerIndex: number;
includedCommitmentId?: HexEncodedString;
}
20 changes: 8 additions & 12 deletions bindings/python/iota_sdk/types/output_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,20 @@ class OutputMetadata:
block_id: The ID of the block in which the output appeared in.
transaction_id: The ID of the transaction in which the output was created.
output_index: The index of the output within the corresponding transaction.
is_spent: Whether the output is already spent.
milestone_index_booked: The index of the milestone which booked/created the output.
milestone_timestamp_booked: The timestamp of the milestone which booked/created the output.
ledger_index: The current ledger index.
milestone_index_spent: The index of the milestone which spent the output.
milestone_timestamp_spent: The timestamp of the milestone which spent the output.
transaction_id_spent: The ID of the transaction that spent the output.
is_spent: Tells if the output is spent in a confirmed transaction or not.
latest_commitment_id: The current latest commitment id for which the request was made.
commitment_id_spent: The commitment ID of the slot at which this output was spent.
transaction_id_spent: The transaction this output was spent with.
included_commitment_id: The commitment ID at which the output was included into the ledger.
"""
block_id: HexStr
transaction_id: HexStr
output_index: int
is_spent: bool
milestone_index_booked: int
milestone_timestamp_booked: int
ledger_index: int
milestone_index_spent: Optional[int] = None
milestone_timestamp_spent: Optional[int] = None
latest_commitment_id: HexStr
commitment_id_spent: Optional[HexStr] = None
transaction_id_spent: Optional[HexStr] = None
included_commitment_id: Optional[HexStr] = None


@json
Expand Down

0 comments on commit a116dbf

Please sign in to comment.