@steemit/steem-js 0.8.0 → 1.0.1

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.
Files changed (128) hide show
  1. package/README.md +202 -105
  2. package/dist/api/index.d.ts +128 -0
  3. package/dist/api/methods.d.ts +9 -0
  4. package/dist/api/rpc-auth.d.ts +43 -0
  5. package/dist/api/transports/base.d.ts +13 -0
  6. package/dist/api/transports/http.d.ts +9 -0
  7. package/dist/api/transports/index.d.ts +9 -0
  8. package/dist/api/transports/types.d.ts +35 -0
  9. package/dist/api/transports/ws.d.ts +18 -0
  10. package/dist/auth/ecc/index.d.ts +9 -0
  11. package/dist/auth/ecc/src/address.d.ts +13 -0
  12. package/dist/auth/ecc/src/aes.d.ts +16 -0
  13. package/dist/auth/ecc/src/brain_key.d.ts +1 -0
  14. package/dist/auth/ecc/src/ecdsa.d.ts +28 -0
  15. package/dist/auth/ecc/src/ecsignature.d.ts +19 -0
  16. package/dist/auth/ecc/src/enforce_types.d.ts +5 -0
  17. package/dist/auth/ecc/src/hash.d.ts +25 -0
  18. package/dist/auth/ecc/src/index.d.ts +9 -0
  19. package/dist/auth/ecc/src/key_private.d.ts +38 -0
  20. package/dist/auth/ecc/src/key_public.d.ts +41 -0
  21. package/dist/auth/ecc/src/key_utils.d.ts +9 -0
  22. package/dist/auth/ecc/src/signature.d.ts +18 -0
  23. package/dist/auth/ecc.d.ts +3 -0
  24. package/dist/auth/index.d.ts +48 -0
  25. package/dist/auth/key_classes.d.ts +3 -0
  26. package/dist/auth/serializer/transaction.d.ts +5 -0
  27. package/dist/auth/serializer.d.ts +19 -0
  28. package/dist/broadcast/helpers.d.ts +11 -0
  29. package/dist/broadcast/index.d.ts +43 -0
  30. package/dist/broadcast/operations.d.ts +6 -0
  31. package/dist/config.d.ts +27 -0
  32. package/dist/crypto/index.d.ts +25 -0
  33. package/dist/formatter/index.d.ts +92 -0
  34. package/dist/index.cjs +26436 -0
  35. package/dist/index.cjs.map +1 -0
  36. package/dist/index.d.ts +30 -0
  37. package/dist/index.js +26400 -0
  38. package/dist/index.js.map +1 -0
  39. package/dist/index.umd.js +58121 -0
  40. package/dist/index.umd.js.map +1 -0
  41. package/dist/memo/index.d.ts +11 -0
  42. package/dist/operations/index.d.ts +44 -0
  43. package/dist/serializer/convert.d.ts +12 -0
  44. package/dist/serializer/index.d.ts +11 -0
  45. package/dist/serializer/number_utils.d.ts +8 -0
  46. package/dist/serializer/precision.d.ts +5 -0
  47. package/dist/serializer/types.d.ts +36 -0
  48. package/dist/types/index.d.ts +131 -0
  49. package/dist/types.d.ts +34 -0
  50. package/dist/utils/debug.d.ts +36 -0
  51. package/dist/utils/index.d.ts +9 -0
  52. package/dist/utils.d.ts +2 -0
  53. package/package.json +68 -87
  54. package/.dockerignore +0 -12
  55. package/.editorconfig +0 -20
  56. package/.eslintrc +0 -27
  57. package/LICENSE +0 -21
  58. package/circle.yml +0 -3
  59. package/config.json +0 -10
  60. package/dist/steem-tests.min.js +0 -4097
  61. package/dist/steem.min.js +0 -2089
  62. package/docker-webpack.config.js +0 -44
  63. package/lib/api/index.js +0 -315
  64. package/lib/api/methods.js +0 -428
  65. package/lib/api/rpc-auth.js +0 -135
  66. package/lib/api/transports/base.js +0 -31
  67. package/lib/api/transports/http.js +0 -157
  68. package/lib/api/transports/index.js +0 -13
  69. package/lib/api/transports/ws.js +0 -128
  70. package/lib/auth/ecc/index.js +0 -13
  71. package/lib/auth/ecc/src/address.js +0 -54
  72. package/lib/auth/ecc/src/aes.js +0 -148
  73. package/lib/auth/ecc/src/brain_key.js +0 -13
  74. package/lib/auth/ecc/src/ecdsa.js +0 -193
  75. package/lib/auth/ecc/src/ecsignature.js +0 -102
  76. package/lib/auth/ecc/src/enforce_types.js +0 -42
  77. package/lib/auth/ecc/src/hash.js +0 -58
  78. package/lib/auth/ecc/src/key_private.js +0 -159
  79. package/lib/auth/ecc/src/key_public.js +0 -143
  80. package/lib/auth/ecc/src/key_utils.js +0 -70
  81. package/lib/auth/ecc/src/signature.js +0 -135
  82. package/lib/auth/index.js +0 -113
  83. package/lib/auth/memo.js +0 -119
  84. package/lib/auth/serializer/index.js +0 -15
  85. package/lib/auth/serializer/src/ChainTypes.js +0 -87
  86. package/lib/auth/serializer/src/convert.js +0 -34
  87. package/lib/auth/serializer/src/error_with_cause.js +0 -27
  88. package/lib/auth/serializer/src/fast_parser.js +0 -57
  89. package/lib/auth/serializer/src/number_utils.js +0 -43
  90. package/lib/auth/serializer/src/object_id.js +0 -43
  91. package/lib/auth/serializer/src/operations.js +0 -695
  92. package/lib/auth/serializer/src/precision.js +0 -77
  93. package/lib/auth/serializer/src/serializer.js +0 -165
  94. package/lib/auth/serializer/src/template.js +0 -22
  95. package/lib/auth/serializer/src/types.js +0 -1085
  96. package/lib/auth/serializer/src/validation.js +0 -300
  97. package/lib/broadcast/helpers.js +0 -140
  98. package/lib/broadcast/index.js +0 -106
  99. package/lib/broadcast/operations.js +0 -255
  100. package/lib/browser.js +0 -25
  101. package/lib/config.js +0 -23
  102. package/lib/formatter.js +0 -163
  103. package/lib/index.js +0 -21
  104. package/lib/utils.js +0 -50
  105. package/node-18.dockerfile +0 -28
  106. package/test/Crypto.js +0 -100
  107. package/test/KeyFormats.js +0 -105
  108. package/test/all_types.js +0 -115
  109. package/test/api.test.js +0 -363
  110. package/test/broadcast.test.js +0 -231
  111. package/test/browser/BrowserTests.js +0 -55
  112. package/test/comment.test.js +0 -83
  113. package/test/hf20-accounts.test.js +0 -76
  114. package/test/hf21-sps.test.js +0 -78
  115. package/test/memo.test.js +0 -37
  116. package/test/number_utils.js +0 -28
  117. package/test/operations_test.js +0 -39
  118. package/test/promise-broadcast.test.js +0 -86
  119. package/test/reputation.test.js +0 -68
  120. package/test/smt.test.js +0 -347
  121. package/test/test-post.json +0 -13
  122. package/test/test.html +0 -13
  123. package/test/test_helper.js +0 -19
  124. package/test/types_test.js +0 -139
  125. package/test-github-workflow.bat +0 -19
  126. package/test-github-workflow.sh +0 -15
  127. package/webpack/makeConfig.js +0 -113
  128. package/webpack.config.js +0 -2
@@ -1,19 +0,0 @@
1
- @echo off
2
- REM Test GitHub Actions workflow locally using 'act'
3
- REM Requires 'act' to be installed (https://github.com/nektos/act)
4
- REM Install with: winget install nektos.act
5
-
6
- echo Testing GitHub Actions workflow locally...
7
- act -j node18 --container-architecture linux/amd64
8
-
9
- REM Check the exit code to see if the workflow succeeded
10
- if %ERRORLEVEL% EQU 0 (
11
- echo ✅ Workflow test passed!
12
- ) else (
13
- echo ❌ Workflow test failed!
14
- echo Error code: %ERRORLEVEL%
15
- )
16
-
17
- echo.
18
- echo Press any key to close this window...
19
- pause > nul
@@ -1,15 +0,0 @@
1
- #!/bin/bash
2
- # Test GitHub Actions workflow locally using 'act'
3
- # Requires 'act' to be installed (https://github.com/nektos/act)
4
- # Install with: curl https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash
5
-
6
- echo "Testing GitHub Actions workflow locally..."
7
- act -j node18 --container-architecture linux/amd64
8
-
9
- # Check the exit code to see if the workflow succeeded
10
- if [ $? -eq 0 ]; then
11
- echo "✅ Workflow test passed!"
12
- else
13
- echo "❌ Workflow test failed!"
14
- exit 1
15
- fi
@@ -1,113 +0,0 @@
1
- 'use strict';
2
- // Removing the visualizer plugin import as it's not compatible with webpack 5
3
- // const Visualizer = require('webpack-visualizer-plugin');
4
- const _ = require('lodash');
5
- const path = require('path');
6
- const webpack = require('webpack');
7
-
8
- const DEFAULTS = {
9
- isDevelopment: process.env.NODE_ENV !== 'production',
10
- baseDir: path.join(__dirname, '..'),
11
- };
12
-
13
- function makePlugins(options) {
14
- const isDevelopment = options.isDevelopment;
15
-
16
- let plugins = [
17
- // Add node polyfills for browser compatibility
18
- new webpack.ProvidePlugin({
19
- process: 'process/browser',
20
- Buffer: ['buffer', 'Buffer'],
21
- }),
22
- ];
23
-
24
- if (!isDevelopment) {
25
- plugins = plugins.concat([
26
- new webpack.optimize.AggressiveMergingPlugin(),
27
- ]);
28
- }
29
-
30
- return plugins;
31
- }
32
-
33
- function makeStyleLoaders(options) {
34
- if (options.isDevelopment) {
35
- return [
36
- {
37
- test: /\.s[ac]ss$/,
38
- loaders: [
39
- 'style',
40
- 'css?sourceMap',
41
- 'autoprefixer-loader?browsers=last 2 version',
42
- 'sass?sourceMap&sourceMapContents',
43
- ],
44
- },
45
- ];
46
- }
47
-
48
- return [
49
- {
50
- test: /\.s[ac]ss$/,
51
- loader: ExtractTextPlugin.extract(
52
- 'style-loader',
53
- 'css!autoprefixer-loader?browsers=last 2 version!sass'
54
- ),
55
- },
56
- ];
57
- }
58
-
59
- function makeConfig(options) {
60
- if (!options) options = {};
61
- _.defaults(options, DEFAULTS);
62
-
63
- const isDevelopment = options.isDevelopment;
64
-
65
- return {
66
- devtool: isDevelopment ? 'eval-source-map' : 'source-map',
67
- entry: {
68
- steem: path.join(options.baseDir, 'src/browser.js'),
69
- 'steem-tests': path.join(options.baseDir, 'test/api.test.js'),
70
- },
71
- output: {
72
- path: path.join(options.baseDir, 'dist'),
73
- filename: '[name].min.js',
74
- },
75
- plugins: makePlugins(options),
76
- module: {
77
- rules: [
78
- {
79
- test: /\.js?$/,
80
- use: 'babel-loader',
81
- exclude: /node_modules/,
82
- },
83
- {
84
- test: /\.json?$/,
85
- type: 'json',
86
- },
87
- ],
88
- },
89
- resolve: {
90
- alias: {
91
- '@exodus/bytebuffer': 'bytebuffer',
92
- 'stream': 'stream-browserify',
93
- 'path': 'path-browserify',
94
- }
95
- },
96
- node: {
97
- fs: 'empty',
98
- crypto: 'empty',
99
- },
100
- optimization: {
101
- minimize: !isDevelopment,
102
- },
103
- };
104
- }
105
-
106
- if (!module.parent) {
107
- console.log(makeConfig({
108
- isDevelopment: process.env.NODE_ENV !== 'production',
109
- }));
110
- }
111
-
112
- exports = module.exports = makeConfig;
113
- exports.DEFAULTS = DEFAULTS;
package/webpack.config.js DELETED
@@ -1,2 +0,0 @@
1
- const makeConfig = require('./webpack/makeConfig');
2
- exports = module.exports = makeConfig();