/// <summary> Bitshares account to bitcoin address. </summary> /// /// <remarks> Paul, 15/01/2015. </remarks> /// /// <param name="account"> The account. </param> /// /// <returns> A string. </returns> protected string BitsharesAccountToBitcoinAddress(BitsharesAccount account) { // turn that into a BTC address BitsharesPubKey pubKey = new BitsharesPubKey(account.active_key_history.Last().Values.Last()); return pubKey.ToBitcoinAddress(true, m_addressByteType); }
public void CheckBitcoinAddressFromBitsharesPublicKey() { for (int i = 0; i < m_btsPubKeys.Count; i++) { string btsPubKey = m_btsPubKeys[i]; string bitcoinAddress = m_bitcoinAddresses[i]; BitsharesPubKey key = new BitsharesPubKey(btsPubKey); Assert.AreEqual(bitcoinAddress, key.ToBitcoinAddress(false, 0)); } }