1
// Copyright © 2017-2020 Trust Wallet.
2
//
3
// This file is part of Trust. The full Trust copyright notice, including
4
// terms governing use, modification, and redistribution, is contained in the
5
// file LICENSE at the root of the source code distribution tree.
6

7
#pragma once
8

9
#include "../Data.h"
10
#include "../PublicKey.h"
11
#include  "../SS58Address.h"
12
#include  <TrustWalletCore/TWSS58AddressType.h>
13

14
#include <string>
15

16
namespace TW::Kusama {
17

18
class Address: public SS58Address {
19
  public:
20
    /// Determines whether a string makes a valid address.
21 1
    static bool isValid(const std::string& string) { return SS58Address::isValid(string, TWSS58AddressTypeKusama); }
22

23
    /// Initializes a Kusama address with a string representation.
24 1
    Address(const std::string& string): SS58Address(string, TWSS58AddressTypeKusama) {}
25

26
    /// Initializes a Kusama address with a public key.
27 1
    Address(const PublicKey& publicKey): SS58Address(publicKey, TWSS58AddressTypeKusama) {}
28
};
29
} // namespace TW::Kusama
30

Read our documentation on viewing source code .

Loading