# Rust SDK

Find the published SDK [here](https://crates.io/crates/ergonames).

First, we need to add our SDK to our toml file.

```
ergonames = "0.4.0"
```

#### resolve\_ergoname()

```rust
let name: &str = "~balb";
let address: Option<String> = ergonames::resolve_ergoname(name, None);
```

#### check\_already\_registered()

```rust
let name: &str = "~balb";
let registerd: bool = ergonames::check_already_registered(name);
```

#### check\_name\_valid()

```rust
let name: &str = "~balb";
let valid: bool = ergonames::check_name_valid(name);
```

#### reformat\_name()

```rust
let name: &str = "~balb";
let reformated_name: String = ergonames::reformat_name(name);
```

#### check\_name\_price()

```rust
let name: &str = "~balb";
let price: Option<i32> = ergonames::check_name_price(name);
```

#### get\_block\_id\_registered()

```rust
let name: &str = "~balb";
let block_id: Option<String> = ergonames::get_block_id_registered(name, None);
```

#### get\_block\_registered()

```rust
let name: &str = "~balb";
let block: Option<i32> = ergonames::get_block_registered(name, None);
```

#### get\_timestamp\_registered()

```rust
let name: &str = "~balb";
let timestamp: Option<u64> = ergonames::get_timestamp_registered(name, None);
```

#### get\_date\_registered()

```rust
let name: &str = "~balb";
let date: Option<String> = ergonames::get_date_registered(name, None);
```

#### reverse\_search()

```rust
let address: &str = "3WwKzFjZGrtKAV7qSCoJsZK9iJhLLrUa3uwd4yw52bVtDVv6j5TL";
let token_list: Option<Vec<Token>> = ergonames::reverse_search(address, None);
```

#### get\_total\_amount\_owned()

```rust
let address: &str = "3WwKzFjZGrtKAV7qSCoJsZK9iJhLLrUa3uwd4yw52bVtDVv6j5TL";
let amount_owned: Option<u32> = ergonames::get_total_amount_owned(address, None);
```
