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 "../CoinEntry.h"
10

11
namespace TW::Polkadot {
12

13
/// Entry point for implementation of Polkadot coin.
14
/// Note: do not put the implementation here (no matter how simple), to avoid having coin-specific includes in this file
15
class Entry: public CoinEntry {
16
public:
17 1
    virtual const std::vector<TWCoinType> coinTypes() const { return {TWCoinTypePolkadot}; }
18
    virtual bool validateAddress(TWCoinType coin, const std::string& address, TW::byte p2pkh, TW::byte p2sh, const char* hrp) const;    
19
    virtual std::string deriveAddress(TWCoinType coin, const PublicKey& publicKey, TW::byte p2pkh, const char* hrp) const;
20
    virtual void sign(TWCoinType coin, const Data& dataIn, Data& dataOut) const;
21
};
22

23
} // namespace TW::Polkadot

Read our documentation on viewing source code .

Loading