seedelf_cli::transaction

Function seedelf_token_name

Source
pub fn seedelf_token_name(label: String, inputs: Option<&Vec<Input>>) -> Vec<u8> 
Expand description

Generates the SeedElf token name.

This function constructs a token name by concatenating a prefix, a provided label, the smallest input’s transaction index (formatted as hex), and its transaction hash. The smallest input is determined lexicographically based on its transaction hash and index. The result is a byte vector derived from the concatenated string.

§Arguments

  • label - A string label to include in the token name.
  • inputs - An optional reference to a vector of Input structs. The smallest input is selected based on lexicographical order of the transaction hash and the index.

§Returns

  • Vec<u8> - A vector of bytes representing the constructed token name.