@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/README.md
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
# Library for Waves Node Rest API
|
|
2
|
-
|
|
1
|
+
# Library for Waves Node Rest API
|
|
2
|
+
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { TLong } from '../../interface';
|
|
2
|
-
/**
|
|
3
|
-
* GET /activation/status
|
|
4
|
-
* Status
|
|
5
|
-
* @param base
|
|
6
|
-
*/
|
|
7
|
-
export declare function fetchActivationStatus(base: string): Promise<IActivationStatus<TLong>>;
|
|
8
|
-
export interface IActivationStatus<LONG> {
|
|
9
|
-
height: number;
|
|
10
|
-
votingInterval: number;
|
|
11
|
-
votingThreshold: number;
|
|
12
|
-
nextCheck: LONG;
|
|
13
|
-
features: Array<IFeatures<TLong>>;
|
|
14
|
-
}
|
|
15
|
-
export interface IFeatures<LONG> {
|
|
16
|
-
id: number;
|
|
17
|
-
description: string;
|
|
18
|
-
blockchainStatus: string;
|
|
19
|
-
nodeStatus: string;
|
|
20
|
-
activationHeight: number;
|
|
21
|
-
}
|
|
1
|
+
import { TLong } from '../../interface';
|
|
2
|
+
/**
|
|
3
|
+
* GET /activation/status
|
|
4
|
+
* Status
|
|
5
|
+
* @param base
|
|
6
|
+
*/
|
|
7
|
+
export declare function fetchActivationStatus(base: string): Promise<IActivationStatus<TLong>>;
|
|
8
|
+
export interface IActivationStatus<LONG> {
|
|
9
|
+
height: number;
|
|
10
|
+
votingInterval: number;
|
|
11
|
+
votingThreshold: number;
|
|
12
|
+
nextCheck: LONG;
|
|
13
|
+
features: Array<IFeatures<TLong>>;
|
|
14
|
+
}
|
|
15
|
+
export interface IFeatures<LONG> {
|
|
16
|
+
id: number;
|
|
17
|
+
description: string;
|
|
18
|
+
blockchainStatus: string;
|
|
19
|
+
nodeStatus: string;
|
|
20
|
+
activationHeight: number;
|
|
21
|
+
}
|
|
@@ -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.fetchActivationStatus = void 0;
|
|
7
|
-
var request_1 = __importDefault(require("../../tools/request"));
|
|
8
|
-
/**
|
|
9
|
-
* GET /activation/status
|
|
10
|
-
* Status
|
|
11
|
-
* @param base
|
|
12
|
-
*/
|
|
13
|
-
function fetchActivationStatus(base) {
|
|
14
|
-
return request_1.default({
|
|
15
|
-
base: base,
|
|
16
|
-
url: 'activation/status'
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
exports.fetchActivationStatus = fetchActivationStatus;
|
|
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.fetchActivationStatus = void 0;
|
|
7
|
+
var request_1 = __importDefault(require("../../tools/request"));
|
|
8
|
+
/**
|
|
9
|
+
* GET /activation/status
|
|
10
|
+
* Status
|
|
11
|
+
* @param base
|
|
12
|
+
*/
|
|
13
|
+
function fetchActivationStatus(base) {
|
|
14
|
+
return request_1.default({
|
|
15
|
+
base: base,
|
|
16
|
+
url: 'activation/status'
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
exports.fetchActivationStatus = fetchActivationStatus;
|
|
20
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
import { TLong } from '../../interface';
|
|
2
|
-
import { DataTransactionEntry } from '@waves/ts-types';
|
|
3
|
-
export declare function fetchDataKey(base: string, address: string, key: string, options?: RequestInit): Promise<DataTransactionEntry<TLong>>;
|
|
4
|
-
export declare function fetchScriptInfo(base: string, address: string, options?: RequestInit): Promise<IScriptInfo<TLong>>;
|
|
5
|
-
export declare function fetchScriptInfoMeta(base: string, address: string): Promise<IScriptInfoMetaResponse>;
|
|
6
|
-
export declare function fetchBalanceDetails(base: string, address: string, options?: RequestInit): Promise<IBalanceDetails<TLong>>;
|
|
7
|
-
export declare function fetchBalanceConfirmations(base: string, address: string, confirmations: number, options?: RequestInit): Promise<IBalanceConfirmations<TLong>>;
|
|
8
|
-
export declare function data(base: string, address: string, params?: IDataQueryParams, options?: RequestInit): Promise<Array<DataTransactionEntry<TLong>>>;
|
|
9
|
-
export declare function fetchValidate(base: string, address: string): Promise<IValidateResponse>;
|
|
10
|
-
export declare function fetchBalance(base: string, address: string, options?: RequestInit): Promise<IBalanceConfirmations<TLong>>;
|
|
11
|
-
export declare function fetchMultipleBalance(base: string, addresses: string[], options?: RequestInit): Promise<IBalanceConfirmations<TLong>[]>;
|
|
12
|
-
export declare function deleteAddressFromWallet(base: string, address: string, options?: RequestInit): Promise<IBalanceConfirmations<TLong> | IBalanceConfirmations<TLong>[]>;
|
|
13
|
-
export declare function fetchEffectiveBalanceConfirmations(base: string, address: string, confirmations: number, options?: RequestInit): Promise<IBalanceConfirmations<TLong>>;
|
|
14
|
-
export declare function fetchEffectiveBalance(base: string, address: string, options?: RequestInit): Promise<IBalanceConfirmations<TLong>>;
|
|
15
|
-
export declare function fetchSeq(base: string, from: number, to: number): Promise<Array<string>>;
|
|
16
|
-
export declare function fetchSeed(base: string, address: string): Promise<string>;
|
|
17
|
-
export declare function fetchPublicKey(base: string, publicKey: string): Promise<IPublicKeyResponse>;
|
|
18
|
-
export declare function fetchAddresses(base: string): Promise<Array<string>>;
|
|
19
|
-
export interface IBalanceConfirmations<LONG> {
|
|
20
|
-
address: string;
|
|
21
|
-
confirmations: number;
|
|
22
|
-
balance: LONG;
|
|
23
|
-
}
|
|
24
|
-
export interface IScriptInfo<LONG = TLong> {
|
|
25
|
-
address: string;
|
|
26
|
-
complexity: number;
|
|
27
|
-
callableComplexities: Record<string, number>;
|
|
28
|
-
verifierComplexity: number;
|
|
29
|
-
extraFee: LONG;
|
|
30
|
-
script?: string;
|
|
31
|
-
scriptText?: string;
|
|
32
|
-
}
|
|
33
|
-
export interface IDataQueryParams {
|
|
34
|
-
matches?: string;
|
|
35
|
-
keys?: string | Array<string>;
|
|
36
|
-
}
|
|
37
|
-
export interface IBalanceDetails<LONG> {
|
|
38
|
-
address: string;
|
|
39
|
-
/**
|
|
40
|
-
* Весь принадлежащий мне баланс, включая исходящий лизинг
|
|
41
|
-
* Available + LeaseOut
|
|
42
|
-
*/
|
|
43
|
-
regular: LONG;
|
|
44
|
-
/**
|
|
45
|
-
* Минимальный эффективный баланс за последнюю 1000 блоков
|
|
46
|
-
*/
|
|
47
|
-
generating: LONG;
|
|
48
|
-
/**
|
|
49
|
-
* Мой баланс без исходящего лизинга
|
|
50
|
-
* Баланс, который можно тратить
|
|
51
|
-
*/
|
|
52
|
-
available: LONG;
|
|
53
|
-
/**
|
|
54
|
-
* Баланс для генерации блоков (включая входящий лизинг и исключая исходящий)
|
|
55
|
-
* Available + LeaseIn - LeaseOut
|
|
56
|
-
*/
|
|
57
|
-
effective: LONG;
|
|
58
|
-
}
|
|
59
|
-
export declare type ICallableFuncArgumentType = 'Int' | 'String' | 'ByteVector' | 'Boolean';
|
|
60
|
-
export declare type TCallableFuncArgumentsArray = {
|
|
61
|
-
name: string;
|
|
62
|
-
type: ICallableFuncArgumentType;
|
|
63
|
-
}[];
|
|
64
|
-
export declare type TCallableFuncArgumentsRecord = Record<string, ICallableFuncArgumentType>;
|
|
65
|
-
export declare type TCallableFuncArguments = TCallableFuncArgumentsArray | TCallableFuncArgumentsRecord;
|
|
66
|
-
export interface IScriptInfoMeta<TArguments extends TCallableFuncArguments> {
|
|
67
|
-
version: string;
|
|
68
|
-
isArrayArguments?: boolean;
|
|
69
|
-
callableFuncTypes: Record<string, TArguments>;
|
|
70
|
-
}
|
|
71
|
-
export interface IScriptInfoMetaResponse {
|
|
72
|
-
address: string;
|
|
73
|
-
meta: IScriptInfoMeta<TCallableFuncArguments>;
|
|
74
|
-
}
|
|
75
|
-
export interface IValidateResponse {
|
|
76
|
-
address: string;
|
|
77
|
-
valid: boolean;
|
|
78
|
-
}
|
|
79
|
-
export interface IPublicKeyResponse {
|
|
80
|
-
address: string;
|
|
81
|
-
}
|
|
1
|
+
import { TLong } from '../../interface';
|
|
2
|
+
import { DataTransactionEntry } from '@waves/ts-types';
|
|
3
|
+
export declare function fetchDataKey(base: string, address: string, key: string, options?: RequestInit): Promise<DataTransactionEntry<TLong>>;
|
|
4
|
+
export declare function fetchScriptInfo(base: string, address: string, options?: RequestInit): Promise<IScriptInfo<TLong>>;
|
|
5
|
+
export declare function fetchScriptInfoMeta(base: string, address: string): Promise<IScriptInfoMetaResponse>;
|
|
6
|
+
export declare function fetchBalanceDetails(base: string, address: string, options?: RequestInit): Promise<IBalanceDetails<TLong>>;
|
|
7
|
+
export declare function fetchBalanceConfirmations(base: string, address: string, confirmations: number, options?: RequestInit): Promise<IBalanceConfirmations<TLong>>;
|
|
8
|
+
export declare function data(base: string, address: string, params?: IDataQueryParams, options?: RequestInit): Promise<Array<DataTransactionEntry<TLong>>>;
|
|
9
|
+
export declare function fetchValidate(base: string, address: string): Promise<IValidateResponse>;
|
|
10
|
+
export declare function fetchBalance(base: string, address: string, options?: RequestInit): Promise<IBalanceConfirmations<TLong>>;
|
|
11
|
+
export declare function fetchMultipleBalance(base: string, addresses: string[], options?: RequestInit): Promise<IBalanceConfirmations<TLong>[]>;
|
|
12
|
+
export declare function deleteAddressFromWallet(base: string, address: string, options?: RequestInit): Promise<IBalanceConfirmations<TLong> | IBalanceConfirmations<TLong>[]>;
|
|
13
|
+
export declare function fetchEffectiveBalanceConfirmations(base: string, address: string, confirmations: number, options?: RequestInit): Promise<IBalanceConfirmations<TLong>>;
|
|
14
|
+
export declare function fetchEffectiveBalance(base: string, address: string, options?: RequestInit): Promise<IBalanceConfirmations<TLong>>;
|
|
15
|
+
export declare function fetchSeq(base: string, from: number, to: number): Promise<Array<string>>;
|
|
16
|
+
export declare function fetchSeed(base: string, address: string): Promise<string>;
|
|
17
|
+
export declare function fetchPublicKey(base: string, publicKey: string): Promise<IPublicKeyResponse>;
|
|
18
|
+
export declare function fetchAddresses(base: string): Promise<Array<string>>;
|
|
19
|
+
export interface IBalanceConfirmations<LONG> {
|
|
20
|
+
address: string;
|
|
21
|
+
confirmations: number;
|
|
22
|
+
balance: LONG;
|
|
23
|
+
}
|
|
24
|
+
export interface IScriptInfo<LONG = TLong> {
|
|
25
|
+
address: string;
|
|
26
|
+
complexity: number;
|
|
27
|
+
callableComplexities: Record<string, number>;
|
|
28
|
+
verifierComplexity: number;
|
|
29
|
+
extraFee: LONG;
|
|
30
|
+
script?: string;
|
|
31
|
+
scriptText?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface IDataQueryParams {
|
|
34
|
+
matches?: string;
|
|
35
|
+
keys?: string | Array<string>;
|
|
36
|
+
}
|
|
37
|
+
export interface IBalanceDetails<LONG> {
|
|
38
|
+
address: string;
|
|
39
|
+
/**
|
|
40
|
+
* Весь принадлежащий мне баланс, включая исходящий лизинг
|
|
41
|
+
* Available + LeaseOut
|
|
42
|
+
*/
|
|
43
|
+
regular: LONG;
|
|
44
|
+
/**
|
|
45
|
+
* Минимальный эффективный баланс за последнюю 1000 блоков
|
|
46
|
+
*/
|
|
47
|
+
generating: LONG;
|
|
48
|
+
/**
|
|
49
|
+
* Мой баланс без исходящего лизинга
|
|
50
|
+
* Баланс, который можно тратить
|
|
51
|
+
*/
|
|
52
|
+
available: LONG;
|
|
53
|
+
/**
|
|
54
|
+
* Баланс для генерации блоков (включая входящий лизинг и исключая исходящий)
|
|
55
|
+
* Available + LeaseIn - LeaseOut
|
|
56
|
+
*/
|
|
57
|
+
effective: LONG;
|
|
58
|
+
}
|
|
59
|
+
export declare type ICallableFuncArgumentType = 'Int' | 'String' | 'ByteVector' | 'Boolean';
|
|
60
|
+
export declare type TCallableFuncArgumentsArray = {
|
|
61
|
+
name: string;
|
|
62
|
+
type: ICallableFuncArgumentType;
|
|
63
|
+
}[];
|
|
64
|
+
export declare type TCallableFuncArgumentsRecord = Record<string, ICallableFuncArgumentType>;
|
|
65
|
+
export declare type TCallableFuncArguments = TCallableFuncArgumentsArray | TCallableFuncArgumentsRecord;
|
|
66
|
+
export interface IScriptInfoMeta<TArguments extends TCallableFuncArguments> {
|
|
67
|
+
version: string;
|
|
68
|
+
isArrayArguments?: boolean;
|
|
69
|
+
callableFuncTypes: Record<string, TArguments>;
|
|
70
|
+
}
|
|
71
|
+
export interface IScriptInfoMetaResponse {
|
|
72
|
+
address: string;
|
|
73
|
+
meta: IScriptInfoMeta<TCallableFuncArguments>;
|
|
74
|
+
}
|
|
75
|
+
export interface IValidateResponse {
|
|
76
|
+
address: string;
|
|
77
|
+
valid: boolean;
|
|
78
|
+
}
|
|
79
|
+
export interface IPublicKeyResponse {
|
|
80
|
+
address: string;
|
|
81
|
+
}
|
|
@@ -1,174 +1,174 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
-
if (k2 === undefined) k2 = k;
|
|
15
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
16
|
-
}) : (function(o, m, k, k2) {
|
|
17
|
-
if (k2 === undefined) k2 = k;
|
|
18
|
-
o[k2] = m[k];
|
|
19
|
-
}));
|
|
20
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
-
}) : function(o, v) {
|
|
23
|
-
o["default"] = v;
|
|
24
|
-
});
|
|
25
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
26
|
-
if (mod && mod.__esModule) return mod;
|
|
27
|
-
var result = {};
|
|
28
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
29
|
-
__setModuleDefault(result, mod);
|
|
30
|
-
return result;
|
|
31
|
-
};
|
|
32
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
33
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
34
|
-
};
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.fetchAddresses = exports.fetchPublicKey = exports.fetchSeed = exports.fetchSeq = exports.fetchEffectiveBalance = exports.fetchEffectiveBalanceConfirmations = exports.deleteAddressFromWallet = exports.fetchMultipleBalance = exports.fetchBalance = exports.fetchValidate = exports.data = exports.fetchBalanceConfirmations = exports.fetchBalanceDetails = exports.fetchScriptInfoMeta = exports.fetchScriptInfo = exports.fetchDataKey = void 0;
|
|
37
|
-
var request_1 = __importStar(require("../../tools/request"));
|
|
38
|
-
var query_1 = __importDefault(require("../../tools/query"));
|
|
39
|
-
function fetchDataKey(base, address, key, options) {
|
|
40
|
-
if (options === void 0) { options = Object.create(null); }
|
|
41
|
-
return request_1.default({
|
|
42
|
-
base: base,
|
|
43
|
-
url: "/addresses/data/" + address + "/" + encodeURIComponent(key),
|
|
44
|
-
options: options
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
exports.fetchDataKey = fetchDataKey;
|
|
48
|
-
function fetchScriptInfo(base, address, options) {
|
|
49
|
-
if (options === void 0) { options = Object.create(null); }
|
|
50
|
-
return request_1.default({
|
|
51
|
-
base: base,
|
|
52
|
-
url: "/addresses/scriptInfo/" + address,
|
|
53
|
-
options: options
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
exports.fetchScriptInfo = fetchScriptInfo;
|
|
57
|
-
function fetchScriptInfoMeta(base, address) {
|
|
58
|
-
return request_1.default({
|
|
59
|
-
base: base,
|
|
60
|
-
url: "/addresses/scriptInfo/" + address + "/meta"
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
exports.fetchScriptInfoMeta = fetchScriptInfoMeta;
|
|
64
|
-
function fetchBalanceDetails(base, address, options) {
|
|
65
|
-
if (options === void 0) { options = Object.create(null); }
|
|
66
|
-
return request_1.default({
|
|
67
|
-
base: base,
|
|
68
|
-
url: "/addresses/balance/details/" + address,
|
|
69
|
-
options: options
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
exports.fetchBalanceDetails = fetchBalanceDetails;
|
|
73
|
-
function fetchBalanceConfirmations(base, address, confirmations, options) {
|
|
74
|
-
if (options === void 0) { options = Object.create(null); }
|
|
75
|
-
return request_1.default({
|
|
76
|
-
base: base,
|
|
77
|
-
url: "/addresses/balance/" + address + "/" + confirmations,
|
|
78
|
-
options: options
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
exports.fetchBalanceConfirmations = fetchBalanceConfirmations;
|
|
82
|
-
function data(base, address, params, options) {
|
|
83
|
-
if (params === void 0) { params = Object.create(null); }
|
|
84
|
-
if (options === void 0) { options = Object.create(null); }
|
|
85
|
-
return request_1.default({
|
|
86
|
-
base: base,
|
|
87
|
-
url: "/addresses/data/" + address + query_1.default(params),
|
|
88
|
-
options: options
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
exports.data = data;
|
|
92
|
-
function fetchValidate(base, address) {
|
|
93
|
-
return request_1.default({
|
|
94
|
-
base: base,
|
|
95
|
-
url: "/addresses/validate/" + address
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
exports.fetchValidate = fetchValidate;
|
|
99
|
-
function fetchBalance(base, address, options) {
|
|
100
|
-
if (options === void 0) { options = Object.create(null); }
|
|
101
|
-
return request_1.default({
|
|
102
|
-
base: base,
|
|
103
|
-
url: "/addresses/balance/" + address,
|
|
104
|
-
options: options
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
exports.fetchBalance = fetchBalance;
|
|
108
|
-
function fetchMultipleBalance(base, addresses, options) {
|
|
109
|
-
if (options === void 0) { options = Object.create(null); }
|
|
110
|
-
return fetch(base + "/addresses/balance", {
|
|
111
|
-
method: "POST",
|
|
112
|
-
body: JSON.stringify({ addresses: addresses }),
|
|
113
|
-
headers: {
|
|
114
|
-
"Content-Type": "application/json"
|
|
115
|
-
}
|
|
116
|
-
}).then(request_1.parseResponse);
|
|
117
|
-
}
|
|
118
|
-
exports.fetchMultipleBalance = fetchMultipleBalance;
|
|
119
|
-
function deleteAddressFromWallet(base, address, options) {
|
|
120
|
-
if (options === void 0) { options = Object.create(null); }
|
|
121
|
-
return request_1.default({
|
|
122
|
-
base: base,
|
|
123
|
-
url: "/addresses/" + address,
|
|
124
|
-
options: __assign(__assign({}, options), { method: 'DELETE' })
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
exports.deleteAddressFromWallet = deleteAddressFromWallet;
|
|
128
|
-
function fetchEffectiveBalanceConfirmations(base, address, confirmations, options) {
|
|
129
|
-
if (options === void 0) { options = Object.create(null); }
|
|
130
|
-
return request_1.default({
|
|
131
|
-
base: base,
|
|
132
|
-
url: "/addresses/effectiveBalance/" + address + "/" + confirmations,
|
|
133
|
-
options: options
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
exports.fetchEffectiveBalanceConfirmations = fetchEffectiveBalanceConfirmations;
|
|
137
|
-
function fetchEffectiveBalance(base, address, options) {
|
|
138
|
-
if (options === void 0) { options = Object.create(null); }
|
|
139
|
-
return request_1.default({
|
|
140
|
-
base: base,
|
|
141
|
-
url: "/addresses/effectiveBalance/" + address,
|
|
142
|
-
options: options
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
exports.fetchEffectiveBalance = fetchEffectiveBalance;
|
|
146
|
-
function fetchSeq(base, from, to) {
|
|
147
|
-
return request_1.default({
|
|
148
|
-
base: base,
|
|
149
|
-
url: "/addresses/seq/" + from + "/" + to
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
exports.fetchSeq = fetchSeq;
|
|
153
|
-
function fetchSeed(base, address) {
|
|
154
|
-
return request_1.default({
|
|
155
|
-
base: base,
|
|
156
|
-
url: "/addresses/seed/" + address
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
exports.fetchSeed = fetchSeed;
|
|
160
|
-
function fetchPublicKey(base, publicKey) {
|
|
161
|
-
return request_1.default({
|
|
162
|
-
base: base,
|
|
163
|
-
url: "/addresses/publicKey/" + publicKey
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
exports.fetchPublicKey = fetchPublicKey;
|
|
167
|
-
function fetchAddresses(base) {
|
|
168
|
-
return request_1.default({
|
|
169
|
-
base: base,
|
|
170
|
-
url: '/addresses'
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
exports.fetchAddresses = fetchAddresses;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
+
}) : function(o, v) {
|
|
23
|
+
o["default"] = v;
|
|
24
|
+
});
|
|
25
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
26
|
+
if (mod && mod.__esModule) return mod;
|
|
27
|
+
var result = {};
|
|
28
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
29
|
+
__setModuleDefault(result, mod);
|
|
30
|
+
return result;
|
|
31
|
+
};
|
|
32
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
33
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
34
|
+
};
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.fetchAddresses = exports.fetchPublicKey = exports.fetchSeed = exports.fetchSeq = exports.fetchEffectiveBalance = exports.fetchEffectiveBalanceConfirmations = exports.deleteAddressFromWallet = exports.fetchMultipleBalance = exports.fetchBalance = exports.fetchValidate = exports.data = exports.fetchBalanceConfirmations = exports.fetchBalanceDetails = exports.fetchScriptInfoMeta = exports.fetchScriptInfo = exports.fetchDataKey = void 0;
|
|
37
|
+
var request_1 = __importStar(require("../../tools/request"));
|
|
38
|
+
var query_1 = __importDefault(require("../../tools/query"));
|
|
39
|
+
function fetchDataKey(base, address, key, options) {
|
|
40
|
+
if (options === void 0) { options = Object.create(null); }
|
|
41
|
+
return request_1.default({
|
|
42
|
+
base: base,
|
|
43
|
+
url: "/addresses/data/" + address + "/" + encodeURIComponent(key),
|
|
44
|
+
options: options
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
exports.fetchDataKey = fetchDataKey;
|
|
48
|
+
function fetchScriptInfo(base, address, options) {
|
|
49
|
+
if (options === void 0) { options = Object.create(null); }
|
|
50
|
+
return request_1.default({
|
|
51
|
+
base: base,
|
|
52
|
+
url: "/addresses/scriptInfo/" + address,
|
|
53
|
+
options: options
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
exports.fetchScriptInfo = fetchScriptInfo;
|
|
57
|
+
function fetchScriptInfoMeta(base, address) {
|
|
58
|
+
return request_1.default({
|
|
59
|
+
base: base,
|
|
60
|
+
url: "/addresses/scriptInfo/" + address + "/meta"
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
exports.fetchScriptInfoMeta = fetchScriptInfoMeta;
|
|
64
|
+
function fetchBalanceDetails(base, address, options) {
|
|
65
|
+
if (options === void 0) { options = Object.create(null); }
|
|
66
|
+
return request_1.default({
|
|
67
|
+
base: base,
|
|
68
|
+
url: "/addresses/balance/details/" + address,
|
|
69
|
+
options: options
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
exports.fetchBalanceDetails = fetchBalanceDetails;
|
|
73
|
+
function fetchBalanceConfirmations(base, address, confirmations, options) {
|
|
74
|
+
if (options === void 0) { options = Object.create(null); }
|
|
75
|
+
return request_1.default({
|
|
76
|
+
base: base,
|
|
77
|
+
url: "/addresses/balance/" + address + "/" + confirmations,
|
|
78
|
+
options: options
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
exports.fetchBalanceConfirmations = fetchBalanceConfirmations;
|
|
82
|
+
function data(base, address, params, options) {
|
|
83
|
+
if (params === void 0) { params = Object.create(null); }
|
|
84
|
+
if (options === void 0) { options = Object.create(null); }
|
|
85
|
+
return request_1.default({
|
|
86
|
+
base: base,
|
|
87
|
+
url: "/addresses/data/" + address + query_1.default(params),
|
|
88
|
+
options: options
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
exports.data = data;
|
|
92
|
+
function fetchValidate(base, address) {
|
|
93
|
+
return request_1.default({
|
|
94
|
+
base: base,
|
|
95
|
+
url: "/addresses/validate/" + address
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
exports.fetchValidate = fetchValidate;
|
|
99
|
+
function fetchBalance(base, address, options) {
|
|
100
|
+
if (options === void 0) { options = Object.create(null); }
|
|
101
|
+
return request_1.default({
|
|
102
|
+
base: base,
|
|
103
|
+
url: "/addresses/balance/" + address,
|
|
104
|
+
options: options
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
exports.fetchBalance = fetchBalance;
|
|
108
|
+
function fetchMultipleBalance(base, addresses, options) {
|
|
109
|
+
if (options === void 0) { options = Object.create(null); }
|
|
110
|
+
return fetch(base + "/addresses/balance", {
|
|
111
|
+
method: "POST",
|
|
112
|
+
body: JSON.stringify({ addresses: addresses }),
|
|
113
|
+
headers: {
|
|
114
|
+
"Content-Type": "application/json"
|
|
115
|
+
}
|
|
116
|
+
}).then(request_1.parseResponse);
|
|
117
|
+
}
|
|
118
|
+
exports.fetchMultipleBalance = fetchMultipleBalance;
|
|
119
|
+
function deleteAddressFromWallet(base, address, options) {
|
|
120
|
+
if (options === void 0) { options = Object.create(null); }
|
|
121
|
+
return request_1.default({
|
|
122
|
+
base: base,
|
|
123
|
+
url: "/addresses/" + address,
|
|
124
|
+
options: __assign(__assign({}, options), { method: 'DELETE' })
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
exports.deleteAddressFromWallet = deleteAddressFromWallet;
|
|
128
|
+
function fetchEffectiveBalanceConfirmations(base, address, confirmations, options) {
|
|
129
|
+
if (options === void 0) { options = Object.create(null); }
|
|
130
|
+
return request_1.default({
|
|
131
|
+
base: base,
|
|
132
|
+
url: "/addresses/effectiveBalance/" + address + "/" + confirmations,
|
|
133
|
+
options: options
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
exports.fetchEffectiveBalanceConfirmations = fetchEffectiveBalanceConfirmations;
|
|
137
|
+
function fetchEffectiveBalance(base, address, options) {
|
|
138
|
+
if (options === void 0) { options = Object.create(null); }
|
|
139
|
+
return request_1.default({
|
|
140
|
+
base: base,
|
|
141
|
+
url: "/addresses/effectiveBalance/" + address,
|
|
142
|
+
options: options
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
exports.fetchEffectiveBalance = fetchEffectiveBalance;
|
|
146
|
+
function fetchSeq(base, from, to) {
|
|
147
|
+
return request_1.default({
|
|
148
|
+
base: base,
|
|
149
|
+
url: "/addresses/seq/" + from + "/" + to
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
exports.fetchSeq = fetchSeq;
|
|
153
|
+
function fetchSeed(base, address) {
|
|
154
|
+
return request_1.default({
|
|
155
|
+
base: base,
|
|
156
|
+
url: "/addresses/seed/" + address
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
exports.fetchSeed = fetchSeed;
|
|
160
|
+
function fetchPublicKey(base, publicKey) {
|
|
161
|
+
return request_1.default({
|
|
162
|
+
base: base,
|
|
163
|
+
url: "/addresses/publicKey/" + publicKey
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
exports.fetchPublicKey = fetchPublicKey;
|
|
167
|
+
function fetchAddresses(base) {
|
|
168
|
+
return request_1.default({
|
|
169
|
+
base: base,
|
|
170
|
+
url: '/addresses'
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
exports.fetchAddresses = fetchAddresses;
|
|
174
174
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare function fetchByAlias(base: string, alias: string): Promise<IByAlias>;
|
|
2
|
-
export declare function fetchByAddress(base: string, address: string): Promise<IByAddress>;
|
|
3
|
-
export interface IByAlias {
|
|
4
|
-
address: string;
|
|
5
|
-
}
|
|
6
|
-
export declare type IByAddress = Array<string>;
|
|
1
|
+
export declare function fetchByAlias(base: string, alias: string): Promise<IByAlias>;
|
|
2
|
+
export declare function fetchByAddress(base: string, address: string): Promise<IByAddress>;
|
|
3
|
+
export interface IByAlias {
|
|
4
|
+
address: string;
|
|
5
|
+
}
|
|
6
|
+
export declare type IByAddress = Array<string>;
|