github.com/turingchain2020/turingchain@v1.1.21/wallet/bipwallet/transformer/btcbase/loader.go (about)

     1  // Copyright Turing Corp. 2018 All Rights Reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package btcbase
     6  
     7  import (
     8  	"github.com/turingchain2020/turingchain/wallet/bipwallet/transformer"
     9  )
    10  
    11  //不同币种的前缀版本号
    12  var coinPrefix = map[string][]byte{
    13  	"BTC":  {0x00},
    14  	"BCH":  {0x00},
    15  	"TRC":  {0x00},
    16  	"YCC":  {0x00},
    17  	"LTC":  {0x30},
    18  	"ZEC":  {0x1c, 0xb8},
    19  	"USDT": {0x00},
    20  }
    21  
    22  func init() {
    23  	//注册
    24  	for name, prefix := range coinPrefix {
    25  		transformer.Register(name, &btcBaseTransformer{prefix})
    26  	}
    27  }