-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zero-Confirmation Escrows #11838
Zero-Confirmation Escrows #11838
Conversation
Codecov Report
@@ Coverage Diff @@
## master #11838 +/- ##
==========================================
- Coverage 28.63% 28.58% -0.06%
==========================================
Files 244 245 +1
Lines 21977 22066 +89
Branches 3551 3566 +15
==========================================
+ Hits 6293 6307 +14
- Misses 15137 15207 +70
- Partials 547 552 +5
Continue to review full report at Codecov.
|
f3a4114
to
4fa1189
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome Job!! 🚀 I was able to make an end-to-end ZCE-secured payment successfully.
txid: 9c2d5e3b867273299bb56ef5c82e845f1847092afea86f1d1a8a58e7517ad8b9
I also paid an invoice without sufficient funds for the instantAcceptanceEscrow
amount without issues.
e653256
to
14dc104
Compare
46a01c5
to
9baa566
Compare
This PR enables BitPay Wallet to make ZCE-secured payments to JSON Payment Protocol accepting merchants and requires
Bitcore Wallet Service
to be running the following Bitcore PR: bitpay/bitcore#3240.Bitcore Wallet Client
andBitcore Lib Cash
must also be upgraded to the commit in the aforementioned Bitcore PR, which can be done by pulling the Bitcore PR and usingnpm link
.ZCEs enable instant, incentive-secure payments on Bitcoin Cash. ZCE-secured payments can be accepted by merchants immediately upon receipt (without the need for a 5-10 second delay to monitor the network for double-spends) and with the same finality as a 1-confirmation transaction.
Testing a ZCE-secured payment end-to-end
bitcore
repo and pull thezero-conf-escrows
branch from this PR: Zero-Confirmation Escrows bitcore#3240Bitcore Wallet Service
locally using the branch abovepackages/bitcore-wallet-client
directory, and runnpm link
packages/bitcore-lib-cash
directory, and runnpm link
wallet
), and pull this PRnpm link bitcore-wallet-client && npm link bitcore-lib-cash
inside thewallet
directorynpm start
Wallet Service URL
tohttp://localhost:3232/bws/api
If everything is working properly, you'll see that the payment is instantly accepted by payment protocol. On the other hand, if you don't have at least 2x the invoice amount in your wallet, the broadcast step will not be instant and will instead take ~8 seconds.