|
|
@ -20,11 +20,12 @@ $(error Environment variable BOLOS_SDK is not set) |
|
|
|
endif |
|
|
|
include $(BOLOS_SDK)/Makefile.defines |
|
|
|
|
|
|
|
APP_LOAD_PARAMS=--appFlags 0x50 --path "" --curve secp256k1 $(COMMON_LOAD_PARAMS) |
|
|
|
APP_PATH = "" |
|
|
|
APP_LOAD_PARAMS=--appFlags 0x50 --curve secp256k1 $(COMMON_LOAD_PARAMS) |
|
|
|
|
|
|
|
APPVERSION_M=1 |
|
|
|
APPVERSION_N=1 |
|
|
|
APPVERSION_P=16 |
|
|
|
APPVERSION_P=17 |
|
|
|
APPVERSION=$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P) |
|
|
|
|
|
|
|
# ifndef COIN
|
|
|
@ -35,68 +36,95 @@ ifeq ($(COIN),bitcoin_testnet) |
|
|
|
# Bitcoin testnet
|
|
|
|
DEFINES += BTCHIP_P2PKH_VERSION=111 BTCHIP_P2SH_VERSION=196 BTCHIP_COIN_FAMILY=1 BTCHIP_COINID=\"Bitcoin\" COINID_UPCASE=\"BITCOIN\" COLOR_HDR=0xFCB653 COLOR_DB=0xFEDBA9 COINID_NAME=\"Bitcoin\" COINID=$(COIN) BTCHIP_COINID_SHORT=\"TEST\" NATIVE_SEGWIT_PREFIX=\"tb\" COIN_BITCOIN_TESTNET HAVE_SEGWIT_CHANGE_SUPPORT |
|
|
|
APPNAME ="Bitcoin Test" |
|
|
|
APP_LOAD_PARAMS += --path $(APP_PATH) |
|
|
|
else ifeq ($(COIN),bitcoin) |
|
|
|
# Bitcoin mainnet
|
|
|
|
DEFINES += BTCHIP_P2PKH_VERSION=0 BTCHIP_P2SH_VERSION=5 BTCHIP_COIN_FAMILY=1 BTCHIP_COINID=\"Bitcoin\" COINID_UPCASE=\"BITCOIN\" COLOR_HDR=0xFCB653 COLOR_DB=0xFEDBA9 COINID_NAME=\"Bitcoin\" COINID=$(COIN) BTCHIP_COINID_SHORT=\"BTC\" NATIVE_SEGWIT_PREFIX=\"bc\" COIN_BITCOIN HAVE_SEGWIT_CHANGE_SUPPORT |
|
|
|
APPNAME ="Bitcoin" |
|
|
|
APP_LOAD_PARAMS += --path $(APP_PATH) |
|
|
|
else ifeq ($(COIN),bitcoin_cash) |
|
|
|
# Bitcoin cash
|
|
|
|
DEFINES += BTCHIP_P2PKH_VERSION=0 BTCHIP_P2SH_VERSION=5 BTCHIP_COIN_FAMILY=1 BTCHIP_COINID=\"Bitcoin\" COINID_UPCASE=\"BITCOINCASH\" COLOR_HDR=0x85bb65 COLOR_DB=0xc2ddb2 COINID_NAME=\"BitcoinCash\" COINID=$(COIN) BTCHIP_COINID_SHORT=\"BCH\" COIN_BITCOIN_CASH COIN_FORKID=0 |
|
|
|
APPNAME ="Bitcoin Cash" |
|
|
|
APP_LOAD_PARAMS += --path $(APP_PATH) |
|
|
|
else ifeq ($(COIN),bitcoin_gold) |
|
|
|
# Bitcoin Gold
|
|
|
|
DEFINES += BTCHIP_P2PKH_VERSION=38 BTCHIP_P2SH_VERSION=23 BTCHIP_COIN_FAMILY=1 BTCHIP_COINID=\"Bitcoin\\x20Gold\" COINID_UPCASE=\"BITCOINGOLD\" COLOR_HDR=0x85bb65 COLOR_DB=0xc2ddb2 COINID_NAME=\"BitcoinGold\" COINID=$(COIN) BTCHIP_COINID_SHORT=\"BTG\" COIN_BITCOIN_GOLD HAVE_SEGWIT_CHANGE_SUPPORT COIN_FORKID=79 |
|
|
|
APPNAME ="Bitcoin Gold" |
|
|
|
APP_LOAD_PARAMS += --path $(APP_PATH) |
|
|
|
else ifeq ($(COIN),litecoin) |
|
|
|
# Litecoin
|
|
|
|
DEFINES += BTCHIP_P2PKH_VERSION=48 BTCHIP_P2SH_VERSION=50 BTCHIP_COIN_FAMILY=1 BTCHIP_COINID=\"Litecoin\" COINID_UPCASE=\"LITECOIN\" COLOR_HDR=0xCCCCCC COLOR_DB=0xE6E6E6 COINID_NAME=\"Litecoin\" COINID=$(COIN) BTCHIP_COINID_SHORT=\"LTC\" COIN_LITECOIN HAVE_SEGWIT_CHANGE_SUPPORT |
|
|
|
APPNAME ="Litecoin" |
|
|
|
APP_LOAD_PARAMS += --path $(APP_PATH) |
|
|
|
else ifeq ($(COIN),dogecoin) |
|
|
|
# Doge
|
|
|
|
DEFINES += BTCHIP_P2PKH_VERSION=30 BTCHIP_P2SH_VERSION=22 BTCHIP_COIN_FAMILY=1 BTCHIP_COINID=\"Dogecoin\" COINID_UPCASE=\"DOGECOIN\" COLOR_HDR=0x65D196 COLOR_DB=0xB2E8CB COINID_NAME=\"Dogecoin\" COINID=$(COIN) BTCHIP_COINID_SHORT=\"DOGE\" COIN_DOGE |
|
|
|
APPNAME ="Dogecoin" |
|
|
|
APP_LOAD_PARAMS += --path $(APP_PATH) |
|
|
|
else ifeq ($(COIN),dash) |
|
|
|
# Dash
|
|
|
|
DEFINES += BTCHIP_P2PKH_VERSION=76 BTCHIP_P2SH_VERSION=16 BTCHIP_COIN_FAMILY=1 BTCHIP_COINID=\"DarkCoin\" COINID_UPCASE=\"DASH\" COLOR_HDR=0x0E76AA COLOR_DB=0x87BBD5 COINID_NAME=\"Dash\" COINID=$(COIN) BTCHIP_COINID_SHORT=\"DASH\" COIN_DASH |
|
|
|
APPNAME ="Dash" |
|
|
|
APP_LOAD_PARAMS += --path $(APP_PATH) |
|
|
|
else ifeq ($(COIN),zcash) |
|
|
|
# Zcash
|
|
|
|
DEFINES += BTCHIP_P2PKH_VERSION=7352 BTCHIP_P2SH_VERSION=7357 BTCHIP_COIN_FAMILY=1 BTCHIP_COINID=\"Zcash\" COINID_UPCASE=\"ZCASH\" COLOR_HDR=0x3790CA COLOR_DB=0x9BC8E5 COINID_NAME=\"Zcash\" COINID=$(COIN) BTCHIP_COINID_SHORT=\"ZEC\" COIN_ZCASH |
|
|
|
APPNAME ="Zcash" |
|
|
|
APP_LOAD_PARAMS += --path $(APP_PATH) |
|
|
|
else ifeq ($(COIN),komodo) |
|
|
|
# Komodo
|
|
|
|
DEFINES += BTCHIP_P2PKH_VERSION=60 BTCHIP_P2SH_VERSION=85 BTCHIP_COIN_FAMILY=1 BTCHIP_COINID=\"Komodo\" COINID_UPCASE=\"KMD\" COLOR_HDR=0x326464 COLOR_DB=0x99b2b2 COINID_NAME=\"Komodo\" COINID=$(COIN) BTCHIP_COINID_SHORT=\"KMD\" COIN_KOMODO |
|
|
|
APPNAME ="Komodo" |
|
|
|
APP_LOAD_PARAMS += --path $(APP_PATH) |
|
|
|
else ifeq ($(COIN),stratis) |
|
|
|
# Stratis
|
|
|
|
DEFINES += BTCHIP_P2PKH_VERSION=63 BTCHIP_P2SH_VERSION=125 BTCHIP_COIN_FAMILY=2 BTCHIP_COINID=\"Stratis\" COINID_UPCASE=\"STRAT\" COLOR_HDR=0x3790CA COLOR_DB=0x9BC8E5 COINID_NAME=\"Stratis\" COINID=$(COIN) BTCHIP_COINID_SHORT=\"STRAT\" COIN_STRATIS HAVE_PEERCOIN_SUPPORT |
|
|
|
APPNAME ="Stratis" |
|
|
|
APP_LOAD_PARAMS += --path $(APP_PATH) |
|
|
|
else ifeq ($(COIN),peercoin) |
|
|
|
# Peercoin
|
|
|
|
DEFINES += BTCHIP_P2PKH_VERSION=55 BTCHIP_P2SH_VERSION=117 BTCHIP_COIN_FAMILY=2 BTCHIP_COINID=\"Peercoin\" COINID_UPCASE=\"PPC\" COLOR_HDR=0x3790CA COLOR_DB=0x9BC8E5 COINID_NAME=\"Peercoin\" COINID=$(COIN) BTCHIP_COINID_SHORT=\"PPC\" COIN_PEERCOIN HAVE_PEERCOIN_SUPPORT HAVE_PEERCOIN_UNITS |
|
|
|
APPNAME ="Peercoin" |
|
|
|
APP_LOAD_PARAMS += --path $(APP_PATH) |
|
|
|
else ifeq ($(COIN),posw) |
|
|
|
DEFINES += BTCHIP_P2PKH_VERSION=55 BTCHIP_P2SH_VERSION=85 BTCHIP_COIN_FAMILY=2 BTCHIP_COINID=\"PoSWallet\" COINID_UPCASE=\"POSW\" COLOR_HDR=0x23273D COLOR_DB=0x91939E COINID_NAME=\"PoSW\" COINID=$(COIN) BTCHIP_COINID_SHORT=\"POSW\" COIN_POSW HAVE_PEERCOIN_SUPPORT |
|
|
|
APPNAME ="PoSW" |
|
|
|
APP_LOAD_PARAMS += --path $(APP_PATH) |
|
|
|
else ifeq ($(COIN),pivx) |
|
|
|
# PivX
|
|
|
|
DEFINES += BTCHIP_P2PKH_VERSION=30 BTCHIP_P2SH_VERSION=13 BTCHIP_COIN_FAMILY=1 BTCHIP_COINID=\"DarkNet\" COINID_UPCASE=\"PIVX\" COLOR_HDR=0x46385D COLOR_DB=0x9E96AA COINID_NAME=\"PivX\" COINID=$(COIN) BTCHIP_COINID_SHORT=\"PIV\" COIN_PIVX |
|
|
|
APPNAME ="PivX" |
|
|
|
APP_LOAD_PARAMS += --path $(APP_PATH) |
|
|
|
else ifeq ($(COIN),stealthcoin) |
|
|
|
# Stealthcoin
|
|
|
|
DEFINES += BTCHIP_P2PKH_VERSION=62 BTCHIP_P2SH_VERSION=85 BTCHIP_COIN_FAMILY=2 BTCHIP_COINID=\"StealthCoin\" COINID_UPCASE=\"STEALTHCOIN\" COLOR_HDR=0x000000 COLOR_DB=0x808080 COINID_NAME=\"Stealthcoin\" COINID=$(COIN) BTCHIP_COINID_SHORT=\"XST\" COIN_STEALTHCOIN HAVE_PEERCOIN_SUPPORT HAVE_PEERCOIN_UNITS |
|
|
|
APPNAME ="Stealthcoin" |
|
|
|
APP_LOAD_PARAMS += --path $(APP_PATH) |
|
|
|
else ifeq ($(COIN),viacoin) |
|
|
|
# Viacoin
|
|
|
|
DEFINES += BTCHIP_P2PKH_VERSION=71 BTCHIP_P2SH_VERSION=33 BTCHIP_COIN_FAMILY=1 BTCHIP_COINID=\"Viacoin\" COINID_UPCASE=\"VIACOIN\" COLOR_HDR=0x414141 COLOR_DB=0xA0A0A0 COINID_NAME=\"Viacoin\" COINID=$(COIN) BTCHIP_COINID_SHORT=\"VIA\" COIN_VIACOIN HAVE_SEGWIT_CHANGE_SUPPORT |
|
|
|
APPNAME ="Viacoin" |
|
|
|
APP_LOAD_PARAMS += --path $(APP_PATH) |
|
|
|
else ifeq ($(COIN),vertcoin) |
|
|
|
# Vertcoin
|
|
|
|
DEFINES += BTCHIP_P2PKH_VERSION=71 BTCHIP_P2SH_VERSION=5 BTCHIP_COIN_FAMILY=1 BTCHIP_COINID=\"Vertcoin\" COINID_UPCASE=\"VERTCOIN\" COLOR_HDR=0x1B5C2E COLOR_DB=0x8DAE97 COINID_NAME=\"Vertcoin\" COINID=$(COIN) BTCHIP_COINID_SHORT=\"VTC\" COIN_VERTCOIN HAVE_SEGWIT_CHANGE_SUPPORT |
|
|
|
APPNAME ="Vertcoin" |
|
|
|
APP_LOAD_PARAMS += --path $(APP_PATH) |
|
|
|
else ifeq ($(COIN),digibyte) |
|
|
|
DEFINES += BTCHIP_P2PKH_VERSION=30 BTCHIP_P2SH_VERSION=5 BTCHIP_COIN_FAMILY=1 BTCHIP_COINID=\"DigiByte\" COINID_UPCASE=\"DIGIBYTE\" COLOR_HDR=0x2864AE COLOR_DB=0x94B2D7 COINID_NAME=\"DigiByte\" COINID=$(COIN) BTCHIP_COINID_SHORT=\"DBG\" COIN_DIGIBYTE HAVE_SEGWIT_CHANGE_SUPPORT |
|
|
|
APPNAME ="Digibyte" |
|
|
|
APP_LOAD_PARAMS += --path $(APP_PATH) |
|
|
|
else ifeq ($(COIN),qtum) |
|
|
|
# Qtum
|
|
|
|
DEFINES += BTCHIP_P2PKH_VERSION=58 BTCHIP_P2SH_VERSION=50 BTCHIP_COIN_FAMILY=3 BTCHIP_COINID=\"Qtum\" COINID_UPCASE=\"QTUM\" COLOR_HDR=0x2E9AD0 COLOR_DB=0x97CDE8 COINID_NAME=\"QTUM\" COINID=$(COIN) BTCHIP_COINID_SHORT=\"QTUM\" COIN_QTUM HAVE_QTUM_SUPPORT |
|
|
|
APPNAME ="Qtum" |
|
|
|
APP_LOAD_PARAMS += --path "44'/88'" --path "0'/45342'" --path "20698'/3053'/12648430'" |
|
|
|
else ifeq ($(COIN),hcash) |
|
|
|
DEFINES += BTCHIP_P2PKH_VERSION=40 BTCHIP_P2SH_VERSION=100 BTCHIP_COIN_FAMILY=2 BTCHIP_COINID=\"HShare\" COINID_UPCASE=\"HCASH\" COLOR_HDR=0x57448D COLOR_DB=0xABA2C6 COINID_NAME=\"HCash\" COINID=$(COIN) BTCHIP_COINID_SHORT=\"HCASH\" COIN_HCASH HAVE_PEERCOIN_SUPPORT |
|
|
|
else |
|
|
|
ifeq ($(filter clean,$(MAKECMDGOALS)),) |
|
|
|
$(error Unsupported COIN - use bitcoin_testnet, bitcoin, bitcoin_cash, bitcoin_gold, litecoin, dogecoin, dash, zcash, komodo, stratis, peercoin, posw, pivx, viacoin, vertcoin, stealthcoin) |
|
|
|
$(error Unsupported COIN - use bitcoin_testnet, bitcoin, bitcoin_cash, bitcoin_gold, litecoin, dogecoin, dash, zcash, komodo, stratis, peercoin, posw, pivx, viacoin, vertcoin, stealthcoin, digibyte, qtum, hcash) |
|
|
|
endif |
|
|
|
endif |
|
|
|
|
|
|
|