xrpl.js icon indicating copy to clipboard operation
xrpl.js copied to clipboard

Export `ledgerAccept` from the integration test `utils.ts`

Open JST5000 opened this issue 1 year ago • 1 comments

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.

JST5000 avatar Aug 03 '23 15:08 JST5000

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.

mvadari avatar Aug 11 '23 10:08 mvadari