@waves/node-api-js 1.3.11-beta.1 → 1.4.0-snapshot.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/api-node/activation/index.d.ts +2 -1
- package/cjs/api-node/activation/index.js +2 -3
- package/cjs/api-node/activation/index.js.map +1 -1
- package/cjs/api-node/addresses/index.d.ts +5 -5
- package/cjs/api-node/addresses/index.js +74 -61
- package/cjs/api-node/addresses/index.js.map +1 -1
- package/cjs/api-node/alias/index.d.ts +1 -1
- package/cjs/api-node/alias/index.js +6 -7
- package/cjs/api-node/alias/index.js.map +1 -1
- package/cjs/api-node/assets/index.d.ts +4 -4
- package/cjs/api-node/assets/index.js +68 -27
- package/cjs/api-node/assets/index.js.map +1 -1
- package/cjs/api-node/blocks/index.d.ts +26 -7
- package/cjs/api-node/blocks/index.js +36 -51
- package/cjs/api-node/blocks/index.js.map +1 -1
- package/cjs/api-node/debug/index.d.ts +3 -3
- package/cjs/api-node/debug/index.js +56 -43
- package/cjs/api-node/debug/index.js.map +1 -1
- package/cjs/api-node/eth/index.js +3 -4
- package/cjs/api-node/eth/index.js.map +1 -1
- package/cjs/api-node/finalization/index.d.ts +54 -0
- package/cjs/api-node/finalization/index.js +126 -0
- package/cjs/api-node/finalization/index.js.map +1 -0
- package/cjs/api-node/leasing/index.js +7 -7
- package/cjs/api-node/leasing/index.js.map +1 -1
- package/cjs/api-node/node/index.js +4 -5
- package/cjs/api-node/node/index.js.map +1 -1
- package/cjs/api-node/peers/index.js +8 -9
- package/cjs/api-node/peers/index.js.map +1 -1
- package/cjs/api-node/rewards/index.d.ts +1 -1
- package/cjs/api-node/rewards/index.js +3 -4
- package/cjs/api-node/rewards/index.js.map +1 -1
- package/cjs/api-node/transactions/index.d.ts +1 -1
- package/cjs/api-node/transactions/index.js +26 -27
- package/cjs/api-node/transactions/index.js.map +1 -1
- package/cjs/api-node/utils/index.js +29 -30
- package/cjs/api-node/utils/index.js.map +1 -1
- package/cjs/constants.d.ts +1 -1
- package/cjs/create.d.ts +17 -1170
- package/cjs/create.js +30 -13
- package/cjs/create.js.map +1 -1
- package/cjs/index.d.ts +2 -1
- package/cjs/index.js +4 -1
- package/cjs/index.js.map +1 -1
- package/cjs/interface.d.ts +6 -6
- package/cjs/interface.js +4 -2
- package/cjs/interface.js.map +1 -1
- package/cjs/nodeInteraction.d.ts +34 -0
- package/cjs/nodeInteraction.js +266 -0
- package/cjs/nodeInteraction.js.map +1 -0
- package/cjs/tools/adresses/availableSponsoredBalances.d.ts +1 -1
- package/cjs/tools/adresses/availableSponsoredBalances.js +2 -2
- package/cjs/tools/adresses/availableSponsoredBalances.js.map +1 -1
- package/cjs/tools/adresses/ethAddress2waves.js +15 -10
- package/cjs/tools/adresses/ethAddress2waves.js.map +1 -1
- package/cjs/tools/adresses/getAssetIdListByTx.js +12 -7
- package/cjs/tools/adresses/getAssetIdListByTx.js.map +1 -1
- package/cjs/tools/adresses/getAssetsByTransaction.js +3 -3
- package/cjs/tools/adresses/getAssetsByTransaction.js.map +1 -1
- package/cjs/tools/adresses/getTransactionsWithAssets.js +3 -3
- package/cjs/tools/adresses/getTransactionsWithAssets.js.map +1 -1
- package/cjs/tools/adresses/watch.d.ts +8 -5
- package/cjs/tools/adresses/watch.js +56 -16
- package/cjs/tools/adresses/watch.js.map +1 -1
- package/cjs/tools/adresses/wavesAddress2eth.js +3 -3
- package/cjs/tools/adresses/wavesAddress2eth.js.map +1 -1
- package/cjs/tools/assets/wavesAsset2eth.js +3 -3
- package/cjs/tools/assets/wavesAsset2eth.js.map +1 -1
- package/cjs/tools/blocks/detectInterval.js +3 -3
- package/cjs/tools/blocks/detectInterval.js.map +1 -1
- package/cjs/tools/blocks/getNetworkByte.js +2 -2
- package/cjs/tools/blocks/getNetworkByte.js.map +1 -1
- package/cjs/tools/blocks/getNetworkCode.js +2 -2
- package/cjs/tools/blocks/getNetworkCode.js.map +1 -1
- package/cjs/tools/blocks/waitHeight.js +5 -5
- package/cjs/tools/blocks/waitHeight.js.map +1 -1
- package/cjs/tools/matcher/order.d.ts +17 -0
- package/cjs/tools/matcher/order.js +27 -0
- package/cjs/tools/matcher/order.js.map +1 -0
- package/cjs/tools/parse.js +1 -1
- package/cjs/tools/parse.js.map +1 -1
- package/cjs/tools/query.d.ts +1 -1
- package/cjs/tools/query.js +3 -3
- package/cjs/tools/query.js.map +1 -1
- package/cjs/tools/request.d.ts +1 -57
- package/cjs/tools/request.js +48 -6
- package/cjs/tools/request.js.map +1 -1
- package/cjs/tools/resolve.js +1 -1
- package/cjs/tools/resolve.js.map +1 -1
- package/cjs/tools/stringify.js +3 -3
- package/cjs/tools/stringify.js.map +1 -1
- package/cjs/tools/transactions/broadcast.d.ts +2 -2
- package/cjs/tools/transactions/broadcast.js +8 -8
- package/cjs/tools/transactions/broadcast.js.map +1 -1
- package/cjs/tools/transactions/ethTxId2waves.js +2 -2
- package/cjs/tools/transactions/ethTxId2waves.js.map +1 -1
- package/cjs/tools/transactions/wait.js +5 -5
- package/cjs/tools/transactions/wait.js.map +1 -1
- package/cjs/tools/utils.d.ts +7 -7
- package/cjs/tools/utils.js +30 -23
- package/cjs/tools/utils.js.map +1 -1
- package/package.json +34 -35
- 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/dist/node-api.js +0 -30395
- package/dist/node-api.min.js +0 -26
- package/es/api-node/activation/index.d.ts +0 -21
- package/es/api-node/activation/index.js +0 -13
- package/es/api-node/activation/index.js.map +0 -1
- package/es/api-node/addresses/index.d.ts +0 -81
- package/es/api-node/addresses/index.js +0 -111
- package/es/api-node/addresses/index.js.map +0 -1
- package/es/api-node/alias/index.d.ts +0 -6
- package/es/api-node/alias/index.js +0 -14
- package/es/api-node/alias/index.js.map +0 -1
- package/es/api-node/assets/index.d.ts +0 -79
- package/es/api-node/assets/index.js +0 -63
- package/es/api-node/assets/index.js.map +0 -1
- package/es/api-node/blocks/index.d.ts +0 -131
- package/es/api-node/blocks/index.js +0 -179
- package/es/api-node/blocks/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/api-node/debug/index.d.ts +0 -189
- package/es/api-node/debug/index.js +0 -201
- package/es/api-node/debug/index.js.map +0 -1
- package/es/api-node/eth/index.d.ts +0 -3
- package/es/api-node/eth/index.js +0 -8
- package/es/api-node/eth/index.js.map +0 -1
- package/es/api-node/leasing/index.d.ts +0 -22
- package/es/api-node/leasing/index.js +0 -22
- package/es/api-node/leasing/index.js.map +0 -1
- package/es/api-node/node/index.d.ts +0 -11
- package/es/api-node/node/index.js +0 -10
- package/es/api-node/node/index.js.map +0 -1
- package/es/api-node/peers/index.d.ts +0 -46
- package/es/api-node/peers/index.js +0 -46
- package/es/api-node/peers/index.js.map +0 -1
- package/es/api-node/rewards/index.d.ts +0 -21
- package/es/api-node/rewards/index.js +0 -13
- package/es/api-node/rewards/index.js.map +0 -1
- package/es/api-node/transactions/index.d.ts +0 -73
- package/es/api-node/transactions/index.js +0 -137
- package/es/api-node/transactions/index.js.map +0 -1
- package/es/api-node/utils/index.d.ts +0 -110
- package/es/api-node/utils/index.js +0 -193
- package/es/api-node/utils/index.js.map +0 -1
- package/es/api-node/wallet/index.d.ts +0 -5
- package/es/api-node/wallet/index.js +0 -7
- package/es/api-node/wallet/index.js.map +0 -1
- package/es/constants.d.ts +0 -40
- package/es/constants.js +0 -40
- package/es/constants.js.map +0 -1
- package/es/create.d.ts +0 -1240
- package/es/create.js +0 -93
- package/es/create.js.map +0 -1
- package/es/index.d.ts +0 -9
- package/es/index.js +0 -9
- package/es/index.js.map +0 -1
- package/es/interface.d.ts +0 -44
- package/es/interface.js +0 -3
- package/es/interface.js.map +0 -1
- package/es/tools/adresses/availableSponsoredBalances.d.ts +0 -7
- package/es/tools/adresses/availableSponsoredBalances.js +0 -27
- package/es/tools/adresses/availableSponsoredBalances.js.map +0 -1
- package/es/tools/adresses/ethAddress2waves.d.ts +0 -1
- package/es/tools/adresses/ethAddress2waves.js +0 -31
- package/es/tools/adresses/ethAddress2waves.js.map +0 -1
- package/es/tools/adresses/getAssetIdListByTx.d.ts +0 -2
- package/es/tools/adresses/getAssetIdListByTx.js +0 -24
- package/es/tools/adresses/getAssetIdListByTx.js.map +0 -1
- package/es/tools/adresses/getAssetsByTransaction.d.ts +0 -3
- package/es/tools/adresses/getAssetsByTransaction.js +0 -8
- package/es/tools/adresses/getAssetsByTransaction.js.map +0 -1
- package/es/tools/adresses/getTransactionsWithAssets.d.ts +0 -6
- package/es/tools/adresses/getTransactionsWithAssets.js +0 -7
- package/es/tools/adresses/getTransactionsWithAssets.js.map +0 -1
- package/es/tools/adresses/watch.d.ts +0 -24
- package/es/tools/adresses/watch.js +0 -134
- package/es/tools/adresses/watch.js.map +0 -1
- package/es/tools/adresses/wavesAddress2eth.d.ts +0 -1
- package/es/tools/adresses/wavesAddress2eth.js +0 -7
- package/es/tools/adresses/wavesAddress2eth.js.map +0 -1
- package/es/tools/assets/wavesAsset2eth.d.ts +0 -1
- package/es/tools/assets/wavesAsset2eth.js +0 -7
- package/es/tools/assets/wavesAsset2eth.js.map +0 -1
- package/es/tools/blocks/detectInterval.d.ts +0 -1
- package/es/tools/blocks/detectInterval.js +0 -9
- package/es/tools/blocks/detectInterval.js.map +0 -1
- package/es/tools/blocks/getNetworkByte.d.ts +0 -1
- package/es/tools/blocks/getNetworkByte.js +0 -51
- package/es/tools/blocks/getNetworkByte.js.map +0 -1
- package/es/tools/blocks/getNetworkCode.d.ts +0 -1
- package/es/tools/blocks/getNetworkCode.js +0 -5
- package/es/tools/blocks/getNetworkCode.js.map +0 -1
- package/es/tools/blocks/waitHeight.d.ts +0 -3
- package/es/tools/blocks/waitHeight.js +0 -36
- package/es/tools/blocks/waitHeight.js.map +0 -1
- package/es/tools/parse.d.ts +0 -1
- package/es/tools/parse.js +0 -5
- package/es/tools/parse.js.map +0 -1
- package/es/tools/query.d.ts +0 -4
- package/es/tools/query.js +0 -12
- package/es/tools/query.js.map +0 -1
- package/es/tools/request.d.ts +0 -64
- package/es/tools/request.js +0 -22
- package/es/tools/request.js.map +0 -1
- package/es/tools/resolve.d.ts +0 -1
- package/es/tools/resolve.js +0 -4
- package/es/tools/resolve.js.map +0 -1
- package/es/tools/stringify.d.ts +0 -1
- package/es/tools/stringify.js +0 -18
- package/es/tools/stringify.js.map +0 -1
- package/es/tools/transactions/broadcast.d.ts +0 -14
- package/es/tools/transactions/broadcast.js +0 -43
- package/es/tools/transactions/broadcast.js.map +0 -1
- package/es/tools/transactions/ethTxId2waves.d.ts +0 -1
- package/es/tools/transactions/ethTxId2waves.js +0 -8
- package/es/tools/transactions/ethTxId2waves.js.map +0 -1
- package/es/tools/transactions/wait.d.ts +0 -10
- package/es/tools/transactions/wait.js +0 -39
- package/es/tools/transactions/wait.js.map +0 -1
- package/es/tools/utils.d.ts +0 -32
- package/es/tools/utils.js +0 -73
- package/es/tools/utils.js.map +0 -1
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { TLong } from '../../interface';
|
|
2
|
-
/**
|
|
3
|
-
* GET /leasing/active/{address}
|
|
4
|
-
* Get all active leases for an address
|
|
5
|
-
*/
|
|
6
|
-
export declare function fetchActive(base: string, address: string, options?: RequestInit): Promise<Array<ILeaseInfo>>;
|
|
7
|
-
/**
|
|
8
|
-
* GET /leasing/info/
|
|
9
|
-
* Get lease transactions info.
|
|
10
|
-
*/
|
|
11
|
-
export declare function fetchLeasingInfo(base: string, ids: string[], options?: RequestInit): Promise<Array<ILeaseInfo>>;
|
|
12
|
-
export interface ILeaseInfo {
|
|
13
|
-
id: string;
|
|
14
|
-
originTransactionId: string;
|
|
15
|
-
sender: string;
|
|
16
|
-
recipient: string;
|
|
17
|
-
amount: TLong;
|
|
18
|
-
height: number;
|
|
19
|
-
status: string;
|
|
20
|
-
cancelHeight: number | null;
|
|
21
|
-
cancelTransactionId: string | null;
|
|
22
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import request from '../../tools/request';
|
|
2
|
-
/**
|
|
3
|
-
* GET /leasing/active/{address}
|
|
4
|
-
* Get all active leases for an address
|
|
5
|
-
*/
|
|
6
|
-
export function fetchActive(base, address, options = Object.create(null)) {
|
|
7
|
-
return request({ base, url: `/leasing/active/${address}`, options });
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* GET /leasing/info/
|
|
11
|
-
* Get lease transactions info.
|
|
12
|
-
*/
|
|
13
|
-
export function fetchLeasingInfo(base, ids, options = Object.create(null)) {
|
|
14
|
-
const searchParams = `{\"ids\":[${ids.map(id => `\"${id}\"`).join(',')}]}`;
|
|
15
|
-
return request({
|
|
16
|
-
base, url: `/leasing/info/`,
|
|
17
|
-
options: Object.assign(Object.assign({}, options), { body: searchParams, method: 'POST', headers: {
|
|
18
|
-
'Content-Type': 'application/json'
|
|
19
|
-
} })
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-node/leasing/index.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAG1C;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,IAAY,EAAE,OAAe,EAAE,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACjG,OAAO,OAAO,CAAC,EAAC,IAAI,EAAE,GAAG,EAAE,mBAAmB,OAAO,EAAE,EAAE,OAAO,EAAC,CAAC,CAAC;AACvE,CAAC;AAGD;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAY,EAAE,GAAa,EAAE,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACpG,MAAM,YAAY,GAAG,aAAa,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC;IAE3E,OAAO,OAAO,CAAC;QACX,IAAI,EAAE,GAAG,EAAE,gBAAgB;QAAE,OAAO,kCAC7B,OAAO,KACV,IAAI,EAAE,YAAY,EAClB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE;gBACL,cAAc,EAAE,kBAAkB;aACrC,GACJ;KACJ,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
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,10 +0,0 @@
|
|
|
1
|
-
import request from '../../tools/request';
|
|
2
|
-
// @TODO: When correct API key
|
|
3
|
-
// POST /node/stop
|
|
4
|
-
export function fetchNodeStatus(base, options = Object.create(null)) {
|
|
5
|
-
return request({ base, url: '/node/status', options });
|
|
6
|
-
}
|
|
7
|
-
export function fetchNodeVersion(base, options = Object.create(null)) {
|
|
8
|
-
return request({ base, url: '/node/version', options });
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-node/node/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAE1C,8BAA8B;AAC9B,kBAAkB;AAElB,MAAM,UAAU,eAAe,CAAC,IAAY,EAAE,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACpF,OAAO,OAAO,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,cAAc,EAAE,OAAO,EAAE,CAAC,CAAC;AAC3D,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAAY,EAAE,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACrF,OAAO,OAAO,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,eAAe,EAAE,OAAO,EAAE,CAAC,CAAC;AAC5D,CAAC"}
|
|
@@ -1,46 +0,0 @@
|
|
|
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,46 +0,0 @@
|
|
|
1
|
-
import request from '../../tools/request';
|
|
2
|
-
/**
|
|
3
|
-
* GET /peers/all
|
|
4
|
-
* Peer list
|
|
5
|
-
*/
|
|
6
|
-
export function fetchAll(base, options = Object.create(null)) {
|
|
7
|
-
return request({
|
|
8
|
-
base,
|
|
9
|
-
url: '/peers/all',
|
|
10
|
-
options
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* GET /peers/connected
|
|
15
|
-
* Connected peers list
|
|
16
|
-
*/
|
|
17
|
-
export function fetchConnected(base, options = Object.create(null)) {
|
|
18
|
-
return request({
|
|
19
|
-
base,
|
|
20
|
-
url: '/peers/connected',
|
|
21
|
-
options
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* GET /peers/blacklisted
|
|
26
|
-
* Blacklisted peers list
|
|
27
|
-
*/
|
|
28
|
-
export function fetchBlackListed(base, options = Object.create(null)) {
|
|
29
|
-
return request({
|
|
30
|
-
base,
|
|
31
|
-
url: '/peers/blacklisted',
|
|
32
|
-
options
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* GET /peers/suspended
|
|
37
|
-
* Suspended peers list
|
|
38
|
-
*/
|
|
39
|
-
export function fetchSuspended(base, options = Object.create(null)) {
|
|
40
|
-
return request({
|
|
41
|
-
base,
|
|
42
|
-
url: '/peers/suspended',
|
|
43
|
-
options
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-node/peers/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAG1C;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAY,EAAE,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IAC7E,OAAO,OAAO,CAAC;QACX,IAAI;QACJ,GAAG,EAAE,YAAY;QACjB,OAAO;KACV,CAAC,CAAA;AACN,CAAC;AAGD;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY,EAAE,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACnF,OAAO,OAAO,CAAC;QACX,IAAI;QACJ,GAAG,EAAE,kBAAkB;QACvB,OAAO;KACV,CAAC,CAAA;AACN,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAY,EAAE,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACrF,OAAO,OAAO,CAAC;QACX,IAAI;QACJ,GAAG,EAAE,oBAAoB;QACzB,OAAO;KACV,CAAC,CAAA;AACN,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY,EAAE,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IACnF,OAAO,OAAO,CAAC;QACX,IAAI;QACJ,GAAG,EAAE,kBAAkB;QACvB,OAAO;KACV,CAAC,CAAA;AACN,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
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,13 +0,0 @@
|
|
|
1
|
-
import request from '../../tools/request';
|
|
2
|
-
/**
|
|
3
|
-
* GET /blockchain/rewards
|
|
4
|
-
* Current reward status
|
|
5
|
-
*/
|
|
6
|
-
export function fetchRewards(base, height, options = Object.create(null)) {
|
|
7
|
-
return request({
|
|
8
|
-
base,
|
|
9
|
-
url: height ? `/blockchain/rewards/${height}` : '/blockchain/rewards',
|
|
10
|
-
options
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-node/rewards/index.ts"],"names":[],"mappings":"AACA,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAG1C;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,IAAY,EAAE,MAAe,EAAE,UAAuB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;IAClG,OAAO,OAAO,CAAC;QACX,IAAI;QACJ,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,uBAAuB,MAAM,EAAE,CAAC,CAAC,CAAC,qBAAqB;QACrE,OAAO;KACV,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1,73 +0,0 @@
|
|
|
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,137 +0,0 @@
|
|
|
1
|
-
import { TRANSACTION_STATUSES } from '../../constants';
|
|
2
|
-
import { fetchHeight } from '../blocks';
|
|
3
|
-
import request from '../../tools/request';
|
|
4
|
-
import query from '../../tools/query';
|
|
5
|
-
import { deepAssign } from '../../tools/utils';
|
|
6
|
-
import stringify from '../../tools/stringify';
|
|
7
|
-
/**
|
|
8
|
-
* GET /transactions/unconfirmed/size
|
|
9
|
-
* Number of unconfirmed transactions
|
|
10
|
-
*/
|
|
11
|
-
export function fetchUnconfirmedSize(base) {
|
|
12
|
-
return request({
|
|
13
|
-
base,
|
|
14
|
-
url: '/transactions/unconfirmed/size'
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
// @TODO: when correct API key is received
|
|
18
|
-
/**
|
|
19
|
-
* POST /transactions/sign/{signerAddress}
|
|
20
|
-
* Sign a transaction with a non-default private key
|
|
21
|
-
*/
|
|
22
|
-
/**
|
|
23
|
-
* POST /transactions/calculateFee
|
|
24
|
-
* Calculate transaction fee
|
|
25
|
-
*/
|
|
26
|
-
export function fetchCalculateFee(base, tx, options = Object.create(null)) {
|
|
27
|
-
return request({
|
|
28
|
-
base,
|
|
29
|
-
url: '/transactions/calculateFee',
|
|
30
|
-
options: deepAssign(Object.assign({}, options), {
|
|
31
|
-
method: 'POST',
|
|
32
|
-
body: stringify(tx),
|
|
33
|
-
headers: {
|
|
34
|
-
'Content-Type': 'application/json'
|
|
35
|
-
}
|
|
36
|
-
})
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* GET /transactions/unconfirmed
|
|
41
|
-
* Unconfirmed transactions
|
|
42
|
-
*/
|
|
43
|
-
export function fetchUnconfirmed(base, options = Object.create(null)) {
|
|
44
|
-
return request({
|
|
45
|
-
base,
|
|
46
|
-
url: '/transactions/unconfirmed',
|
|
47
|
-
options
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Список транзакций по адресу
|
|
52
|
-
* @param address
|
|
53
|
-
* @param limit максимальное количество транзакций в результате
|
|
54
|
-
* @param after искать транзакции после ID указанного в after
|
|
55
|
-
* @param retry количество попыток на выполнение запроса
|
|
56
|
-
*/
|
|
57
|
-
export function fetchTransactions(base, address, limit, after, retry, options = Object.create(null)) {
|
|
58
|
-
return request({
|
|
59
|
-
base,
|
|
60
|
-
url: `/transactions/address/${address}/limit/${limit}${query({ after })}`,
|
|
61
|
-
options
|
|
62
|
-
}).then(([list]) => {
|
|
63
|
-
return list;
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* GET /transactions/unconfirmed/info/{id}
|
|
68
|
-
* Unconfirmed transaction info
|
|
69
|
-
*/
|
|
70
|
-
export function fetchUnconfirmedInfo(base, id, options = Object.create(null)) {
|
|
71
|
-
return request({
|
|
72
|
-
base,
|
|
73
|
-
url: `/transactions/unconfirmed/info/${id}`,
|
|
74
|
-
options
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
// @TODO when correct API key is received
|
|
78
|
-
/**
|
|
79
|
-
* POST /transactions/sign
|
|
80
|
-
* Sign a transaction
|
|
81
|
-
*/
|
|
82
|
-
/**
|
|
83
|
-
* GET /transactions/info/{id}
|
|
84
|
-
* Transaction info
|
|
85
|
-
*/
|
|
86
|
-
export function fetchInfo(base, id, options = Object.create(null)) {
|
|
87
|
-
return request({
|
|
88
|
-
base,
|
|
89
|
-
url: `/transactions/info/${id}`,
|
|
90
|
-
options
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* GET /transactions/info/
|
|
95
|
-
* Get transactions by IDs
|
|
96
|
-
*/
|
|
97
|
-
export function fetchMultipleInfo(base, ids, options = Object.create(null)) {
|
|
98
|
-
return request({
|
|
99
|
-
base,
|
|
100
|
-
url: `/transactions/info${query({ id: ids })}`,
|
|
101
|
-
options
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
export function fetchStatus(base, list) {
|
|
105
|
-
const DEFAULT_STATUS = {
|
|
106
|
-
id: '',
|
|
107
|
-
confirmations: -1,
|
|
108
|
-
height: -1,
|
|
109
|
-
inUTX: false,
|
|
110
|
-
status: TRANSACTION_STATUSES.NOT_FOUND
|
|
111
|
-
};
|
|
112
|
-
const loadAllTxInfo = list.map(id => fetchUnconfirmedInfo(base, id)
|
|
113
|
-
.then(() => (Object.assign(Object.assign({}, DEFAULT_STATUS), { id, status: TRANSACTION_STATUSES.UNCONFIRMED, inUTX: true })))
|
|
114
|
-
.catch(() => fetchInfo(base, id)
|
|
115
|
-
.then(tx => (Object.assign(Object.assign({}, DEFAULT_STATUS), { id, status: TRANSACTION_STATUSES.IN_BLOCKCHAIN, height: tx.height, applicationStatus: tx.applicationStatus }))))
|
|
116
|
-
.catch(() => (Object.assign(Object.assign({}, DEFAULT_STATUS), { id }))));
|
|
117
|
-
return Promise.all([
|
|
118
|
-
fetchHeight(base),
|
|
119
|
-
Promise.all(loadAllTxInfo)
|
|
120
|
-
]).then(([{ height }, statuses]) => ({
|
|
121
|
-
height,
|
|
122
|
-
statuses: statuses.map(item => (Object.assign(Object.assign({}, item), { confirmations: item.status === TRANSACTION_STATUSES.IN_BLOCKCHAIN ? height - item.height : item.confirmations })))
|
|
123
|
-
}));
|
|
124
|
-
}
|
|
125
|
-
export function broadcast(base, tx, options = Object.create(null)) {
|
|
126
|
-
return request({
|
|
127
|
-
base, url: '/transactions/broadcast',
|
|
128
|
-
options: deepAssign(Object.assign({}, options), {
|
|
129
|
-
method: 'POST',
|
|
130
|
-
body: stringify(tx),
|
|
131
|
-
headers: {
|
|
132
|
-
'Content-Type': 'application/json'
|
|
133
|
-
}
|
|
134
|
-
})
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api-node/transactions/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import { Transaction, WithApiMixin } from '@waves/ts-types';
|
|
2
|
-
import { TLong } from '../../interface';
|
|
3
|
-
/**
|
|
4
|
-
* GET /utils/seed
|
|
5
|
-
* Generate random seed
|
|
6
|
-
*/
|
|
7
|
-
export declare function fetchSeed(base: string, length?: number): Promise<{
|
|
8
|
-
seed: string;
|
|
9
|
-
}>;
|
|
10
|
-
/**
|
|
11
|
-
* POST /utils/script/compileCode
|
|
12
|
-
* Compiles string code to base64 script representation
|
|
13
|
-
*/
|
|
14
|
-
export declare function fetchCompileCode(base: string, body: string): Promise<ICompileCode>;
|
|
15
|
-
/**
|
|
16
|
-
* POST /utils/script/compileWithImports
|
|
17
|
-
* Compiles string code with imports to base64 script representation
|
|
18
|
-
*/
|
|
19
|
-
export declare function fetchCompileWithImports(base: string, body: ICompileWithImportsBody): Promise<ICompileCode>;
|
|
20
|
-
/**
|
|
21
|
-
* POST /utils/script/estimate
|
|
22
|
-
* Estimates compiled code in Base64 representation
|
|
23
|
-
*/
|
|
24
|
-
export declare function fetchEstimate(base: string, body: string): Promise<IEstimate>;
|
|
25
|
-
/**
|
|
26
|
-
* POST /utils/script/evaluate
|
|
27
|
-
* Evaluates the provided expression, taking into account the deployed dApp contract
|
|
28
|
-
*/
|
|
29
|
-
export declare function fetchEvaluate(base: string, address: string, expr: string): Promise<IEvaluate>;
|
|
30
|
-
/**
|
|
31
|
-
* POST /utils/transactionSerialize
|
|
32
|
-
* Serialize transaction
|
|
33
|
-
*/
|
|
34
|
-
export declare function fetchTransactionSerialize(base: string, body: Transaction<TLong> & WithApiMixin): Promise<ITransactionSerialize>;
|
|
35
|
-
/**
|
|
36
|
-
* POST /utils/hash/secure
|
|
37
|
-
* Return SecureCryptographicHash of specified message
|
|
38
|
-
*/
|
|
39
|
-
export declare function fetchHashSecure(base: string, body: string): Promise<IHashSecure>;
|
|
40
|
-
/**
|
|
41
|
-
* POST /utils/hash/fast
|
|
42
|
-
* Return FastCryptographicHash of specified message
|
|
43
|
-
*/
|
|
44
|
-
export declare function fetchHashFast(base: string, body: string): Promise<IHashSecure>;
|
|
45
|
-
/**
|
|
46
|
-
* POST /utils/script/meta
|
|
47
|
-
* Account's script meta
|
|
48
|
-
*/
|
|
49
|
-
export declare function fetchScriptMeta(base: string, body: string): Promise<IScriptMeta>;
|
|
50
|
-
/**
|
|
51
|
-
* POST /utils/script/decompile
|
|
52
|
-
* Decompiles base64 script representation to string code
|
|
53
|
-
*/
|
|
54
|
-
export declare function fetchScriptDecompile(base: string, body: string): Promise<IScriptDecompile>;
|
|
55
|
-
/**
|
|
56
|
-
* POST /utils/sign/{privateKey}
|
|
57
|
-
* Return FastCryptographicHash of specified message
|
|
58
|
-
*/
|
|
59
|
-
export declare function fetchSignPrivateKey(base: string, privateKey: string, body: string): Promise<ISignPrivateKey>;
|
|
60
|
-
/**
|
|
61
|
-
* GET /utils/time
|
|
62
|
-
* Current Node time (UTC)
|
|
63
|
-
*/
|
|
64
|
-
export declare function fetchNodeTime(base: string): Promise<INodeTime>;
|
|
65
|
-
interface IScriptMeta {
|
|
66
|
-
version?: string;
|
|
67
|
-
callableFuncTypes?: Array<Record<string, Record<string, 'Int' | 'String' | 'Binary'>>>;
|
|
68
|
-
}
|
|
69
|
-
interface IScriptDecompile {
|
|
70
|
-
STDLIB_VERSION: number;
|
|
71
|
-
CONTENT_TYPE: string;
|
|
72
|
-
script: string;
|
|
73
|
-
SCRIPT_TYPE?: string;
|
|
74
|
-
}
|
|
75
|
-
export interface ICompileCode {
|
|
76
|
-
script: string;
|
|
77
|
-
complexity: number;
|
|
78
|
-
callableComplexities: Record<string, number>;
|
|
79
|
-
verifierComplexity: number;
|
|
80
|
-
extraFee: TLong;
|
|
81
|
-
}
|
|
82
|
-
export interface IEstimate extends ICompileCode {
|
|
83
|
-
scriptText: string;
|
|
84
|
-
}
|
|
85
|
-
export interface IEvaluate {
|
|
86
|
-
address: string;
|
|
87
|
-
expr: string;
|
|
88
|
-
result: object;
|
|
89
|
-
complexity: number;
|
|
90
|
-
}
|
|
91
|
-
interface ICompileWithImportsBody {
|
|
92
|
-
script: string;
|
|
93
|
-
imports: object;
|
|
94
|
-
}
|
|
95
|
-
interface IHashSecure {
|
|
96
|
-
message: string;
|
|
97
|
-
hash: string;
|
|
98
|
-
}
|
|
99
|
-
interface ITransactionSerialize {
|
|
100
|
-
bytes: Array<number>;
|
|
101
|
-
}
|
|
102
|
-
interface ISignPrivateKey {
|
|
103
|
-
message: string;
|
|
104
|
-
signature: string;
|
|
105
|
-
}
|
|
106
|
-
interface INodeTime {
|
|
107
|
-
system: number;
|
|
108
|
-
NTP: number;
|
|
109
|
-
}
|
|
110
|
-
export {};
|