Where are defined the endpoints in bitcore-lib? - bitcore

I'm trying to learn more about the bitpay and just now, reading about bitcore-lib, but I'm not finding where the addresses and endpoints are specified to connect with the servers.
Someone has an idea where I should find it?

I'm assuming the server referred to in the question is bitcoind. In case anyone is still looking for these, the rpc and rest endpoints are here https://bitcoin.org/en/developer-reference#rpc-quick-reference
You can put the addresses/ports in a bitcoin.conf file like this
zmqpubrawtx=tcp://127.0.0.1:15371
zmqpubhashblock=tcp://127.0.0.1:15371
rpcallowip=127.0.0.1
rpcport=15332

Related

bitshares api implementation using php

I am interested in seeing some PHP class with some working examples making trades on the Bitshares DEX. I found https://github.com/carlo-fontanos/bitshares-api-php but it requires a running full node.
I don't want to have to run Bitshares, but want to connect to a node that is running somewhere else. If this code does not exist anywhere, I would be interested in building it. any help please
You can update RPC endpoint URL to match your requirement.
You can see that in index.php line 9.

Usage of ngcsv in web apps

I really can't think of a scenario that would make me use ngcsv, it converts array to CSV file.
What I don't understand is why the server couldn't just return a proper file instead of pass the data through client code first. If you use I'll be happy to understand why this is useful.
Presumably it would work without access to the server since the code is all completely client side.
I'm planning on using it in a 100% offline app that relays on LocalStorage.. so I guess there's many scenarios where it could be useful

How to make my GAE system secure

I'm developing an iOS app that used GAE as a backend. The only sensitive data my app will transfer to GAE is login details, anything else that is transferred is not sensitive. I intend to use SSL for everything, just coz that seems most sensible to me - is there any reason not to? Also, I want some way of ensuring that my app is the only way that my GAE system can be accessed (ie nobody accessing it from the web/spoofing a client to look like mine) how do I go about this? I read something about public and private keys but wasn't exactly sure if it was relevant?
Any help is much appreciated
Thanks!
Short answer for your last question: you cant. There is no way you can enforce that your application is only accessed through your IOS app.
You can make it as hard as possible, but you cant guarantee that. The correct way is not relying on your IOS application
to validate the data send, but to do this verification in your gae app (if needed: again).
SSL is a good thing anyway - if done correctly (see: http://www2.dcsec.uni-hannover.de/files/android/p50-fahl.pdf )
But if the only sensitive data send is a password, you could consider using something like SRP ( start reading here: http://en.wikipedia.org/wiki/Secure_Remote_Password_protocol )

Work with Database using Spock and Geb.

I hope someone have already faced an issue to verify that application shows correct data from database. I reviewd how groovy used SQL, but I have no idea where and how I should do that. I'm just starting to use gradle+Spock+Geb for testing application. I have a few files where I described a couple of pages from application, a couple of modules and a file with spock specification. Where and how I need to connect to Oracle DB, use SQL and compare result's data with application's ones?
P.S. I write everything in notepad++ and launch from command line writing 'gradlew firefoxTest'. Does exist any more comfortable way to work with gradle+spock+geb?
Thanks in advance.
Because there are no other answers, I wanted to provide a solution someone at my company thought of. This assumes you already have a project that uses some sort of JDBC. In our case it is JDBI.
The idea is to extend Classloader and then use that to directly access the data access object class via the JVM. That idea should work.
I have not tested it out because it doesn't completely fit our use-case. I'll admit that this does not completely apply to your use case, but technically you could just run the jar of an existing project, which can access the database.

Preventing dictionary user names for registration

When I was setting up an account with gmail few years back (probably this is still a case, haven't check) I've noticed that system doesn't allow to register common terms, nouns as username, it seemed that it used a sort of dictionary for screening. I would like to implement similar feature in my app, anyone have idea how to tackle this? App is written in PHP but understand I'll have to hook it up with online service.
Thanks
Wordpress MU has such feature too, you fill a list of possible usernames that you want to avoid and they become unavailable for users. You can check its source to get their approach...
Sinan.
Well the API will vary from service to service so I'd suggest you find one, look at their developer docs and then if you have a question ask it here.

Resources