iota_types/stardust/
coin_type.rs1use std::fmt::Display;
5
6use iota_sdk_types::{StructTag, TypeTag};
7
8#[derive(Copy, Clone, Debug, PartialEq, Eq)]
10pub enum CoinType {
11 Iota,
12}
13
14impl CoinType {
15 pub fn to_type_tag(&self) -> TypeTag {
16 match self {
17 Self::Iota => TypeTag::from(StructTag::new_gas()),
18 }
19 }
20}
21
22impl Display for CoinType {
23 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
24 match self {
25 Self::Iota => write!(f, "iota"),
26 }
27 }
28}