In the previous section, we discussed ES6. In this guide, we will get accustomed to practical implementation by defining generic methods as modules.
First, let’s set up a utils directory to organize our learning process efficiently.
1. Creating trustSet.js
Define a generic method for setting a trust line.
Usage
2. Creating createOffer.js
Define a generic method to send an OfferCreate transaction.
Usage
3. Creating payment.js
Define a generic method to send payments.
Usage
4. Creating setAccountFlags.js
Define a generic method to change account settings (such as enabling rippling).
Usage
5. Creating issueCurrency.js
Define a generic method to issue tokens.
Usage