@waves/node-api-js 1.3.0 → 1.3.10-beta.2
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/addresses/index.js.map +1 -1
- 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 -131
- package/cjs/api-node/blocks/index.js +209 -209
- package/cjs/api-node/consensus/index.d.ts +39 -39
- package/cjs/api-node/consensus/index.js +36 -36
- 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 -1240
- package/cjs/create.js +115 -118
- package/cjs/create.js.map +1 -1
- 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 +2368 -2420
- package/dist/node-api.min.js +2 -2
- 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/addresses/index.js.map +1 -1
- 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 -131
- package/es/api-node/blocks/index.js +178 -178
- package/es/api-node/consensus/index.d.ts +39 -39
- package/es/api-node/consensus/index.js +26 -26
- 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 -1240
- package/es/create.js +89 -92
- package/es/create.js.map +1 -1
- 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/tools/transactions/transactions.d.ts +0 -0
- package/cjs/tools/transactions/transactions.js +0 -2
- package/cjs/tools/transactions/transactions.js.map +0 -1
- package/dist/0.node-api.js +0 -467
- package/dist/node-api.min.js.LICENSE.txt +0 -17
- package/dist/node_fs-node_path.node-api.js +0 -23
- package/dist/vendors-node_modules_node-fetch_src_utils_multipart-parser_js.node-api.js +0 -599
- package/es/tools/transactions/transactions.d.ts +0 -0
- package/es/tools/transactions/transactions.js +0 -2
- package/es/tools/transactions/transactions.js.map +0 -1
|
@@ -1,211 +1,211 @@
|
|
|
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.fetchNodeTime = exports.fetchSignPrivateKey = exports.fetchScriptDecompile = exports.fetchScriptMeta = exports.fetchHashFast = exports.fetchHashSecure = exports.fetchTransactionSerialize = exports.fetchEvaluate = exports.fetchEstimate = exports.fetchCompileWithImports = exports.fetchCompileCode = exports.fetchSeed = void 0;
|
|
7
|
-
var request_1 = __importDefault(require("../../tools/request"));
|
|
8
|
-
var stringify_1 = __importDefault(require("../../tools/stringify"));
|
|
9
|
-
/**
|
|
10
|
-
* GET /utils/seed
|
|
11
|
-
* Generate random seed
|
|
12
|
-
*/
|
|
13
|
-
function fetchSeed(base, length) {
|
|
14
|
-
return request_1.default({
|
|
15
|
-
base: base,
|
|
16
|
-
url: "/utils/seed" + (length ? "/" + length : '')
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
exports.fetchSeed = fetchSeed;
|
|
20
|
-
/**
|
|
21
|
-
* POST /utils/script/compileCode
|
|
22
|
-
* Compiles string code to base64 script representation
|
|
23
|
-
*/
|
|
24
|
-
function fetchCompileCode(base, body) {
|
|
25
|
-
return request_1.default({
|
|
26
|
-
base: base,
|
|
27
|
-
url: '/utils/script/compileCode',
|
|
28
|
-
options: {
|
|
29
|
-
method: 'POST',
|
|
30
|
-
body: body,
|
|
31
|
-
headers: {
|
|
32
|
-
'Content-Type': 'application/json'
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
exports.fetchCompileCode = fetchCompileCode;
|
|
38
|
-
/**
|
|
39
|
-
* POST /utils/script/compileWithImports
|
|
40
|
-
* Compiles string code with imports to base64 script representation
|
|
41
|
-
*/
|
|
42
|
-
function fetchCompileWithImports(base, body) {
|
|
43
|
-
return request_1.default({
|
|
44
|
-
base: base,
|
|
45
|
-
url: '/utils/script/compileWithImports',
|
|
46
|
-
options: {
|
|
47
|
-
method: 'POST',
|
|
48
|
-
body: stringify_1.default(body),
|
|
49
|
-
headers: {
|
|
50
|
-
'Content-Type': 'application/json'
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
exports.fetchCompileWithImports = fetchCompileWithImports;
|
|
56
|
-
/**
|
|
57
|
-
* POST /utils/script/estimate
|
|
58
|
-
* Estimates compiled code in Base64 representation
|
|
59
|
-
*/
|
|
60
|
-
function fetchEstimate(base, body) {
|
|
61
|
-
return request_1.default({
|
|
62
|
-
base: base,
|
|
63
|
-
url: '/utils/script/estimate',
|
|
64
|
-
options: {
|
|
65
|
-
method: 'POST',
|
|
66
|
-
body: body,
|
|
67
|
-
headers: {
|
|
68
|
-
'Content-Type': 'application/json'
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
exports.fetchEstimate = fetchEstimate;
|
|
74
|
-
/**
|
|
75
|
-
* POST /utils/script/evaluate
|
|
76
|
-
* Evaluates the provided expression, taking into account the deployed dApp contract
|
|
77
|
-
*/
|
|
78
|
-
function fetchEvaluate(base, address, expr) {
|
|
79
|
-
return request_1.default({
|
|
80
|
-
base: base,
|
|
81
|
-
url: "/utils/script/evaluate/" + address,
|
|
82
|
-
options: {
|
|
83
|
-
method: 'POST',
|
|
84
|
-
body: JSON.stringify({ expr: expr }),
|
|
85
|
-
headers: {
|
|
86
|
-
'Content-Type': 'application/json'
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
exports.fetchEvaluate = fetchEvaluate;
|
|
92
|
-
/**
|
|
93
|
-
* POST /utils/transactionSerialize
|
|
94
|
-
* Serialize transaction
|
|
95
|
-
*/
|
|
96
|
-
function fetchTransactionSerialize(base, body) {
|
|
97
|
-
return request_1.default({
|
|
98
|
-
base: base,
|
|
99
|
-
url: '/utils/transactionSerialize',
|
|
100
|
-
options: {
|
|
101
|
-
method: 'POST',
|
|
102
|
-
body: stringify_1.default(body),
|
|
103
|
-
headers: {
|
|
104
|
-
'Content-Type': 'application/json'
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
exports.fetchTransactionSerialize = fetchTransactionSerialize;
|
|
110
|
-
/**
|
|
111
|
-
* POST /utils/hash/secure
|
|
112
|
-
* Return SecureCryptographicHash of specified message
|
|
113
|
-
*/
|
|
114
|
-
function fetchHashSecure(base, body) {
|
|
115
|
-
return request_1.default({
|
|
116
|
-
base: base,
|
|
117
|
-
url: '/utils/hash/secure',
|
|
118
|
-
options: {
|
|
119
|
-
method: 'POST',
|
|
120
|
-
body: body,
|
|
121
|
-
headers: {
|
|
122
|
-
'Content-Type': 'application/json'
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
exports.fetchHashSecure = fetchHashSecure;
|
|
128
|
-
/**
|
|
129
|
-
* POST /utils/hash/fast
|
|
130
|
-
* Return FastCryptographicHash of specified message
|
|
131
|
-
*/
|
|
132
|
-
function fetchHashFast(base, body) {
|
|
133
|
-
return request_1.default({
|
|
134
|
-
base: base,
|
|
135
|
-
url: '/utils/hash/fast',
|
|
136
|
-
options: {
|
|
137
|
-
method: 'POST',
|
|
138
|
-
body: body,
|
|
139
|
-
headers: {
|
|
140
|
-
'Content-Type': 'application/json'
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
exports.fetchHashFast = fetchHashFast;
|
|
146
|
-
/**
|
|
147
|
-
* POST /utils/script/meta
|
|
148
|
-
* Account's script meta
|
|
149
|
-
*/
|
|
150
|
-
function fetchScriptMeta(base, body) {
|
|
151
|
-
return request_1.default({
|
|
152
|
-
base: base,
|
|
153
|
-
url: '/utils/script/meta',
|
|
154
|
-
options: {
|
|
155
|
-
method: 'POST',
|
|
156
|
-
body: body,
|
|
157
|
-
headers: {
|
|
158
|
-
'Content-Type': 'application/json'
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
exports.fetchScriptMeta = fetchScriptMeta;
|
|
164
|
-
/**
|
|
165
|
-
* POST /utils/script/decompile
|
|
166
|
-
* Decompiles base64 script representation to string code
|
|
167
|
-
*/
|
|
168
|
-
function fetchScriptDecompile(base, body) {
|
|
169
|
-
return request_1.default({
|
|
170
|
-
base: base,
|
|
171
|
-
url: '/utils/script/decompile',
|
|
172
|
-
options: {
|
|
173
|
-
method: 'POST',
|
|
174
|
-
body: body,
|
|
175
|
-
headers: {
|
|
176
|
-
'Content-Type': 'application/json'
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
exports.fetchScriptDecompile = fetchScriptDecompile;
|
|
182
|
-
/**
|
|
183
|
-
* POST /utils/sign/{privateKey}
|
|
184
|
-
* Return FastCryptographicHash of specified message
|
|
185
|
-
*/
|
|
186
|
-
function fetchSignPrivateKey(base, privateKey, body) {
|
|
187
|
-
return request_1.default({
|
|
188
|
-
base: base,
|
|
189
|
-
url: "/utils/sign/" + privateKey,
|
|
190
|
-
options: {
|
|
191
|
-
method: 'POST',
|
|
192
|
-
body: body,
|
|
193
|
-
headers: {
|
|
194
|
-
'Content-Type': 'application/json'
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
exports.fetchSignPrivateKey = fetchSignPrivateKey;
|
|
200
|
-
/**
|
|
201
|
-
* GET /utils/time
|
|
202
|
-
* Current Node time (UTC)
|
|
203
|
-
*/
|
|
204
|
-
function fetchNodeTime(base) {
|
|
205
|
-
return request_1.default({
|
|
206
|
-
base: base,
|
|
207
|
-
url: '/utils/time'
|
|
208
|
-
});
|
|
209
|
-
}
|
|
210
|
-
exports.fetchNodeTime = fetchNodeTime;
|
|
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.fetchNodeTime = exports.fetchSignPrivateKey = exports.fetchScriptDecompile = exports.fetchScriptMeta = exports.fetchHashFast = exports.fetchHashSecure = exports.fetchTransactionSerialize = exports.fetchEvaluate = exports.fetchEstimate = exports.fetchCompileWithImports = exports.fetchCompileCode = exports.fetchSeed = void 0;
|
|
7
|
+
var request_1 = __importDefault(require("../../tools/request"));
|
|
8
|
+
var stringify_1 = __importDefault(require("../../tools/stringify"));
|
|
9
|
+
/**
|
|
10
|
+
* GET /utils/seed
|
|
11
|
+
* Generate random seed
|
|
12
|
+
*/
|
|
13
|
+
function fetchSeed(base, length) {
|
|
14
|
+
return request_1.default({
|
|
15
|
+
base: base,
|
|
16
|
+
url: "/utils/seed" + (length ? "/" + length : '')
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
exports.fetchSeed = fetchSeed;
|
|
20
|
+
/**
|
|
21
|
+
* POST /utils/script/compileCode
|
|
22
|
+
* Compiles string code to base64 script representation
|
|
23
|
+
*/
|
|
24
|
+
function fetchCompileCode(base, body) {
|
|
25
|
+
return request_1.default({
|
|
26
|
+
base: base,
|
|
27
|
+
url: '/utils/script/compileCode',
|
|
28
|
+
options: {
|
|
29
|
+
method: 'POST',
|
|
30
|
+
body: body,
|
|
31
|
+
headers: {
|
|
32
|
+
'Content-Type': 'application/json'
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
exports.fetchCompileCode = fetchCompileCode;
|
|
38
|
+
/**
|
|
39
|
+
* POST /utils/script/compileWithImports
|
|
40
|
+
* Compiles string code with imports to base64 script representation
|
|
41
|
+
*/
|
|
42
|
+
function fetchCompileWithImports(base, body) {
|
|
43
|
+
return request_1.default({
|
|
44
|
+
base: base,
|
|
45
|
+
url: '/utils/script/compileWithImports',
|
|
46
|
+
options: {
|
|
47
|
+
method: 'POST',
|
|
48
|
+
body: stringify_1.default(body),
|
|
49
|
+
headers: {
|
|
50
|
+
'Content-Type': 'application/json'
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
exports.fetchCompileWithImports = fetchCompileWithImports;
|
|
56
|
+
/**
|
|
57
|
+
* POST /utils/script/estimate
|
|
58
|
+
* Estimates compiled code in Base64 representation
|
|
59
|
+
*/
|
|
60
|
+
function fetchEstimate(base, body) {
|
|
61
|
+
return request_1.default({
|
|
62
|
+
base: base,
|
|
63
|
+
url: '/utils/script/estimate',
|
|
64
|
+
options: {
|
|
65
|
+
method: 'POST',
|
|
66
|
+
body: body,
|
|
67
|
+
headers: {
|
|
68
|
+
'Content-Type': 'application/json'
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
exports.fetchEstimate = fetchEstimate;
|
|
74
|
+
/**
|
|
75
|
+
* POST /utils/script/evaluate
|
|
76
|
+
* Evaluates the provided expression, taking into account the deployed dApp contract
|
|
77
|
+
*/
|
|
78
|
+
function fetchEvaluate(base, address, expr) {
|
|
79
|
+
return request_1.default({
|
|
80
|
+
base: base,
|
|
81
|
+
url: "/utils/script/evaluate/" + address,
|
|
82
|
+
options: {
|
|
83
|
+
method: 'POST',
|
|
84
|
+
body: JSON.stringify({ expr: expr }),
|
|
85
|
+
headers: {
|
|
86
|
+
'Content-Type': 'application/json'
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
exports.fetchEvaluate = fetchEvaluate;
|
|
92
|
+
/**
|
|
93
|
+
* POST /utils/transactionSerialize
|
|
94
|
+
* Serialize transaction
|
|
95
|
+
*/
|
|
96
|
+
function fetchTransactionSerialize(base, body) {
|
|
97
|
+
return request_1.default({
|
|
98
|
+
base: base,
|
|
99
|
+
url: '/utils/transactionSerialize',
|
|
100
|
+
options: {
|
|
101
|
+
method: 'POST',
|
|
102
|
+
body: stringify_1.default(body),
|
|
103
|
+
headers: {
|
|
104
|
+
'Content-Type': 'application/json'
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
exports.fetchTransactionSerialize = fetchTransactionSerialize;
|
|
110
|
+
/**
|
|
111
|
+
* POST /utils/hash/secure
|
|
112
|
+
* Return SecureCryptographicHash of specified message
|
|
113
|
+
*/
|
|
114
|
+
function fetchHashSecure(base, body) {
|
|
115
|
+
return request_1.default({
|
|
116
|
+
base: base,
|
|
117
|
+
url: '/utils/hash/secure',
|
|
118
|
+
options: {
|
|
119
|
+
method: 'POST',
|
|
120
|
+
body: body,
|
|
121
|
+
headers: {
|
|
122
|
+
'Content-Type': 'application/json'
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
exports.fetchHashSecure = fetchHashSecure;
|
|
128
|
+
/**
|
|
129
|
+
* POST /utils/hash/fast
|
|
130
|
+
* Return FastCryptographicHash of specified message
|
|
131
|
+
*/
|
|
132
|
+
function fetchHashFast(base, body) {
|
|
133
|
+
return request_1.default({
|
|
134
|
+
base: base,
|
|
135
|
+
url: '/utils/hash/fast',
|
|
136
|
+
options: {
|
|
137
|
+
method: 'POST',
|
|
138
|
+
body: body,
|
|
139
|
+
headers: {
|
|
140
|
+
'Content-Type': 'application/json'
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
exports.fetchHashFast = fetchHashFast;
|
|
146
|
+
/**
|
|
147
|
+
* POST /utils/script/meta
|
|
148
|
+
* Account's script meta
|
|
149
|
+
*/
|
|
150
|
+
function fetchScriptMeta(base, body) {
|
|
151
|
+
return request_1.default({
|
|
152
|
+
base: base,
|
|
153
|
+
url: '/utils/script/meta',
|
|
154
|
+
options: {
|
|
155
|
+
method: 'POST',
|
|
156
|
+
body: body,
|
|
157
|
+
headers: {
|
|
158
|
+
'Content-Type': 'application/json'
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
exports.fetchScriptMeta = fetchScriptMeta;
|
|
164
|
+
/**
|
|
165
|
+
* POST /utils/script/decompile
|
|
166
|
+
* Decompiles base64 script representation to string code
|
|
167
|
+
*/
|
|
168
|
+
function fetchScriptDecompile(base, body) {
|
|
169
|
+
return request_1.default({
|
|
170
|
+
base: base,
|
|
171
|
+
url: '/utils/script/decompile',
|
|
172
|
+
options: {
|
|
173
|
+
method: 'POST',
|
|
174
|
+
body: body,
|
|
175
|
+
headers: {
|
|
176
|
+
'Content-Type': 'application/json'
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
exports.fetchScriptDecompile = fetchScriptDecompile;
|
|
182
|
+
/**
|
|
183
|
+
* POST /utils/sign/{privateKey}
|
|
184
|
+
* Return FastCryptographicHash of specified message
|
|
185
|
+
*/
|
|
186
|
+
function fetchSignPrivateKey(base, privateKey, body) {
|
|
187
|
+
return request_1.default({
|
|
188
|
+
base: base,
|
|
189
|
+
url: "/utils/sign/" + privateKey,
|
|
190
|
+
options: {
|
|
191
|
+
method: 'POST',
|
|
192
|
+
body: body,
|
|
193
|
+
headers: {
|
|
194
|
+
'Content-Type': 'application/json'
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
exports.fetchSignPrivateKey = fetchSignPrivateKey;
|
|
200
|
+
/**
|
|
201
|
+
* GET /utils/time
|
|
202
|
+
* Current Node time (UTC)
|
|
203
|
+
*/
|
|
204
|
+
function fetchNodeTime(base) {
|
|
205
|
+
return request_1.default({
|
|
206
|
+
base: base,
|
|
207
|
+
url: '/utils/time'
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
exports.fetchNodeTime = fetchNodeTime;
|
|
211
211
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TODO
|
|
3
|
-
* GET /wallet/seed
|
|
4
|
-
* Seed
|
|
5
|
-
*/
|
|
1
|
+
/**
|
|
2
|
+
* TODO
|
|
3
|
+
* GET /wallet/seed
|
|
4
|
+
* Seed
|
|
5
|
+
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* TODO
|
|
4
|
-
* GET /wallet/seed
|
|
5
|
-
* Seed
|
|
6
|
-
*/
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* TODO
|
|
4
|
+
* GET /wallet/seed
|
|
5
|
+
* Seed
|
|
6
|
+
*/
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
package/cjs/constants.d.ts
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
export declare const TYPE_MAP: {
|
|
2
|
-
3: "issue";
|
|
3
|
-
4: "transfer";
|
|
4
|
-
5: "reissue";
|
|
5
|
-
6: "burn";
|
|
6
|
-
7: "exchange";
|
|
7
|
-
8: "lease";
|
|
8
|
-
9: "cancelLease";
|
|
9
|
-
10: "alias";
|
|
10
|
-
11: "massTransfer";
|
|
11
|
-
12: "data";
|
|
12
|
-
13: "setScript";
|
|
13
|
-
14: "sponsorship";
|
|
14
|
-
15: "setAssetScript";
|
|
15
|
-
16: "invoke";
|
|
16
|
-
17: "updateAsset";
|
|
17
|
-
};
|
|
18
|
-
export declare const NAME_MAP: {
|
|
19
|
-
issue: 3;
|
|
20
|
-
transfer: 4;
|
|
21
|
-
reissue: 5;
|
|
22
|
-
burn: 6;
|
|
23
|
-
exchange: 7;
|
|
24
|
-
lease: 8;
|
|
25
|
-
cancelLease: 9;
|
|
26
|
-
alias: 10;
|
|
27
|
-
massTransfer: 11;
|
|
28
|
-
data: 12;
|
|
29
|
-
setScript: 13;
|
|
30
|
-
sponsorship: 14;
|
|
31
|
-
setAssetScript: 15;
|
|
32
|
-
invoke: 16;
|
|
33
|
-
updateAsset: 17;
|
|
34
|
-
};
|
|
35
|
-
export declare const TRANSACTION_STATUSES: {
|
|
36
|
-
IN_BLOCKCHAIN: "in_blockchain";
|
|
37
|
-
UNCONFIRMED: "unconfirmed";
|
|
38
|
-
NOT_FOUND: "not_found";
|
|
39
|
-
};
|
|
40
|
-
export declare type TTransactionStatuses = typeof TRANSACTION_STATUSES[keyof typeof TRANSACTION_STATUSES];
|
|
1
|
+
export declare const TYPE_MAP: {
|
|
2
|
+
3: "issue";
|
|
3
|
+
4: "transfer";
|
|
4
|
+
5: "reissue";
|
|
5
|
+
6: "burn";
|
|
6
|
+
7: "exchange";
|
|
7
|
+
8: "lease";
|
|
8
|
+
9: "cancelLease";
|
|
9
|
+
10: "alias";
|
|
10
|
+
11: "massTransfer";
|
|
11
|
+
12: "data";
|
|
12
|
+
13: "setScript";
|
|
13
|
+
14: "sponsorship";
|
|
14
|
+
15: "setAssetScript";
|
|
15
|
+
16: "invoke";
|
|
16
|
+
17: "updateAsset";
|
|
17
|
+
};
|
|
18
|
+
export declare const NAME_MAP: {
|
|
19
|
+
issue: 3;
|
|
20
|
+
transfer: 4;
|
|
21
|
+
reissue: 5;
|
|
22
|
+
burn: 6;
|
|
23
|
+
exchange: 7;
|
|
24
|
+
lease: 8;
|
|
25
|
+
cancelLease: 9;
|
|
26
|
+
alias: 10;
|
|
27
|
+
massTransfer: 11;
|
|
28
|
+
data: 12;
|
|
29
|
+
setScript: 13;
|
|
30
|
+
sponsorship: 14;
|
|
31
|
+
setAssetScript: 15;
|
|
32
|
+
invoke: 16;
|
|
33
|
+
updateAsset: 17;
|
|
34
|
+
};
|
|
35
|
+
export declare const TRANSACTION_STATUSES: {
|
|
36
|
+
IN_BLOCKCHAIN: "in_blockchain";
|
|
37
|
+
UNCONFIRMED: "unconfirmed";
|
|
38
|
+
NOT_FOUND: "not_found";
|
|
39
|
+
};
|
|
40
|
+
export declare type TTransactionStatuses = typeof TRANSACTION_STATUSES[keyof typeof TRANSACTION_STATUSES];
|
package/cjs/constants.js
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TRANSACTION_STATUSES = exports.NAME_MAP = exports.TYPE_MAP = void 0;
|
|
4
|
-
exports.TYPE_MAP = {
|
|
5
|
-
3: 'issue',
|
|
6
|
-
4: 'transfer',
|
|
7
|
-
5: 'reissue',
|
|
8
|
-
6: 'burn',
|
|
9
|
-
7: 'exchange',
|
|
10
|
-
8: 'lease',
|
|
11
|
-
9: 'cancelLease',
|
|
12
|
-
10: 'alias',
|
|
13
|
-
11: 'massTransfer',
|
|
14
|
-
12: 'data',
|
|
15
|
-
13: 'setScript',
|
|
16
|
-
14: 'sponsorship',
|
|
17
|
-
15: 'setAssetScript',
|
|
18
|
-
16: 'invoke',
|
|
19
|
-
17: 'updateAsset'
|
|
20
|
-
};
|
|
21
|
-
exports.NAME_MAP = {
|
|
22
|
-
'issue': 3,
|
|
23
|
-
'transfer': 4,
|
|
24
|
-
'reissue': 5,
|
|
25
|
-
'burn': 6,
|
|
26
|
-
'exchange': 7,
|
|
27
|
-
'lease': 8,
|
|
28
|
-
'cancelLease': 9,
|
|
29
|
-
'alias': 10,
|
|
30
|
-
'massTransfer': 11,
|
|
31
|
-
'data': 12,
|
|
32
|
-
'setScript': 13,
|
|
33
|
-
'sponsorship': 14,
|
|
34
|
-
'setAssetScript': 15,
|
|
35
|
-
'invoke': 16,
|
|
36
|
-
'updateAsset': 17
|
|
37
|
-
};
|
|
38
|
-
exports.TRANSACTION_STATUSES = {
|
|
39
|
-
IN_BLOCKCHAIN: 'in_blockchain',
|
|
40
|
-
UNCONFIRMED: 'unconfirmed',
|
|
41
|
-
NOT_FOUND: 'not_found'
|
|
42
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TRANSACTION_STATUSES = exports.NAME_MAP = exports.TYPE_MAP = void 0;
|
|
4
|
+
exports.TYPE_MAP = {
|
|
5
|
+
3: 'issue',
|
|
6
|
+
4: 'transfer',
|
|
7
|
+
5: 'reissue',
|
|
8
|
+
6: 'burn',
|
|
9
|
+
7: 'exchange',
|
|
10
|
+
8: 'lease',
|
|
11
|
+
9: 'cancelLease',
|
|
12
|
+
10: 'alias',
|
|
13
|
+
11: 'massTransfer',
|
|
14
|
+
12: 'data',
|
|
15
|
+
13: 'setScript',
|
|
16
|
+
14: 'sponsorship',
|
|
17
|
+
15: 'setAssetScript',
|
|
18
|
+
16: 'invoke',
|
|
19
|
+
17: 'updateAsset'
|
|
20
|
+
};
|
|
21
|
+
exports.NAME_MAP = {
|
|
22
|
+
'issue': 3,
|
|
23
|
+
'transfer': 4,
|
|
24
|
+
'reissue': 5,
|
|
25
|
+
'burn': 6,
|
|
26
|
+
'exchange': 7,
|
|
27
|
+
'lease': 8,
|
|
28
|
+
'cancelLease': 9,
|
|
29
|
+
'alias': 10,
|
|
30
|
+
'massTransfer': 11,
|
|
31
|
+
'data': 12,
|
|
32
|
+
'setScript': 13,
|
|
33
|
+
'sponsorship': 14,
|
|
34
|
+
'setAssetScript': 15,
|
|
35
|
+
'invoke': 16,
|
|
36
|
+
'updateAsset': 17
|
|
37
|
+
};
|
|
38
|
+
exports.TRANSACTION_STATUSES = {
|
|
39
|
+
IN_BLOCKCHAIN: 'in_blockchain',
|
|
40
|
+
UNCONFIRMED: 'unconfirmed',
|
|
41
|
+
NOT_FOUND: 'not_found'
|
|
42
|
+
};
|
|
43
43
|
//# sourceMappingURL=constants.js.map
|