algosdk 1.15.0 → 1.18.0
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 +4 -4
- package/dist/browser/algosdk.min.js +1 -1
- package/dist/browser/algosdk.min.js.map +1 -1
- package/dist/cjs/src/abi/contract.js +3 -0
- package/dist/cjs/src/abi/contract.js.map +1 -1
- package/dist/cjs/src/abi/interface.js +3 -0
- package/dist/cjs/src/abi/interface.js.map +1 -1
- package/dist/cjs/src/abi/method.js +16 -1
- package/dist/cjs/src/abi/method.js.map +1 -1
- package/dist/cjs/src/client/kmd.js +1 -1
- package/dist/cjs/src/client/kmd.js.map +1 -1
- package/dist/cjs/src/client/v2/algod/models/types.js +32 -5
- package/dist/cjs/src/client/v2/algod/models/types.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/indexer.js +8 -8
- package/dist/cjs/src/client/v2/indexer/lookupAccountAppLocalStates.js +29 -4
- package/dist/cjs/src/client/v2/indexer/lookupAccountAppLocalStates.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/lookupAccountAssets.js +29 -3
- package/dist/cjs/src/client/v2/indexer/lookupAccountAssets.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/lookupAccountByID.js +76 -3
- package/dist/cjs/src/client/v2/indexer/lookupAccountByID.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/lookupAccountCreatedApplications.js +30 -4
- package/dist/cjs/src/client/v2/indexer/lookupAccountCreatedApplications.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/lookupAccountCreatedAssets.js +30 -3
- package/dist/cjs/src/client/v2/indexer/lookupAccountCreatedAssets.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/lookupAccountTransactions.js +30 -25
- package/dist/cjs/src/client/v2/indexer/lookupAccountTransactions.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/lookupApplicationLogs.js +112 -6
- package/dist/cjs/src/client/v2/indexer/lookupApplicationLogs.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/lookupApplications.js +40 -1
- package/dist/cjs/src/client/v2/indexer/lookupApplications.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/lookupAssetBalances.js +29 -6
- package/dist/cjs/src/client/v2/indexer/lookupAssetBalances.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/lookupAssetByID.js +2 -0
- package/dist/cjs/src/client/v2/indexer/lookupAssetByID.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/lookupAssetTransactions.js +298 -18
- package/dist/cjs/src/client/v2/indexer/lookupAssetTransactions.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/lookupBlock.js +16 -0
- package/dist/cjs/src/client/v2/indexer/lookupBlock.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/lookupTransactionByID.js +16 -0
- package/dist/cjs/src/client/v2/indexer/lookupTransactionByID.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/makeHealthCheck.js +15 -0
- package/dist/cjs/src/client/v2/indexer/makeHealthCheck.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/searchAccounts.js +210 -10
- package/dist/cjs/src/client/v2/indexer/searchAccounts.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/searchForApplications.js +101 -5
- package/dist/cjs/src/client/v2/indexer/searchForApplications.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/searchForAssets.js +132 -7
- package/dist/cjs/src/client/v2/indexer/searchForAssets.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/searchForTransactions.js +328 -19
- package/dist/cjs/src/client/v2/indexer/searchForTransactions.js.map +1 -1
- package/dist/cjs/src/composer.js +1 -0
- package/dist/cjs/src/composer.js.map +1 -1
- package/dist/cjs/src/dryrun.js +199 -2
- package/dist/cjs/src/dryrun.js.map +1 -1
- package/dist/esm/src/abi/contract.js +4 -1
- package/dist/esm/src/abi/contract.js.map +1 -1
- package/dist/esm/src/abi/interface.js +4 -1
- package/dist/esm/src/abi/interface.js.map +1 -1
- package/dist/esm/src/abi/method.js +14 -0
- package/dist/esm/src/abi/method.js.map +1 -1
- package/dist/esm/src/client/kmd.js +1 -1
- package/dist/esm/src/client/kmd.js.map +1 -1
- package/dist/esm/src/client/v2/algod/models/types.js +30 -4
- package/dist/esm/src/client/v2/algod/models/types.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/indexer.js +8 -8
- package/dist/esm/src/client/v2/indexer/lookupAccountAppLocalStates.js +29 -4
- package/dist/esm/src/client/v2/indexer/lookupAccountAppLocalStates.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/lookupAccountAssets.js +29 -3
- package/dist/esm/src/client/v2/indexer/lookupAccountAssets.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/lookupAccountByID.js +76 -3
- package/dist/esm/src/client/v2/indexer/lookupAccountByID.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/lookupAccountCreatedApplications.js +30 -4
- package/dist/esm/src/client/v2/indexer/lookupAccountCreatedApplications.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/lookupAccountCreatedAssets.js +30 -3
- package/dist/esm/src/client/v2/indexer/lookupAccountCreatedAssets.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/lookupAccountTransactions.js +30 -25
- package/dist/esm/src/client/v2/indexer/lookupAccountTransactions.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/lookupApplicationLogs.js +112 -6
- package/dist/esm/src/client/v2/indexer/lookupApplicationLogs.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/lookupApplications.js +40 -1
- package/dist/esm/src/client/v2/indexer/lookupApplications.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/lookupAssetBalances.js +29 -6
- package/dist/esm/src/client/v2/indexer/lookupAssetBalances.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/lookupAssetByID.js +2 -0
- package/dist/esm/src/client/v2/indexer/lookupAssetByID.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/lookupAssetTransactions.js +298 -18
- package/dist/esm/src/client/v2/indexer/lookupAssetTransactions.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/lookupBlock.js +16 -0
- package/dist/esm/src/client/v2/indexer/lookupBlock.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/lookupTransactionByID.js +16 -0
- package/dist/esm/src/client/v2/indexer/lookupTransactionByID.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/makeHealthCheck.js +15 -0
- package/dist/esm/src/client/v2/indexer/makeHealthCheck.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/searchAccounts.js +210 -10
- package/dist/esm/src/client/v2/indexer/searchAccounts.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/searchForApplications.js +101 -5
- package/dist/esm/src/client/v2/indexer/searchForApplications.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/searchForAssets.js +132 -7
- package/dist/esm/src/client/v2/indexer/searchForAssets.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/searchForTransactions.js +328 -19
- package/dist/esm/src/client/v2/indexer/searchForTransactions.js.map +1 -1
- package/dist/esm/src/composer.js +1 -0
- package/dist/esm/src/composer.js.map +1 -1
- package/dist/esm/src/dryrun.js +197 -1
- package/dist/esm/src/dryrun.js.map +1 -1
- package/dist/types/src/abi/contract.d.ts +1 -0
- package/dist/types/src/abi/interface.d.ts +1 -0
- package/dist/types/src/abi/method.d.ts +1 -0
- package/dist/types/src/client/kmd.d.ts +4 -4
- package/dist/types/src/client/v2/algod/models/types.d.ts +39 -6
- package/dist/types/src/client/v2/indexer/indexer.d.ts +8 -8
- package/dist/types/src/client/v2/indexer/lookupAccountAppLocalStates.d.ts +29 -4
- package/dist/types/src/client/v2/indexer/lookupAccountAssets.d.ts +29 -3
- package/dist/types/src/client/v2/indexer/lookupAccountByID.d.ts +76 -0
- package/dist/types/src/client/v2/indexer/lookupAccountCreatedApplications.d.ts +30 -4
- package/dist/types/src/client/v2/indexer/lookupAccountCreatedAssets.d.ts +30 -3
- package/dist/types/src/client/v2/indexer/lookupAccountTransactions.d.ts +30 -25
- package/dist/types/src/client/v2/indexer/lookupApplicationLogs.d.ts +112 -6
- package/dist/types/src/client/v2/indexer/lookupApplications.d.ts +40 -0
- package/dist/types/src/client/v2/indexer/lookupAssetBalances.d.ts +29 -6
- package/dist/types/src/client/v2/indexer/lookupAssetByID.d.ts +2 -0
- package/dist/types/src/client/v2/indexer/lookupAssetTransactions.d.ts +298 -1
- package/dist/types/src/client/v2/indexer/lookupBlock.d.ts +16 -0
- package/dist/types/src/client/v2/indexer/lookupTransactionByID.d.ts +16 -0
- package/dist/types/src/client/v2/indexer/makeHealthCheck.d.ts +15 -0
- package/dist/types/src/client/v2/indexer/searchAccounts.d.ts +210 -0
- package/dist/types/src/client/v2/indexer/searchForApplications.d.ts +101 -0
- package/dist/types/src/client/v2/indexer/searchForAssets.d.ts +132 -0
- package/dist/types/src/client/v2/indexer/searchForTransactions.d.ts +328 -1
- package/dist/types/src/composer.d.ts +4 -0
- package/dist/types/src/dryrun.d.ts +81 -1
- package/package.json +6 -5
|
@@ -25,6 +25,7 @@ export default class LookupAssetByID extends JSONRequest {
|
|
|
25
25
|
*
|
|
26
26
|
* #### Example 1
|
|
27
27
|
* ```typescript
|
|
28
|
+
* const assetId = 163650;
|
|
28
29
|
* const assetInfo = await indexerClient
|
|
29
30
|
* .lookupAssetByID(assetId)
|
|
30
31
|
* .includeAll(false)
|
|
@@ -33,6 +34,7 @@ export default class LookupAssetByID extends JSONRequest {
|
|
|
33
34
|
*
|
|
34
35
|
* #### Example 2
|
|
35
36
|
* ```typescript
|
|
37
|
+
* const assetId = 163650;
|
|
36
38
|
* const assetInfo = await indexerClient
|
|
37
39
|
* .lookupAssetByID(assetId)
|
|
38
40
|
* .includeAll()
|
|
@@ -3,28 +3,325 @@ import HTTPClient from '../../client';
|
|
|
3
3
|
import IntDecoding from '../../../types/intDecoding';
|
|
4
4
|
export default class LookupAssetTransactions extends JSONRequest {
|
|
5
5
|
private index;
|
|
6
|
+
/**
|
|
7
|
+
* Returns transactions relating to the given asset.
|
|
8
|
+
*
|
|
9
|
+
* #### Example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* const assetId = 163650;
|
|
12
|
+
* const assetTxns = await indexerClient.lookupAssetTransactions(assetId).do();
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2assetsasset-idtransactions)
|
|
16
|
+
* @param index - The asset ID to look up.
|
|
17
|
+
*/
|
|
6
18
|
constructor(c: HTTPClient, intDecoding: IntDecoding, index: number);
|
|
19
|
+
/**
|
|
20
|
+
* @returns `/v2/assets/${index}/transactions`
|
|
21
|
+
*/
|
|
7
22
|
path(): string;
|
|
8
23
|
/**
|
|
9
|
-
*
|
|
24
|
+
* Specifies a prefix which must be contained in the note field.
|
|
25
|
+
*
|
|
26
|
+
* #### Example
|
|
27
|
+
* ```typescript
|
|
28
|
+
* const notePrefixBase64Encoded = "Y3JlYXRl";
|
|
29
|
+
* const assetId = 163650;
|
|
30
|
+
* const assetTxns = await indexerClient
|
|
31
|
+
* .lookupAssetTransactions(assetId)
|
|
32
|
+
* .notePrefix(notePrefixBase64Encoded)
|
|
33
|
+
* .do();
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
10
36
|
* @param prefix - base64 string or uint8array
|
|
37
|
+
* @category query
|
|
11
38
|
*/
|
|
12
39
|
notePrefix(prefix: Uint8Array | string): this;
|
|
40
|
+
/**
|
|
41
|
+
* Type of transaction to filter with.
|
|
42
|
+
*
|
|
43
|
+
* #### Example
|
|
44
|
+
* ```typescript
|
|
45
|
+
* const assetId = 163650;
|
|
46
|
+
* const assetTxns = await indexerClient
|
|
47
|
+
* .lookupAssetTransactions(assetId)
|
|
48
|
+
* .txType("axfer")
|
|
49
|
+
* .do();
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* @param type - one of `pay`, `keyreg`, `acfg`, `axfer`, `afrz`, `appl`
|
|
53
|
+
* @category query
|
|
54
|
+
*/
|
|
13
55
|
txType(type: string): this;
|
|
56
|
+
/**
|
|
57
|
+
* Type of signature to filter with.
|
|
58
|
+
* - sig: Standard
|
|
59
|
+
* - msig: MultiSig
|
|
60
|
+
* - lsig: LogicSig
|
|
61
|
+
*
|
|
62
|
+
* #### Example
|
|
63
|
+
* ```typescript
|
|
64
|
+
* const assetId = 163650;
|
|
65
|
+
* const assetTxns = await indexerClient
|
|
66
|
+
* .lookupAssetTransactions(assetId)
|
|
67
|
+
* .sigType("lsig")
|
|
68
|
+
* .do();
|
|
69
|
+
* ```
|
|
70
|
+
*
|
|
71
|
+
* @param type - one of `sig`, `msig`, `lsig`
|
|
72
|
+
* @category query
|
|
73
|
+
*/
|
|
14
74
|
sigType(type: string): this;
|
|
75
|
+
/**
|
|
76
|
+
* Lookup the specific transaction by ID.
|
|
77
|
+
*
|
|
78
|
+
* #### Example
|
|
79
|
+
* ```typescript
|
|
80
|
+
* const txId = "MEUOC4RQJB23CQZRFRKYEI6WBO73VTTPST5A7B3S5OKBUY6LFUDA";
|
|
81
|
+
* const assetId = 163650;
|
|
82
|
+
* const assetTxns = await indexerClient
|
|
83
|
+
* .lookupAssetTransactions(assetId)
|
|
84
|
+
* .txid(txId)
|
|
85
|
+
* .do();
|
|
86
|
+
* ```
|
|
87
|
+
*
|
|
88
|
+
* @param txid
|
|
89
|
+
* @category query
|
|
90
|
+
*/
|
|
15
91
|
txid(txid: string): this;
|
|
92
|
+
/**
|
|
93
|
+
* Include results for the specified round.
|
|
94
|
+
*
|
|
95
|
+
* #### Example
|
|
96
|
+
* ```typescript
|
|
97
|
+
* const targetBlock = 18309917;
|
|
98
|
+
* const assetId = 163650;
|
|
99
|
+
* const assetTxns = await indexerClient
|
|
100
|
+
* .lookupAssetTransactions(assetId)
|
|
101
|
+
* .round(targetBlock)
|
|
102
|
+
* .do();
|
|
103
|
+
* ```
|
|
104
|
+
*
|
|
105
|
+
* @param round
|
|
106
|
+
* @category query
|
|
107
|
+
*/
|
|
16
108
|
round(round: number): this;
|
|
109
|
+
/**
|
|
110
|
+
* Include results at or after the specified min-round.
|
|
111
|
+
*
|
|
112
|
+
* #### Example
|
|
113
|
+
* ```typescript
|
|
114
|
+
* const minRound = 18309917;
|
|
115
|
+
* const assetId = 163650;
|
|
116
|
+
* const assetTxns = await indexerClient
|
|
117
|
+
* .lookupAssetTransactions(assetId)
|
|
118
|
+
* .minRound(minRound)
|
|
119
|
+
* .do();
|
|
120
|
+
* ```
|
|
121
|
+
*
|
|
122
|
+
* @param round
|
|
123
|
+
* @category query
|
|
124
|
+
*/
|
|
17
125
|
minRound(round: number): this;
|
|
126
|
+
/**
|
|
127
|
+
* Include results at or before the specified max-round.
|
|
128
|
+
*
|
|
129
|
+
* #### Example
|
|
130
|
+
* ```typescript
|
|
131
|
+
* const maxRound = 18309917;
|
|
132
|
+
* const assetId = 163650;
|
|
133
|
+
* const assetTxns = await indexerClient
|
|
134
|
+
* .lookupAssetTransactions(assetId)
|
|
135
|
+
* .maxRound(maxRound)
|
|
136
|
+
* .do();
|
|
137
|
+
* ```
|
|
138
|
+
*
|
|
139
|
+
* @param round
|
|
140
|
+
* @category query
|
|
141
|
+
*/
|
|
18
142
|
maxRound(round: number): this;
|
|
143
|
+
/**
|
|
144
|
+
* @deprecated Redundant query parameter. Asset ID is already passed into the method.
|
|
145
|
+
*/
|
|
19
146
|
assetID(id: number): this;
|
|
147
|
+
/**
|
|
148
|
+
* Maximum number of results to return.
|
|
149
|
+
*
|
|
150
|
+
* #### Example
|
|
151
|
+
* ```typescript
|
|
152
|
+
* const maxResults = 25;
|
|
153
|
+
* const assetId = 163650;
|
|
154
|
+
* const assetTxns = await indexerClient
|
|
155
|
+
* .lookupAssetTransactions(assetId)
|
|
156
|
+
* .limit(maxResults)
|
|
157
|
+
* .do();
|
|
158
|
+
* ```
|
|
159
|
+
*
|
|
160
|
+
* @param limit
|
|
161
|
+
* @category query
|
|
162
|
+
*/
|
|
20
163
|
limit(limit: number): this;
|
|
164
|
+
/**
|
|
165
|
+
* Include results before the given time.
|
|
166
|
+
*
|
|
167
|
+
* #### Example
|
|
168
|
+
* ```typescript
|
|
169
|
+
* const beforeTime = "2022-02-02T20:20:22.02Z";
|
|
170
|
+
* const assetId = 163650;
|
|
171
|
+
* const assetTxns = await indexerClient
|
|
172
|
+
* .lookupAssetTransactions(assetId)
|
|
173
|
+
* .beforeTime(beforeTime)
|
|
174
|
+
* .do();
|
|
175
|
+
* ```
|
|
176
|
+
*
|
|
177
|
+
* @param before - rfc3339 string
|
|
178
|
+
* @category query
|
|
179
|
+
*/
|
|
21
180
|
beforeTime(before: string): this;
|
|
181
|
+
/**
|
|
182
|
+
* Include results after the given time.
|
|
183
|
+
*
|
|
184
|
+
* #### Example
|
|
185
|
+
* ```typescript
|
|
186
|
+
* const afterTime = "2022-10-21T00:00:11.55Z";
|
|
187
|
+
* const assetId = 163650;
|
|
188
|
+
* const assetTxns = await indexerClient
|
|
189
|
+
* .lookupAssetTransactions(assetId)
|
|
190
|
+
* .afterTime(afterTime)
|
|
191
|
+
* .do();
|
|
192
|
+
* ```
|
|
193
|
+
*
|
|
194
|
+
* @param after - rfc3339 string
|
|
195
|
+
* @category query
|
|
196
|
+
*/
|
|
22
197
|
afterTime(after: string): this;
|
|
198
|
+
/**
|
|
199
|
+
* Filtered results should have an amount greater than this value, as int, representing asset units.
|
|
200
|
+
*
|
|
201
|
+
* #### Example
|
|
202
|
+
* ```typescript
|
|
203
|
+
* const minBalance = 300000;
|
|
204
|
+
* const assetId = 163650;
|
|
205
|
+
* const assetTxns = await indexerClient
|
|
206
|
+
* .lookupAssetTransactions(assetId)
|
|
207
|
+
* .currencyGreaterThan(minBalance - 1)
|
|
208
|
+
* .do();
|
|
209
|
+
* ```
|
|
210
|
+
*
|
|
211
|
+
* @remarks
|
|
212
|
+
* If you are looking for transactions with the currency amount greater than 0, simply construct the query without `currencyGreaterThan` because it doesn't accept `-1`, and passing the `0` `currency-greater-than` value would exclude transactions with a 0 amount.
|
|
213
|
+
*
|
|
214
|
+
* @param greater
|
|
215
|
+
* @category query
|
|
216
|
+
*/
|
|
23
217
|
currencyGreaterThan(greater: number): this;
|
|
218
|
+
/**
|
|
219
|
+
* Filtered results should have an amount less than this value, as int, representing asset units.
|
|
220
|
+
*
|
|
221
|
+
* #### Example
|
|
222
|
+
* ```typescript
|
|
223
|
+
* const maxBalance = 500000;
|
|
224
|
+
* const assetId = 163650;
|
|
225
|
+
* const assetTxns = await indexerClient
|
|
226
|
+
* .lookupAssetTransactions(assetId)
|
|
227
|
+
* .currencyLessThan(maxBalance + 1)
|
|
228
|
+
* .do();
|
|
229
|
+
* ```
|
|
230
|
+
*
|
|
231
|
+
* @param lesser
|
|
232
|
+
* @category query
|
|
233
|
+
*/
|
|
24
234
|
currencyLessThan(lesser: number): this;
|
|
235
|
+
/**
|
|
236
|
+
* Combined with address, defines what address to filter on, as string.
|
|
237
|
+
*
|
|
238
|
+
* #### Example
|
|
239
|
+
* ```typescript
|
|
240
|
+
* const assetId = 163650;
|
|
241
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
242
|
+
* const role = "sender";
|
|
243
|
+
* const assetTxns = await indexerClient
|
|
244
|
+
* .lookupAssetTransactions(assetId)
|
|
245
|
+
* .address(address)
|
|
246
|
+
* .addressRole(role)
|
|
247
|
+
* .do();
|
|
248
|
+
* ```
|
|
249
|
+
*
|
|
250
|
+
* @param role - one of `sender`, `receiver`, `freeze-target`
|
|
251
|
+
* @category query
|
|
252
|
+
*/
|
|
25
253
|
addressRole(role: string): this;
|
|
254
|
+
/**
|
|
255
|
+
* Only include transactions with this address in one of the transaction fields.
|
|
256
|
+
*
|
|
257
|
+
* #### Example
|
|
258
|
+
* ```typescript
|
|
259
|
+
* const assetId = 163650;
|
|
260
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
261
|
+
* const assetTxns = await indexerClient
|
|
262
|
+
* .lookupAssetTransactions(assetId)
|
|
263
|
+
* .address(address)
|
|
264
|
+
* .do();
|
|
265
|
+
* ```
|
|
266
|
+
*
|
|
267
|
+
* @param address
|
|
268
|
+
* @category query
|
|
269
|
+
*/
|
|
26
270
|
address(address: string): this;
|
|
271
|
+
/**
|
|
272
|
+
* Whether or not to consider the `close-to` field as a receiver when filtering transactions, as bool. Set to `true` to ignore `close-to`.
|
|
273
|
+
*
|
|
274
|
+
* #### Example
|
|
275
|
+
* ```typescript
|
|
276
|
+
* const assetId = 163650;
|
|
277
|
+
* const assetTxns = await indexerClient
|
|
278
|
+
* .lookupAssetTransactions(assetId)
|
|
279
|
+
* .excludeCloseTo(true)
|
|
280
|
+
* .do();
|
|
281
|
+
* ```
|
|
282
|
+
*
|
|
283
|
+
* @param exclude
|
|
284
|
+
* @category query
|
|
285
|
+
*/
|
|
27
286
|
excludeCloseTo(exclude: boolean): this;
|
|
287
|
+
/**
|
|
288
|
+
* The next page of results.
|
|
289
|
+
*
|
|
290
|
+
* #### Example
|
|
291
|
+
* ```typescript
|
|
292
|
+
* const maxResults = 25;
|
|
293
|
+
* const assetId = 163650;
|
|
294
|
+
*
|
|
295
|
+
* const assetTxnsPage1 = await indexerClient
|
|
296
|
+
* .lookupAssetTransactions(assetId)
|
|
297
|
+
* .limit(maxResults)
|
|
298
|
+
* .do();
|
|
299
|
+
*
|
|
300
|
+
* const assetTxnsPage2 = await indexerClient
|
|
301
|
+
* .lookupAssetTransactions(assetId)
|
|
302
|
+
* .limit(maxResults)
|
|
303
|
+
* .nextToken(assetTxnsPage1["next-token"])
|
|
304
|
+
* .do();
|
|
305
|
+
* ```
|
|
306
|
+
*
|
|
307
|
+
* @param nextToken - provided by the previous results.
|
|
308
|
+
* @category query
|
|
309
|
+
*/
|
|
28
310
|
nextToken(nextToken: string): this;
|
|
311
|
+
/**
|
|
312
|
+
* Whether or not to include rekeying transactions.
|
|
313
|
+
*
|
|
314
|
+
* #### Example
|
|
315
|
+
* ```typescript
|
|
316
|
+
* const assetId = 163650;
|
|
317
|
+
* const assetTxns = await indexerClient
|
|
318
|
+
* .lookupAssetTransactions(assetId)
|
|
319
|
+
* .rekeyTo(false)
|
|
320
|
+
* .do();
|
|
321
|
+
* ```
|
|
322
|
+
*
|
|
323
|
+
* @param rekeyTo
|
|
324
|
+
* @category query
|
|
325
|
+
*/
|
|
29
326
|
rekeyTo(rekeyTo: boolean): this;
|
|
30
327
|
}
|
|
@@ -3,6 +3,22 @@ import HTTPClient from '../../client';
|
|
|
3
3
|
import IntDecoding from '../../../types/intDecoding';
|
|
4
4
|
export default class LookupBlock extends JSONRequest {
|
|
5
5
|
private round;
|
|
6
|
+
/**
|
|
7
|
+
* Returns the block for the passed round.
|
|
8
|
+
*
|
|
9
|
+
* #### Example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* const targetBlock = 18309917;
|
|
12
|
+
* const blockInfo = await indexerClient.lookupBlock(targetBlock).do();
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2blocksround-number)
|
|
16
|
+
* @param round - The number of the round to look up.
|
|
17
|
+
* @category GET
|
|
18
|
+
*/
|
|
6
19
|
constructor(c: HTTPClient, intDecoding: IntDecoding, round: number);
|
|
20
|
+
/**
|
|
21
|
+
* @returns `/v2/blocks/${round}`
|
|
22
|
+
*/
|
|
7
23
|
path(): string;
|
|
8
24
|
}
|
|
@@ -3,6 +3,22 @@ import HTTPClient from '../../client';
|
|
|
3
3
|
import IntDecoding from '../../../types/intDecoding';
|
|
4
4
|
export default class LookupTransactionByID extends JSONRequest {
|
|
5
5
|
private txID;
|
|
6
|
+
/**
|
|
7
|
+
* Returns information about the given transaction.
|
|
8
|
+
*
|
|
9
|
+
* #### Example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* const txnId = "MEUOC4RQJB23CQZRFRKYEI6WBO73VTTPST5A7B3S5OKBUY6LFUDA";
|
|
12
|
+
* const txnInfo = await indexerClient.lookupTransactionByID(txnId).do();
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2transactionstxid)
|
|
16
|
+
* @param txID - The ID of the transaction to look up.
|
|
17
|
+
* @category GET
|
|
18
|
+
*/
|
|
6
19
|
constructor(c: HTTPClient, intDecoding: IntDecoding, txID: string);
|
|
20
|
+
/**
|
|
21
|
+
* @returns `/v2/transactions/${txID}`
|
|
22
|
+
*/
|
|
7
23
|
path(): string;
|
|
8
24
|
}
|
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
import JSONRequest from '../jsonrequest';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the health object for the service.
|
|
4
|
+
* Returns 200 if healthy.
|
|
5
|
+
*
|
|
6
|
+
* #### Example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* const health = await indexerClient.makeHealthCheck().do();
|
|
9
|
+
* ```
|
|
10
|
+
*
|
|
11
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-health)
|
|
12
|
+
* @category GET
|
|
13
|
+
*/
|
|
2
14
|
export default class MakeHealthCheck extends JSONRequest {
|
|
15
|
+
/**
|
|
16
|
+
* @returns `/health`
|
|
17
|
+
*/
|
|
3
18
|
path(): string;
|
|
4
19
|
}
|
|
@@ -1,14 +1,224 @@
|
|
|
1
1
|
import JSONRequest from '../jsonrequest';
|
|
2
|
+
/**
|
|
3
|
+
* Returns information about indexed accounts.
|
|
4
|
+
*
|
|
5
|
+
* #### Example
|
|
6
|
+
* ```typescript
|
|
7
|
+
* const accounts = await indexerClient.searchAccounts().do();
|
|
8
|
+
* ```
|
|
9
|
+
*
|
|
10
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accounts)
|
|
11
|
+
* @category GET
|
|
12
|
+
*/
|
|
2
13
|
export default class SearchAccounts extends JSONRequest {
|
|
14
|
+
/**
|
|
15
|
+
* @returns `/v2/accounts`
|
|
16
|
+
*/
|
|
3
17
|
path(): string;
|
|
18
|
+
/**
|
|
19
|
+
* Filtered results should have an amount greater than this value, as int, representing microAlgos, unless an asset-id is provided, in which case units are in the asset's units.
|
|
20
|
+
*
|
|
21
|
+
* #### Example 1
|
|
22
|
+
* ```typescript
|
|
23
|
+
* const minBalance = 300000;
|
|
24
|
+
* const accounts = await indexerClient
|
|
25
|
+
* .searchAccounts()
|
|
26
|
+
* .currencyGreaterThan(minBalance - 1)
|
|
27
|
+
* .do();
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* #### Example 2
|
|
31
|
+
* ```typescript
|
|
32
|
+
* const assetID = 163650;
|
|
33
|
+
* const minBalance = 300000;
|
|
34
|
+
* const accounts = await indexerClient
|
|
35
|
+
* .searchAccounts()
|
|
36
|
+
* .assetID(assetID)
|
|
37
|
+
* .currencyGreaterThan(minBalance - 1)
|
|
38
|
+
* .do();
|
|
39
|
+
* ```
|
|
40
|
+
* @remarks
|
|
41
|
+
* If you are looking for accounts with the currency amount greater than 0, simply construct the query without `currencyGreaterThan` because it doesn't accept `-1`, and passing the `0` `currency-greater-than` value would exclude transactions with a 0 amount.
|
|
42
|
+
*
|
|
43
|
+
* @param greater
|
|
44
|
+
* @category query
|
|
45
|
+
*/
|
|
4
46
|
currencyGreaterThan(greater: number): this;
|
|
47
|
+
/**
|
|
48
|
+
* Filtered results should have an amount less than this value, as int, representing microAlgos, unless an asset-id is provided, in which case units are in the asset's units.
|
|
49
|
+
*
|
|
50
|
+
* #### Example 1
|
|
51
|
+
* ```typescript
|
|
52
|
+
* const maxBalance = 500000;
|
|
53
|
+
* const accounts = await indexerClient
|
|
54
|
+
* .searchAccounts()
|
|
55
|
+
* .currencyLessThan(maxBalance + 1)
|
|
56
|
+
* .do();
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* #### Example 2
|
|
60
|
+
* ```typescript
|
|
61
|
+
* const assetID = 163650;
|
|
62
|
+
* const maxBalance = 500000;
|
|
63
|
+
* const accounts = await indexerClient
|
|
64
|
+
* .searchAccounts()
|
|
65
|
+
* .assetID(assetID)
|
|
66
|
+
* .currencyLessThan(maxBalance + 1)
|
|
67
|
+
* .do();
|
|
68
|
+
* ```
|
|
69
|
+
*
|
|
70
|
+
* @param lesser
|
|
71
|
+
* @category query
|
|
72
|
+
*/
|
|
5
73
|
currencyLessThan(lesser: number): this;
|
|
74
|
+
/**
|
|
75
|
+
* Maximum number of results to return.
|
|
76
|
+
*
|
|
77
|
+
* #### Example
|
|
78
|
+
* ```typescript
|
|
79
|
+
* const maxResults = 25;
|
|
80
|
+
* const accounts = await indexerClient
|
|
81
|
+
* .searchAccounts()
|
|
82
|
+
* .limit(maxResults)
|
|
83
|
+
* .do();
|
|
84
|
+
* ```
|
|
85
|
+
*
|
|
86
|
+
* @param limit
|
|
87
|
+
* @category query
|
|
88
|
+
*/
|
|
6
89
|
limit(limit: number): this;
|
|
90
|
+
/**
|
|
91
|
+
* Asset ID to filter with.
|
|
92
|
+
*
|
|
93
|
+
* #### Example
|
|
94
|
+
* ```typescript
|
|
95
|
+
* const assetID = 163650;
|
|
96
|
+
* const accounts = await indexerClient
|
|
97
|
+
* .searchAccounts()
|
|
98
|
+
* .assetID(assetID)
|
|
99
|
+
* .do();
|
|
100
|
+
* ```
|
|
101
|
+
*
|
|
102
|
+
* @param id
|
|
103
|
+
* @category query
|
|
104
|
+
*/
|
|
7
105
|
assetID(id: number): this;
|
|
106
|
+
/**
|
|
107
|
+
* The next page of results.
|
|
108
|
+
*
|
|
109
|
+
* #### Example
|
|
110
|
+
* ```typescript
|
|
111
|
+
* const maxResults = 25;
|
|
112
|
+
*
|
|
113
|
+
* const accountsPage1 = await indexerClient
|
|
114
|
+
* .searchAccounts()
|
|
115
|
+
* .limit(maxResults)
|
|
116
|
+
* .do();
|
|
117
|
+
*
|
|
118
|
+
* const accountsPage2 = await indexerClient
|
|
119
|
+
* .searchAccounts()
|
|
120
|
+
* .limit(maxResults)
|
|
121
|
+
* .nextToken(accountsPage1["next-token"])
|
|
122
|
+
* .do();
|
|
123
|
+
* ```
|
|
124
|
+
*
|
|
125
|
+
* @param nextToken - provided by the previous results
|
|
126
|
+
* @category query
|
|
127
|
+
*/
|
|
8
128
|
nextToken(nextToken: string): this;
|
|
129
|
+
/**
|
|
130
|
+
* Include results for the specified round.
|
|
131
|
+
*
|
|
132
|
+
* #### Example
|
|
133
|
+
* ```typescript
|
|
134
|
+
* const targetBlock = 18309917;
|
|
135
|
+
* const accounts = await indexerClient
|
|
136
|
+
* .searchAccounts()
|
|
137
|
+
* .round(targetBlock)
|
|
138
|
+
* .do();
|
|
139
|
+
* ```
|
|
140
|
+
* @remarks For performance reasons, this parameter may be disabled on some configurations.
|
|
141
|
+
* @param round
|
|
142
|
+
* @category query
|
|
143
|
+
*/
|
|
9
144
|
round(round: number): this;
|
|
145
|
+
/**
|
|
146
|
+
* Include accounts that use this spending key.
|
|
147
|
+
*
|
|
148
|
+
* #### Example
|
|
149
|
+
* ```typescript
|
|
150
|
+
* const authAddr = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
151
|
+
* const accounts = await indexerClient
|
|
152
|
+
* .searchAccounts()
|
|
153
|
+
* .authAddr(authAddr)
|
|
154
|
+
* .do();
|
|
155
|
+
* ```
|
|
156
|
+
*
|
|
157
|
+
* @param authAddr
|
|
158
|
+
*/
|
|
10
159
|
authAddr(authAddr: string): this;
|
|
160
|
+
/**
|
|
161
|
+
* Filter for this application.
|
|
162
|
+
*
|
|
163
|
+
* #### Example
|
|
164
|
+
* ```typescript
|
|
165
|
+
* const appId = 60553466;
|
|
166
|
+
* const accounts = await indexerClient
|
|
167
|
+
* .searchAccounts()
|
|
168
|
+
* .applicationID(appId)
|
|
169
|
+
* .do();
|
|
170
|
+
* ```
|
|
171
|
+
*
|
|
172
|
+
* @param applicationID
|
|
173
|
+
* @category query
|
|
174
|
+
*/
|
|
11
175
|
applicationID(applicationID: number): this;
|
|
176
|
+
/**
|
|
177
|
+
* Includes all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates
|
|
178
|
+
*
|
|
179
|
+
* #### Example 1
|
|
180
|
+
* ```typescript
|
|
181
|
+
* const assetId = 163650;
|
|
182
|
+
* const accounts = await indexerClient
|
|
183
|
+
* .searchAccounts()
|
|
184
|
+
* .includeAll(false)
|
|
185
|
+
* .do();
|
|
186
|
+
* ```
|
|
187
|
+
*
|
|
188
|
+
* #### Example 2
|
|
189
|
+
* ```typescript
|
|
190
|
+
* const assetId = 163650;
|
|
191
|
+
* const accounts = await indexerClient
|
|
192
|
+
* .searchAccounts()
|
|
193
|
+
* .includeAll()
|
|
194
|
+
* .do();
|
|
195
|
+
* ```
|
|
196
|
+
*
|
|
197
|
+
* @param value - default true when called without passing a value
|
|
198
|
+
* @category query
|
|
199
|
+
*/
|
|
12
200
|
includeAll(value?: boolean): this;
|
|
201
|
+
/**
|
|
202
|
+
* Exclude additional items such as asset holdings, application local data stored for this account, asset parameters created by this account, and application parameters created by this account.
|
|
203
|
+
*
|
|
204
|
+
* #### Example 1
|
|
205
|
+
* ```typescript
|
|
206
|
+
* const accounts = await indexerClient
|
|
207
|
+
* .searchAccounts()
|
|
208
|
+
* .exclude("all")
|
|
209
|
+
* .do();
|
|
210
|
+
* ```
|
|
211
|
+
*
|
|
212
|
+
* #### Example 2
|
|
213
|
+
* ```typescript
|
|
214
|
+
* const accounts = await indexerClient
|
|
215
|
+
* .searchAccounts()
|
|
216
|
+
* .exclude("assets,created-assets")
|
|
217
|
+
* .do();
|
|
218
|
+
* ```
|
|
219
|
+
* @remarks By default, it behaves as exclude=none
|
|
220
|
+
* @param exclude - Array of `all`, `assets`, `created-assets`, `apps-local-state`, `created-apps`, `none`
|
|
221
|
+
* @category query
|
|
222
|
+
*/
|
|
13
223
|
exclude(exclude: string): this;
|
|
14
224
|
}
|