The @gardenfi/orderbook
package is used to facilitate the creation of orders. It also provides functionality for listening to orders and retrieving orders created by a specific address.
npm install @gardenfi/orderbook
- Creating an order: (should create an order with the valid configuration)
- Getting all orders created by an address: (should return orders where the user is the maker)
- Listening to orders: (should update when order is created)
Both CommonJs and ES imports are supported so there is not extra setup needed to use the library. To use the orderbook simply import it (using import or require statements) and perform your logic. Make sure to use a signer if you're using the library in an environment where you do not have access to the private keys.