Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@waves/assets-pairs-order

Package Overview
Dependencies
Maintainers
7
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@waves/assets-pairs-order - npm Package Compare versions

Comparing version 3.1.0 to 3.2.0

dist/browser.js

10

package.json
{
"name": "@waves/assets-pairs-order",
"version": "3.1.0",
"version": "3.2.0",
"main": "src/index.js",

@@ -12,5 +12,5 @@ "types": "src/index.d.ts",

"scripts": {
"build:umd": "rollup -c rollup.umd.js",
"build:browser": "rollup -c rollup.config.js",
"test": "jest",
"prepublish": "yarn test && yarn build:umd"
"prepublish": "yarn test && yarn build:browser"
},

@@ -31,8 +31,8 @@ "devDependencies": {

"rollup-plugin-node-builtins": "^2.1.2",
"rollup-plugin-node-globals": "^1.2.0",
"rollup-plugin-node-resolve": "^3.3.0"
},
"dependencies": {
"bs58": "^4.0.1",
"ramda": "^0.25.0"
"bs58": "^4.0.1"
}
}
# Utility for ordering pair of assets in (amount_asset, price_asset)
![Build Status](https://api.travis-ci.org/wavesplatform/assets-pairs-order.svg?branch=master)
## Example:
```
```
yarn add @waves/assets-pairs-order
```
```javascript
import { createOrderPairs, MAINNET_DATA } from '@waves/assets-pairs-order'
import { createOrderPair, MAINNET_DATA } from '@waves/assets-pairs-order'
const orderPair = createOrderPairs(MAINNET_DATA);
orderPairs(
const orderPair = createOrderPair(MAINNET_DATA);
orderPair(
'DNhP2zAH5HM1kdUSmxcBqs8RP4vvUgRFc1YgAKkfPmPD',

@@ -22,1 +25,6 @@ 'FxSm86qcEw8wGfpX3T7X5fsnuK5XxYA6ZfVYJja29vMA'

*/
## Browser
For using in browser include dist/browser.js
```
const Base58 = require('bs58');
const { curry } = require('ramda');
const MAINNET_RAW_DATA = require('./mainnet.json');

@@ -27,3 +26,21 @@ const { compareUint8Arrays, isPair, isEmptyArray } = require('./utils');

};
const curry = function(f) {
var slice = Array.prototype.slice,
self = f,
totalargs = self.length,
partial = function(args, fn) {
return function() {
return fn.apply({}, args.concat(slice.call(arguments)));
};
},
fn = function() {
var args = slice.call(arguments);
return args.length < totalargs
? partial(args, fn)
: self.apply({}, slice.apply(arguments, [0, totalargs]));
};
return fn;
};
module.exports.createOrderPair = curry(orderPair);
module.exports.MAINNET_DATA = MAINNET_DATA;

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc