Returns the crypto_data for all currencies defined in moneywagon that also
        meet the minimum support for altcore. Data is keyed according to the
        bitcore specification.
342054
def altcore_data(self):
        
        ret = []
        for symbol in self.supported_currencies(project='altcore', level="address"):
            data = crypto_data[symbol]
            priv = data.get('private_key_prefix')
            pub = data.get('address_version_byte')
            hha = data.get('header_hash_algo')
            shb = data.get('script_hash_byte')

            supported = collections.OrderedDict()
            supported['name'] = data['name']
            supported['alias'] = symbol

            if pub is not None:
                supported['pubkeyhash'] = int(pub)
            if priv:
                supported['privatekey'] = priv
            supported['scripthash'] = shb if shb else 5
            if 'transaction_form' in data:
                supported['transactionForm'] = data['transaction_form']
            if 'private_key_form' in data:
                supported['privateKeyForm'] = data['private_key_form']
            #if 'message_magic' in data and data['message_magic']:
            #    supported['networkMagic'] = '0x%s' % binascii.hexlify(data['message_magic'])
            supported['port'] = data.get('port') or None
            if hha not in (None, 'double-sha256'):
                supported['headerHashAlgo'] = hha
            if data.get('script_hash_algo', 'double-sha256') not in (None, 'double-sha256'):
                supported['scriptHashAlgo'] = data['script_hash_algo']
            if data.get('transaction_hash_algo', 'double-sha256') not in (None, 'double-sha256'):
                supported['transactionHashAlgo'] = data['transaction_hash_algo']
            if data.get('seed_nodes'):
                supported['dnsSeeds'] = data['seed_nodes']

            ret.append(supported)

        return ret
92488
def crc(self):
        
        # will make sure everything has been transferred
        # to datastore that needs to be before returning crc

        result = self._data.fast_hash()
        if hasattr(self.mesh, 'crc'):
            # bitwise xor combines hashes better than a sum
            result ^= self.mesh.crc()
        return result
540103
def GetCoinAssets(self):
        
        assets = set()
        for coin in self.GetCoins():
            assets.add(coin.Output.AssetId)
        return list(assets)
366108
def get_optimal_fee(crypto, tx_bytes, **modes):
    
    try:
        services = get_optimal_services(crypto, 'get_optimal_fee')
    except NoServicesDefined:
        convert = get_current_price(crypto, 'usd')
        fee = int(0.02 / convert * 1e8)

        if modes.get('report_services'):
            return [None], fee
        else:
            return fee

    fee = enforce_service_mode(
        services, OptimalFee, dict(crypto=crypto, tx_bytes=tx_bytes), modes=modes
    )
    if modes.get('report_services'):
        return fee[0], int(fee[1])
    else:
        return int(fee)
1167556
public com.google.protobuf.ByteString
      getCurrencyCodeBytes() {
    java.lang.Object ref = currencyCode_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      currencyCode_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }
645573
protected function data()
    {
        $key = $this->getLocalesKey(
            $locale = $this->getLocale(),
            $fallbackLocale = $this->getFallbackLocale()
        );

        if (! isset($this->data[$key])) {
            $this->data[$key] = new CurrencyRepository($locale, $fallbackLocale);
        }

        return $this->data[$key];
    }
670410
private Data getCurrencyData(ULocale locale) {
        CompactDecimalDataCache.DataBundle bundle = cache.get(locale);
            return bundle.shortCurrencyData;
    }
1323815
function (data) {
			return Crypto.RIPEMD160(Crypto.SHA256(data, { asBytes: true }), { asBytes: true });
		}
77394
def network_stats(self):
        
        summary = {}
        crypto = set()
        akmsuite_types = {
            0x00: "Reserved",
            0x01: "802.1X",
            0x02: "PSK"
        }
        p = self.payload
        while isinstance(p, Dot11Elt):
            if p.ID == 0:
                summary["ssid"] = plain_str(p.info)
            elif p.ID == 3:
                summary["channel"] = ord(p.info)
            elif isinstance(p, Dot11EltCountry):
                summary["country"] = plain_str(p.country_string[:2])
                country_descriptor_types = {
                    b"I": "Indoor",
                    b"O": "Outdoor",
                    b"X": "Non-country",
                    b"\xff": "Ignored"
                }
                summary["country_desc_type"] = country_descriptor_types.get(
                    p.country_string[-1:]
                )
            elif isinstance(p, Dot11EltRates):
                summary["rates"] = p.rates
            elif isinstance(p, Dot11EltRSN):
                if p.akm_suites:
                    auth = akmsuite_types.get(p.akm_suites[0].suite)
                    crypto.add("WPA2/%s" % auth)
                else:
                    crypto.add("WPA2")
            elif p.ID == 221:
                if isinstance(p, Dot11EltMicrosoftWPA) or \
                        p.info.startswith(b'\x00P\xf2\x01\x01\x00'):
                    if p.akm_suites:
                        auth = akmsuite_types.get(p.akm_suites[0].suite)
                        crypto.add("WPA/%s" % auth)
                    else:
                        crypto.add("WPA")
            p = p.payload
        if not crypto:
            if self.cap.privacy:
                crypto.add("WEP")
            else:
                crypto.add("OPN")
        summary["crypto"] = crypto
        return summary
1361768
def AllTypes():
        
        return [AssetType.CreditFlag, AssetType.DutyFlag, AssetType.GoverningToken,
                AssetType.UtilityToken, AssetType.Currency, AssetType.Share,
                AssetType.Invoice, AssetType.Token]
265383
public function getData()
    {
        parent::getData();

        $data = array(
            'amount' => $this->getAmountInteger(),
            'country' => $this->getCountry(),
            'currency' => $this->getCurrency(),
        );

        return array_filter($data);
    }
910933
def __get_cash_row(self, item: CashBalance, depth: int) -> str:
        
        assert isinstance(item, CashBalance)

        view_model = AssetAllocationViewModel()

        view_model.depth = depth

        # Symbol
        view_model.name = item.symbol

        # Value in base currency
        view_model.curr_value = item.value_in_base_currency

        # Value in security's currency.
        view_model.curr_value_own_currency = item.value
        view_model.own_currency = item.currency

        return view_model
1325634
def get_available_currencies():
    """"""
    r = requests.get(API_CURRENCIES)
    if r.status_code != requests.codes.ok:
        raise CryptonatorException(
            ("An error occurred while getting available currencies "
             "({} from Cryptonator).").format(r.status_code)
        )

    return [currency['code'] for currency in r.json()['rows']]
994461
public BitZOrders getDepth(CurrencyPair currencyPair) throws IOException {
    BitZOrdersResult result = bitz.getDepth(BitZUtils.toPairString(currencyPair));
    return result.getData();
  }
543124
def get_databits():
    
    databits = []
    s = pyserial.Serial()
    for name, value in s.getSupportedByteSizes():
        databits.append((value, name,))
    return tuple(databits)
399439
def get_blockchain_fee_estimates(coin_symbol='btc', api_key=None):
    
    overview = get_blockchain_overview(coin_symbol=coin_symbol, api_key=api_key)
    return {
            'high_fee_per_kb': overview['high_fee_per_kb'],
            'medium_fee_per_kb': overview['medium_fee_per_kb'],
            'low_fee_per_kb': overview['low_fee_per_kb'],
            }
480392
public BitZTrades getOrder(CurrencyPair currencyPair) throws IOException {
    BitZTradesResult result = bitz.getOrder(BitZUtils.toPairString(currencyPair));
    return result.getData();
  }