Skip to content

Functions for retrieving the AssetId and Amount #32

Description

@Hrom131

Describe the feature

Describe the feature

Simplicityhl-std should include functions for easily retrieving the AssetId and Amount for inputs and outputs.

Simplicityhl-std should provide the IndexType enum:

enum IndexType {
    Input,
    Output,
}

Functions for retrieving an AssetId:

  1. get_explicit_asset_id(index: u32, index_type: IndexType)
  2. get_confidential_asset_id(index: u32, index_type: IndexType)
  3. get_explicit_input_asset_id(index: u32)
  4. get_confidential_input_asset_id(index: u32)
  5. get_explicit_output_asset_id(index: u32)
  6. get_confidential_output_asset_id(index: u32)
  7. get_current_explicit_asset_id()
  8. get_current_confidential_asset_id()

Functions for getting Amount:

  1. get_explicit_amount(index: u32, index_type: IndexType)
  2. get_confidential_amount(index: u32, index_type: IndexType)
  3. get_explicit_input_amount(index: u32)
  4. get_confidential_input_amount(index: u32)
  5. get_explicit_output_amount(index: u32)
  6. get_confidential_output_amount(index: u32)
  7. get_current_explicit_amount()
  8. get_current_confidential_amount()

Functions for retrieving the AssetId along with the Amount:

  1. get_explicit_asset_id_with_amount(index: u32, index_type: IndexType)
  2. get_confidential_asset_id_with_amount(index: u32, index_type: IndexType)
  3. get_explicit_input_asset_id_with_amount(index: u32)
  4. get_confidential_input_asset_id_with_amount(index: u32)
  5. get_explicit_output_asset_id_with_amount(index: u32)
  6. get_confidential_output_asset_id_with_amount(index: u32)
  7. get_current_explicit_asset_id_with_amount()
  8. get_current_confidential_asset_id_with_amount()

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status
Q3 2026

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions