@waves/node-api-js 1.3.10-beta.2 → 1.3.10-beta.3
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 +2 -2
- package/cjs/api-node/activation/index.d.ts +21 -21
- package/cjs/api-node/activation/index.js +19 -19
- package/cjs/api-node/addresses/index.d.ts +81 -81
- package/cjs/api-node/addresses/index.js +173 -173
- package/cjs/api-node/alias/index.d.ts +6 -6
- package/cjs/api-node/alias/index.js +21 -21
- package/cjs/api-node/assets/index.d.ts +79 -79
- package/cjs/api-node/assets/index.js +171 -171
- package/cjs/api-node/blocks/index.d.ts +143 -143
- package/cjs/api-node/blocks/index.js +209 -209
- package/cjs/api-node/debug/index.d.ts +189 -189
- package/cjs/api-node/debug/index.js +244 -244
- package/cjs/api-node/eth/index.d.ts +3 -3
- package/cjs/api-node/eth/index.js +14 -14
- package/cjs/api-node/leasing/index.d.ts +22 -22
- package/cjs/api-node/leasing/index.js +41 -41
- package/cjs/api-node/node/index.d.ts +11 -11
- package/cjs/api-node/node/index.js +19 -19
- package/cjs/api-node/peers/index.d.ts +46 -46
- package/cjs/api-node/peers/index.js +59 -59
- package/cjs/api-node/rewards/index.d.ts +21 -21
- package/cjs/api-node/rewards/index.js +20 -20
- package/cjs/api-node/transactions/index.d.ts +73 -73
- package/cjs/api-node/transactions/index.js +192 -192
- package/cjs/api-node/utils/index.d.ts +110 -110
- package/cjs/api-node/utils/index.js +210 -210
- package/cjs/api-node/wallet/index.d.ts +5 -5
- package/cjs/api-node/wallet/index.js +6 -6
- package/cjs/constants.d.ts +40 -40
- package/cjs/constants.js +42 -42
- package/cjs/create.d.ts +1238 -1238
- package/cjs/create.js +115 -115
- package/cjs/index.d.ts +9 -9
- package/cjs/index.js +17 -17
- package/cjs/interface.d.ts +44 -44
- package/cjs/interface.js +9 -9
- package/cjs/tools/adresses/availableSponsoredBalances.d.ts +7 -7
- package/cjs/tools/adresses/availableSponsoredBalances.js +29 -29
- package/cjs/tools/adresses/ethAddress2waves.d.ts +1 -1
- package/cjs/tools/adresses/ethAddress2waves.js +46 -46
- package/cjs/tools/adresses/getAssetIdListByTx.d.ts +2 -2
- package/cjs/tools/adresses/getAssetIdListByTx.js +47 -47
- package/cjs/tools/adresses/getAssetsByTransaction.d.ts +3 -3
- package/cjs/tools/adresses/getAssetsByTransaction.js +13 -13
- package/cjs/tools/adresses/getTransactionsWithAssets.d.ts +6 -6
- package/cjs/tools/adresses/getTransactionsWithAssets.js +12 -12
- package/cjs/tools/adresses/watch.d.ts +24 -24
- package/cjs/tools/adresses/watch.js +167 -167
- package/cjs/tools/adresses/wavesAddress2eth.d.ts +1 -1
- package/cjs/tools/adresses/wavesAddress2eth.js +9 -9
- package/cjs/tools/assets/wavesAsset2eth.d.ts +1 -1
- package/cjs/tools/assets/wavesAsset2eth.js +9 -9
- package/cjs/tools/blocks/detectInterval.d.ts +1 -1
- package/cjs/tools/blocks/detectInterval.js +11 -11
- package/cjs/tools/blocks/getNetworkByte.d.ts +1 -1
- package/cjs/tools/blocks/getNetworkByte.js +53 -53
- package/cjs/tools/blocks/getNetworkCode.d.ts +1 -1
- package/cjs/tools/blocks/getNetworkCode.js +10 -10
- package/cjs/tools/blocks/waitHeight.d.ts +3 -3
- package/cjs/tools/blocks/waitHeight.js +64 -64
- package/cjs/tools/parse.d.ts +1 -1
- package/cjs/tools/parse.js +7 -7
- package/cjs/tools/query.d.ts +4 -4
- package/cjs/tools/query.js +40 -40
- package/cjs/tools/request.d.ts +64 -64
- package/cjs/tools/request.js +41 -41
- package/cjs/tools/resolve.d.ts +1 -1
- package/cjs/tools/resolve.js +6 -6
- package/cjs/tools/stringify.d.ts +1 -1
- package/cjs/tools/stringify.js +20 -20
- package/cjs/tools/transactions/broadcast.d.ts +14 -14
- package/cjs/tools/transactions/broadcast.js +59 -59
- package/cjs/tools/transactions/ethTxId2waves.d.ts +1 -1
- package/cjs/tools/transactions/ethTxId2waves.js +10 -10
- package/cjs/tools/transactions/wait.d.ts +10 -10
- package/cjs/tools/transactions/wait.js +41 -41
- package/cjs/tools/utils.d.ts +32 -32
- package/cjs/tools/utils.js +117 -117
- package/dist/node-api.js +2300 -2300
- package/es/api-node/activation/index.d.ts +21 -21
- package/es/api-node/activation/index.js +12 -12
- package/es/api-node/addresses/index.d.ts +81 -81
- package/es/api-node/addresses/index.js +110 -110
- package/es/api-node/alias/index.d.ts +6 -6
- package/es/api-node/alias/index.js +13 -13
- package/es/api-node/assets/index.d.ts +79 -79
- package/es/api-node/assets/index.js +102 -102
- package/es/api-node/blocks/index.d.ts +143 -143
- package/es/api-node/blocks/index.js +178 -178
- package/es/api-node/debug/index.d.ts +189 -189
- package/es/api-node/debug/index.js +200 -200
- package/es/api-node/eth/index.d.ts +3 -3
- package/es/api-node/eth/index.js +7 -7
- package/es/api-node/leasing/index.d.ts +22 -22
- package/es/api-node/leasing/index.js +21 -21
- package/es/api-node/node/index.d.ts +11 -11
- package/es/api-node/node/index.js +9 -9
- package/es/api-node/peers/index.d.ts +46 -46
- package/es/api-node/peers/index.js +45 -45
- package/es/api-node/rewards/index.d.ts +21 -21
- package/es/api-node/rewards/index.js +12 -12
- package/es/api-node/transactions/index.d.ts +73 -73
- package/es/api-node/transactions/index.js +136 -136
- package/es/api-node/utils/index.d.ts +110 -110
- package/es/api-node/utils/index.js +192 -192
- package/es/api-node/wallet/index.d.ts +5 -5
- package/es/api-node/wallet/index.js +6 -6
- package/es/constants.d.ts +40 -40
- package/es/constants.js +39 -39
- package/es/create.d.ts +1238 -1238
- package/es/create.js +89 -89
- package/es/index.d.ts +9 -9
- package/es/index.js +8 -8
- package/es/interface.d.ts +44 -44
- package/es/interface.js +2 -2
- package/es/tools/adresses/availableSponsoredBalances.d.ts +7 -7
- package/es/tools/adresses/availableSponsoredBalances.js +26 -26
- package/es/tools/adresses/ethAddress2waves.d.ts +1 -1
- package/es/tools/adresses/ethAddress2waves.js +30 -30
- package/es/tools/adresses/getAssetIdListByTx.d.ts +2 -2
- package/es/tools/adresses/getAssetIdListByTx.js +23 -23
- package/es/tools/adresses/getAssetsByTransaction.d.ts +3 -3
- package/es/tools/adresses/getAssetsByTransaction.js +7 -7
- package/es/tools/adresses/getTransactionsWithAssets.d.ts +6 -6
- package/es/tools/adresses/getTransactionsWithAssets.js +6 -6
- package/es/tools/adresses/watch.d.ts +24 -24
- package/es/tools/adresses/watch.js +133 -133
- package/es/tools/adresses/wavesAddress2eth.d.ts +1 -1
- package/es/tools/adresses/wavesAddress2eth.js +6 -6
- package/es/tools/assets/wavesAsset2eth.d.ts +1 -1
- package/es/tools/assets/wavesAsset2eth.js +6 -6
- package/es/tools/blocks/detectInterval.d.ts +1 -1
- package/es/tools/blocks/detectInterval.js +8 -8
- package/es/tools/blocks/getNetworkByte.d.ts +1 -1
- package/es/tools/blocks/getNetworkByte.js +50 -50
- package/es/tools/blocks/getNetworkCode.d.ts +1 -1
- package/es/tools/blocks/getNetworkCode.js +4 -4
- package/es/tools/blocks/waitHeight.d.ts +3 -3
- package/es/tools/blocks/waitHeight.js +35 -35
- package/es/tools/parse.d.ts +1 -1
- package/es/tools/parse.js +4 -4
- package/es/tools/query.d.ts +4 -4
- package/es/tools/query.js +11 -11
- package/es/tools/request.d.ts +64 -64
- package/es/tools/request.js +21 -21
- package/es/tools/resolve.d.ts +1 -1
- package/es/tools/resolve.js +3 -3
- package/es/tools/stringify.d.ts +1 -1
- package/es/tools/stringify.js +17 -17
- package/es/tools/transactions/broadcast.d.ts +14 -14
- package/es/tools/transactions/broadcast.js +42 -42
- package/es/tools/transactions/ethTxId2waves.d.ts +1 -1
- package/es/tools/transactions/ethTxId2waves.js +7 -7
- package/es/tools/transactions/wait.d.ts +10 -10
- package/es/tools/transactions/wait.js +38 -38
- package/es/tools/utils.d.ts +32 -32
- package/es/tools/utils.js +72 -72
- package/package.json +66 -66
- package/cjs/api-node/consensus/index.d.ts +0 -39
- package/cjs/api-node/consensus/index.js +0 -37
- package/cjs/api-node/consensus/index.js.map +0 -1
- package/es/api-node/consensus/index.d.ts +0 -39
- package/es/api-node/consensus/index.js +0 -27
- package/es/api-node/consensus/index.js.map +0 -1
package/es/tools/utils.js
CHANGED
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
export function isObject(obj) {
|
|
2
|
-
if (typeof obj === "object" && obj !== null) {
|
|
3
|
-
if (typeof Object.getPrototypeOf === "function") {
|
|
4
|
-
const prototype = Object.getPrototypeOf(obj);
|
|
5
|
-
return prototype === Object.prototype || prototype === null;
|
|
6
|
-
}
|
|
7
|
-
return Object.prototype.toString.call(obj) === "[object Object]";
|
|
8
|
-
}
|
|
9
|
-
return false;
|
|
10
|
-
}
|
|
11
|
-
export function toArray(data) {
|
|
12
|
-
return Array.isArray(data) ? data : [data];
|
|
13
|
-
}
|
|
14
|
-
export function head(data) {
|
|
15
|
-
return data[0];
|
|
16
|
-
}
|
|
17
|
-
export function wait(time) {
|
|
18
|
-
return new Promise(resolve => {
|
|
19
|
-
setTimeout(resolve, time);
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
export function prop(key) {
|
|
23
|
-
return data => data[key];
|
|
24
|
-
}
|
|
25
|
-
export const keys = (obj) => Object.keys(obj);
|
|
26
|
-
export const entries = (obj) => keys(obj).map(name => [name, obj[name]]);
|
|
27
|
-
export const values = (obj) => keys(obj).map(key => obj[key]);
|
|
28
|
-
export const assign = (target, merge) => {
|
|
29
|
-
return entries(merge).reduce((acc, [key, value]) => {
|
|
30
|
-
target[key] = value;
|
|
31
|
-
return target;
|
|
32
|
-
}, target);
|
|
33
|
-
};
|
|
34
|
-
export const deepAssign = (...objects) => objects.reduce((target, merge) => {
|
|
35
|
-
keys(merge).forEach((key) => {
|
|
36
|
-
if (Array.isArray(target[key]) && Array.isArray(merge[key])) {
|
|
37
|
-
target[key] = Array.from(new Set(target[key].concat(merge[key])));
|
|
38
|
-
}
|
|
39
|
-
else if (isObject(target[key]) && isObject(merge[key])) {
|
|
40
|
-
target[key] = deepAssign(target[key], merge[key]);
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
target[key] = merge[key];
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
return target;
|
|
47
|
-
}, objects[0] || {});
|
|
48
|
-
export function map(process) {
|
|
49
|
-
return list => list.map(process);
|
|
50
|
-
}
|
|
51
|
-
export function filter(process) {
|
|
52
|
-
return list => list.filter(process);
|
|
53
|
-
}
|
|
54
|
-
export function indexBy(process, data) {
|
|
55
|
-
return data.reduce((acc, item) => {
|
|
56
|
-
acc[process(item)] = item;
|
|
57
|
-
return acc;
|
|
58
|
-
}, {});
|
|
59
|
-
}
|
|
60
|
-
export const uniq = (list) => {
|
|
61
|
-
return keys(list.reduce((acc, item) => {
|
|
62
|
-
if (item != null)
|
|
63
|
-
acc[item] = item;
|
|
64
|
-
return acc;
|
|
65
|
-
}, Object.create(null)));
|
|
66
|
-
};
|
|
67
|
-
export function switchTransactionByType(choices) {
|
|
68
|
-
return tx => choices[tx.type] && typeof choices[tx.type] === 'function' ? choices[tx.type](tx) : undefined;
|
|
69
|
-
}
|
|
70
|
-
export const pipe = (...args) => {
|
|
71
|
-
return data => args.reduce((acc, item) => item(acc), data);
|
|
72
|
-
};
|
|
1
|
+
export function isObject(obj) {
|
|
2
|
+
if (typeof obj === "object" && obj !== null) {
|
|
3
|
+
if (typeof Object.getPrototypeOf === "function") {
|
|
4
|
+
const prototype = Object.getPrototypeOf(obj);
|
|
5
|
+
return prototype === Object.prototype || prototype === null;
|
|
6
|
+
}
|
|
7
|
+
return Object.prototype.toString.call(obj) === "[object Object]";
|
|
8
|
+
}
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
export function toArray(data) {
|
|
12
|
+
return Array.isArray(data) ? data : [data];
|
|
13
|
+
}
|
|
14
|
+
export function head(data) {
|
|
15
|
+
return data[0];
|
|
16
|
+
}
|
|
17
|
+
export function wait(time) {
|
|
18
|
+
return new Promise(resolve => {
|
|
19
|
+
setTimeout(resolve, time);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
export function prop(key) {
|
|
23
|
+
return data => data[key];
|
|
24
|
+
}
|
|
25
|
+
export const keys = (obj) => Object.keys(obj);
|
|
26
|
+
export const entries = (obj) => keys(obj).map(name => [name, obj[name]]);
|
|
27
|
+
export const values = (obj) => keys(obj).map(key => obj[key]);
|
|
28
|
+
export const assign = (target, merge) => {
|
|
29
|
+
return entries(merge).reduce((acc, [key, value]) => {
|
|
30
|
+
target[key] = value;
|
|
31
|
+
return target;
|
|
32
|
+
}, target);
|
|
33
|
+
};
|
|
34
|
+
export const deepAssign = (...objects) => objects.reduce((target, merge) => {
|
|
35
|
+
keys(merge).forEach((key) => {
|
|
36
|
+
if (Array.isArray(target[key]) && Array.isArray(merge[key])) {
|
|
37
|
+
target[key] = Array.from(new Set(target[key].concat(merge[key])));
|
|
38
|
+
}
|
|
39
|
+
else if (isObject(target[key]) && isObject(merge[key])) {
|
|
40
|
+
target[key] = deepAssign(target[key], merge[key]);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
target[key] = merge[key];
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
return target;
|
|
47
|
+
}, objects[0] || {});
|
|
48
|
+
export function map(process) {
|
|
49
|
+
return list => list.map(process);
|
|
50
|
+
}
|
|
51
|
+
export function filter(process) {
|
|
52
|
+
return list => list.filter(process);
|
|
53
|
+
}
|
|
54
|
+
export function indexBy(process, data) {
|
|
55
|
+
return data.reduce((acc, item) => {
|
|
56
|
+
acc[process(item)] = item;
|
|
57
|
+
return acc;
|
|
58
|
+
}, {});
|
|
59
|
+
}
|
|
60
|
+
export const uniq = (list) => {
|
|
61
|
+
return keys(list.reduce((acc, item) => {
|
|
62
|
+
if (item != null)
|
|
63
|
+
acc[item] = item;
|
|
64
|
+
return acc;
|
|
65
|
+
}, Object.create(null)));
|
|
66
|
+
};
|
|
67
|
+
export function switchTransactionByType(choices) {
|
|
68
|
+
return tx => choices[tx.type] && typeof choices[tx.type] === 'function' ? choices[tx.type](tx) : undefined;
|
|
69
|
+
}
|
|
70
|
+
export const pipe = (...args) => {
|
|
71
|
+
return data => args.reduce((acc, item) => item(acc), data);
|
|
72
|
+
};
|
|
73
73
|
//# sourceMappingURL=utils.js.map
|
package/package.json
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@waves/node-api-js",
|
|
3
|
-
"version": "1.3.10-beta.
|
|
4
|
-
"main": "cjs/index.js",
|
|
5
|
-
"types": "cjs/index.d.ts",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"testCommand": "jest",
|
|
8
|
-
"prepare": "npm run build",
|
|
9
|
-
"build": "tsc -p ./tsconfig-es.json && tsc -p ./tsconfig-cjs.json && webpack",
|
|
10
|
-
"test": "node-state -e -n -m typescript -o ./test/_state.ts -r"
|
|
11
|
-
},
|
|
12
|
-
"dependencies": {
|
|
13
|
-
"@types/node-fetch": "^2.5.4",
|
|
14
|
-
"@waves/bignumber": "^1.1.1",
|
|
15
|
-
"@waves/ts-types": "1.2.0-beta.
|
|
16
|
-
"node-fetch": "^2.6.7",
|
|
17
|
-
"typed-ts-events": "^1.1.1"
|
|
18
|
-
},
|
|
19
|
-
"files": [
|
|
20
|
-
"dist",
|
|
21
|
-
"cjs",
|
|
22
|
-
"es"
|
|
23
|
-
],
|
|
24
|
-
"jest": {
|
|
25
|
-
"coverageThreshold": {
|
|
26
|
-
"global": {
|
|
27
|
-
"branches": 60,
|
|
28
|
-
"functions": 60,
|
|
29
|
-
"lines": 60,
|
|
30
|
-
"statements": 60
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
"collectCoverage": true,
|
|
34
|
-
"coveragePathIgnorePatterns": [
|
|
35
|
-
"/node_modules/",
|
|
36
|
-
"/test/",
|
|
37
|
-
"/src/libs/"
|
|
38
|
-
],
|
|
39
|
-
"moduleFileExtensions": [
|
|
40
|
-
"ts",
|
|
41
|
-
"tsx",
|
|
42
|
-
"js"
|
|
43
|
-
],
|
|
44
|
-
"transform": {
|
|
45
|
-
"^.+\\.(ts|tsx)$": "ts-jest"
|
|
46
|
-
},
|
|
47
|
-
"testMatch": [
|
|
48
|
-
"**/test/*spec.+(ts)",
|
|
49
|
-
"**/test/**/*spec.+(ts)"
|
|
50
|
-
],
|
|
51
|
-
"setupFilesAfterEnv": [
|
|
52
|
-
"<rootDir>/test/extendedMatcher.ts"
|
|
53
|
-
]
|
|
54
|
-
},
|
|
55
|
-
"devDependencies": {
|
|
56
|
-
"@types/jest": "^26.0.23",
|
|
57
|
-
"@waves/node-state": "0.1.0",
|
|
58
|
-
"@waves/waves-transactions": "4.3.10-beta.1",
|
|
59
|
-
"jest": "^26.6.3",
|
|
60
|
-
"ts-jest": "^26.5.6",
|
|
61
|
-
"ts-loader": "^7.0.5",
|
|
62
|
-
"typescript": "^3.9.4",
|
|
63
|
-
"webpack": "^4.46.0",
|
|
64
|
-
"webpack-cli": "^4.9.2"
|
|
65
|
-
}
|
|
66
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@waves/node-api-js",
|
|
3
|
+
"version": "1.3.10-beta.3",
|
|
4
|
+
"main": "cjs/index.js",
|
|
5
|
+
"types": "cjs/index.d.ts",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"testCommand": "jest",
|
|
8
|
+
"prepare": "npm run build",
|
|
9
|
+
"build": "tsc -p ./tsconfig-es.json && tsc -p ./tsconfig-cjs.json && webpack",
|
|
10
|
+
"test": "node-state -e -n -m typescript -o ./test/_state.ts -r"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@types/node-fetch": "^2.5.4",
|
|
14
|
+
"@waves/bignumber": "^1.1.1",
|
|
15
|
+
"@waves/ts-types": "1.2.0-beta.3",
|
|
16
|
+
"node-fetch": "^2.6.7",
|
|
17
|
+
"typed-ts-events": "^1.1.1"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist",
|
|
21
|
+
"cjs",
|
|
22
|
+
"es"
|
|
23
|
+
],
|
|
24
|
+
"jest": {
|
|
25
|
+
"coverageThreshold": {
|
|
26
|
+
"global": {
|
|
27
|
+
"branches": 60,
|
|
28
|
+
"functions": 60,
|
|
29
|
+
"lines": 60,
|
|
30
|
+
"statements": 60
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"collectCoverage": true,
|
|
34
|
+
"coveragePathIgnorePatterns": [
|
|
35
|
+
"/node_modules/",
|
|
36
|
+
"/test/",
|
|
37
|
+
"/src/libs/"
|
|
38
|
+
],
|
|
39
|
+
"moduleFileExtensions": [
|
|
40
|
+
"ts",
|
|
41
|
+
"tsx",
|
|
42
|
+
"js"
|
|
43
|
+
],
|
|
44
|
+
"transform": {
|
|
45
|
+
"^.+\\.(ts|tsx)$": "ts-jest"
|
|
46
|
+
},
|
|
47
|
+
"testMatch": [
|
|
48
|
+
"**/test/*spec.+(ts)",
|
|
49
|
+
"**/test/**/*spec.+(ts)"
|
|
50
|
+
],
|
|
51
|
+
"setupFilesAfterEnv": [
|
|
52
|
+
"<rootDir>/test/extendedMatcher.ts"
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@types/jest": "^26.0.23",
|
|
57
|
+
"@waves/node-state": "0.1.0",
|
|
58
|
+
"@waves/waves-transactions": "4.3.10-beta.1",
|
|
59
|
+
"jest": "^26.6.3",
|
|
60
|
+
"ts-jest": "^26.5.6",
|
|
61
|
+
"ts-loader": "^7.0.5",
|
|
62
|
+
"typescript": "^3.9.4",
|
|
63
|
+
"webpack": "^4.46.0",
|
|
64
|
+
"webpack-cli": "^4.9.2"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { TLong } from '../../interface';
|
|
2
|
-
/**
|
|
3
|
-
* GET /consensus/generatingbalance/{address}
|
|
4
|
-
* Generating balance
|
|
5
|
-
* @param base
|
|
6
|
-
* @param address
|
|
7
|
-
*/
|
|
8
|
-
export declare function fetchGeneratingBalance(base: string, address: string, options?: RequestInit): Promise<IGeneratingBalance<TLong>>;
|
|
9
|
-
/**
|
|
10
|
-
* GET /consensus/basetarget
|
|
11
|
-
* Base target last
|
|
12
|
-
* @param base
|
|
13
|
-
*/
|
|
14
|
-
export declare function fetchBasetarget(base: string): Promise<IBasetarget>;
|
|
15
|
-
/**
|
|
16
|
-
* GET /consensus/algo
|
|
17
|
-
* Consensus algo
|
|
18
|
-
* @param base
|
|
19
|
-
*/
|
|
20
|
-
export declare function fetchConsensusAlgo(base: string): Promise<IConsensusAlgo>;
|
|
21
|
-
export interface IGeneratingBalance<LONG> {
|
|
22
|
-
address: string;
|
|
23
|
-
balance: LONG;
|
|
24
|
-
}
|
|
25
|
-
export interface IBasetarget {
|
|
26
|
-
baseTarget: number;
|
|
27
|
-
}
|
|
28
|
-
export interface IConsensusAlgo {
|
|
29
|
-
consensusAlgo: string;
|
|
30
|
-
}
|
|
31
|
-
export interface IGeneraationSignatureBlockId {
|
|
32
|
-
generationSignature: string;
|
|
33
|
-
}
|
|
34
|
-
export interface IBaseTargetBlockId {
|
|
35
|
-
baseTarget: number;
|
|
36
|
-
}
|
|
37
|
-
export interface IGenerationSignature {
|
|
38
|
-
generationSignature: string;
|
|
39
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.fetchConsensusAlgo = exports.fetchBasetarget = exports.fetchGeneratingBalance = void 0;
|
|
7
|
-
var request_1 = __importDefault(require("../../tools/request"));
|
|
8
|
-
/**
|
|
9
|
-
* GET /consensus/generatingbalance/{address}
|
|
10
|
-
* Generating balance
|
|
11
|
-
* @param base
|
|
12
|
-
* @param address
|
|
13
|
-
*/
|
|
14
|
-
function fetchGeneratingBalance(base, address, options) {
|
|
15
|
-
if (options === void 0) { options = Object.create(null); }
|
|
16
|
-
return request_1.default({ base: base, url: "/consensus/generatingbalance/" + address });
|
|
17
|
-
}
|
|
18
|
-
exports.fetchGeneratingBalance = fetchGeneratingBalance;
|
|
19
|
-
/**
|
|
20
|
-
* GET /consensus/basetarget
|
|
21
|
-
* Base target last
|
|
22
|
-
* @param base
|
|
23
|
-
*/
|
|
24
|
-
function fetchBasetarget(base) {
|
|
25
|
-
return request_1.default({ base: base, url: '/consensus/basetarget' });
|
|
26
|
-
}
|
|
27
|
-
exports.fetchBasetarget = fetchBasetarget;
|
|
28
|
-
/**
|
|
29
|
-
* GET /consensus/algo
|
|
30
|
-
* Consensus algo
|
|
31
|
-
* @param base
|
|
32
|
-
*/
|
|
33
|
-
function fetchConsensusAlgo(base) {
|
|
34
|
-
return request_1.default({ base: base, url: '/consensus/algo' });
|
|
35
|
-
}
|
|
36
|
-
exports.fetchConsensusAlgo = fetchConsensusAlgo;
|
|
37
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-node/consensus/index.ts"],"names":[],"mappings":";;;;;;AACA,gEAA0C;AAE1C;;;;;GAKG;AACH,SAAgB,sBAAsB,CAAC,IAAY,EAAE,OAAe,EAAE,OAA0C;IAA1C,wBAAA,EAAA,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IAC5G,OAAO,iBAAO,CAAC,EAAC,IAAI,MAAA,EAAE,GAAG,EAAE,kCAAgC,OAAS,EAAC,CAAC,CAAC;AAC3E,CAAC;AAFD,wDAEC;AAED;;;;GAIG;AACH,SAAgB,eAAe,CAAC,IAAY;IACxC,OAAO,iBAAO,CAAC,EAAC,IAAI,MAAA,EAAE,GAAG,EAAE,uBAAuB,EAAC,CAAC,CAAC;AACzD,CAAC;AAFD,0CAEC;AAED;;;;GAIG;AACH,SAAgB,kBAAkB,CAAC,IAAY;IAC3C,OAAO,iBAAO,CAAC,EAAC,IAAI,MAAA,EAAE,GAAG,EAAE,iBAAiB,EAAC,CAAC,CAAC;AACnD,CAAC;AAFD,gDAEC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { TLong } from '../../interface';
|
|
2
|
-
/**
|
|
3
|
-
* GET /consensus/generatingbalance/{address}
|
|
4
|
-
* Generating balance
|
|
5
|
-
* @param base
|
|
6
|
-
* @param address
|
|
7
|
-
*/
|
|
8
|
-
export declare function fetchGeneratingBalance(base: string, address: string, options?: RequestInit): Promise<IGeneratingBalance<TLong>>;
|
|
9
|
-
/**
|
|
10
|
-
* GET /consensus/basetarget
|
|
11
|
-
* Base target last
|
|
12
|
-
* @param base
|
|
13
|
-
*/
|
|
14
|
-
export declare function fetchBasetarget(base: string): Promise<IBasetarget>;
|
|
15
|
-
/**
|
|
16
|
-
* GET /consensus/algo
|
|
17
|
-
* Consensus algo
|
|
18
|
-
* @param base
|
|
19
|
-
*/
|
|
20
|
-
export declare function fetchConsensusAlgo(base: string): Promise<IConsensusAlgo>;
|
|
21
|
-
export interface IGeneratingBalance<LONG> {
|
|
22
|
-
address: string;
|
|
23
|
-
balance: LONG;
|
|
24
|
-
}
|
|
25
|
-
export interface IBasetarget {
|
|
26
|
-
baseTarget: number;
|
|
27
|
-
}
|
|
28
|
-
export interface IConsensusAlgo {
|
|
29
|
-
consensusAlgo: string;
|
|
30
|
-
}
|
|
31
|
-
export interface IGeneraationSignatureBlockId {
|
|
32
|
-
generationSignature: string;
|
|
33
|
-
}
|
|
34
|
-
export interface IBaseTargetBlockId {
|
|
35
|
-
baseTarget: number;
|
|
36
|
-
}
|
|
37
|
-
export interface IGenerationSignature {
|
|
38
|
-
generationSignature: string;
|
|
39
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import request from '../../tools/request';
|
|
2
|
-
/**
|
|
3
|
-
* GET /consensus/generatingbalance/{address}
|
|
4
|
-
* Generating balance
|
|
5
|
-
* @param base
|
|
6
|
-
* @param address
|
|
7
|
-
*/
|
|
8
|
-
export function fetchGeneratingBalance(base, address, options = Object.create(null)) {
|
|
9
|
-
return request({ base, url: `/consensus/generatingbalance/${address}` });
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* GET /consensus/basetarget
|
|
13
|
-
* Base target last
|
|
14
|
-
* @param base
|
|
15
|
-
*/
|
|
16
|
-
export function fetchBasetarget(base) {
|
|
17
|
-
return request({ base, url: '/consensus/basetarget' });
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* GET /consensus/algo
|
|
21
|
-
* Consensus algo
|
|
22
|
-
* @param base
|
|
23
|
-
*/
|
|
24
|
-
export function fetchConsensusAlgo(base) {
|
|
25
|
-
return request({ base, url: '/consensus/algo' });
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-node/consensus/index.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAE1C;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CAAC,IAAY,EAAE,OAAe,EAAE,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IAC5G,OAAO,OAAO,CAAC,EAAC,IAAI,EAAE,GAAG,EAAE,gCAAgC,OAAO,EAAE,EAAC,CAAC,CAAC;AAC3E,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY;IACxC,OAAO,OAAO,CAAC,EAAC,IAAI,EAAE,GAAG,EAAE,uBAAuB,EAAC,CAAC,CAAC;AACzD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC3C,OAAO,OAAO,CAAC,EAAC,IAAI,EAAE,GAAG,EAAE,iBAAiB,EAAC,CAAC,CAAC;AACnD,CAAC"}
|