algosdk 1.14.0-beta.1 → 1.15.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.
Files changed (102) hide show
  1. package/README.md +4 -4
  2. package/dist/browser/algosdk.min.js +1 -1
  3. package/dist/browser/algosdk.min.js.map +1 -1
  4. package/dist/cjs/src/client/client.js +16 -41
  5. package/dist/cjs/src/client/client.js.map +1 -1
  6. package/dist/cjs/src/client/v2/algod/accountApplicationInformation.js +20 -0
  7. package/dist/cjs/src/client/v2/algod/accountApplicationInformation.js.map +1 -0
  8. package/dist/cjs/src/client/v2/algod/accountAssetInformation.js +20 -0
  9. package/dist/cjs/src/client/v2/algod/accountAssetInformation.js.map +1 -0
  10. package/dist/cjs/src/client/v2/algod/accountInformation.js +18 -0
  11. package/dist/cjs/src/client/v2/algod/accountInformation.js.map +1 -1
  12. package/dist/cjs/src/client/v2/algod/algod.js +38 -0
  13. package/dist/cjs/src/client/v2/algod/algod.js.map +1 -1
  14. package/dist/cjs/src/client/v2/algod/models/types.js +73 -8
  15. package/dist/cjs/src/client/v2/algod/models/types.js.map +1 -1
  16. package/dist/cjs/src/client/v2/indexer/indexer.js +68 -0
  17. package/dist/cjs/src/client/v2/indexer/indexer.js.map +1 -1
  18. package/dist/cjs/src/client/v2/indexer/lookupAccountAppLocalStates.js +110 -0
  19. package/dist/cjs/src/client/v2/indexer/lookupAccountAppLocalStates.js.map +1 -0
  20. package/dist/cjs/src/client/v2/indexer/lookupAccountAssets.js +110 -0
  21. package/dist/cjs/src/client/v2/indexer/lookupAccountAssets.js.map +1 -0
  22. package/dist/cjs/src/client/v2/indexer/lookupAccountByID.js +5 -0
  23. package/dist/cjs/src/client/v2/indexer/lookupAccountByID.js.map +1 -1
  24. package/dist/cjs/src/client/v2/indexer/lookupAccountCreatedApplications.js +110 -0
  25. package/dist/cjs/src/client/v2/indexer/lookupAccountCreatedApplications.js.map +1 -0
  26. package/dist/cjs/src/client/v2/indexer/lookupAccountCreatedAssets.js +110 -0
  27. package/dist/cjs/src/client/v2/indexer/lookupAccountCreatedAssets.js.map +1 -0
  28. package/dist/cjs/src/client/v2/indexer/lookupAccountTransactions.js +280 -15
  29. package/dist/cjs/src/client/v2/indexer/lookupAccountTransactions.js.map +1 -1
  30. package/dist/cjs/src/client/v2/indexer/lookupAssetBalances.js +0 -18
  31. package/dist/cjs/src/client/v2/indexer/lookupAssetBalances.js.map +1 -1
  32. package/dist/cjs/src/client/v2/indexer/lookupAssetByID.js +37 -1
  33. package/dist/cjs/src/client/v2/indexer/lookupAssetByID.js.map +1 -1
  34. package/dist/cjs/src/client/v2/indexer/searchAccounts.js +5 -0
  35. package/dist/cjs/src/client/v2/indexer/searchAccounts.js.map +1 -1
  36. package/dist/cjs/src/client/v2/indexer/searchForApplications.js +5 -0
  37. package/dist/cjs/src/client/v2/indexer/searchForApplications.js.map +1 -1
  38. package/dist/cjs/src/client/v2/jsonrequest.js +3 -0
  39. package/dist/cjs/src/client/v2/jsonrequest.js.map +1 -1
  40. package/dist/cjs/src/dryrun.js +1 -1
  41. package/dist/cjs/src/dryrun.js.map +1 -1
  42. package/dist/cjs/src/makeTxn.js.map +1 -1
  43. package/dist/esm/src/client/client.js +16 -41
  44. package/dist/esm/src/client/client.js.map +1 -1
  45. package/dist/esm/src/client/v2/algod/accountApplicationInformation.js +14 -0
  46. package/dist/esm/src/client/v2/algod/accountApplicationInformation.js.map +1 -0
  47. package/dist/esm/src/client/v2/algod/accountAssetInformation.js +14 -0
  48. package/dist/esm/src/client/v2/algod/accountAssetInformation.js.map +1 -0
  49. package/dist/esm/src/client/v2/algod/accountInformation.js +18 -0
  50. package/dist/esm/src/client/v2/algod/accountInformation.js.map +1 -1
  51. package/dist/esm/src/client/v2/algod/algod.js +38 -0
  52. package/dist/esm/src/client/v2/algod/algod.js.map +1 -1
  53. package/dist/esm/src/client/v2/algod/models/types.js +70 -7
  54. package/dist/esm/src/client/v2/algod/models/types.js.map +1 -1
  55. package/dist/esm/src/client/v2/indexer/indexer.js +68 -0
  56. package/dist/esm/src/client/v2/indexer/indexer.js.map +1 -1
  57. package/dist/esm/src/client/v2/indexer/lookupAccountAppLocalStates.js +104 -0
  58. package/dist/esm/src/client/v2/indexer/lookupAccountAppLocalStates.js.map +1 -0
  59. package/dist/esm/src/client/v2/indexer/lookupAccountAssets.js +104 -0
  60. package/dist/esm/src/client/v2/indexer/lookupAccountAssets.js.map +1 -0
  61. package/dist/esm/src/client/v2/indexer/lookupAccountByID.js +5 -0
  62. package/dist/esm/src/client/v2/indexer/lookupAccountByID.js.map +1 -1
  63. package/dist/esm/src/client/v2/indexer/lookupAccountCreatedApplications.js +104 -0
  64. package/dist/esm/src/client/v2/indexer/lookupAccountCreatedApplications.js.map +1 -0
  65. package/dist/esm/src/client/v2/indexer/lookupAccountCreatedAssets.js +104 -0
  66. package/dist/esm/src/client/v2/indexer/lookupAccountCreatedAssets.js.map +1 -0
  67. package/dist/esm/src/client/v2/indexer/lookupAccountTransactions.js +280 -15
  68. package/dist/esm/src/client/v2/indexer/lookupAccountTransactions.js.map +1 -1
  69. package/dist/esm/src/client/v2/indexer/lookupAssetBalances.js +0 -18
  70. package/dist/esm/src/client/v2/indexer/lookupAssetBalances.js.map +1 -1
  71. package/dist/esm/src/client/v2/indexer/lookupAssetByID.js +37 -1
  72. package/dist/esm/src/client/v2/indexer/lookupAssetByID.js.map +1 -1
  73. package/dist/esm/src/client/v2/indexer/searchAccounts.js +5 -0
  74. package/dist/esm/src/client/v2/indexer/searchAccounts.js.map +1 -1
  75. package/dist/esm/src/client/v2/indexer/searchForApplications.js +5 -0
  76. package/dist/esm/src/client/v2/indexer/searchForApplications.js.map +1 -1
  77. package/dist/esm/src/client/v2/jsonrequest.js +3 -0
  78. package/dist/esm/src/client/v2/jsonrequest.js.map +1 -1
  79. package/dist/esm/src/dryrun.js +1 -1
  80. package/dist/esm/src/dryrun.js.map +1 -1
  81. package/dist/esm/src/makeTxn.js.map +1 -1
  82. package/dist/types/src/client/client.d.ts +7 -7
  83. package/dist/types/src/client/v2/algod/accountApplicationInformation.d.ts +9 -0
  84. package/dist/types/src/client/v2/algod/accountAssetInformation.d.ts +9 -0
  85. package/dist/types/src/client/v2/algod/accountInformation.d.ts +15 -0
  86. package/dist/types/src/client/v2/algod/algod.d.ts +34 -0
  87. package/dist/types/src/client/v2/algod/models/types.d.ts +95 -13
  88. package/dist/types/src/client/v2/indexer/indexer.d.ts +60 -0
  89. package/dist/types/src/client/v2/indexer/lookupAccountAppLocalStates.d.ts +85 -0
  90. package/dist/types/src/client/v2/indexer/lookupAccountAssets.d.ts +85 -0
  91. package/dist/types/src/client/v2/indexer/lookupAccountByID.d.ts +1 -0
  92. package/dist/types/src/client/v2/indexer/lookupAccountCreatedApplications.d.ts +85 -0
  93. package/dist/types/src/client/v2/indexer/lookupAccountCreatedAssets.d.ts +85 -0
  94. package/dist/types/src/client/v2/indexer/lookupAccountTransactions.d.ts +280 -1
  95. package/dist/types/src/client/v2/indexer/lookupAssetBalances.d.ts +0 -15
  96. package/dist/types/src/client/v2/indexer/lookupAssetByID.d.ts +37 -0
  97. package/dist/types/src/client/v2/indexer/searchAccounts.d.ts +1 -0
  98. package/dist/types/src/client/v2/indexer/searchForApplications.d.ts +1 -0
  99. package/dist/types/src/client/v2/jsonrequest.d.ts +4 -0
  100. package/dist/types/src/makeTxn.d.ts +31 -31
  101. package/dist/types/src/types/utils.d.ts +7 -0
  102. package/package.json +3 -3
