@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.
Files changed (165) hide show
  1. package/README.md +2 -2
  2. package/cjs/api-node/activation/index.d.ts +21 -21
  3. package/cjs/api-node/activation/index.js +19 -19
  4. package/cjs/api-node/addresses/index.d.ts +81 -81
  5. package/cjs/api-node/addresses/index.js +173 -173
  6. package/cjs/api-node/alias/index.d.ts +6 -6
  7. package/cjs/api-node/alias/index.js +21 -21
  8. package/cjs/api-node/assets/index.d.ts +79 -79
  9. package/cjs/api-node/assets/index.js +171 -171
  10. package/cjs/api-node/blocks/index.d.ts +143 -143
  11. package/cjs/api-node/blocks/index.js +209 -209
  12. package/cjs/api-node/debug/index.d.ts +189 -189
  13. package/cjs/api-node/debug/index.js +244 -244
  14. package/cjs/api-node/eth/index.d.ts +3 -3
  15. package/cjs/api-node/eth/index.js +14 -14
  16. package/cjs/api-node/leasing/index.d.ts +22 -22
  17. package/cjs/api-node/leasing/index.js +41 -41
  18. package/cjs/api-node/node/index.d.ts +11 -11
  19. package/cjs/api-node/node/index.js +19 -19
  20. package/cjs/api-node/peers/index.d.ts +46 -46
  21. package/cjs/api-node/peers/index.js +59 -59
  22. package/cjs/api-node/rewards/index.d.ts +21 -21
  23. package/cjs/api-node/rewards/index.js +20 -20
  24. package/cjs/api-node/transactions/index.d.ts +73 -73
  25. package/cjs/api-node/transactions/index.js +192 -192
  26. package/cjs/api-node/utils/index.d.ts +110 -110
  27. package/cjs/api-node/utils/index.js +210 -210
  28. package/cjs/api-node/wallet/index.d.ts +5 -5
  29. package/cjs/api-node/wallet/index.js +6 -6
  30. package/cjs/constants.d.ts +40 -40
  31. package/cjs/constants.js +42 -42
  32. package/cjs/create.d.ts +1238 -1238
  33. package/cjs/create.js +115 -115
  34. package/cjs/index.d.ts +9 -9
  35. package/cjs/index.js +17 -17
  36. package/cjs/interface.d.ts +44 -44
  37. package/cjs/interface.js +9 -9
  38. package/cjs/tools/adresses/availableSponsoredBalances.d.ts +7 -7
  39. package/cjs/tools/adresses/availableSponsoredBalances.js +29 -29
  40. package/cjs/tools/adresses/ethAddress2waves.d.ts +1 -1
  41. package/cjs/tools/adresses/ethAddress2waves.js +46 -46
  42. package/cjs/tools/adresses/getAssetIdListByTx.d.ts +2 -2
  43. package/cjs/tools/adresses/getAssetIdListByTx.js +47 -47
  44. package/cjs/tools/adresses/getAssetsByTransaction.d.ts +3 -3
  45. package/cjs/tools/adresses/getAssetsByTransaction.js +13 -13
  46. package/cjs/tools/adresses/getTransactionsWithAssets.d.ts +6 -6
  47. package/cjs/tools/adresses/getTransactionsWithAssets.js +12 -12
  48. package/cjs/tools/adresses/watch.d.ts +24 -24
  49. package/cjs/tools/adresses/watch.js +167 -167
  50. package/cjs/tools/adresses/wavesAddress2eth.d.ts +1 -1
  51. package/cjs/tools/adresses/wavesAddress2eth.js +9 -9
  52. package/cjs/tools/assets/wavesAsset2eth.d.ts +1 -1
  53. package/cjs/tools/assets/wavesAsset2eth.js +9 -9
  54. package/cjs/tools/blocks/detectInterval.d.ts +1 -1
  55. package/cjs/tools/blocks/detectInterval.js +11 -11
  56. package/cjs/tools/blocks/getNetworkByte.d.ts +1 -1
  57. package/cjs/tools/blocks/getNetworkByte.js +53 -53
  58. package/cjs/tools/blocks/getNetworkCode.d.ts +1 -1
  59. package/cjs/tools/blocks/getNetworkCode.js +10 -10
  60. package/cjs/tools/blocks/waitHeight.d.ts +3 -3
  61. package/cjs/tools/blocks/waitHeight.js +64 -64
  62. package/cjs/tools/parse.d.ts +1 -1
  63. package/cjs/tools/parse.js +7 -7
  64. package/cjs/tools/query.d.ts +4 -4
  65. package/cjs/tools/query.js +40 -40
  66. package/cjs/tools/request.d.ts +64 -64
  67. package/cjs/tools/request.js +41 -41
  68. package/cjs/tools/resolve.d.ts +1 -1
  69. package/cjs/tools/resolve.js +6 -6
  70. package/cjs/tools/stringify.d.ts +1 -1
  71. package/cjs/tools/stringify.js +20 -20
  72. package/cjs/tools/transactions/broadcast.d.ts +14 -14
  73. package/cjs/tools/transactions/broadcast.js +59 -59
  74. package/cjs/tools/transactions/ethTxId2waves.d.ts +1 -1
  75. package/cjs/tools/transactions/ethTxId2waves.js +10 -10
  76. package/cjs/tools/transactions/wait.d.ts +10 -10
  77. package/cjs/tools/transactions/wait.js +41 -41
  78. package/cjs/tools/utils.d.ts +32 -32
  79. package/cjs/tools/utils.js +117 -117
  80. package/dist/node-api.js +2300 -2300
  81. package/es/api-node/activation/index.d.ts +21 -21
  82. package/es/api-node/activation/index.js +12 -12
  83. package/es/api-node/addresses/index.d.ts +81 -81
  84. package/es/api-node/addresses/index.js +110 -110
  85. package/es/api-node/alias/index.d.ts +6 -6
  86. package/es/api-node/alias/index.js +13 -13
  87. package/es/api-node/assets/index.d.ts +79 -79
  88. package/es/api-node/assets/index.js +102 -102
  89. package/es/api-node/blocks/index.d.ts +143 -143
  90. package/es/api-node/blocks/index.js +178 -178
  91. package/es/api-node/debug/index.d.ts +189 -189
  92. package/es/api-node/debug/index.js +200 -200
  93. package/es/api-node/eth/index.d.ts +3 -3
  94. package/es/api-node/eth/index.js +7 -7
  95. package/es/api-node/leasing/index.d.ts +22 -22
  96. package/es/api-node/leasing/index.js +21 -21
  97. package/es/api-node/node/index.d.ts +11 -11
  98. package/es/api-node/node/index.js +9 -9
  99. package/es/api-node/peers/index.d.ts +46 -46
  100. package/es/api-node/peers/index.js +45 -45
  101. package/es/api-node/rewards/index.d.ts +21 -21
  102. package/es/api-node/rewards/index.js +12 -12
  103. package/es/api-node/transactions/index.d.ts +73 -73
  104. package/es/api-node/transactions/index.js +136 -136
  105. package/es/api-node/utils/index.d.ts +110 -110
  106. package/es/api-node/utils/index.js +192 -192
  107. package/es/api-node/wallet/index.d.ts +5 -5
  108. package/es/api-node/wallet/index.js +6 -6
  109. package/es/constants.d.ts +40 -40
  110. package/es/constants.js +39 -39
  111. package/es/create.d.ts +1238 -1238
  112. package/es/create.js +89 -89
  113. package/es/index.d.ts +9 -9
  114. package/es/index.js +8 -8
  115. package/es/interface.d.ts +44 -44
  116. package/es/interface.js +2 -2
  117. package/es/tools/adresses/availableSponsoredBalances.d.ts +7 -7
  118. package/es/tools/adresses/availableSponsoredBalances.js +26 -26
  119. package/es/tools/adresses/ethAddress2waves.d.ts +1 -1
  120. package/es/tools/adresses/ethAddress2waves.js +30 -30
  121. package/es/tools/adresses/getAssetIdListByTx.d.ts +2 -2
  122. package/es/tools/adresses/getAssetIdListByTx.js +23 -23
  123. package/es/tools/adresses/getAssetsByTransaction.d.ts +3 -3
  124. package/es/tools/adresses/getAssetsByTransaction.js +7 -7
  125. package/es/tools/adresses/getTransactionsWithAssets.d.ts +6 -6
  126. package/es/tools/adresses/getTransactionsWithAssets.js +6 -6
  127. package/es/tools/adresses/watch.d.ts +24 -24
  128. package/es/tools/adresses/watch.js +133 -133
  129. package/es/tools/adresses/wavesAddress2eth.d.ts +1 -1
  130. package/es/tools/adresses/wavesAddress2eth.js +6 -6
  131. package/es/tools/assets/wavesAsset2eth.d.ts +1 -1
  132. package/es/tools/assets/wavesAsset2eth.js +6 -6
  133. package/es/tools/blocks/detectInterval.d.ts +1 -1
  134. package/es/tools/blocks/detectInterval.js +8 -8
  135. package/es/tools/blocks/getNetworkByte.d.ts +1 -1
  136. package/es/tools/blocks/getNetworkByte.js +50 -50
  137. package/es/tools/blocks/getNetworkCode.d.ts +1 -1
  138. package/es/tools/blocks/getNetworkCode.js +4 -4
  139. package/es/tools/blocks/waitHeight.d.ts +3 -3
  140. package/es/tools/blocks/waitHeight.js +35 -35
  141. package/es/tools/parse.d.ts +1 -1
  142. package/es/tools/parse.js +4 -4
  143. package/es/tools/query.d.ts +4 -4
  144. package/es/tools/query.js +11 -11
  145. package/es/tools/request.d.ts +64 -64
  146. package/es/tools/request.js +21 -21
  147. package/es/tools/resolve.d.ts +1 -1
  148. package/es/tools/resolve.js +3 -3
  149. package/es/tools/stringify.d.ts +1 -1
  150. package/es/tools/stringify.js +17 -17
  151. package/es/tools/transactions/broadcast.d.ts +14 -14
  152. package/es/tools/transactions/broadcast.js +42 -42
  153. package/es/tools/transactions/ethTxId2waves.d.ts +1 -1
  154. package/es/tools/transactions/ethTxId2waves.js +7 -7
  155. package/es/tools/transactions/wait.d.ts +10 -10
  156. package/es/tools/transactions/wait.js +38 -38
  157. package/es/tools/utils.d.ts +32 -32
  158. package/es/tools/utils.js +72 -72
  159. package/package.json +66 -66
  160. package/cjs/api-node/consensus/index.d.ts +0 -39
  161. package/cjs/api-node/consensus/index.js +0 -37
  162. package/cjs/api-node/consensus/index.js.map +0 -1
  163. package/es/api-node/consensus/index.d.ts +0 -39
  164. package/es/api-node/consensus/index.js +0 -27
  165. 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>;