dash 3.21.5 → 3.21.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -99,20 +99,20 @@ export declare namespace SDK {
99
99
  INSTANT_LOCK: string;
100
100
  };
101
101
  plugins: {
102
- StandardPlugin: typeof import("@dashevo/wallet-lib/src/plugins/StandardPlugin");
103
- Worker: typeof import("@dashevo/wallet-lib/src/plugins/Worker");
102
+ StandardPlugin: typeof import("@dashevo/wallet-libsrc/plugins/StandardPlugin");
103
+ Worker: typeof import("@dashevo/wallet-libsrc/plugins/Worker");
104
104
  };
105
105
  utils: {
106
106
  extendTransactionsWithMetadata: (transactions: any, transactionsMetadata: any) => any[];
107
107
  varIntSizeBytesFromLength: (length: any) => number;
108
- calculateTransactionFees: typeof import("@dashevo/wallet-lib/src/utils/calculateTransactionFees");
109
- categorizeTransactions: typeof import("@dashevo/wallet-lib/src/utils/categorizeTransactions");
108
+ calculateTransactionFees: typeof import("@dashevo/wallet-libsrc/utils/calculateTransactionFees");
109
+ categorizeTransactions: typeof import("@dashevo/wallet-libsrc/utils/categorizeTransactions");
110
110
  mnemonicToHDPrivateKey: (mnemonic: any, network?: any, passphrase?: string) => any;
111
111
  generateNewMnemonic: () => any;
112
112
  seedToHDPrivateKey: (seed: any, network?: string) => any;
113
113
  mnemonicToWalletId: (mnemonic: any) => string;
114
- filterTransactions: typeof import("@dashevo/wallet-lib/src/utils/filterTransactions");
115
- classifyAddresses: typeof import("@dashevo/wallet-lib/src/utils/classifyAddresses");
114
+ filterTransactions: typeof import("@dashevo/wallet-libsrc/utils/filterTransactions");
115
+ classifyAddresses: typeof import("@dashevo/wallet-libsrc/utils/classifyAddresses");
116
116
  mnemonicToSeed: (mnemonic: any, password?: string) => any;
117
117
  feeCalculation: (type?: string) => {
118
118
  type: null;
@@ -132,12 +132,12 @@ export declare namespace SDK {
132
132
  utxosValue: number;
133
133
  };
134
134
  doubleSha256: (data: any) => Buffer;
135
- dashToDuffs: typeof import("@dashevo/wallet-lib/src/utils/dashToDuffs");
136
- duffsToDash: typeof import("@dashevo/wallet-lib/src/utils/duffsToDash");
137
- fundWallet: typeof import("@dashevo/wallet-lib/src/utils/fundWallet");
138
- getBytesOf: typeof import("@dashevo/wallet-lib/src/utils/getBytesOf");
139
- hasMethod: typeof import("@dashevo/wallet-lib/src/utils/hasMethod");
140
- hasProp: typeof import("@dashevo/wallet-lib/src/utils/hasProp");
135
+ dashToDuffs: typeof import("@dashevo/wallet-libsrc/utils/dashToDuffs");
136
+ duffsToDash: typeof import("@dashevo/wallet-libsrc/utils/duffsToDash");
137
+ fundWallet: typeof import("@dashevo/wallet-libsrc/utils/fundWallet");
138
+ getBytesOf: typeof import("@dashevo/wallet-libsrc/utils/getBytesOf");
139
+ hasMethod: typeof import("@dashevo/wallet-libsrc/utils/hasMethod");
140
+ hasProp: typeof import("@dashevo/wallet-libsrc/utils/hasProp");
141
141
  sha256: (data: any) => Buffer;
142
142
  hash: (alg: any, data: any) => Buffer;
143
143
  is: {
package/karma.conf.js CHANGED
@@ -4,13 +4,20 @@ const dotenvResult = require('dotenv-safe').config();
4
4
 
5
5
  const webpackBaseConfig = require("./webpack.base.config");
6
6
 
7
+ const karmaMocha = require('karma-mocha');
8
+ const karmaMochaReporter = require('karma-mocha-reporter');
9
+ const karmaChai = require('karma-chai');
10
+ const karmaChromeLauncher = require('karma-chrome-launcher');
11
+ const karmaFirefoxLauncher = require('karma-firefox-launcher');
12
+ const karmaWebpack = require('karma-webpack');
13
+
7
14
  if (dotenvResult.error) {
8
15
  throw dotenvResult.error;
9
16
  }
10
17
 
11
18
  module.exports = (config) => {
12
19
  config.set({
13
- frameworks: ['mocha', 'chai'],
20
+ frameworks: ['mocha', 'chai', 'webpack'],
14
21
  files: [
15
22
  'src/**/*.spec.ts',
16
23
  'src/test/karma/bootstrap.ts',
@@ -43,12 +50,12 @@ module.exports = (config) => {
43
50
  browserDisconnectTimeout: 3 * 2000, // 2000 default
44
51
  pingTimeout: 3 * 5000, // 5000 default
45
52
  plugins: [
46
- 'karma-mocha',
47
- 'karma-mocha-reporter',
48
- 'karma-chai',
49
- 'karma-chrome-launcher',
50
- 'karma-firefox-launcher',
51
- 'karma-webpack',
53
+ karmaMocha,
54
+ karmaMochaReporter,
55
+ karmaChai,
56
+ karmaChromeLauncher,
57
+ karmaFirefoxLauncher,
58
+ karmaWebpack,
52
59
  ],
53
60
  customLaunchers: {
54
61
  FirefoxHeadless: {
package/package.json CHANGED
@@ -1,22 +1,22 @@
1
1
  {
2
2
  "name": "dash",
3
- "version": "3.21.5",
3
+ "version": "3.21.6",
4
4
  "description": "Dash library for JavaScript/TypeScript ecosystem (Wallet, DAPI, Primitives, BLS, ...)",
5
5
  "main": "build/src/index.js",
6
6
  "unpkg": "dist/dash.min.js",
7
7
  "types": "dist/src/index.d.ts",
8
8
  "scripts": {
9
- "start:dev": "nodemon --exec 'npm run build && npm run test:unit'",
10
- "build": "npm run build:ts",
11
- "build:web": "npm run build:ts && webpack --stats-error-details",
9
+ "start:dev": "nodemon --exec 'yarn run build && yarn run test:unit'",
10
+ "build": "yarn run build:ts",
11
+ "build:web": "yarn run build:ts && webpack --stats-error-details",
12
12
  "build:ts": "tsc",
13
13
  "lint": "",
14
- "test": "npm run test:unit && npm run test:functional && npm run test:browsers",
14
+ "test": "yarn run test:unit && yarn run test:functional && yarn run test:browsers",
15
15
  "test:browsers": "karma start ./karma.conf.js --single-run",
16
- "test:unit": "TS_NODE_COMPILER_OPTIONS={\"target\":\"es6\"} mocha -r ts-node/register/transpile-only \"src/**/*.spec.ts\"",
17
- "test:functional": "npm run build && mocha --recursive tests/functional/**/*.js",
18
- "prepublishOnly": "npm run build:web",
19
- "prepare": "npm run build"
16
+ "test:unit": "TS_NODE_COMPILER_OPTIONS={\"target\":\"es6\"} ts-mocha \"src/**/*.spec.ts\"",
17
+ "test:functional": "yarn run build && mocha --recursive tests/functional/**/*.js",
18
+ "prepublishOnly": "yarn run build:web",
19
+ "prepare": "yarn run build"
20
20
  },
21
21
  "ultra": {
22
22
  "concurrent": [
@@ -34,11 +34,11 @@
34
34
  },
35
35
  "homepage": "https://github.com/dashevo/DashJS#readme",
36
36
  "dependencies": {
37
- "@dashevo/dapi-client": "~0.21.5",
37
+ "@dashevo/dapi-client": "~0.21.6",
38
38
  "@dashevo/dashcore-lib": "~0.19.28",
39
- "@dashevo/dpp": "~0.21.5",
40
- "@dashevo/grpc-common": "~0.21.5",
41
- "@dashevo/wallet-lib": "~7.21.5",
39
+ "@dashevo/dpp": "~0.21.6",
40
+ "@dashevo/grpc-common": "~0.21.6",
41
+ "@dashevo/wallet-lib": "~7.21.6",
42
42
  "bs58": "^4.0.1",
43
43
  "node-inspect-extracted": "^1.0.8"
44
44
  },
@@ -58,6 +58,7 @@
58
58
  "crypto-browserify": "^3.12.0",
59
59
  "dirty-chai": "^2.0.1",
60
60
  "dotenv-safe": "^8.2.0",
61
+ "events": "^3.3.0",
61
62
  "https-browserify": "^1.0.0",
62
63
  "karma": "^6.3.4",
63
64
  "karma-chai": "^0.1.0",
@@ -76,7 +77,9 @@
76
77
  "sinon-chai": "^3.7.0",
77
78
  "stream-browserify": "^3.0.0",
78
79
  "stream-http": "^3.2.0",
80
+ "string_decoder": "^1.3.0",
79
81
  "ts-loader": "^8.0.2",
82
+ "ts-mocha": "^8.0.0",
80
83
  "ts-mock-imports": "^1.3.0",
81
84
  "ts-node": "^10.4.0",
82
85
  "typescript": "^3.9.5",
@@ -85,4 +88,4 @@
85
88
  "webpack": "^5.59.1",
86
89
  "webpack-cli": "^4.9.1"
87
90
  }
88
- }
91
+ }
@@ -20,18 +20,21 @@ const baseConfig = {
20
20
  crypto: require.resolve('crypto-browserify'),
21
21
  http: require.resolve('stream-http'),
22
22
  https: require.resolve('https-browserify'),
23
+ buffer: require.resolve('buffer/'),
23
24
  url: require.resolve('url/'),
24
25
  assert: require.resolve('assert/'),
25
26
  stream: require.resolve('stream-browserify'),
26
27
  path: require.resolve('path-browserify'),
27
28
  os: require.resolve('os-browserify/browser'),
28
29
  zlib: require.resolve('browserify-zlib'),
30
+ events: require.resolve('events/'),
31
+ string_decoder: require.resolve('string_decoder/'),
29
32
  },
30
33
  },
31
34
  plugins: [
32
35
  new webpack.ProvidePlugin({
33
- Buffer: ['buffer', 'Buffer'],
34
- process: 'process/browser',
36
+ Buffer: [require.resolve('buffer/'), 'Buffer'],
37
+ process: require.resolve('process/browser'),
35
38
  }),
36
39
  ],
37
40
  output: {
package/webpack.config.js CHANGED
@@ -1,31 +1,10 @@
1
1
  const path = require('path');
2
- const webpack = require('webpack');
2
+ const webpackBaseConfig = require("./webpack.base.config");
3
3
 
4
4
  const webConfig = {
5
+ ...webpackBaseConfig,
5
6
  entry: './build/src/index.js',
6
- mode: "production",
7
- resolve: {
8
- extensions: ['.js', '.json'],
9
- fallback: {
10
- fs: false,
11
- util: require.resolve('util/'),
12
- crypto: require.resolve('crypto-browserify'),
13
- http: require.resolve('stream-http'),
14
- https: require.resolve('https-browserify'),
15
- url: require.resolve('url/'),
16
- assert: require.resolve('assert/'),
17
- stream: require.resolve('stream-browserify'),
18
- path: require.resolve('path-browserify'),
19
- os: require.resolve('os-browserify/browser'),
20
- zlib: require.resolve('browserify-zlib'),
21
- },
22
- },
23
- plugins: [
24
- new webpack.ProvidePlugin({
25
- Buffer: ['buffer', 'Buffer'],
26
- process: 'process/browser',
27
- }),
28
- ],
7
+ mode: 'production',
29
8
  output: {
30
9
  path: path.resolve(__dirname, 'dist'),
31
10
  libraryTarget: 'umd',