Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bindings: update output metadata #1685

Merged
merged 2 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading