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
|
@@ -3,8 +3,85 @@ import HTTPClient from '../../client';
|
|
|
3
3
|
import IntDecoding from '../../../types/intDecoding';
|
|
4
4
|
export default class LookupAccountByID extends JSONRequest {
|
|
5
5
|
private account;
|
|
6
|
+
/**
|
|
7
|
+
* Returns information about the given account.
|
|
8
|
+
*
|
|
9
|
+
* #### Example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
12
|
+
* const accountInfo = await indexerClient.lookupAccountByID(address).do();
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-id)
|
|
16
|
+
* @param account - The address of the account to look up.
|
|
17
|
+
* @category GET
|
|
18
|
+
*/
|
|
6
19
|
constructor(c: HTTPClient, intDecoding: IntDecoding, account: string);
|
|
20
|
+
/**
|
|
21
|
+
* @returns `/v2/accounts/${account}`
|
|
22
|
+
*/
|
|
7
23
|
path(): string;
|
|
24
|
+
/**
|
|
25
|
+
* Specify round to filter with.
|
|
26
|
+
*
|
|
27
|
+
* #### Example
|
|
28
|
+
* ```typescript
|
|
29
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
30
|
+
* const targetBlock = 18309917;
|
|
31
|
+
* const accountInfo = await indexerClient
|
|
32
|
+
* .lookupAccountByID(address)
|
|
33
|
+
* .round(targetBlock)
|
|
34
|
+
* .do();
|
|
35
|
+
* ```
|
|
36
|
+
* @param round
|
|
37
|
+
*/
|
|
8
38
|
round(round: number): this;
|
|
39
|
+
/**
|
|
40
|
+
* Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates.
|
|
41
|
+
*
|
|
42
|
+
* #### Example 1
|
|
43
|
+
* ```typescript
|
|
44
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
45
|
+
* const accountInfo = await indexerClient
|
|
46
|
+
* .lookupAccountByID(address)
|
|
47
|
+
* .includeAll(false)
|
|
48
|
+
* .do();
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* #### Example 2
|
|
52
|
+
* ```typescript
|
|
53
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
54
|
+
* const accountInfo = await indexerClient
|
|
55
|
+
* .lookupAccountByID(address)
|
|
56
|
+
* .includeAll()
|
|
57
|
+
* .do();
|
|
58
|
+
* ```
|
|
59
|
+
* @param value
|
|
60
|
+
*/
|
|
9
61
|
includeAll(value?: boolean): this;
|
|
62
|
+
/**
|
|
63
|
+
* 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.
|
|
64
|
+
*
|
|
65
|
+
* #### Example 1
|
|
66
|
+
* ```typescript
|
|
67
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
68
|
+
* const accountInfo = await indexerClient
|
|
69
|
+
* .lookupAccountByID(address)
|
|
70
|
+
* .exclude("all")
|
|
71
|
+
* .do();
|
|
72
|
+
* ```
|
|
73
|
+
*
|
|
74
|
+
* #### Example 2
|
|
75
|
+
* ```typescript
|
|
76
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
77
|
+
* const accountInfo = await indexerClient
|
|
78
|
+
* .lookupAccountByID(address)
|
|
79
|
+
* .exclude("assets,created-assets")
|
|
80
|
+
* .do();
|
|
81
|
+
* ```
|
|
82
|
+
* @remarks By default, it behaves as exclude=none
|
|
83
|
+
* @param exclude - Array of `all`, `assets`, `created-assets`, `apps-local-state`, `created-apps`, `none`
|
|
84
|
+
* @category query
|
|
85
|
+
*/
|
|
86
|
+
exclude(exclude: string): this;
|
|
10
87
|
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import JSONRequest from '../jsonrequest';
|
|
2
|
+
import HTTPClient from '../../client';
|
|
3
|
+
import IntDecoding from '../../../types/intDecoding';
|
|
4
|
+
export default class LookupAccountCreatedApplications extends JSONRequest {
|
|
5
|
+
private account;
|
|
6
|
+
/**
|
|
7
|
+
* Returns application information created by the given account.
|
|
8
|
+
*
|
|
9
|
+
* #### Example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
12
|
+
* const accountCreatedApps = await indexerClient.lookupAccountCreatedApplications(address).do();
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-idcreated-applications)
|
|
16
|
+
* @param account - The address of the account to look up.
|
|
17
|
+
* @category GET
|
|
18
|
+
*/
|
|
19
|
+
constructor(c: HTTPClient, intDecoding: IntDecoding, account: string);
|
|
20
|
+
/**
|
|
21
|
+
* @returns `/v2/accounts/${account}/created-applications`
|
|
22
|
+
*/
|
|
23
|
+
path(): string;
|
|
24
|
+
/**
|
|
25
|
+
* Add a limit for filter.
|
|
26
|
+
*
|
|
27
|
+
* #### Example
|
|
28
|
+
* ```typescript
|
|
29
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
30
|
+
* const maxResults = 20;
|
|
31
|
+
* const accountAssets = await indexerClient
|
|
32
|
+
* .lookupAccountCreatedApplications(address)
|
|
33
|
+
* .limit(maxResults)
|
|
34
|
+
* .do();
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* @param limit - maximum number of results to return.
|
|
38
|
+
* @category query
|
|
39
|
+
*/
|
|
40
|
+
limit(limit: number): this;
|
|
41
|
+
/**
|
|
42
|
+
* Specify round to filter with.
|
|
43
|
+
*
|
|
44
|
+
* #### Example
|
|
45
|
+
* ```typescript
|
|
46
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
47
|
+
* const targetBlock = 18309917;
|
|
48
|
+
* const accountAssets = await indexerClient
|
|
49
|
+
* .lookupAccountCreatedApplications(address)
|
|
50
|
+
* .round(targetBlock)
|
|
51
|
+
* .do();
|
|
52
|
+
* ```
|
|
53
|
+
* @param round
|
|
54
|
+
* @category query
|
|
55
|
+
*/
|
|
56
|
+
round(round: number): this;
|
|
57
|
+
/**
|
|
58
|
+
* Specify the next page of results.
|
|
59
|
+
*
|
|
60
|
+
* #### Example
|
|
61
|
+
* ```typescript
|
|
62
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
63
|
+
* const maxResults = 20;
|
|
64
|
+
*
|
|
65
|
+
* const accountAssetsPage1 = await indexerClient
|
|
66
|
+
* .lookupAccountCreatedApplications(address)
|
|
67
|
+
* .limit(maxResults)
|
|
68
|
+
* .do();
|
|
69
|
+
*
|
|
70
|
+
* const accountAssetsPage2 = await indexerClient
|
|
71
|
+
* .lookupAccountCreatedApplications(address)
|
|
72
|
+
* .limit(maxResults)
|
|
73
|
+
* .next(accountAssetsPage1["next-token"])
|
|
74
|
+
* .do();
|
|
75
|
+
* ```
|
|
76
|
+
* @param nextToken - provided by the previous results.
|
|
77
|
+
* @category query
|
|
78
|
+
*/
|
|
79
|
+
nextToken(nextToken: string): this;
|
|
80
|
+
/**
|
|
81
|
+
* Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates
|
|
82
|
+
*
|
|
83
|
+
* #### Example
|
|
84
|
+
* ```typescript
|
|
85
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
86
|
+
* const accountAssets = await indexerClient
|
|
87
|
+
* .lookupAccountCreatedApplications(address)
|
|
88
|
+
* .includeAll(false)
|
|
89
|
+
* .do();
|
|
90
|
+
* ```
|
|
91
|
+
* @param value
|
|
92
|
+
* @category query
|
|
93
|
+
*/
|
|
94
|
+
includeAll(value?: boolean): this;
|
|
95
|
+
/**
|
|
96
|
+
* Specify an applicationID to search for.
|
|
97
|
+
*
|
|
98
|
+
* #### Example
|
|
99
|
+
* ```typescript
|
|
100
|
+
* const applicationID = 163650;
|
|
101
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
102
|
+
* const accountApplications = await indexerClient
|
|
103
|
+
* .lookupAccountAppLocalStates(address)
|
|
104
|
+
* .applicationID(applicationID)
|
|
105
|
+
* .do();
|
|
106
|
+
* ```
|
|
107
|
+
* @param index - the applicationID
|
|
108
|
+
* @category query
|
|
109
|
+
*/
|
|
110
|
+
applicationID(index: number): this;
|
|
111
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import JSONRequest from '../jsonrequest';
|
|
2
|
+
import HTTPClient from '../../client';
|
|
3
|
+
import IntDecoding from '../../../types/intDecoding';
|
|
4
|
+
export default class LookupAccountCreatedAssets extends JSONRequest {
|
|
5
|
+
private account;
|
|
6
|
+
/**
|
|
7
|
+
* Returns asset information created by the given account.
|
|
8
|
+
*
|
|
9
|
+
* #### Example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
12
|
+
* const accountCreatedAssets = await indexerClient.lookupAccountCreatedAssets(address).do();
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-idcreated-assets)
|
|
16
|
+
* @param account - The address of the account to look up.
|
|
17
|
+
* @category GET
|
|
18
|
+
*/
|
|
19
|
+
constructor(c: HTTPClient, intDecoding: IntDecoding, account: string);
|
|
20
|
+
/**
|
|
21
|
+
* @returns `/v2/accounts/${account}/created-assets`
|
|
22
|
+
*/
|
|
23
|
+
path(): string;
|
|
24
|
+
/**
|
|
25
|
+
* Add a limit for filter.
|
|
26
|
+
*
|
|
27
|
+
* #### Example
|
|
28
|
+
* ```typescript
|
|
29
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
30
|
+
* const maxResults = 20;
|
|
31
|
+
* const accountAssets = await indexerClient
|
|
32
|
+
* .lookupAccountCreatedAssets(address)
|
|
33
|
+
* .limit(maxResults)
|
|
34
|
+
* .do();
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* @param limit - maximum number of results to return.
|
|
38
|
+
* @category query
|
|
39
|
+
*/
|
|
40
|
+
limit(limit: number): this;
|
|
41
|
+
/**
|
|
42
|
+
* Specify round to filter with.
|
|
43
|
+
*
|
|
44
|
+
* #### Example
|
|
45
|
+
* ```typescript
|
|
46
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
47
|
+
* const targetBlock = 18309917;
|
|
48
|
+
* const accountAssets = await indexerClient
|
|
49
|
+
* .lookupAccountCreatedAssets(address)
|
|
50
|
+
* .round(targetBlock)
|
|
51
|
+
* .do();
|
|
52
|
+
* ```
|
|
53
|
+
* @param round
|
|
54
|
+
* @category query
|
|
55
|
+
*/
|
|
56
|
+
round(round: number): this;
|
|
57
|
+
/**
|
|
58
|
+
* Specify the next page of results.
|
|
59
|
+
*
|
|
60
|
+
* #### Example
|
|
61
|
+
* ```typescript
|
|
62
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
63
|
+
* const maxResults = 20;
|
|
64
|
+
*
|
|
65
|
+
* const accountAssetsPage1 = await indexerClient
|
|
66
|
+
* .lookupAccountCreatedAssets(address)
|
|
67
|
+
* .limit(maxResults)
|
|
68
|
+
* .do();
|
|
69
|
+
* ```
|
|
70
|
+
*
|
|
71
|
+
* const accountAssetsPage2 = await indexerClient
|
|
72
|
+
* .lookupAccountCreatedAssets(address)
|
|
73
|
+
* .limit(maxResults)
|
|
74
|
+
* .next(accountAssetsPage1["next-token"])
|
|
75
|
+
* .do();
|
|
76
|
+
* ```
|
|
77
|
+
* @param nextToken - provided by the previous results.
|
|
78
|
+
* @category query
|
|
79
|
+
*/
|
|
80
|
+
nextToken(nextToken: string): this;
|
|
81
|
+
/**
|
|
82
|
+
* Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates
|
|
83
|
+
*
|
|
84
|
+
* #### Example
|
|
85
|
+
* ```typescript
|
|
86
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
87
|
+
* const accountAssets = await indexerClient
|
|
88
|
+
* .lookupAccountCreatedAssets(address)
|
|
89
|
+
* .includeAll(false)
|
|
90
|
+
* .do();
|
|
91
|
+
* ```
|
|
92
|
+
* @param value
|
|
93
|
+
* @category query
|
|
94
|
+
*/
|
|
95
|
+
includeAll(value?: boolean): this;
|
|
96
|
+
/**
|
|
97
|
+
* Specify an assetID to search for.
|
|
98
|
+
*
|
|
99
|
+
* #### Example
|
|
100
|
+
* ```typescript
|
|
101
|
+
* const assetID = 163650;
|
|
102
|
+
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
103
|
+
* const assetAssets = await indexerClient
|
|
104
|
+
* .lookupAccountCreatedAssets(address)
|
|
105
|
+
* .assetID(assetID)
|
|
106
|
+
* .do();
|
|
107
|
+
* ```
|
|
108
|
+
* @param index - the assetID
|
|
109
|
+
* @category query
|
|
110
|
+
*/
|
|
111
|
+
assetID(index: number): this;
|
|
112
|
+
}
|
|
@@ -23,11 +23,11 @@ export default class LookupAccountTransactions extends JSONRequest {
|
|
|
23
23
|
*/
|
|
24
24
|
constructor(c: HTTPClient, intDecoding: IntDecoding, account: string);
|
|
25
25
|
/**
|
|
26
|
-
* @returns
|
|
26
|
+
* @returns `/v2/accounts/${account}/transactions`
|
|
27
27
|
*/
|
|
28
28
|
path(): string;
|
|
29
29
|
/**
|
|
30
|
-
* Specifies a prefix which must be contained in the note field
|
|
30
|
+
* Specifies a prefix which must be contained in the note field.
|
|
31
31
|
*
|
|
32
32
|
* #### Example
|
|
33
33
|
* ```typescript
|
|
@@ -44,7 +44,7 @@ export default class LookupAccountTransactions extends JSONRequest {
|
|
|
44
44
|
*/
|
|
45
45
|
notePrefix(prefix: Uint8Array | string): this;
|
|
46
46
|
/**
|
|
47
|
-
* Type of transaction to filter with
|
|
47
|
+
* Type of transaction to filter with.
|
|
48
48
|
*
|
|
49
49
|
* #### Example
|
|
50
50
|
* ```typescript
|
|
@@ -55,12 +55,12 @@ export default class LookupAccountTransactions extends JSONRequest {
|
|
|
55
55
|
* .do();
|
|
56
56
|
* ```
|
|
57
57
|
*
|
|
58
|
-
* @param type - one of
|
|
58
|
+
* @param type - one of `pay`, `keyreg`, `acfg`, `axfer`, `afrz`, `appl`
|
|
59
59
|
* @category query
|
|
60
60
|
*/
|
|
61
61
|
txType(type: string): this;
|
|
62
62
|
/**
|
|
63
|
-
* Type of signature to filter with
|
|
63
|
+
* Type of signature to filter with.
|
|
64
64
|
* - sig: Standard
|
|
65
65
|
* - msig: MultiSig
|
|
66
66
|
* - lsig: LogicSig
|
|
@@ -74,12 +74,12 @@ export default class LookupAccountTransactions extends JSONRequest {
|
|
|
74
74
|
* .do();
|
|
75
75
|
* ```
|
|
76
76
|
*
|
|
77
|
-
* @param type - one of
|
|
77
|
+
* @param type - one of `sig`, `msig`, `lsig`
|
|
78
78
|
* @category query
|
|
79
79
|
*/
|
|
80
80
|
sigType(type: string): this;
|
|
81
81
|
/**
|
|
82
|
-
* Lookup the specific transaction by ID
|
|
82
|
+
* Lookup the specific transaction by ID.
|
|
83
83
|
*
|
|
84
84
|
* #### Example
|
|
85
85
|
* ```typescript
|
|
@@ -90,13 +90,13 @@ export default class LookupAccountTransactions extends JSONRequest {
|
|
|
90
90
|
* .txid(txId)
|
|
91
91
|
* .do();
|
|
92
92
|
* ```
|
|
93
|
-
*
|
|
93
|
+
* @remarks Alternatively, use `indexerClient.lookupTransactionByID(txnId).do()`
|
|
94
94
|
* @param txid
|
|
95
95
|
* @category query
|
|
96
96
|
*/
|
|
97
97
|
txid(txid: string): this;
|
|
98
98
|
/**
|
|
99
|
-
* Include results for the specified round
|
|
99
|
+
* Include results for the specified round.
|
|
100
100
|
*
|
|
101
101
|
* #### Example
|
|
102
102
|
* ```typescript
|
|
@@ -113,7 +113,7 @@ export default class LookupAccountTransactions extends JSONRequest {
|
|
|
113
113
|
*/
|
|
114
114
|
round(round: number): this;
|
|
115
115
|
/**
|
|
116
|
-
* Include results at or after the specified min-round
|
|
116
|
+
* Include results at or after the specified min-round.
|
|
117
117
|
*
|
|
118
118
|
* #### Example
|
|
119
119
|
* ```typescript
|
|
@@ -130,7 +130,7 @@ export default class LookupAccountTransactions extends JSONRequest {
|
|
|
130
130
|
*/
|
|
131
131
|
minRound(round: number): this;
|
|
132
132
|
/**
|
|
133
|
-
* Include results at or before the specified max-round
|
|
133
|
+
* Include results at or before the specified max-round.
|
|
134
134
|
*
|
|
135
135
|
* #### Example
|
|
136
136
|
* ```typescript
|
|
@@ -147,7 +147,7 @@ export default class LookupAccountTransactions extends JSONRequest {
|
|
|
147
147
|
*/
|
|
148
148
|
maxRound(round: number): this;
|
|
149
149
|
/**
|
|
150
|
-
* Asset ID to filter with
|
|
150
|
+
* Asset ID to filter with.
|
|
151
151
|
*
|
|
152
152
|
* #### Example
|
|
153
153
|
* ```typescript
|
|
@@ -164,15 +164,15 @@ export default class LookupAccountTransactions extends JSONRequest {
|
|
|
164
164
|
*/
|
|
165
165
|
assetID(id: number): this;
|
|
166
166
|
/**
|
|
167
|
-
* Maximum number of results to return
|
|
167
|
+
* Maximum number of results to return.
|
|
168
168
|
*
|
|
169
169
|
* #### Example
|
|
170
170
|
* ```typescript
|
|
171
|
-
* const
|
|
171
|
+
* const maxResults = 25;
|
|
172
172
|
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
173
173
|
* const accountTxns = await indexerClient
|
|
174
174
|
* .lookupAccountTransactions(address)
|
|
175
|
-
* .limit(
|
|
175
|
+
* .limit(maxResults)
|
|
176
176
|
* .do();
|
|
177
177
|
* ```
|
|
178
178
|
*
|
|
@@ -181,7 +181,7 @@ export default class LookupAccountTransactions extends JSONRequest {
|
|
|
181
181
|
*/
|
|
182
182
|
limit(limit: number): this;
|
|
183
183
|
/**
|
|
184
|
-
* Include results before the given time
|
|
184
|
+
* Include results before the given time.
|
|
185
185
|
*
|
|
186
186
|
* #### Example
|
|
187
187
|
* ```typescript
|
|
@@ -198,7 +198,7 @@ export default class LookupAccountTransactions extends JSONRequest {
|
|
|
198
198
|
*/
|
|
199
199
|
beforeTime(before: string): this;
|
|
200
200
|
/**
|
|
201
|
-
* Include results after the given time
|
|
201
|
+
* Include results after the given time.
|
|
202
202
|
*
|
|
203
203
|
* #### Example
|
|
204
204
|
* ```typescript
|
|
@@ -246,7 +246,7 @@ export default class LookupAccountTransactions extends JSONRequest {
|
|
|
246
246
|
*/
|
|
247
247
|
currencyGreaterThan(greater: number): this;
|
|
248
248
|
/**
|
|
249
|
-
* 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
|
|
249
|
+
* 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.
|
|
250
250
|
*
|
|
251
251
|
* #### Example 1
|
|
252
252
|
* ```typescript
|
|
@@ -279,22 +279,27 @@ export default class LookupAccountTransactions extends JSONRequest {
|
|
|
279
279
|
*
|
|
280
280
|
* #### Example
|
|
281
281
|
* ```typescript
|
|
282
|
-
* const
|
|
283
|
-
* const nextToken = "the next token returned in the previous query response";
|
|
282
|
+
* const maxResults = 25;
|
|
284
283
|
* const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
285
|
-
*
|
|
284
|
+
*
|
|
285
|
+
* const accountTxnsPage1 = await indexerClient
|
|
286
|
+
* .lookupAccountTransactions(address)
|
|
287
|
+
* .limit(maxResults)
|
|
288
|
+
* .do();
|
|
289
|
+
*
|
|
290
|
+
* const accountTxnsPage2 = await indexerClient
|
|
286
291
|
* .lookupAccountTransactions(address)
|
|
287
|
-
* .limit(
|
|
288
|
-
* .nextToken(
|
|
292
|
+
* .limit(maxResults)
|
|
293
|
+
* .nextToken(accountTxnsPage1["next-token"])
|
|
289
294
|
* .do();
|
|
290
295
|
* ```
|
|
291
296
|
*
|
|
292
|
-
* @param nextToken
|
|
297
|
+
* @param nextToken - provided by the previous results.
|
|
293
298
|
* @category query
|
|
294
299
|
*/
|
|
295
300
|
nextToken(nextToken: string): this;
|
|
296
301
|
/**
|
|
297
|
-
*
|
|
302
|
+
* Whether or not to include rekeying transactions.
|
|
298
303
|
*
|
|
299
304
|
* #### Example
|
|
300
305
|
* ```typescript
|
|
@@ -3,18 +3,124 @@ import HTTPClient from '../../client';
|
|
|
3
3
|
import IntDecoding from '../../../types/intDecoding';
|
|
4
4
|
export default class LookupApplicationLogs extends JSONRequest {
|
|
5
5
|
private appID;
|
|
6
|
+
/**
|
|
7
|
+
* Returns log messages generated by the passed in application.
|
|
8
|
+
*
|
|
9
|
+
* #### Example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* const appId = 60553466;
|
|
12
|
+
* const appLogs = await indexerClient.lookupApplicationLogs(appId).do();
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2applicationsapplication-idlogs)
|
|
16
|
+
* @param appID - The ID of the application which generated the logs.
|
|
17
|
+
* @category GET
|
|
18
|
+
*/
|
|
6
19
|
constructor(c: HTTPClient, intDecoding: IntDecoding, appID: number);
|
|
20
|
+
/**
|
|
21
|
+
* @returns `/v2/applications/${appID}/logs`
|
|
22
|
+
*/
|
|
7
23
|
path(): string;
|
|
8
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* Limit results for pagination.
|
|
26
|
+
*
|
|
27
|
+
* #### Example
|
|
28
|
+
* ```typescript
|
|
29
|
+
* const maxResults = 20;
|
|
30
|
+
* const appLogs = await indexerClient
|
|
31
|
+
* .lookupApplicationLogs(appId)
|
|
32
|
+
* .limit(maxResults)
|
|
33
|
+
* .do();
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* @param limit - maximum number of results to return.
|
|
37
|
+
*/
|
|
9
38
|
limit(limit: number): this;
|
|
10
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* Include results at or after the specified min-round.
|
|
41
|
+
*
|
|
42
|
+
* #### Example
|
|
43
|
+
* ```typescript
|
|
44
|
+
* const minRound = 18309917;
|
|
45
|
+
* const appLogs = await indexerClient
|
|
46
|
+
* .lookupApplicationLogs(appId)
|
|
47
|
+
* .minRound(minRound)
|
|
48
|
+
* .do();
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* @param round
|
|
52
|
+
* @category query
|
|
53
|
+
*/
|
|
11
54
|
minRound(round: number): this;
|
|
12
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* Include results at or before the specified max-round.
|
|
57
|
+
*
|
|
58
|
+
* #### Example
|
|
59
|
+
* ```typescript
|
|
60
|
+
* const maxRound = 18309917;
|
|
61
|
+
* const appLogs = await indexerClient
|
|
62
|
+
* .lookupApplicationLogs(appId)
|
|
63
|
+
* .maxRound(maxRound)
|
|
64
|
+
* .do();
|
|
65
|
+
* ```
|
|
66
|
+
*
|
|
67
|
+
* @param round
|
|
68
|
+
* @category query
|
|
69
|
+
*/
|
|
13
70
|
maxRound(round: number): this;
|
|
14
|
-
/**
|
|
71
|
+
/**
|
|
72
|
+
* The next page of results.
|
|
73
|
+
*
|
|
74
|
+
* #### Example
|
|
75
|
+
* ```typescript
|
|
76
|
+
* const maxResults = 25;
|
|
77
|
+
*
|
|
78
|
+
* const appLogsPage1 = await indexerClient
|
|
79
|
+
* .lookupApplicationLogs(appId)
|
|
80
|
+
* .limit(maxResults)
|
|
81
|
+
* .do();
|
|
82
|
+
*
|
|
83
|
+
* const appLogsPage2 = await indexerClient
|
|
84
|
+
* .lookupApplicationLogs(appId)
|
|
85
|
+
* .limit(maxResults)
|
|
86
|
+
* .nextToken(appLogsPage1["next-token"])
|
|
87
|
+
* .do();
|
|
88
|
+
* ```
|
|
89
|
+
*
|
|
90
|
+
* @param nextToken - provided by the previous results.
|
|
91
|
+
* @category query
|
|
92
|
+
*/
|
|
15
93
|
nextToken(nextToken: string): this;
|
|
16
|
-
/**
|
|
94
|
+
/**
|
|
95
|
+
* Only include transactions with this sender address.
|
|
96
|
+
*
|
|
97
|
+
* #### Example
|
|
98
|
+
* ```typescript
|
|
99
|
+
* const sender = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
|
|
100
|
+
* const appLogs = await indexerClient
|
|
101
|
+
* .lookupApplicationLogs(appId)
|
|
102
|
+
* .sender(sender)
|
|
103
|
+
* .do();
|
|
104
|
+
* ```
|
|
105
|
+
*
|
|
106
|
+
* @param senderAddress
|
|
107
|
+
* @category query
|
|
108
|
+
*/
|
|
17
109
|
sender(senderAddress: string): this;
|
|
18
|
-
/**
|
|
110
|
+
/**
|
|
111
|
+
* Lookup the specific transaction by ID.
|
|
112
|
+
*
|
|
113
|
+
* #### Example
|
|
114
|
+
* ```typescript
|
|
115
|
+
* const txId = "MEUOC4RQJB23CQZRFRKYEI6WBO73VTTPST5A7B3S5OKBUY6LFUDA";
|
|
116
|
+
* const appLogs = await indexerClient
|
|
117
|
+
* .lookupApplicationLogs(appId)
|
|
118
|
+
* .txid(txId)
|
|
119
|
+
* .do();
|
|
120
|
+
* ```
|
|
121
|
+
*
|
|
122
|
+
* @param txid
|
|
123
|
+
* @category query
|
|
124
|
+
*/
|
|
19
125
|
txid(txid: string): this;
|
|
20
126
|
}
|
|
@@ -3,7 +3,47 @@ import HTTPClient from '../../client';
|
|
|
3
3
|
import IntDecoding from '../../../types/intDecoding';
|
|
4
4
|
export default class LookupApplications extends JSONRequest {
|
|
5
5
|
private index;
|
|
6
|
+
/**
|
|
7
|
+
* Returns information about the passed application.
|
|
8
|
+
*
|
|
9
|
+
* #### Example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* const appId = 60553466;
|
|
12
|
+
* const appInfo = await indexerClient.lookupApplications(appId).do();
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2applicationsapplication-id)
|
|
16
|
+
* @param index - The ID of the application to look up.
|
|
17
|
+
* @category GET
|
|
18
|
+
*/
|
|
6
19
|
constructor(c: HTTPClient, intDecoding: IntDecoding, index: number);
|
|
20
|
+
/**
|
|
21
|
+
* @returns `/v2/applications/${index}`
|
|
22
|
+
*/
|
|
7
23
|
path(): string;
|
|
24
|
+
/**
|
|
25
|
+
* Includes all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates
|
|
26
|
+
*
|
|
27
|
+
* #### Example 1
|
|
28
|
+
* ```typescript
|
|
29
|
+
* const appId = 60553466;
|
|
30
|
+
* const appInfo = await indexerClient
|
|
31
|
+
* .lookupApplications(appId)
|
|
32
|
+
* .includeAll(false)
|
|
33
|
+
* .do();
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* #### Example 2
|
|
37
|
+
* ```typescript
|
|
38
|
+
* const appId = 60553466;
|
|
39
|
+
* const appInfo = await indexerClient
|
|
40
|
+
* .lookupApplications(appId)
|
|
41
|
+
* .includeAll()
|
|
42
|
+
* .do();
|
|
43
|
+
* ```
|
|
44
|
+
*
|
|
45
|
+
* @param value - default true when called without passing a value
|
|
46
|
+
* @category query
|
|
47
|
+
*/
|
|
8
48
|
includeAll(value?: boolean): this;
|
|
9
49
|
}
|