algosdk 1.14.0 → 1.16.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/client/kmd.js +1 -1
- package/dist/cjs/src/client/kmd.js.map +1 -1
- package/dist/cjs/src/client/v2/algod/accountApplicationInformation.js +20 -0
- package/dist/cjs/src/client/v2/algod/accountApplicationInformation.js.map +1 -0
- package/dist/cjs/src/client/v2/algod/accountAssetInformation.js +20 -0
- package/dist/cjs/src/client/v2/algod/accountAssetInformation.js.map +1 -0
- package/dist/cjs/src/client/v2/algod/accountInformation.js +18 -0
- package/dist/cjs/src/client/v2/algod/accountInformation.js.map +1 -1
- package/dist/cjs/src/client/v2/algod/algod.js +38 -0
- package/dist/cjs/src/client/v2/algod/algod.js.map +1 -1
- package/dist/cjs/src/client/v2/algod/models/types.js +73 -8
- package/dist/cjs/src/client/v2/algod/models/types.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/indexer.js +68 -0
- package/dist/cjs/src/client/v2/indexer/indexer.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/lookupAccountAppLocalStates.js +135 -0
- package/dist/cjs/src/client/v2/indexer/lookupAccountAppLocalStates.js.map +1 -0
- package/dist/cjs/src/client/v2/indexer/lookupAccountAssets.js +136 -0
- package/dist/cjs/src/client/v2/indexer/lookupAccountAssets.js.map +1 -0
- package/dist/cjs/src/client/v2/indexer/lookupAccountByID.js +80 -2
- package/dist/cjs/src/client/v2/indexer/lookupAccountByID.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/lookupAccountCreatedApplications.js +136 -0
- package/dist/cjs/src/client/v2/indexer/lookupAccountCreatedApplications.js.map +1 -0
- package/dist/cjs/src/client/v2/indexer/lookupAccountCreatedAssets.js +137 -0
- package/dist/cjs/src/client/v2/indexer/lookupAccountCreatedAssets.js.map +1 -0
- 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 -24
- 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 +214 -9
- package/dist/cjs/src/client/v2/indexer/searchAccounts.js.map +1 -1
- package/dist/cjs/src/client/v2/indexer/searchForApplications.js +105 -4
- 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/dryrun.js +200 -3
- package/dist/cjs/src/dryrun.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/accountApplicationInformation.js +14 -0
- package/dist/esm/src/client/v2/algod/accountApplicationInformation.js.map +1 -0
- package/dist/esm/src/client/v2/algod/accountAssetInformation.js +14 -0
- package/dist/esm/src/client/v2/algod/accountAssetInformation.js.map +1 -0
- package/dist/esm/src/client/v2/algod/accountInformation.js +18 -0
- package/dist/esm/src/client/v2/algod/accountInformation.js.map +1 -1
- package/dist/esm/src/client/v2/algod/algod.js +38 -0
- package/dist/esm/src/client/v2/algod/algod.js.map +1 -1
- package/dist/esm/src/client/v2/algod/models/types.js +70 -7
- package/dist/esm/src/client/v2/algod/models/types.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/indexer.js +68 -0
- package/dist/esm/src/client/v2/indexer/indexer.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/lookupAccountAppLocalStates.js +129 -0
- package/dist/esm/src/client/v2/indexer/lookupAccountAppLocalStates.js.map +1 -0
- package/dist/esm/src/client/v2/indexer/lookupAccountAssets.js +130 -0
- package/dist/esm/src/client/v2/indexer/lookupAccountAssets.js.map +1 -0
- package/dist/esm/src/client/v2/indexer/lookupAccountByID.js +80 -2
- package/dist/esm/src/client/v2/indexer/lookupAccountByID.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/lookupAccountCreatedApplications.js +130 -0
- package/dist/esm/src/client/v2/indexer/lookupAccountCreatedApplications.js.map +1 -0
- package/dist/esm/src/client/v2/indexer/lookupAccountCreatedAssets.js +131 -0
- package/dist/esm/src/client/v2/indexer/lookupAccountCreatedAssets.js.map +1 -0
- 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 -24
- 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 +214 -9
- package/dist/esm/src/client/v2/indexer/searchAccounts.js.map +1 -1
- package/dist/esm/src/client/v2/indexer/searchForApplications.js +105 -4
- 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/dryrun.js +198 -2
- package/dist/esm/src/dryrun.js.map +1 -1
- package/dist/types/src/client/kmd.d.ts +2 -2
- package/dist/types/src/client/v2/algod/accountApplicationInformation.d.ts +9 -0
- package/dist/types/src/client/v2/algod/accountAssetInformation.d.ts +9 -0
- package/dist/types/src/client/v2/algod/accountInformation.d.ts +15 -0
- package/dist/types/src/client/v2/algod/algod.d.ts +34 -0
- package/dist/types/src/client/v2/algod/models/types.d.ts +95 -13
- package/dist/types/src/client/v2/indexer/indexer.d.ts +60 -0
- package/dist/types/src/client/v2/indexer/lookupAccountAppLocalStates.d.ts +110 -0
- package/dist/types/src/client/v2/indexer/lookupAccountAssets.d.ts +111 -0
- package/dist/types/src/client/v2/indexer/lookupAccountByID.d.ts +77 -0
- package/dist/types/src/client/v2/indexer/lookupAccountCreatedApplications.d.ts +111 -0
- package/dist/types/src/client/v2/indexer/lookupAccountCreatedAssets.d.ts +112 -0
- 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 -21
- 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 +211 -0
- package/dist/types/src/client/v2/indexer/searchForApplications.d.ts +102 -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/dryrun.d.ts +81 -1
- package/package.json +4 -3
|
@@ -16,9 +16,12 @@ export default class LookupAssetBalances extends JSONRequest {
|
|
|
16
16
|
* @param index - The asset ID to look up.
|
|
17
17
|
*/
|
|
18
18
|
constructor(c: HTTPClient, intDecoding: IntDecoding, index: number);
|
|
19
|
+
/**
|
|
20
|
+
* @returns `/v2/assets/${index}/balances`
|
|
21
|
+
*/
|
|
19
22
|
path(): string;
|
|
20
23
|
/**
|
|
21
|
-
*
|
|
24
|
+
* Limit results for pagination.
|
|
22
25
|
*
|
|
23
26
|
* #### Example
|
|
24
27
|
* ```typescript
|
|
@@ -31,23 +34,9 @@ export default class LookupAssetBalances extends JSONRequest {
|
|
|
31
34
|
* ```
|
|
32
35
|
*
|
|
33
36
|
* @param limit - maximum number of results to return.
|
|
37
|
+
* @category query
|
|
34
38
|
*/
|
|
35
39
|
limit(limit: number): this;
|
|
36
|
-
/**
|
|
37
|
-
* Specify round to filter with.
|
|
38
|
-
*
|
|
39
|
-
* #### Example
|
|
40
|
-
* ```typescript
|
|
41
|
-
* const assetId = 163650;
|
|
42
|
-
* const targetBlock = 18309917;
|
|
43
|
-
* const assetBalances = await indexerClient
|
|
44
|
-
* .lookupAssetBalances(assetId)
|
|
45
|
-
* .round(targetBlock)
|
|
46
|
-
* .do();
|
|
47
|
-
* ```
|
|
48
|
-
* @param round
|
|
49
|
-
*/
|
|
50
|
-
round(round: number): this;
|
|
51
40
|
/**
|
|
52
41
|
* Filtered results should have an asset balance greater than this value.
|
|
53
42
|
*
|
|
@@ -61,6 +50,7 @@ export default class LookupAssetBalances extends JSONRequest {
|
|
|
61
50
|
* .do();
|
|
62
51
|
* ```
|
|
63
52
|
* @param greater
|
|
53
|
+
* @category query
|
|
64
54
|
*/
|
|
65
55
|
currencyGreaterThan(greater: number): this;
|
|
66
56
|
/**
|
|
@@ -76,6 +66,7 @@ export default class LookupAssetBalances extends JSONRequest {
|
|
|
76
66
|
* .do();
|
|
77
67
|
* ```
|
|
78
68
|
* @param lesser
|
|
69
|
+
* @category query
|
|
79
70
|
*/
|
|
80
71
|
currencyLessThan(lesser: number): this;
|
|
81
72
|
/**
|
|
@@ -85,20 +76,26 @@ export default class LookupAssetBalances extends JSONRequest {
|
|
|
85
76
|
* ```typescript
|
|
86
77
|
* const assetId = 163650;
|
|
87
78
|
* const maxResults = 20;
|
|
88
|
-
*
|
|
89
|
-
* const
|
|
79
|
+
*
|
|
80
|
+
* const assetBalancesPage1 = await indexerClient
|
|
90
81
|
* .lookupAssetBalances(assetId)
|
|
91
82
|
* .limit(maxResults)
|
|
92
|
-
* .
|
|
83
|
+
* .do();
|
|
84
|
+
*
|
|
85
|
+
* const assetBalancesPage2 = await indexerClient
|
|
86
|
+
* .lookupAssetBalances(assetId)
|
|
87
|
+
* .limit(maxResults)
|
|
88
|
+
* .nextToken(assetBalancesPage1["next-token"])
|
|
93
89
|
* .do();
|
|
94
90
|
* ```
|
|
95
91
|
* @param nextToken - provided by the previous results.
|
|
92
|
+
* @category query
|
|
96
93
|
*/
|
|
97
94
|
nextToken(nextToken: string): this;
|
|
98
95
|
/**
|
|
99
|
-
* Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates
|
|
96
|
+
* Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates.
|
|
100
97
|
*
|
|
101
|
-
* #### Example
|
|
98
|
+
* #### Example 1
|
|
102
99
|
* ```typescript
|
|
103
100
|
* const assetId = 163650;
|
|
104
101
|
* const assetBalances = await indexerClient
|
|
@@ -106,7 +103,18 @@ export default class LookupAssetBalances extends JSONRequest {
|
|
|
106
103
|
* .includeAll(false)
|
|
107
104
|
* .do();
|
|
108
105
|
* ```
|
|
106
|
+
*
|
|
107
|
+
* #### Example 2
|
|
108
|
+
* ```typescript
|
|
109
|
+
* const assetId = 163650;
|
|
110
|
+
* const assetBalances = await indexerClient
|
|
111
|
+
* .lookupAssetBalances(assetId)
|
|
112
|
+
* .includeAll()
|
|
113
|
+
* .do();
|
|
114
|
+
* ```
|
|
115
|
+
*
|
|
109
116
|
* @param value
|
|
117
|
+
* @category query
|
|
110
118
|
*/
|
|
111
119
|
includeAll(value?: boolean): this;
|
|
112
120
|
}
|
|
@@ -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
|
}
|