xrpl.js
xrpl.js copied to clipboard
Export `ledgerAccept` from the integration test `utils.ts`
When writing tests against a standalone ledger, it's very useful to be able to send a transaction, then progress the ledger and verify that the transaction was successful. This can be used to speed up CI testing like we do in xrpl.js since you can close ledgers immediately instead of waiting 3-5 seconds for a public network to validate the transactions.
So it'd be useful to export ledgerAccept
from xrpl.js instead of just having it in the integration test utils.ts
file.
IMO it's not a good idea to export admin commands directly (without them being in some special admin section of the library) - people will get confused.
You can pass in any command to the client, including admin commands like ledger_accept
, as long as you tell Typescript to ignore the type. I have a lot of xrpl.js scripts that do this.