@@ -28,9 +28,9 @@ export default class HTTPClient {
28
28
  * Parse JSON using either the built-in JSON.parse or utils.parseJSON
29
29
  * depending on whether jsonOptions are provided or not
30
30
  *
31
- * @param text JSON data
32
- * @param status Status of the response (used in case parseJSON fails)
33
- * @param jsonOptions Options object to use to decode JSON responses. See
31
+ * @param text - JSON data
32
+ * @param status - Status of the response (used in case parseJSON fails)
33
+ * @param jsonOptions - Options object to use to decode JSON responses. See
34
34
  * utils.parseJSON for the options available.
35
35
  */
36
36
  static parseJSON(text: string, status: number, jsonOptions?: utils.JSONOptions): any;
@@ -58,10 +58,10 @@ export default class HTTPClient {
58
58
  private static prepareResponseError;
59
59
  /**
60
60
  * Send a GET request.
61
- * @param {string} relativePath The path of the request.
62
- * @param {object} query An object containing the query paramters of the request.
63
- * @param {object} requestHeaders An object containing additional request headers to use.
64
- * @param {object} jsonOptions Options object to use to decode JSON responses. See
61
+ * @param relativePath - The path of the request.
62
+ * @param query - An object containing the query parameters of the request.
63
+ * @param requestHeaders - An object containing additional request headers to use.
64
+ * @param jsonOptions - Options object to use to decode JSON responses. See
65
65
  * utils.parseJSON for the options available.
66
66
  * @returns Response object.
67
67
  */
@@ -0,0 +1,9 @@
1
+ import JSONRequest from '../jsonrequest';
2
+ import HTTPClient from '../../client';
3
+ import IntDecoding from '../../../types/intDecoding';
4
+ export default class AccountApplicationInformation extends JSONRequest {
5
+ private account;
6
+ private applicationID;
7
+ constructor(c: HTTPClient, intDecoding: IntDecoding, account: string, applicationID: number);
8
+ path(): string;
9
+ }
@@ -0,0 +1,9 @@
1
+ import JSONRequest from '../jsonrequest';
2
+ import HTTPClient from '../../client';
3
+ import IntDecoding from '../../../types/intDecoding';
4
+ export default class AccountAssetInformation extends JSONRequest {
5
+ private account;
6
+ private assetID;
7
+ constructor(c: HTTPClient, intDecoding: IntDecoding, account: string, assetID: number);
8
+ path(): string;
9
+ }
@@ -5,4 +5,19 @@ export default class AccountInformation extends JSONRequest {
5
5
  private account;
6
6
  constructor(c: HTTPClient, intDecoding: IntDecoding, account: string);
7
7
  path(): string;
8
+ /**
9
+ * Exclude assets and application data from results
10
+ *
11
+ * #### Example
12
+ * ```typescript
13
+ * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
14
+ * const accountInfo = await algodClient.accountInformation(address)
15
+ * .exclude('all')
16
+ * .do();
17
+ * ```
18
+ *
19
+ * @param round
20
+ * @category query
21
+ */
22
+ exclude(exclude: string): this;
8
23
  }
@@ -1,6 +1,8 @@
1
1
  import ServiceClient from '../serviceClient';
2
2
  import * as modelsv2 from './models/types';
3
3
  import AccountInformation from './accountInformation';
4
+ import AccountAssetInformation from './accountAssetInformation';
5
+ import AccountApplicationInformation from './accountApplicationInformation';
4
6
  import Block from './block';
5
7
  import Compile from './compile';
6
8
  import Dryrun from './dryrun';
@@ -108,6 +110,38 @@ export default class AlgodClient extends ServiceClient {
108
110
  * @category GET
109
111
  */
110
112
  accountInformation(account: string): AccountInformation;
113
+ /**
114
+ * Returns the given account's asset information for a specific asset.
115
+ *
116
+ * #### Example
117
+ * ```typescript
118
+ * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
119
+ * const index = 60553466;
120
+ * const accountAssetInfo = await algodClient.accountAssetInformation(address, index).do();
121
+ * ```
122
+ *
123
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/v2/#get-v2accountsaddress)
124
+ * @param account - The address of the account to look up.
125
+ * @param index - The asset ID to look up.
126
+ * @category GET
127
+ */
128
+ accountAssetInformation(account: string, index: number): AccountAssetInformation;
129
+ /**
130
+ * Returns the given account's application information for a specific application.
131
+ *
132
+ * #### Example
133
+ * ```typescript
134
+ * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
135
+ * const index = 60553466;
136
+ * const accountInfo = await algodClient.accountApplicationInformation(address).do();
137
+ * ```
138
+ *
139
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/algod/v2/#get-v2accountsaddress)
140
+ * @param account - The address of the account to look up.
141
+ * @param index - The application ID to look up.
142
+ * @category GET
143
+ */
144
+ accountApplicationInformation(account: string, index: number): AccountApplicationInformation;
111
145
  /**
112
146
  * Gets the block info for the given round.
113
147
  *
@@ -49,6 +49,24 @@ export declare class Account extends BaseModel {
49
49
  * delegator nor a delegate.
50
50
  */
51
51
  status: string;
52
+ /**
53
+ * The count of all applications that have been opted in, equivalent to the count
54
+ * of application local data (AppLocalState objects) stored in this account.
55
+ */
56
+ totalAppsOptedIn: number | bigint;
57
+ /**
58
+ * The count of all assets that have been opted in, equivalent to the count of
59
+ * AssetHolding objects held by this account.
60
+ */
61
+ totalAssetsOptedIn: number | bigint;
62
+ /**
63
+ * The count of all apps (AppParams objects) created by this account.
64
+ */
65
+ totalCreatedApps: number | bigint;
66
+ /**
67
+ * The count of all assets (AssetParams objects) created by this account.
68
+ */
69
+ totalCreatedAssets: number | bigint;
52
70
  /**
53
71
  * (appl) applications local data stored in this account.
54
72
  * Note the raw object uses `map[int] -> AppLocalState` for this type.
@@ -120,6 +138,12 @@ export declare class Account extends BaseModel {
120
138
  * pool.
121
139
  * * NotParticipating - indicates that the associated account is neither a
122
140
  * delegator nor a delegate.
141
+ * @param totalAppsOptedIn - The count of all applications that have been opted in, equivalent to the count
142
+ * of application local data (AppLocalState objects) stored in this account.
143
+ * @param totalAssetsOptedIn - The count of all assets that have been opted in, equivalent to the count of
144
+ * AssetHolding objects held by this account.
145
+ * @param totalCreatedApps - The count of all apps (AppParams objects) created by this account.
146
+ * @param totalCreatedAssets - The count of all assets (AssetParams objects) created by this account.
123
147
  * @param appsLocalState - (appl) applications local data stored in this account.
124
148
  * Note the raw object uses `map[int] -> AppLocalState` for this type.
125
149
  * @param appsTotalExtraPages - (teap) the sum of all extra application program pages for this account.
@@ -145,7 +169,7 @@ export declare class Account extends BaseModel {
145
169
  * * msig
146
170
  * * lsig
147
171
  */
148
- constructor({ address, amount, amountWithoutPendingRewards, minBalance, pendingRewards, rewards, round, status, appsLocalState, appsTotalExtraPages, appsTotalSchema, assets, authAddr, createdApps, createdAssets, participation, rewardBase, sigType, }: {
172
+ constructor({ address, amount, amountWithoutPendingRewards, minBalance, pendingRewards, rewards, round, status, totalAppsOptedIn, totalAssetsOptedIn, totalCreatedApps, totalCreatedAssets, appsLocalState, appsTotalExtraPages, appsTotalSchema, assets, authAddr, createdApps, createdAssets, participation, rewardBase, sigType, }: {
149
173
  address: string;
150
174
  amount: number | bigint;
151
175
  amountWithoutPendingRewards: number | bigint;
@@ -154,6 +178,10 @@ export declare class Account extends BaseModel {
154
178
  rewards: number | bigint;
155
179
  round: number | bigint;
156
180
  status: string;
181
+ totalAppsOptedIn: number | bigint;
182
+ totalAssetsOptedIn: number | bigint;
183
+ totalCreatedApps: number | bigint;
184
+ totalCreatedAssets: number | bigint;
157
185
  appsLocalState?: ApplicationLocalState[];
158
186
  appsTotalExtraPages?: number | bigint;
159
187
  appsTotalSchema?: ApplicationStateSchema;
@@ -166,6 +194,69 @@ export declare class Account extends BaseModel {
166
194
  sigType?: string;
167
195
  });
168
196
  }
197
+ /**
198
+ * AccountApplicationResponse describes the account's application local state and
199
+ * global state (AppLocalState and AppParams, if either exists) for a specific
200
+ * application ID. Global state will only be returned if the provided address is
201
+ * the application's creator.
202
+ */
203
+ export declare class AccountApplicationResponse extends BaseModel {
204
+ /**
205
+ * The round for which this information is relevant.
206
+ */
207
+ round: number | bigint;
208
+ /**
209
+ * (appl) the application local data stored in this account.
210
+ * The raw account uses `AppLocalState` for this type.
211
+ */
212
+ appLocalState?: ApplicationLocalState;
213
+ /**
214
+ * (appp) parameters of the application created by this account including app
215
+ * global data.
216
+ * The raw account uses `AppParams` for this type.
217
+ */
218
+ createdApp?: ApplicationParams;
219
+ /**
220
+ * Creates a new `AccountApplicationResponse` object.
221
+ * @param round - The round for which this information is relevant.
222
+ * @param appLocalState - (appl) the application local data stored in this account.
223
+ * The raw account uses `AppLocalState` for this type.
224
+ * @param createdApp - (appp) parameters of the application created by this account including app
225
+ * global data.
226
+ * The raw account uses `AppParams` for this type.
227
+ */
228
+ constructor(round: number | bigint, appLocalState?: ApplicationLocalState, createdApp?: ApplicationParams);
229
+ }
230
+ /**
231
+ * AccountAssetResponse describes the account's asset holding and asset parameters
232
+ * (if either exist) for a specific asset ID. Asset parameters will only be
233
+ * returned if the provided address is the asset's creator.
234
+ */
235
+ export declare class AccountAssetResponse extends BaseModel {
236
+ /**
237
+ * The round for which this information is relevant.
238
+ */
239
+ round: number | bigint;
240
+ /**
241
+ * (asset) Details about the asset held by this account.
242
+ * The raw account uses `AssetHolding` for this type.
243
+ */
244
+ assetHolding?: AssetHolding;
245
+ /**
246
+ * (apar) parameters of the asset created by this account.
247
+ * The raw account uses `AssetParams` for this type.
248
+ */
249
+ createdAsset?: AssetParams;
250
+ /**
251
+ * Creates a new `AccountAssetResponse` object.
252
+ * @param round - The round for which this information is relevant.
253
+ * @param assetHolding - (asset) Details about the asset held by this account.
254
+ * The raw account uses `AssetHolding` for this type.
255
+ * @param createdAsset - (apar) parameters of the asset created by this account.
256
+ * The raw account uses `AssetParams` for this type.
257
+ */
258
+ constructor(round: number | bigint, assetHolding?: AssetHolding, createdAsset?: AssetParams);
259
+ }
169
260
  /**
170
261
  * AccountParticipation describes the parameters used by this account in consensus
171
262
  * protocol.
@@ -386,12 +477,6 @@ export declare class AssetHolding extends BaseModel {
386
477
  * Asset ID of the holding.
387
478
  */
388
479
  assetId: number | bigint;
389
- /**
390
- * Address that created this asset. This is the address where the parameters for
391
- * this asset can be found, and also the address where unwanted asset units can be
392
- * sent in the worst case.
393
- */
394
- creator: string;
395
480
  /**
396
481
  * (f) whether or not the holding is frozen.
397
482
  */
@@ -400,12 +485,9 @@ export declare class AssetHolding extends BaseModel {
400
485
  * Creates a new `AssetHolding` object.
401
486
  * @param amount - (a) number of units held.
402
487
  * @param assetId - Asset ID of the holding.
403
- * @param creator - Address that created this asset. This is the address where the parameters for
404
- * this asset can be found, and also the address where unwanted asset units can be
405
- * sent in the worst case.
406
488
  * @param isFrozen - (f) whether or not the holding is frozen.
407
489
  */
408
- constructor(amount: number | bigint, assetId: number | bigint, creator: string, isFrozen: boolean);
490
+ constructor(amount: number | bigint, assetId: number | bigint, isFrozen: boolean);
409
491
  }
410
492
  /**
411
493
  * AssetParams specifies the parameters for an asset.
@@ -807,13 +889,13 @@ export declare class DryrunTxnResult extends BaseModel {
807
889
  */
808
890
  export declare class ErrorResponse extends BaseModel {
809
891
  message: string;
810
- data?: string;
892
+ data?: Record<string, any>;
811
893
  /**
812
894
  * Creates a new `ErrorResponse` object.
813
895
  * @param message -
814
896
  * @param data -
815
897
  */
816
- constructor(message: string, data?: string);
898
+ constructor(message: string, data?: Record<string, any>);
817
899
  }
818
900
  /**
819
901
  * Represents a TEAL value delta.
@@ -6,6 +6,10 @@ import LookupAccountTransactions from './lookupAccountTransactions';
6
6
  import LookupBlock from './lookupBlock';
7
7
  import LookupTransactionByID from './lookupTransactionByID';
8
8
  import LookupAccountByID from './lookupAccountByID';
9
+ import LookupAccountAssets from './lookupAccountAssets';
10
+ import LookupAccountCreatedAssets from './lookupAccountCreatedAssets';
11
+ import LookupAccountAppLocalStates from './lookupAccountAppLocalStates';
12
+ import LookupAccountCreatedApplications from './lookupAccountCreatedApplications';
9
13
  import LookupAssetByID from './lookupAssetByID';
10
14
  import LookupApplications from './lookupApplications';
11
15
  import LookupApplicationLogs from './lookupApplicationLogs';
@@ -149,6 +153,62 @@ export default class IndexerClient extends ServiceClient {
149
153
  * @category GET
150
154
  */
151
155
  lookupAccountByID(account: string): LookupAccountByID;
156
+ /**
157
+ * Returns asset about the given account.
158
+ *
159
+ * #### Example
160
+ * ```typescript
161
+ * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
162
+ * const accountInfo = await indexerClient.lookupAccountAssets(address).do();
163
+ * ```
164
+ *
165
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-id)
166
+ * @param account - The address of the account to look up.
167
+ * @category GET
168
+ */
169
+ lookupAccountAssets(account: string): LookupAccountAssets;
170
+ /**
171
+ * Returns asset information created by the given account.
172
+ *
173
+ * #### Example
174
+ * ```typescript
175
+ * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
176
+ * const accountInfo = await indexerClient.lookupAccountCreatedAssets(address).do();
177
+ * ```
178
+ *
179
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-id)
180
+ * @param account - The address of the account to look up.
181
+ * @category GET
182
+ */
183
+ lookupAccountCreatedAssets(account: string): LookupAccountCreatedAssets;
184
+ /**
185
+ * Returns application local state about the given account.
186
+ *
187
+ * #### Example
188
+ * ```typescript
189
+ * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
190
+ * const accountInfo = await indexerClient.lookupAccountAppLocalStates(address).do();
191
+ * ```
192
+ *
193
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-id)
194
+ * @param account - The address of the account to look up.
195
+ * @category GET
196
+ */
197
+ lookupAccountAppLocalStates(account: string): LookupAccountAppLocalStates;
198
+ /**
199
+ * Returns application information created by the given account.
200
+ *
201
+ * #### Example
202
+ * ```typescript
203
+ * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
204
+ * const accountInfo = await indexerClient.lookupAccountCreatedApplications(address).do();
205
+ * ```
206
+ *
207
+ * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-id)
208
+ * @param account - The address of the account to look up.
209
+ * @category GET
210
+ */
211
+ lookupAccountCreatedApplications(account: string): LookupAccountCreatedApplications;
152
212
  /**
153
213
  * Returns information about the passed asset.
154
214
  *
@@ -0,0 +1,85 @@
1
+ import JSONRequest from '../jsonrequest';
2
+ import HTTPClient from '../../client';
3
+ import IntDecoding from '../../../types/intDecoding';
4
+ export default class LookupAccountAppLocalStates extends JSONRequest {
5
+ private account;
6
+ constructor(c: HTTPClient, intDecoding: IntDecoding, account: string);
7
+ path(): string;
8
+ /**
9
+ * Add a limit for filter.
10
+ *
11
+ * #### Example
12
+ * ```typescript
13
+ * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
14
+ * const maxResults = 20;
15
+ * const accountAssets = await indexerClient
16
+ * .lookupAccountAppLocalStates(address)
17
+ * .limit(maxResults)
18
+ * .do();
19
+ * ```
20
+ *
21
+ * @param limit - maximum number of results to return.
22
+ */
23
+ limit(limit: number): this;
24
+ /**
25
+ * Specify round to filter with.
26
+ *
27
+ * #### Example
28
+ * ```typescript
29
+ * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
30
+ * const targetBlock = 18309917;
31
+ * const accountAssets = await indexerClient
32
+ * .lookupAccountAppLocalStates(address)
33
+ * .round(targetBlock)
34
+ * .do();
35
+ * ```
36
+ * @param round
37
+ */
38
+ round(round: number): this;
39
+ /**
40
+ * Specify the next page of results.
41
+ *
42
+ * #### Example
43
+ * ```typescript
44
+ * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
45
+ * const maxResults = 20;
46
+ * const nextToken = "APA6C7C3NCANRPIBUWQOF7WSKLJMK6RPQUVFLLDV4U5WCQE4DEF26D4E3E";
47
+ * const accountAssets = await indexerClient
48
+ * .lookupAccountAppLocalStates(address)
49
+ * .limit(maxResults)
50
+ * .next(nextToken)
51
+ * .do();
52
+ * ```
53
+ * @param nextToken - provided by the previous results.
54
+ */
55
+ nextToken(nextToken: string): this;
56
+ /**
57
+ * Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates
58
+ *
59
+ * #### Example
60
+ * ```typescript
61
+ * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
62
+ * const accountAssets = await indexerClient
63
+ * .lookupAccountAppLocalStates(address)
64
+ * .includeAll(false)
65
+ * .do();
66
+ * ```
67
+ * @param value
68
+ */
69
+ includeAll(value?: boolean): this;
70
+ /**
71
+ * Specify an applicationID to search for
72
+ *
73
+ * #### Example
74
+ * ```typescript
75
+ * const applicationID = 163650;
76
+ * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
77
+ * const accountApplications = await indexerClient
78
+ * .lookupAccountAppLocalStates(address)
79
+ * .applicationID(applicationID)
80
+ * .do();
81
+ * ```
82
+ * @param index - the applicationID
83
+ */
84
+ applicationID(index: number): this;
85
+ }
@@ -0,0 +1,85 @@
1
+ import JSONRequest from '../jsonrequest';
2
+ import HTTPClient from '../../client';
3
+ import IntDecoding from '../../../types/intDecoding';
4
+ export default class LookupAccountAssets extends JSONRequest {
5
+ private account;
6
+ constructor(c: HTTPClient, intDecoding: IntDecoding, account: string);
7
+ path(): string;
8
+ /**
9
+ * Add a limit for filter.
10
+ *
11
+ * #### Example
12
+ * ```typescript
13
+ * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
14
+ * const maxResults = 20;
15
+ * const accountAssets = await indexerClient
16
+ * .lookupAccountAssets(address)
17
+ * .limit(maxResults)
18
+ * .do();
19
+ * ```
20
+ *
21
+ * @param limit - maximum number of results to return.
22
+ */
23
+ limit(limit: number): this;
24
+ /**
25
+ * Specify round to filter with.
26
+ *
27
+ * #### Example
28
+ * ```typescript
29
+ * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
30
+ * const targetBlock = 18309917;
31
+ * const accountAssets = await indexerClient
32
+ * .lookupAccountAssets(address)
33
+ * .round(targetBlock)
34
+ * .do();
35
+ * ```
36
+ * @param round
37
+ */
38
+ round(round: number): this;
39
+ /**
40
+ * Specify the next page of results.
41
+ *
42
+ * #### Example
43
+ * ```typescript
44
+ * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
45
+ * const maxResults = 20;
46
+ * const nextToken = "APA6C7C3NCANRPIBUWQOF7WSKLJMK6RPQUVFLLDV4U5WCQE4DEF26D4E3E";
47
+ * const accountAssets = await indexerClient
48
+ * .lookupAccountAssets(address)
49
+ * .limit(maxResults)
50
+ * .next(nextToken)
51
+ * .do();
52
+ * ```
53
+ * @param nextToken - provided by the previous results.
54
+ */
55
+ nextToken(nextToken: string): this;
56
+ /**
57
+ * Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates
58
+ *
59
+ * #### Example
60
+ * ```typescript
61
+ * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
62
+ * const accountAssets = await indexerClient
63
+ * .lookupAccountAssets(address)
64
+ * .includeAll(false)
65
+ * .do();
66
+ * ```
67
+ * @param value
68
+ */
69
+ includeAll(value?: boolean): this;
70
+ /**
71
+ * Specify an assetID to search for.
72
+ *
73
+ * #### Example
74
+ * ```typescript
75
+ * const assetId = 163650;
76
+ * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
77
+ * const assetAssets = await indexerClient
78
+ * .lookupAccountAssets(address)
79
+ * .assetId(assetId)
80
+ * .do();
81
+ * ```
82
+ * @param index - the assetID
83
+ */
84
+ assetId(index: number): this;
85
+ }
@@ -7,4 +7,5 @@ export default class LookupAccountByID extends JSONRequest {
7
7
  path(): string;
8
8
  round(round: number): this;
9
9
  includeAll(value?: boolean): this;
10
+ exclude(exclude: string): this;
10
11
  }
@@ -0,0 +1,85 @@
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
+ constructor(c: HTTPClient, intDecoding: IntDecoding, account: string);
7
+ path(): string;
8
+ /**
9
+ * Add a limit for filter.
10
+ *
11
+ * #### Example
12
+ * ```typescript
13
+ * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
14
+ * const maxResults = 20;
15
+ * const accountAssets = await indexerClient
16
+ * .lookupAccountCreatedApplications(address)
17
+ * .limit(maxResults)
18
+ * .do();
19
+ * ```
20
+ *
21
+ * @param limit - maximum number of results to return.
22
+ */
23
+ limit(limit: number): this;
24
+ /**
25
+ * Specify round to filter with.
26
+ *
27
+ * #### Example
28
+ * ```typescript
29
+ * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
30
+ * const targetBlock = 18309917;
31
+ * const accountAssets = await indexerClient
32
+ * .lookupAccountCreatedApplications(address)
33
+ * .round(targetBlock)
34
+ * .do();
35
+ * ```
36
+ * @param round
37
+ */
38
+ round(round: number): this;
39
+ /**
40
+ * Specify the next page of results.
41
+ *
42
+ * #### Example
43
+ * ```typescript
44
+ * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
45
+ * const maxResults = 20;
46
+ * const nextToken = "APA6C7C3NCANRPIBUWQOF7WSKLJMK6RPQUVFLLDV4U5WCQE4DEF26D4E3E";
47
+ * const accountAssets = await indexerClient
48
+ * .lookupAccountCreatedApplications(address)
49
+ * .limit(maxResults)
50
+ * .next(nextToken)
51
+ * .do();
52
+ * ```
53
+ * @param nextToken - provided by the previous results.
54
+ */
55
+ nextToken(nextToken: string): this;
56
+ /**
57
+ * Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates
58
+ *
59
+ * #### Example
60
+ * ```typescript
61
+ * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
62
+ * const accountAssets = await indexerClient
63
+ * .lookupAccountCreatedApplications(address)
64
+ * .includeAll(false)
65
+ * .do();
66
+ * ```
67
+ * @param value
68
+ */
69
+ includeAll(value?: boolean): this;
70
+ /**
71
+ * Specify an applicationID to search for
72
+ *
73
+ * #### Example
74
+ * ```typescript
75
+ * const applicationID = 163650;
76
+ * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
77
+ * const accountApplications = await indexerClient
78
+ * .lookupAccountAppLocalStates(address)
79
+ * .applicationID(applicationID)
80
+ * .do();
81
+ * ```
82
+ * @param index - the applicationID
83
+ */
84
+ applicationID(index: number): this;
85
+ }