@steemit/steem-js 0.8.0 → 1.0.0
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.
- package/README.md +202 -105
- package/dist/api/index.d.ts +128 -0
- package/dist/api/methods.d.ts +9 -0
- package/dist/api/rpc-auth.d.ts +43 -0
- package/dist/api/transports/base.d.ts +13 -0
- package/dist/api/transports/http.d.ts +9 -0
- package/dist/api/transports/index.d.ts +9 -0
- package/dist/api/transports/types.d.ts +35 -0
- package/dist/api/transports/ws.d.ts +18 -0
- package/dist/auth/ecc/index.d.ts +9 -0
- package/dist/auth/ecc/src/address.d.ts +13 -0
- package/dist/auth/ecc/src/aes.d.ts +16 -0
- package/dist/auth/ecc/src/brain_key.d.ts +1 -0
- package/dist/auth/ecc/src/ecdsa.d.ts +28 -0
- package/dist/auth/ecc/src/ecsignature.d.ts +19 -0
- package/dist/auth/ecc/src/enforce_types.d.ts +5 -0
- package/dist/auth/ecc/src/hash.d.ts +25 -0
- package/dist/auth/ecc/src/index.d.ts +9 -0
- package/dist/auth/ecc/src/key_private.d.ts +38 -0
- package/dist/auth/ecc/src/key_public.d.ts +41 -0
- package/dist/auth/ecc/src/key_utils.d.ts +9 -0
- package/dist/auth/ecc/src/signature.d.ts +18 -0
- package/dist/auth/ecc.d.ts +3 -0
- package/dist/auth/index.d.ts +48 -0
- package/dist/auth/key_classes.d.ts +3 -0
- package/dist/auth/serializer.d.ts +19 -0
- package/dist/broadcast/helpers.d.ts +11 -0
- package/dist/broadcast/index.d.ts +43 -0
- package/dist/broadcast/operations.d.ts +6 -0
- package/dist/config.d.ts +25 -0
- package/dist/crypto/index.d.ts +25 -0
- package/dist/formatter/index.d.ts +92 -0
- package/dist/index.cjs +25848 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +25812 -0
- package/dist/index.js.map +1 -0
- package/dist/index.umd.js +57513 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/memo/index.d.ts +11 -0
- package/dist/operations/index.d.ts +44 -0
- package/dist/serializer/convert.d.ts +12 -0
- package/dist/serializer/index.d.ts +11 -0
- package/dist/serializer/number_utils.d.ts +8 -0
- package/dist/serializer/precision.d.ts +5 -0
- package/dist/serializer/types.d.ts +36 -0
- package/dist/types/index.d.ts +131 -0
- package/dist/types.d.ts +34 -0
- package/dist/utils/index.d.ts +8 -0
- package/dist/utils.d.ts +2 -0
- package/package.json +68 -87
- package/.dockerignore +0 -12
- package/.editorconfig +0 -20
- package/.eslintrc +0 -27
- package/LICENSE +0 -21
- package/circle.yml +0 -3
- package/config.json +0 -10
- package/dist/steem-tests.min.js +0 -4097
- package/dist/steem.min.js +0 -2089
- package/docker-webpack.config.js +0 -44
- package/lib/api/index.js +0 -315
- package/lib/api/methods.js +0 -428
- package/lib/api/rpc-auth.js +0 -135
- package/lib/api/transports/base.js +0 -31
- package/lib/api/transports/http.js +0 -157
- package/lib/api/transports/index.js +0 -13
- package/lib/api/transports/ws.js +0 -128
- package/lib/auth/ecc/index.js +0 -13
- package/lib/auth/ecc/src/address.js +0 -54
- package/lib/auth/ecc/src/aes.js +0 -148
- package/lib/auth/ecc/src/brain_key.js +0 -13
- package/lib/auth/ecc/src/ecdsa.js +0 -193
- package/lib/auth/ecc/src/ecsignature.js +0 -102
- package/lib/auth/ecc/src/enforce_types.js +0 -42
- package/lib/auth/ecc/src/hash.js +0 -58
- package/lib/auth/ecc/src/key_private.js +0 -159
- package/lib/auth/ecc/src/key_public.js +0 -143
- package/lib/auth/ecc/src/key_utils.js +0 -70
- package/lib/auth/ecc/src/signature.js +0 -135
- package/lib/auth/index.js +0 -113
- package/lib/auth/memo.js +0 -119
- package/lib/auth/serializer/index.js +0 -15
- package/lib/auth/serializer/src/ChainTypes.js +0 -87
- package/lib/auth/serializer/src/convert.js +0 -34
- package/lib/auth/serializer/src/error_with_cause.js +0 -27
- package/lib/auth/serializer/src/fast_parser.js +0 -57
- package/lib/auth/serializer/src/number_utils.js +0 -43
- package/lib/auth/serializer/src/object_id.js +0 -43
- package/lib/auth/serializer/src/operations.js +0 -695
- package/lib/auth/serializer/src/precision.js +0 -77
- package/lib/auth/serializer/src/serializer.js +0 -165
- package/lib/auth/serializer/src/template.js +0 -22
- package/lib/auth/serializer/src/types.js +0 -1085
- package/lib/auth/serializer/src/validation.js +0 -300
- package/lib/broadcast/helpers.js +0 -140
- package/lib/broadcast/index.js +0 -106
- package/lib/broadcast/operations.js +0 -255
- package/lib/browser.js +0 -25
- package/lib/config.js +0 -23
- package/lib/formatter.js +0 -163
- package/lib/index.js +0 -21
- package/lib/utils.js +0 -50
- package/node-18.dockerfile +0 -28
- package/test/Crypto.js +0 -100
- package/test/KeyFormats.js +0 -105
- package/test/all_types.js +0 -115
- package/test/api.test.js +0 -363
- package/test/broadcast.test.js +0 -231
- package/test/browser/BrowserTests.js +0 -55
- package/test/comment.test.js +0 -83
- package/test/hf20-accounts.test.js +0 -76
- package/test/hf21-sps.test.js +0 -78
- package/test/memo.test.js +0 -37
- package/test/number_utils.js +0 -28
- package/test/operations_test.js +0 -39
- package/test/promise-broadcast.test.js +0 -86
- package/test/reputation.test.js +0 -68
- package/test/smt.test.js +0 -347
- package/test/test-post.json +0 -13
- package/test/test.html +0 -13
- package/test/test_helper.js +0 -19
- package/test/types_test.js +0 -139
- package/test-github-workflow.bat +0 -19
- package/test-github-workflow.sh +0 -15
- package/webpack/makeConfig.js +0 -113
- package/webpack.config.js +0 -2
package/test-github-workflow.bat
DELETED
|
@@ -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
|
package/test-github-workflow.sh
DELETED
|
@@ -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
|
package/webpack/makeConfig.js
DELETED
|
@@ -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