code: func (s *Session) initialize(seed []byte) error {
  	// Check that the wallet isn't currently initialized,
  	// otherwise the key would be overwritten.
  	status, err := s.Wallet.Status()
  	if err != nil {
  		return err
  	}
  	if status == "Online" {
  		return fmt.Errorf("card is already initialized, cowardly refusing to proceed")
  	}
  
  	s.Wallet.lock.Lock()
  	defer s.Wallet.lock.Unlock()
  
  	// HMAC the seed to produce the private key and chain code
  	mac := hmac.New(sha512.New, []byte("Bitcoin seed"))
  	mac.Write(seed)
  	seed = mac.Sum(nil)
  
  	key, err := crypto.ToECDSA(seed[:32])
  	if err != nil {
  		return err
  	}
  
  	id := initializeData{}
  	id.PublicKey = crypto.FromECDSAPub(&key.PublicKey)
  	id.PrivateKey = seed[:32]
  	id.ChainCode = seed[32:]
  	data, err := asn1.Marshal(id)
  	if err != nil {
  		return err
  	}
  
  	// Nasty hack to force the top-level struct tag to be context-specific
  	data[0] = 0xA1
  
  	_, err = s.Channel.transmitEncrypted(claSCWallet, insLoadKey, 0x02, 0, data)
  	return err
  }
docs: // initialize initializes the card with new key data.