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::Cosmos {
12

13
/// Entry point for implementation of Cosmos 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 {
18 1
        return {
19
            TWCoinTypeCosmos,
20
            TWCoinTypeKava,
21
            TWCoinTypeTerra,
22
            TWCoinTypeBandChain,
23
        };
24
    }
25
    virtual bool validateAddress(TWCoinType coin, const std::string& address, TW::byte p2pkh, TW::byte p2sh, const char* hrp) const;
26
    virtual std::string deriveAddress(TWCoinType coin, const PublicKey& publicKey, TW::byte p2pkh, const char* hrp) const;
27
    virtual void sign(TWCoinType coin, const Data& dataIn, Data& dataOut) const;
28 1
    virtual bool supportsJSONSigning() const { return true; }
29
    virtual std::string signJSON(TWCoinType coin, const std::string& json, const Data& key) const;
30
};
31

32
} // namespace TW::Cosmos

Read our documentation on viewing source code .

Loading