registry.json
file. Consult a similar blockchain (or simply copy & modify).codegen/bin/newcoin <coinid>
, where newcoin <coinid>
is the ID of the new coin from registry.json
. This will generate skeleton Address
, Signer
, Entry
classes, proto file, C interface for Signer and corresponding tests.tools/generate-files
to generate message proto files.cmake
to include the new files in the build (cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Debug
), and build the project.tests/X/TWCoinTypeTests.cpp
(where X
is the name of the blockchain), exactly as in other blockchains. Run the tests and make sure everything is passing before moving on to the next step. You should reate a commit with this change, (but don't create a pull request yet).cmake
before building, to include new files in the build.src/X
folder where X
is the name of the blockchain.Entry
class should be kept minimal, it should have no logic, just call into relevant Address, Signer, etc. classes.src/Coin.cpp
(an include, a new instance in the list of dispatcher instances).src/X/Address.h
and src/X/Address.cpp
(where X
is the blockchain name).src/Coin.cpp
is also extended.src/X/Signer.h
and src/X/Signer.cpp
source files. Make sure you can generate a valid signature and a valid signed and encoded transaction. Write a unit tests for this.tests/X
where X
is the name of the blockchain. All C++ code needs to be unit tested.Xxx
, handle and implement it first in TWAnyAddress.h
and TWAnySigner.h
before writing tests.registry.json
.codegen/bin/newcoin <coinid>
.tools/generate-files
.src/Coin.cpp
.tests/Xxx/TWCoinTypeTests.cpp
.src/
.tests/
.Mnemonic phrase - > Address
derivation test. Put this test in the CoinTests.cpp
file.TWEthereumChainID
, TWCurve
, etc., as necessary.src/interface
.TWAnyAddress
and TWAnySigner
CoinAddressDerivationTests.cpp
and CoinAddressValidationTests.cpp
, TWHRPTests.cpp
, CoinAddressDerivationTests.kt
, CoinAddressDerivationTests.swift
.registry.json
, p2pkh
address for bip44
or native bech32
segwit address for bip84
.p2pkh
, p2sh
and bech32
.xpub
/ xprv
and cross check the values with other wallets, like ledger or trezor.xpub
at random index.