@waves/node-api-js 1.3.10-beta.2 → 1.3.10
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 +2371 -2371
- 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
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export declare function fetchNodeStatus(base: string, options?: RequestInit): Promise<INodeStatus>;
|
|
2
|
-
export declare function fetchNodeVersion(base: string, options?: RequestInit): Promise<INodeVersion>;
|
|
3
|
-
export interface INodeStatus {
|
|
4
|
-
blockchainHeight: number;
|
|
5
|
-
stateHeight: number;
|
|
6
|
-
updatedTimestamp: number;
|
|
7
|
-
updatedDate: string;
|
|
8
|
-
}
|
|
9
|
-
export interface INodeVersion {
|
|
10
|
-
version: string;
|
|
11
|
-
}
|
|
1
|
+
export declare function fetchNodeStatus(base: string, options?: RequestInit): Promise<INodeStatus>;
|
|
2
|
+
export declare function fetchNodeVersion(base: string, options?: RequestInit): Promise<INodeVersion>;
|
|
3
|
+
export interface INodeStatus {
|
|
4
|
+
blockchainHeight: number;
|
|
5
|
+
stateHeight: number;
|
|
6
|
+
updatedTimestamp: number;
|
|
7
|
+
updatedDate: string;
|
|
8
|
+
}
|
|
9
|
+
export interface INodeVersion {
|
|
10
|
+
version: string;
|
|
11
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
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.fetchNodeVersion = exports.fetchNodeStatus = void 0;
|
|
7
|
-
var request_1 = __importDefault(require("../../tools/request"));
|
|
8
|
-
// @TODO: When correct API key
|
|
9
|
-
// POST /node/stop
|
|
10
|
-
function fetchNodeStatus(base, options) {
|
|
11
|
-
if (options === void 0) { options = Object.create(null); }
|
|
12
|
-
return request_1.default({ base: base, url: '/node/status', options: options });
|
|
13
|
-
}
|
|
14
|
-
exports.fetchNodeStatus = fetchNodeStatus;
|
|
15
|
-
function fetchNodeVersion(base, options) {
|
|
16
|
-
if (options === void 0) { options = Object.create(null); }
|
|
17
|
-
return request_1.default({ base: base, url: '/node/version', options: options });
|
|
18
|
-
}
|
|
19
|
-
exports.fetchNodeVersion = fetchNodeVersion;
|
|
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.fetchNodeVersion = exports.fetchNodeStatus = void 0;
|
|
7
|
+
var request_1 = __importDefault(require("../../tools/request"));
|
|
8
|
+
// @TODO: When correct API key
|
|
9
|
+
// POST /node/stop
|
|
10
|
+
function fetchNodeStatus(base, options) {
|
|
11
|
+
if (options === void 0) { options = Object.create(null); }
|
|
12
|
+
return request_1.default({ base: base, url: '/node/status', options: options });
|
|
13
|
+
}
|
|
14
|
+
exports.fetchNodeStatus = fetchNodeStatus;
|
|
15
|
+
function fetchNodeVersion(base, options) {
|
|
16
|
+
if (options === void 0) { options = Object.create(null); }
|
|
17
|
+
return request_1.default({ base: base, url: '/node/version', options: options });
|
|
18
|
+
}
|
|
19
|
+
exports.fetchNodeVersion = fetchNodeVersion;
|
|
20
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { TLong } from "../../interface";
|
|
2
|
-
/**
|
|
3
|
-
* GET /peers/all
|
|
4
|
-
* Peer list
|
|
5
|
-
*/
|
|
6
|
-
export declare function fetchAll(base: string, options?: RequestInit): Promise<IAllResponse>;
|
|
7
|
-
/**
|
|
8
|
-
* GET /peers/connected
|
|
9
|
-
* Connected peers list
|
|
10
|
-
*/
|
|
11
|
-
export declare function fetchConnected(base: string, options?: RequestInit): Promise<IAllConnectedResponse>;
|
|
12
|
-
/**
|
|
13
|
-
* GET /peers/blacklisted
|
|
14
|
-
* Blacklisted peers list
|
|
15
|
-
*/
|
|
16
|
-
export declare function fetchBlackListed(base: string, options?: RequestInit): Promise<Array<IBlackPeer>>;
|
|
17
|
-
/**
|
|
18
|
-
* GET /peers/suspended
|
|
19
|
-
* Suspended peers list
|
|
20
|
-
*/
|
|
21
|
-
export declare function fetchSuspended(base: string, options?: RequestInit): Promise<Array<ISuspendedPeer>>;
|
|
22
|
-
export interface IAllResponse {
|
|
23
|
-
peers: Array<IPeerAllResponse>;
|
|
24
|
-
}
|
|
25
|
-
export interface IAllConnectedResponse {
|
|
26
|
-
peers: Array<IPeerConnectedResponse>;
|
|
27
|
-
}
|
|
28
|
-
export interface IPeerAllResponse {
|
|
29
|
-
address: string;
|
|
30
|
-
lastSeen: TLong;
|
|
31
|
-
}
|
|
32
|
-
export interface IPeerConnectedResponse {
|
|
33
|
-
address: string;
|
|
34
|
-
declaredAddress: string;
|
|
35
|
-
peerName: string;
|
|
36
|
-
peerNonce: TLong;
|
|
37
|
-
applicationName: string;
|
|
38
|
-
applicationVersion: string;
|
|
39
|
-
}
|
|
40
|
-
export interface IBlackPeer extends ISuspendedPeer {
|
|
41
|
-
reason: string;
|
|
42
|
-
}
|
|
43
|
-
export interface ISuspendedPeer {
|
|
44
|
-
hostname: string;
|
|
45
|
-
timestamp: number;
|
|
46
|
-
}
|
|
1
|
+
import { TLong } from "../../interface";
|
|
2
|
+
/**
|
|
3
|
+
* GET /peers/all
|
|
4
|
+
* Peer list
|
|
5
|
+
*/
|
|
6
|
+
export declare function fetchAll(base: string, options?: RequestInit): Promise<IAllResponse>;
|
|
7
|
+
/**
|
|
8
|
+
* GET /peers/connected
|
|
9
|
+
* Connected peers list
|
|
10
|
+
*/
|
|
11
|
+
export declare function fetchConnected(base: string, options?: RequestInit): Promise<IAllConnectedResponse>;
|
|
12
|
+
/**
|
|
13
|
+
* GET /peers/blacklisted
|
|
14
|
+
* Blacklisted peers list
|
|
15
|
+
*/
|
|
16
|
+
export declare function fetchBlackListed(base: string, options?: RequestInit): Promise<Array<IBlackPeer>>;
|
|
17
|
+
/**
|
|
18
|
+
* GET /peers/suspended
|
|
19
|
+
* Suspended peers list
|
|
20
|
+
*/
|
|
21
|
+
export declare function fetchSuspended(base: string, options?: RequestInit): Promise<Array<ISuspendedPeer>>;
|
|
22
|
+
export interface IAllResponse {
|
|
23
|
+
peers: Array<IPeerAllResponse>;
|
|
24
|
+
}
|
|
25
|
+
export interface IAllConnectedResponse {
|
|
26
|
+
peers: Array<IPeerConnectedResponse>;
|
|
27
|
+
}
|
|
28
|
+
export interface IPeerAllResponse {
|
|
29
|
+
address: string;
|
|
30
|
+
lastSeen: TLong;
|
|
31
|
+
}
|
|
32
|
+
export interface IPeerConnectedResponse {
|
|
33
|
+
address: string;
|
|
34
|
+
declaredAddress: string;
|
|
35
|
+
peerName: string;
|
|
36
|
+
peerNonce: TLong;
|
|
37
|
+
applicationName: string;
|
|
38
|
+
applicationVersion: string;
|
|
39
|
+
}
|
|
40
|
+
export interface IBlackPeer extends ISuspendedPeer {
|
|
41
|
+
reason: string;
|
|
42
|
+
}
|
|
43
|
+
export interface ISuspendedPeer {
|
|
44
|
+
hostname: string;
|
|
45
|
+
timestamp: number;
|
|
46
|
+
}
|
|
@@ -1,60 +1,60 @@
|
|
|
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.fetchSuspended = exports.fetchBlackListed = exports.fetchConnected = exports.fetchAll = void 0;
|
|
7
|
-
var request_1 = __importDefault(require("../../tools/request"));
|
|
8
|
-
/**
|
|
9
|
-
* GET /peers/all
|
|
10
|
-
* Peer list
|
|
11
|
-
*/
|
|
12
|
-
function fetchAll(base, options) {
|
|
13
|
-
if (options === void 0) { options = Object.create(null); }
|
|
14
|
-
return request_1.default({
|
|
15
|
-
base: base,
|
|
16
|
-
url: '/peers/all',
|
|
17
|
-
options: options
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
exports.fetchAll = fetchAll;
|
|
21
|
-
/**
|
|
22
|
-
* GET /peers/connected
|
|
23
|
-
* Connected peers list
|
|
24
|
-
*/
|
|
25
|
-
function fetchConnected(base, options) {
|
|
26
|
-
if (options === void 0) { options = Object.create(null); }
|
|
27
|
-
return request_1.default({
|
|
28
|
-
base: base,
|
|
29
|
-
url: '/peers/connected',
|
|
30
|
-
options: options
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
exports.fetchConnected = fetchConnected;
|
|
34
|
-
/**
|
|
35
|
-
* GET /peers/blacklisted
|
|
36
|
-
* Blacklisted peers list
|
|
37
|
-
*/
|
|
38
|
-
function fetchBlackListed(base, options) {
|
|
39
|
-
if (options === void 0) { options = Object.create(null); }
|
|
40
|
-
return request_1.default({
|
|
41
|
-
base: base,
|
|
42
|
-
url: '/peers/blacklisted',
|
|
43
|
-
options: options
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
exports.fetchBlackListed = fetchBlackListed;
|
|
47
|
-
/**
|
|
48
|
-
* GET /peers/suspended
|
|
49
|
-
* Suspended peers list
|
|
50
|
-
*/
|
|
51
|
-
function fetchSuspended(base, options) {
|
|
52
|
-
if (options === void 0) { options = Object.create(null); }
|
|
53
|
-
return request_1.default({
|
|
54
|
-
base: base,
|
|
55
|
-
url: '/peers/suspended',
|
|
56
|
-
options: options
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
exports.fetchSuspended = fetchSuspended;
|
|
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.fetchSuspended = exports.fetchBlackListed = exports.fetchConnected = exports.fetchAll = void 0;
|
|
7
|
+
var request_1 = __importDefault(require("../../tools/request"));
|
|
8
|
+
/**
|
|
9
|
+
* GET /peers/all
|
|
10
|
+
* Peer list
|
|
11
|
+
*/
|
|
12
|
+
function fetchAll(base, options) {
|
|
13
|
+
if (options === void 0) { options = Object.create(null); }
|
|
14
|
+
return request_1.default({
|
|
15
|
+
base: base,
|
|
16
|
+
url: '/peers/all',
|
|
17
|
+
options: options
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
exports.fetchAll = fetchAll;
|
|
21
|
+
/**
|
|
22
|
+
* GET /peers/connected
|
|
23
|
+
* Connected peers list
|
|
24
|
+
*/
|
|
25
|
+
function fetchConnected(base, options) {
|
|
26
|
+
if (options === void 0) { options = Object.create(null); }
|
|
27
|
+
return request_1.default({
|
|
28
|
+
base: base,
|
|
29
|
+
url: '/peers/connected',
|
|
30
|
+
options: options
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
exports.fetchConnected = fetchConnected;
|
|
34
|
+
/**
|
|
35
|
+
* GET /peers/blacklisted
|
|
36
|
+
* Blacklisted peers list
|
|
37
|
+
*/
|
|
38
|
+
function fetchBlackListed(base, options) {
|
|
39
|
+
if (options === void 0) { options = Object.create(null); }
|
|
40
|
+
return request_1.default({
|
|
41
|
+
base: base,
|
|
42
|
+
url: '/peers/blacklisted',
|
|
43
|
+
options: options
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
exports.fetchBlackListed = fetchBlackListed;
|
|
47
|
+
/**
|
|
48
|
+
* GET /peers/suspended
|
|
49
|
+
* Suspended peers list
|
|
50
|
+
*/
|
|
51
|
+
function fetchSuspended(base, options) {
|
|
52
|
+
if (options === void 0) { options = Object.create(null); }
|
|
53
|
+
return request_1.default({
|
|
54
|
+
base: base,
|
|
55
|
+
url: '/peers/suspended',
|
|
56
|
+
options: options
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
exports.fetchSuspended = fetchSuspended;
|
|
60
60
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { TLong } from '../../interface';
|
|
2
|
-
/**
|
|
3
|
-
* GET /blockchain/rewards
|
|
4
|
-
* Current reward status
|
|
5
|
-
*/
|
|
6
|
-
export declare function fetchRewards(base: string, height?: number, options?: RequestInit): Promise<TRewards<TLong>>;
|
|
7
|
-
export declare type TRewards<LONG> = {
|
|
8
|
-
height: number;
|
|
9
|
-
totalWavesAmount: LONG;
|
|
10
|
-
currentReward: LONG;
|
|
11
|
-
minIncrement: LONG;
|
|
12
|
-
term: number;
|
|
13
|
-
nextCheck: number;
|
|
14
|
-
votingIntervalStart: number;
|
|
15
|
-
votingInterval: number;
|
|
16
|
-
votingThreshold: number;
|
|
17
|
-
votes: {
|
|
18
|
-
increase: number;
|
|
19
|
-
decrease: number;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
1
|
+
import { TLong } from '../../interface';
|
|
2
|
+
/**
|
|
3
|
+
* GET /blockchain/rewards
|
|
4
|
+
* Current reward status
|
|
5
|
+
*/
|
|
6
|
+
export declare function fetchRewards(base: string, height?: number, options?: RequestInit): Promise<TRewards<TLong>>;
|
|
7
|
+
export declare type TRewards<LONG> = {
|
|
8
|
+
height: number;
|
|
9
|
+
totalWavesAmount: LONG;
|
|
10
|
+
currentReward: LONG;
|
|
11
|
+
minIncrement: LONG;
|
|
12
|
+
term: number;
|
|
13
|
+
nextCheck: number;
|
|
14
|
+
votingIntervalStart: number;
|
|
15
|
+
votingInterval: number;
|
|
16
|
+
votingThreshold: number;
|
|
17
|
+
votes: {
|
|
18
|
+
increase: number;
|
|
19
|
+
decrease: number;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -1,21 +1,21 @@
|
|
|
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.fetchRewards = void 0;
|
|
7
|
-
var request_1 = __importDefault(require("../../tools/request"));
|
|
8
|
-
/**
|
|
9
|
-
* GET /blockchain/rewards
|
|
10
|
-
* Current reward status
|
|
11
|
-
*/
|
|
12
|
-
function fetchRewards(base, height, options) {
|
|
13
|
-
if (options === void 0) { options = Object.create(null); }
|
|
14
|
-
return request_1.default({
|
|
15
|
-
base: base,
|
|
16
|
-
url: height ? "/blockchain/rewards/" + height : '/blockchain/rewards',
|
|
17
|
-
options: options
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
exports.fetchRewards = fetchRewards;
|
|
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.fetchRewards = void 0;
|
|
7
|
+
var request_1 = __importDefault(require("../../tools/request"));
|
|
8
|
+
/**
|
|
9
|
+
* GET /blockchain/rewards
|
|
10
|
+
* Current reward status
|
|
11
|
+
*/
|
|
12
|
+
function fetchRewards(base, height, options) {
|
|
13
|
+
if (options === void 0) { options = Object.create(null); }
|
|
14
|
+
return request_1.default({
|
|
15
|
+
base: base,
|
|
16
|
+
url: height ? "/blockchain/rewards/" + height : '/blockchain/rewards',
|
|
17
|
+
options: options
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
exports.fetchRewards = fetchRewards;
|
|
21
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
import { TTransactionStatuses } from '../../constants';
|
|
2
|
-
import { TLong } from '../../interface';
|
|
3
|
-
import { RequestInit } from '../../tools/request';
|
|
4
|
-
import { SignedTransaction, Transaction, TransactionFromNode, TransactionMap, WithApiMixin } from '@waves/ts-types';
|
|
5
|
-
/**
|
|
6
|
-
* GET /transactions/unconfirmed/size
|
|
7
|
-
* Number of unconfirmed transactions
|
|
8
|
-
*/
|
|
9
|
-
export declare function fetchUnconfirmedSize(base: string): Promise<IUnconfirmedSize>;
|
|
10
|
-
interface IUnconfirmedSize {
|
|
11
|
-
size: number;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* POST /transactions/sign/{signerAddress}
|
|
15
|
-
* Sign a transaction with a non-default private key
|
|
16
|
-
*/
|
|
17
|
-
/**
|
|
18
|
-
* POST /transactions/calculateFee
|
|
19
|
-
* Calculate transaction fee
|
|
20
|
-
*/
|
|
21
|
-
export declare function fetchCalculateFee<T extends keyof TransactionMap<TLong>>(base: string, tx: Partial<TransactionMap<TLong>[T]> & {
|
|
22
|
-
type: T;
|
|
23
|
-
}, options?: RequestInit): Promise<TFeeInfo>;
|
|
24
|
-
export declare type TFeeInfo<LONG = TLong> = {
|
|
25
|
-
feeAssetId: string | null;
|
|
26
|
-
feeAmount: LONG;
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* GET /transactions/unconfirmed
|
|
30
|
-
* Unconfirmed transactions
|
|
31
|
-
*/
|
|
32
|
-
export declare function fetchUnconfirmed(base: string, options?: RequestInit): Promise<Array<Transaction<TLong> & WithApiMixin>>;
|
|
33
|
-
/**
|
|
34
|
-
* Список транзакций по адресу
|
|
35
|
-
* @param address
|
|
36
|
-
* @param limit максимальное количество транзакций в результате
|
|
37
|
-
* @param after искать транзакции после ID указанного в after
|
|
38
|
-
* @param retry количество попыток на выполнение запроса
|
|
39
|
-
*/
|
|
40
|
-
export declare function fetchTransactions(base: string, address: string, limit: number, after?: string, retry?: number, options?: RequestInit): Promise<Array<TransactionFromNode>>;
|
|
41
|
-
/**
|
|
42
|
-
* GET /transactions/unconfirmed/info/{id}
|
|
43
|
-
* Unconfirmed transaction info
|
|
44
|
-
*/
|
|
45
|
-
export declare function fetchUnconfirmedInfo(base: string, id: string, options?: RequestInit): Promise<Transaction<TLong> & WithApiMixin>;
|
|
46
|
-
/**
|
|
47
|
-
* POST /transactions/sign
|
|
48
|
-
* Sign a transaction
|
|
49
|
-
*/
|
|
50
|
-
/**
|
|
51
|
-
* GET /transactions/info/{id}
|
|
52
|
-
* Transaction info
|
|
53
|
-
*/
|
|
54
|
-
export declare function fetchInfo(base: string, id: string, options?: RequestInit): Promise<TransactionFromNode>;
|
|
55
|
-
/**
|
|
56
|
-
* GET /transactions/info/
|
|
57
|
-
* Get transactions by IDs
|
|
58
|
-
*/
|
|
59
|
-
export declare function fetchMultipleInfo(base: string, ids: string[], options?: RequestInit): Promise<Array<TransactionFromNode>>;
|
|
60
|
-
export declare function fetchStatus(base: string, list: Array<string>): Promise<ITransactionsStatus>;
|
|
61
|
-
export interface ITransactionsStatus {
|
|
62
|
-
height: number;
|
|
63
|
-
statuses: Array<ITransactionStatus>;
|
|
64
|
-
}
|
|
65
|
-
export interface ITransactionStatus {
|
|
66
|
-
id: string;
|
|
67
|
-
status: TTransactionStatuses;
|
|
68
|
-
inUTX: boolean;
|
|
69
|
-
confirmations: number;
|
|
70
|
-
height: number;
|
|
71
|
-
}
|
|
72
|
-
export declare function broadcast<T extends SignedTransaction<Transaction<TLong>>>(base: string, tx: T, options?: RequestInit): Promise<T & WithApiMixin>;
|
|
73
|
-
export {};
|
|
1
|
+
import { TTransactionStatuses } from '../../constants';
|
|
2
|
+
import { TLong } from '../../interface';
|
|
3
|
+
import { RequestInit } from '../../tools/request';
|
|
4
|
+
import { SignedTransaction, Transaction, TransactionFromNode, TransactionMap, WithApiMixin } from '@waves/ts-types';
|
|
5
|
+
/**
|
|
6
|
+
* GET /transactions/unconfirmed/size
|
|
7
|
+
* Number of unconfirmed transactions
|
|
8
|
+
*/
|
|
9
|
+
export declare function fetchUnconfirmedSize(base: string): Promise<IUnconfirmedSize>;
|
|
10
|
+
interface IUnconfirmedSize {
|
|
11
|
+
size: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* POST /transactions/sign/{signerAddress}
|
|
15
|
+
* Sign a transaction with a non-default private key
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* POST /transactions/calculateFee
|
|
19
|
+
* Calculate transaction fee
|
|
20
|
+
*/
|
|
21
|
+
export declare function fetchCalculateFee<T extends keyof TransactionMap<TLong>>(base: string, tx: Partial<TransactionMap<TLong>[T]> & {
|
|
22
|
+
type: T;
|
|
23
|
+
}, options?: RequestInit): Promise<TFeeInfo>;
|
|
24
|
+
export declare type TFeeInfo<LONG = TLong> = {
|
|
25
|
+
feeAssetId: string | null;
|
|
26
|
+
feeAmount: LONG;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* GET /transactions/unconfirmed
|
|
30
|
+
* Unconfirmed transactions
|
|
31
|
+
*/
|
|
32
|
+
export declare function fetchUnconfirmed(base: string, options?: RequestInit): Promise<Array<Transaction<TLong> & WithApiMixin>>;
|
|
33
|
+
/**
|
|
34
|
+
* Список транзакций по адресу
|
|
35
|
+
* @param address
|
|
36
|
+
* @param limit максимальное количество транзакций в результате
|
|
37
|
+
* @param after искать транзакции после ID указанного в after
|
|
38
|
+
* @param retry количество попыток на выполнение запроса
|
|
39
|
+
*/
|
|
40
|
+
export declare function fetchTransactions(base: string, address: string, limit: number, after?: string, retry?: number, options?: RequestInit): Promise<Array<TransactionFromNode>>;
|
|
41
|
+
/**
|
|
42
|
+
* GET /transactions/unconfirmed/info/{id}
|
|
43
|
+
* Unconfirmed transaction info
|
|
44
|
+
*/
|
|
45
|
+
export declare function fetchUnconfirmedInfo(base: string, id: string, options?: RequestInit): Promise<Transaction<TLong> & WithApiMixin>;
|
|
46
|
+
/**
|
|
47
|
+
* POST /transactions/sign
|
|
48
|
+
* Sign a transaction
|
|
49
|
+
*/
|
|
50
|
+
/**
|
|
51
|
+
* GET /transactions/info/{id}
|
|
52
|
+
* Transaction info
|
|
53
|
+
*/
|
|
54
|
+
export declare function fetchInfo(base: string, id: string, options?: RequestInit): Promise<TransactionFromNode>;
|
|
55
|
+
/**
|
|
56
|
+
* GET /transactions/info/
|
|
57
|
+
* Get transactions by IDs
|
|
58
|
+
*/
|
|
59
|
+
export declare function fetchMultipleInfo(base: string, ids: string[], options?: RequestInit): Promise<Array<TransactionFromNode>>;
|
|
60
|
+
export declare function fetchStatus(base: string, list: Array<string>): Promise<ITransactionsStatus>;
|
|
61
|
+
export interface ITransactionsStatus {
|
|
62
|
+
height: number;
|
|
63
|
+
statuses: Array<ITransactionStatus>;
|
|
64
|
+
}
|
|
65
|
+
export interface ITransactionStatus {
|
|
66
|
+
id: string;
|
|
67
|
+
status: TTransactionStatuses;
|
|
68
|
+
inUTX: boolean;
|
|
69
|
+
confirmations: number;
|
|
70
|
+
height: number;
|
|
71
|
+
}
|
|
72
|
+
export declare function broadcast<T extends SignedTransaction<Transaction<TLong>>>(base: string, tx: T, options?: RequestInit): Promise<T & WithApiMixin>;
|
|
73
|
+
export {};
|