---
title: llarp::service::ServiceInfo

---

# llarp::service::ServiceInfo





## Public Functions

|                | Name           |
| -------------- | -------------- |
| void | **[RandomizeVanity](Classes/structllarp_1_1service_1_1ServiceInfo.md#function-randomizevanity)**() |
| bool | **[Verify](Classes/structllarp_1_1service_1_1ServiceInfo.md#function-verify)**(const [llarp_buffer_t](Classes/structllarp__buffer__t.md) & payload, const [Signature](Classes/structllarp_1_1Signature.md) & sig) const |
| const [PubKey](Classes/structllarp_1_1PubKey.md) & | **[EncryptionPublicKey](Classes/structllarp_1_1service_1_1ServiceInfo.md#function-encryptionpublickey)**() const |
| bool | **[Update](Classes/structllarp_1_1service_1_1ServiceInfo.md#function-update)**(const byte_t * sign, const byte_t * enc, const std::optional< [VanityNonce](Classes/structllarp_1_1AlignedBuffer.md) > & nonce ={}) |
| bool | **[operator==](Classes/structllarp_1_1service_1_1ServiceInfo.md#function-operator==)**(const [ServiceInfo](Classes/structllarp_1_1service_1_1ServiceInfo.md) & other) const |
| bool | **[operator!=](Classes/structllarp_1_1service_1_1ServiceInfo.md#function-operator!=)**(const [ServiceInfo](Classes/structllarp_1_1service_1_1ServiceInfo.md) & other) const |
| bool | **[operator<](Classes/structllarp_1_1service_1_1ServiceInfo.md#function-operator<)**(const [ServiceInfo](Classes/structllarp_1_1service_1_1ServiceInfo.md) & other) const |
| std::string | **[ToString](Classes/structllarp_1_1service_1_1ServiceInfo.md#function-tostring)**() const |
| std::string | **[Name](Classes/structllarp_1_1service_1_1ServiceInfo.md#function-name)**() const<br>.loki address  |
| bool | **[UpdateAddr](Classes/structllarp_1_1service_1_1ServiceInfo.md#function-updateaddr)**() |
| const [Address](Classes/structllarp_1_1service_1_1Address.md) & | **[Addr](Classes/structllarp_1_1service_1_1ServiceInfo.md#function-addr)**() const |
| bool | **[CalculateAddress](Classes/structllarp_1_1service_1_1ServiceInfo.md#function-calculateaddress)**(std::array< byte_t, 32 > & data) const<br>calculate our address  |
| bool | **[BDecode](Classes/structllarp_1_1service_1_1ServiceInfo.md#function-bdecode)**([llarp_buffer_t](Classes/structllarp__buffer__t.md) * buf) |
| bool | **[BEncode](Classes/structllarp_1_1service_1_1ServiceInfo.md#function-bencode)**([llarp_buffer_t](Classes/structllarp__buffer__t.md) * buf) const |
| bool | **[DecodeKey](Classes/structllarp_1_1service_1_1ServiceInfo.md#function-decodekey)**(const [llarp_buffer_t](Classes/structllarp__buffer__t.md) & key, [llarp_buffer_t](Classes/structllarp__buffer__t.md) * buf) |

## Public Attributes

|                | Name           |
| -------------- | -------------- |
| [VanityNonce](Classes/structllarp_1_1AlignedBuffer.md) | **[vanity](Classes/structllarp_1_1service_1_1ServiceInfo.md#variable-vanity)**  |
| uint64_t | **[version](Classes/structllarp_1_1service_1_1ServiceInfo.md#variable-version)**  |

## Public Functions Documentation

### function RandomizeVanity

```cpp
inline void RandomizeVanity()
```


### function Verify

```cpp
bool Verify(
    const llarp_buffer_t & payload,
    const Signature & sig
) const
```


### function EncryptionPublicKey

```cpp
inline const PubKey & EncryptionPublicKey() const
```


### function Update

```cpp
bool Update(
    const byte_t * sign,
    const byte_t * enc,
    const std::optional< VanityNonce > & nonce ={}
)
```


### function operator==

```cpp
inline bool operator==(
    const ServiceInfo & other
) const
```


### function operator!=

```cpp
inline bool operator!=(
    const ServiceInfo & other
) const
```


### function operator<

```cpp
inline bool operator<(
    const ServiceInfo & other
) const
```


### function ToString

```cpp
std::string ToString() const
```


### function Name

```cpp
std::string Name() const
```

.loki address 

### function UpdateAddr

```cpp
bool UpdateAddr()
```


### function Addr

```cpp
inline const Address & Addr() const
```


### function CalculateAddress

```cpp
bool CalculateAddress(
    std::array< byte_t, 32 > & data
) const
```

calculate our address 

### function BDecode

```cpp
inline bool BDecode(
    llarp_buffer_t * buf
)
```


### function BEncode

```cpp
bool BEncode(
    llarp_buffer_t * buf
) const
```


### function DecodeKey

```cpp
bool DecodeKey(
    const llarp_buffer_t & key,
    llarp_buffer_t * buf
)
```


## Public Attributes Documentation

### variable vanity

```cpp
VanityNonce vanity;
```


### variable version

```cpp
uint64_t version = llarp::constants::proto_version;
```


-------------------------------

Updated on 2023-04-27 at 04:17:17 +0000