- Notifications
You must be signed in to change notification settings - Fork309
Description
In real life, you would either depend on a third party API to fetch the colored coins of a transaction or a balance. Which might not be a good idea, because it add a trust dependency to your program with the API provider.
When usingeither
you need to have anor
counterpart.
Example:You can either go left or right
.
The author of the quoted text might be trying to tell us that,
in order to fetch the coloured coins of a transaction, we can
either use a third party API or a balance.
But I think it is more likely that the or part of the sentence was simply omitted.
NBitcoin allows you either to depend on a web service, either to provide your own implementation for fetching the color of aTransaction. This allows you to have a flexible way to unit test your code, use another implementation or your own.
I think the author meansallows you to either depend on a webserver or provide your own implementation to fetch the color of a transaction