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

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

28
} // namespace TW::Filecoin

Read our documentation on viewing source code .

Loading