@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
@@ -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,13 +1,13 @@
1
- import request from '../../tools/request';
2
- /**
3
- * GET /activation/status
4
- * Status
5
- * @param base
6
- */
7
- export function fetchActivationStatus(base) {
8
- return request({
9
- base,
10
- url: 'activation/status'
11
- });
12
- }
1
+ import request from '../../tools/request';
2
+ /**
3
+ * GET /activation/status
4
+ * Status
5
+ * @param base
6
+ */
7
+ export function fetchActivationStatus(base) {
8
+ return request({
9
+ base,
10
+ url: 'activation/status'
11
+ });
12
+ }
13
13
  //# 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,111 +1,111 @@
1
- import request, { parseResponse } from '../../tools/request';
2
- import query from '../../tools/query';
3
- export function fetchDataKey(base, address, key, options = Object.create(null)) {
4
- return request({
5
- base,
6
- url: `/addresses/data/${address}/${encodeURIComponent(key)}`,
7
- options
8
- });
9
- }
10
- export function fetchScriptInfo(base, address, options = Object.create(null)) {
11
- return request({
12
- base,
13
- url: `/addresses/scriptInfo/${address}`,
14
- options
15
- });
16
- }
17
- export function fetchScriptInfoMeta(base, address) {
18
- return request({
19
- base,
20
- url: `/addresses/scriptInfo/${address}/meta`
21
- });
22
- }
23
- export function fetchBalanceDetails(base, address, options = Object.create(null)) {
24
- return request({
25
- base,
26
- url: `/addresses/balance/details/${address}`,
27
- options
28
- });
29
- }
30
- export function fetchBalanceConfirmations(base, address, confirmations, options = Object.create(null)) {
31
- return request({
32
- base,
33
- url: `/addresses/balance/${address}/${confirmations}`,
34
- options
35
- });
36
- }
37
- export function data(base, address, params = Object.create(null), options = Object.create(null)) {
38
- return request({
39
- base,
40
- url: `/addresses/data/${address}${query(params)}`,
41
- options
42
- });
43
- }
44
- export function fetchValidate(base, address) {
45
- return request({
46
- base,
47
- url: `/addresses/validate/${address}`
48
- });
49
- }
50
- export function fetchBalance(base, address, options = Object.create(null)) {
51
- return request({
52
- base,
53
- url: `/addresses/balance/${address}`,
54
- options
55
- });
56
- }
57
- export function fetchMultipleBalance(base, addresses, options = Object.create(null)) {
58
- return fetch(`${base}/addresses/balance`, {
59
- method: "POST",
60
- body: JSON.stringify({ addresses }),
61
- headers: {
62
- "Content-Type": "application/json"
63
- }
64
- }).then(parseResponse);
65
- }
66
- export function deleteAddressFromWallet(base, address, options = Object.create(null)) {
67
- return request({
68
- base,
69
- url: `/addresses/${address}`,
70
- options: Object.assign(Object.assign({}, options), { method: 'DELETE' })
71
- });
72
- }
73
- export function fetchEffectiveBalanceConfirmations(base, address, confirmations, options = Object.create(null)) {
74
- return request({
75
- base,
76
- url: `/addresses/effectiveBalance/${address}/${confirmations}`,
77
- options
78
- });
79
- }
80
- export function fetchEffectiveBalance(base, address, options = Object.create(null)) {
81
- return request({
82
- base,
83
- url: `/addresses/effectiveBalance/${address}`,
84
- options
85
- });
86
- }
87
- export function fetchSeq(base, from, to) {
88
- return request({
89
- base,
90
- url: `/addresses/seq/${from}/${to}`
91
- });
92
- }
93
- export function fetchSeed(base, address) {
94
- return request({
95
- base,
96
- url: `/addresses/seed/${address}`
97
- });
98
- }
99
- export function fetchPublicKey(base, publicKey) {
100
- return request({
101
- base,
102
- url: `/addresses/publicKey/${publicKey}`
103
- });
104
- }
105
- export function fetchAddresses(base) {
106
- return request({
107
- base,
108
- url: '/addresses'
109
- });
110
- }
1
+ import request, { parseResponse } from '../../tools/request';
2
+ import query from '../../tools/query';
3
+ export function fetchDataKey(base, address, key, options = Object.create(null)) {
4
+ return request({
5
+ base,
6
+ url: `/addresses/data/${address}/${encodeURIComponent(key)}`,
7
+ options
8
+ });
9
+ }
10
+ export function fetchScriptInfo(base, address, options = Object.create(null)) {
11
+ return request({
12
+ base,
13
+ url: `/addresses/scriptInfo/${address}`,
14
+ options
15
+ });
16
+ }
17
+ export function fetchScriptInfoMeta(base, address) {
18
+ return request({
19
+ base,
20
+ url: `/addresses/scriptInfo/${address}/meta`
21
+ });
22
+ }
23
+ export function fetchBalanceDetails(base, address, options = Object.create(null)) {
24
+ return request({
25
+ base,
26
+ url: `/addresses/balance/details/${address}`,
27
+ options
28
+ });
29
+ }
30
+ export function fetchBalanceConfirmations(base, address, confirmations, options = Object.create(null)) {
31
+ return request({
32
+ base,
33
+ url: `/addresses/balance/${address}/${confirmations}`,
34
+ options
35
+ });
36
+ }
37
+ export function data(base, address, params = Object.create(null), options = Object.create(null)) {
38
+ return request({
39
+ base,
40
+ url: `/addresses/data/${address}${query(params)}`,
41
+ options
42
+ });
43
+ }
44
+ export function fetchValidate(base, address) {
45
+ return request({
46
+ base,
47
+ url: `/addresses/validate/${address}`
48
+ });
49
+ }
50
+ export function fetchBalance(base, address, options = Object.create(null)) {
51
+ return request({
52
+ base,
53
+ url: `/addresses/balance/${address}`,
54
+ options
55
+ });
56
+ }
57
+ export function fetchMultipleBalance(base, addresses, options = Object.create(null)) {
58
+ return fetch(`${base}/addresses/balance`, {
59
+ method: "POST",
60
+ body: JSON.stringify({ addresses }),
61
+ headers: {
62
+ "Content-Type": "application/json"
63
+ }
64
+ }).then(parseResponse);
65
+ }
66
+ export function deleteAddressFromWallet(base, address, options = Object.create(null)) {
67
+ return request({
68
+ base,
69
+ url: `/addresses/${address}`,
70
+ options: Object.assign(Object.assign({}, options), { method: 'DELETE' })
71
+ });
72
+ }
73
+ export function fetchEffectiveBalanceConfirmations(base, address, confirmations, options = Object.create(null)) {
74
+ return request({
75
+ base,
76
+ url: `/addresses/effectiveBalance/${address}/${confirmations}`,
77
+ options
78
+ });
79
+ }
80
+ export function fetchEffectiveBalance(base, address, options = Object.create(null)) {
81
+ return request({
82
+ base,
83
+ url: `/addresses/effectiveBalance/${address}`,
84
+ options
85
+ });
86
+ }
87
+ export function fetchSeq(base, from, to) {
88
+ return request({
89
+ base,
90
+ url: `/addresses/seq/${from}/${to}`
91
+ });
92
+ }
93
+ export function fetchSeed(base, address) {
94
+ return request({
95
+ base,
96
+ url: `/addresses/seed/${address}`
97
+ });
98
+ }
99
+ export function fetchPublicKey(base, publicKey) {
100
+ return request({
101
+ base,
102
+ url: `/addresses/publicKey/${publicKey}`
103
+ });
104
+ }
105
+ export function fetchAddresses(base) {
106
+ return request({
107
+ base,
108
+ url: '/addresses'
109
+ });
110
+ }
111
111
  //# 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>;
@@ -1,14 +1,14 @@
1
- import request from '../../tools/request';
2
- export function fetchByAlias(base, alias) {
3
- return request({
4
- base,
5
- url: `/alias/by-alias/${alias}`
6
- });
7
- }
8
- export function fetchByAddress(base, address) {
9
- return request({
10
- base,
11
- url: `/alias/by-address/${address}`
12
- });
13
- }
1
+ import request from '../../tools/request';
2
+ export function fetchByAlias(base, alias) {
3
+ return request({
4
+ base,
5
+ url: `/alias/by-alias/${alias}`
6
+ });
7
+ }
8
+ export function fetchByAddress(base, address) {
9
+ return request({
10
+ base,
11
+ url: `/alias/by-address/${address}`
12
+ });
13
+ }
14
14
  //# sourceMappingURL=index.js.map
@@ -1,79 +1,79 @@
1
- import { TLong } from '../../interface';
2
- import { AssetDecimals, IssueTransaction, SignedTransaction, WithApiMixin } from '@waves/ts-types';
3
- /**
4
- * GET /assets/details/{assetId}
5
- * Information about an asset
6
- */
7
- export declare function fetchDetails(base: string, assetId: string, options?: RequestInit): Promise<TAssetDetails>;
8
- export declare function fetchDetails(base: string, assetId: Array<string>, options?: RequestInit): Promise<Array<TAssetDetails>>;
9
- /**
10
- * POST /assets/details
11
- * Provides detailed information about the given assets
12
- */
13
- export declare function fetchAssetsDetails(base: string, assetIds: Array<string>, options?: RequestInit): Promise<Array<TAssetDetails | TErrorResponse>>;
14
- export declare function fetchAssetDistribution(base: string, assetId: string, height: number, limit: number, options?: RequestInit): Promise<IAssetDistribution>;
15
- /**
16
- * TODO
17
- * GET /assets/{assetId}/distribution
18
- * Asset balance distribution
19
- */
20
- export declare function fetchAssetsAddressLimit(base: string, address: string, limit: number, options?: RequestInit): Promise<Array<TAssetDetails>>;
21
- /**
22
- * TODO
23
- * GET assets/nft/${address}/limit/${limit}
24
- * Asset balance distribution
25
- */
26
- interface IFetchAssetsNftParams {
27
- address: string;
28
- limit: number;
29
- after?: string;
30
- }
31
- export declare function fetchAssetsNft(base: string, { address, limit, after }: IFetchAssetsNftParams, options?: RequestInit): Promise<Array<TAssetDetails>>;
32
- export declare function fetchAssetsBalance(base: string, address: string, options?: RequestInit): Promise<TAssetsBalance>;
33
- export declare function fetchBalanceAddressAssetId(base: string, address: string, assetId: string, options?: RequestInit): Promise<IBalanceAddressAssetId>;
34
- export declare function convertEthAssetId(base: string, assetId: string): Promise<string>;
35
- export interface IAssetDistribution {
36
- hasNext: boolean;
37
- lastItem: string | null;
38
- items: Record<string, number>;
39
- }
40
- export interface IBalanceAddressAssetId<LONG = TLong> {
41
- address: string;
42
- assetId: string;
43
- balance: LONG;
44
- }
45
- export declare type TAssetsBalance = {
46
- 'address': string;
47
- 'balances': Array<TAssetBalance>;
48
- };
49
- export declare type TAssetBalance<LONG = TLong> = {
50
- 'assetId': string;
51
- 'balance': LONG;
52
- 'reissuable': true;
53
- 'minSponsoredAssetFee': LONG | null;
54
- 'sponsorBalance': LONG | null;
55
- 'quantity': LONG;
56
- 'issueTransaction': SignedTransaction<IssueTransaction & WithApiMixin> & {
57
- feeAssetId: null;
58
- };
59
- };
60
- export declare type TAssetDetails<LONG = TLong> = {
61
- assetId: string;
62
- issueHeight: number;
63
- issueTimestamp: number;
64
- issuer: string;
65
- issuerPublicKey: string;
66
- name: string;
67
- description: string;
68
- decimals: AssetDecimals;
69
- reissuable: boolean;
70
- quantity: LONG;
71
- scripted: boolean;
72
- minSponsoredAssetFee: LONG | null;
73
- originTransactionId: string;
74
- };
75
- export declare type TErrorResponse = {
76
- error: number;
77
- message: string;
78
- };
79
- export {};
1
+ import { TLong } from '../../interface';
2
+ import { AssetDecimals, IssueTransaction, SignedTransaction, WithApiMixin } from '@waves/ts-types';
3
+ /**
4
+ * GET /assets/details/{assetId}
5
+ * Information about an asset
6
+ */
7
+ export declare function fetchDetails(base: string, assetId: string, options?: RequestInit): Promise<TAssetDetails>;
8
+ export declare function fetchDetails(base: string, assetId: Array<string>, options?: RequestInit): Promise<Array<TAssetDetails>>;
9
+ /**
10
+ * POST /assets/details
11
+ * Provides detailed information about the given assets
12
+ */
13
+ export declare function fetchAssetsDetails(base: string, assetIds: Array<string>, options?: RequestInit): Promise<Array<TAssetDetails | TErrorResponse>>;
14
+ export declare function fetchAssetDistribution(base: string, assetId: string, height: number, limit: number, options?: RequestInit): Promise<IAssetDistribution>;
15
+ /**
16
+ * TODO
17
+ * GET /assets/{assetId}/distribution
18
+ * Asset balance distribution
19
+ */
20
+ export declare function fetchAssetsAddressLimit(base: string, address: string, limit: number, options?: RequestInit): Promise<Array<TAssetDetails>>;
21
+ /**
22
+ * TODO
23
+ * GET assets/nft/${address}/limit/${limit}
24
+ * Asset balance distribution
25
+ */
26
+ interface IFetchAssetsNftParams {
27
+ address: string;
28
+ limit: number;
29
+ after?: string;
30
+ }
31
+ export declare function fetchAssetsNft(base: string, { address, limit, after }: IFetchAssetsNftParams, options?: RequestInit): Promise<Array<TAssetDetails>>;
32
+ export declare function fetchAssetsBalance(base: string, address: string, options?: RequestInit): Promise<TAssetsBalance>;
33
+ export declare function fetchBalanceAddressAssetId(base: string, address: string, assetId: string, options?: RequestInit): Promise<IBalanceAddressAssetId>;
34
+ export declare function convertEthAssetId(base: string, assetId: string): Promise<string>;
35
+ export interface IAssetDistribution {
36
+ hasNext: boolean;
37
+ lastItem: string | null;
38
+ items: Record<string, number>;
39
+ }
40
+ export interface IBalanceAddressAssetId<LONG = TLong> {
41
+ address: string;
42
+ assetId: string;
43
+ balance: LONG;
44
+ }
45
+ export declare type TAssetsBalance = {
46
+ 'address': string;
47
+ 'balances': Array<TAssetBalance>;
48
+ };
49
+ export declare type TAssetBalance<LONG = TLong> = {
50
+ 'assetId': string;
51
+ 'balance': LONG;
52
+ 'reissuable': true;
53
+ 'minSponsoredAssetFee': LONG | null;
54
+ 'sponsorBalance': LONG | null;
55
+ 'quantity': LONG;
56
+ 'issueTransaction': SignedTransaction<IssueTransaction & WithApiMixin> & {
57
+ feeAssetId: null;
58
+ };
59
+ };
60
+ export declare type TAssetDetails<LONG = TLong> = {
61
+ assetId: string;
62
+ issueHeight: number;
63
+ issueTimestamp: number;
64
+ issuer: string;
65
+ issuerPublicKey: string;
66
+ name: string;
67
+ description: string;
68
+ decimals: AssetDecimals;
69
+ reissuable: boolean;
70
+ quantity: LONG;
71
+ scripted: boolean;
72
+ minSponsoredAssetFee: LONG | null;
73
+ originTransactionId: string;
74
+ };
75
+ export declare type TErrorResponse = {
76
+ error: number;
77
+ message: string;
78
+ };
79
+ export {};