What type off address should you create to accept payments? [closed] - bitcoin

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I am looking at this library.
https://github.com/bitcoinjs/bitcoinjs-lib
There are numerous type of addresses to choose from:
Generate a random address
Generate an address from a SHA256 hash
Generate a 2-of-3 P2SH multisig address
Generate a SegWit address
Generate a SegWit P2SH address
Generate a SegWit 3-of-4 multisig address
Generate a SegWit 2-of-2 P2SH multisig address
Why are there so many options and is it safe to choose any address type?
I heard coinbase does not implement SegWit yet. Does that mean if I choose SegWit address, I can't get payments from Coinbase users?
If someone sends me to my SegWit address from a non-SegWit address, will it result in bounce back or money being lost?

It is safe for you to choose any of those addresses however they all work slightly differently.
Bitcoin-core has adopted Segwit and fortunately Segwit is backwards compatible so wallets that are segwit can still transfer funds to wallets that are not segwit enabled.
You will still be able to get coins from non-segwit addresses however there is a chance they may have to pay higher transactional fees to have their purchases included in an earlier block.
Technical justification:
Segwit P2SH (Pay to Script Hash), multisig and Segwit must all support the original bitcoin transaction format of Version/txins/txouts/nLockTime allowing wallets on the same Blockchain to interact regardless of being a variation of Segwit or not.

Related

how Localbitcoins and other bitcoin wallet able to send/receive without network fee [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have been exploring bitcoin API and I found there is network fee for every transaction which is around 0.0001 but I noticed many trading and bitcoin related agencies doesn't charge any network fee at all for transfer between user on same Website/App. Few of which are cryptopia, Zebpay and localbitcoins.
Could someone help me understand that how they are able to transfer between wallet without any network fee.
Organizations that offer online wallets aren't obligated to handle transactions using the actual Bitcoin blockchain; they may instead choose to keep their own off-chain record of transactions between users. While faster and cheaper than on-chain transactions, this system is often less secure, especially since the transaction records are centralized.
Only when a user transfers Bitcoins between an external wallet would an organization utilize the blockchain; this is when a transfer would cost some network fee and take some time to process.

Phone number carrier API [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Is there any public database containing current mobile carriers for phone numbers?
I find out that there are many paid services (like numverify.com) and static (not real time updated) database from Google (libphonenumber).
I am looking for free API or database like libphonenumber, but with actual data about mobile phone carrier (in countries where numbers can be moved from one carrier to another).
Thank you
Well there are a plenty of services available. All of them paid. They do offer a trial version with limited api requests.
You should note that the way to figure out which carrier a number belongs to will be country-specific.
The information is, at least there, not available to the public - I've known service providers, network operators and information providers (as in yellow pages) that have access.
But, wouldn't a proper sms gateway service do this for you?
The cheap ones out there you could try out are
1) Data24-7 offers an API for looking up the carrier for wireless phone numbers. It also returns the email addresses to send SMS and MMS messages to the phone. It's not free, it's $12 per month and $0.006 per lookup. Check it out on
http://www.data24-7.com/carrier24-7.php
2) Twilio is one of the most reliable service provider out there.
You can find some more providers here https://git.daplie.com/coolaj86/node-tel-carrier

license keys generation method for software product [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
We have a software database product that is delivered to a customer. The fees charged are based on a number of factors such as
number of users that can be created
number of database transactions etc
We wanted to give a license key whenever the user pays for some time duration. So the license key should contain such information about the duration of product, number of users/transactions allowed etc..
What is a cryptographically secure way of license key generation (that contains the whole information and can be read securely by our system at their end) to prevent user from any illegal usage.
I know about RSA as a method but how do I go about it? and are there any tools available that i should checkout?
You can generate license files Public-Private key Cryptography, and using RSA.
Please look at this library, you can found this useful.
http://afewguyscoding.com/page/2/
This library people have also done survey, which will give you idea that how good this method works.
There is another github project using similar approach.
Visit https://github.com/starschema/slm4j

US->foreign currency abstraction for US-based payment gateways [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
In the case of payment gateways, if the gateway is US-based and can only charge in dollars, but can charge foreign debit/credit cards, and you want to act on countries where the currency is not USD, and you can't/do not want to apply for a local payment gateway, what could you do, programming-wise?
I was thinking about converting the amount in USD to the the specific currency. Problem is:
I don't know where to get real-time accurate exchange-rate data
Not sure if I get the data from somewhere, if the client's card processor will actually charge that exact price
Do you guys know any best-practices for that? I think another way would be to just charge in dollars, and then let the client know that approximate amount in his/her local currency, but again, I'm not sure where to get an updated currency conversion.
Does any of you have gone through a similar scenario?
PS.: Paypal is not an option.
Any hints appreciated!
Currency conversion takes place by your customer's bank, so there's unfortunately no central market through which you can even make estimates.
There are some APIs that you can use to make an estimate, though it's mostly just a guess. If you use one of these, I would make sure to make it clear to your customers that the price may vary depending on their bank.
Overall, I've found the best practice is just to display your prices in the supported currency (e.g., USD) and mention to your customers that it might vary. As we continue to expand internationally, you can take advantage of our local currency offerings to make more exact charges.

How to check if an address is a business or residential address [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I have a dataset that contains many addresses (60,000-ish entries). I want to classify these addresses into either residential or business addresses.
Does anyone know a good API/Service to get started doing this?
I don't think the google maps geocoder can do this at this time.
Fedex and UPS both seem to have API's but they are only released to companies that are shipping products (sort of a need to know basis only)
USPS API: https://www.usps.com/nationalpremieraccounts/rdi.htm
Fedex API:http://www.fedex.com/us/developer/web-services/index.html
This is a hobby project, so free or cheap are better! But paid solutions are not out of the question.
As mentioned previously, RDI is the way to go. RDI stands for "residential delivery indicator" and it tells you whether an address is residential or commercial. The only issue with that is you have to be a developer to use it and you have to have standardized and certified addresses, not to mention the annual licensing fee from the USPS for hundreds of dollars. Once you've got it and programmed a solution, you can just give it an address with any old ZIP and expect it to work. The address must have the full 12-digit delivery point barcode.
Or you could use a service provider to do the same thing and pay about $50-100 for a list your size.
Full disclosure: I'm the founder of SmartyStreets. We have RDI included into our offering at no extra charge. This means it's as simple as dragging your list to our website and having it processed and back in seconds. We also offer an address verification web service API which will returns the residential/business indicator to let you know the kind of address you're working with.
Whitepages claims they let you do that in their API. For hobby purposes of up to 200 queries per day, it's free. You would query zoning type.
The Address ID Data Structure contains a "usage" field, which is described as "Only valid for US address LocationType. This indicates the US Postal Service opinion about whether this address is primarily a "Business" or "Residential"."
Take a look at the API at http://compass.webservius.com
It's a listing of 16+ million businesses in the US (aims to be a complete business listing). If an address isn't there, chances are it's a residential address.
This is a bit of a hack, but why not write a script to check to see if the first line of the address contains any of the last names from the census list? That should get you most of the residential addresses. Assuming the person's/business's name is part of the address you have.