@acryl/assets-pairs-order

yarn add @acryl/assets-pairs-order

Usage no npm install needed!

<script type="module">
  import acrylAssetsPairsOrder from 'https://cdn.skypack.dev/@acryl/assets-pairs-order';
</script>

README

Utility for ordering pair of assets in (amount_asset, price_asset)

Build Status

Example:

yarn add @acryl/assets-pairs-order
import { createOrderPair, MAINNET_DATA } from '@acryl/assets-pairs-order'

const orderPair = createOrderPair(MAINNET_DATA);
orderPair(
  'DNhP2zAH5HM1kdUSmxcBqs8RP4vvUgRFc1YgAKkfPmPD',
  'FxSm86qcEw8wGfpX3T7X5fsnuK5XxYA6ZfVYJja29vMA'
)

/* [
    'FxSm86qcEw8wGfpX3T7X5fsnuK5XxYA6ZfVYJja29vMA',
    'DNhP2zAH5HM1kdUSmxcBqs8RP4vvUgRFc1YgAKkfPmPD',
  ]
*/

## Browser

For using in browser include dist/browser.js