@algorandfoundation/algokit-utils 10.0.0-alpha.16 → 10.0.0-alpha.17

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.
@@ -171,17 +171,17 @@ declare class AppFactory {
171
171
  get params(): {
172
172
  /** Return params for a create ABI call, including deploy-time TEAL template replacements and compilation if provided */
173
173
  create: (params: {
174
- maxFee?: AlgoAmount | undefined;
175
- lease?: string | Uint8Array | undefined;
174
+ signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
176
175
  rekeyTo?: ReadableAddress | undefined;
177
- onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
178
- signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
179
176
  note?: string | Uint8Array | undefined;
177
+ lease?: string | Uint8Array | undefined;
180
178
  staticFee?: AlgoAmount | undefined;
181
179
  extraFee?: AlgoAmount | undefined;
180
+ maxFee?: AlgoAmount | undefined;
182
181
  validityWindow?: number | bigint | undefined;
183
182
  firstValidRound?: bigint | undefined;
184
183
  lastValidRound?: bigint | undefined;
184
+ onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
185
185
  accountReferences?: ReadableAddress[] | undefined;
186
186
  appReferences?: bigint[] | undefined;
187
187
  assetReferences?: bigint[] | undefined;
@@ -219,17 +219,17 @@ declare class AppFactory {
219
219
  };
220
220
  approvalProgram: Uint8Array;
221
221
  clearStateProgram: Uint8Array;
222
- maxFee?: AlgoAmount | undefined;
223
- lease?: string | Uint8Array | undefined;
222
+ signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
224
223
  rekeyTo?: ReadableAddress | undefined;
225
- onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
226
- signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
227
224
  note?: string | Uint8Array | undefined;
225
+ lease?: string | Uint8Array | undefined;
228
226
  staticFee?: AlgoAmount | undefined;
229
227
  extraFee?: AlgoAmount | undefined;
228
+ maxFee?: AlgoAmount | undefined;
230
229
  validityWindow?: number | bigint | undefined;
231
230
  firstValidRound?: bigint | undefined;
232
231
  lastValidRound?: bigint | undefined;
232
+ onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
233
233
  accountReferences?: ReadableAddress[] | undefined;
234
234
  appReferences?: bigint[] | undefined;
235
235
  assetReferences?: bigint[] | undefined;
@@ -244,21 +244,21 @@ declare class AppFactory {
244
244
  extraProgramPages?: number | undefined;
245
245
  } & {
246
246
  sender: Address;
247
- signer: AddressWithTransactionSigner | TransactionSigner | undefined;
247
+ signer: TransactionSigner | AddressWithTransactionSigner | undefined;
248
248
  method: ABIMethod;
249
- args: (ABIValue | TransactionWithSigner | Transaction | Promise<Transaction> | AppMethodCall<{
250
- maxFee?: AlgoAmount | undefined;
249
+ args: (ABIValue | Transaction | Promise<Transaction> | TransactionWithSigner | AppMethodCall<{
251
250
  sender: SendingAddress;
252
- lease?: string | Uint8Array | undefined;
251
+ signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
253
252
  rekeyTo?: ReadableAddress | undefined;
254
- onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
255
- signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
256
253
  note?: string | Uint8Array | undefined;
254
+ lease?: string | Uint8Array | undefined;
257
255
  staticFee?: AlgoAmount | undefined;
258
256
  extraFee?: AlgoAmount | undefined;
257
+ maxFee?: AlgoAmount | undefined;
259
258
  validityWindow?: number | bigint | undefined;
260
259
  firstValidRound?: bigint | undefined;
261
260
  lastValidRound?: bigint | undefined;
261
+ onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
262
262
  args?: Uint8Array[] | undefined;
263
263
  accountReferences?: ReadableAddress[] | undefined;
264
264
  appReferences?: bigint[] | undefined;
@@ -278,7 +278,7 @@ declare class AppFactory {
278
278
  extraProgramPages?: number | undefined;
279
279
  }> | AppMethodCall<{
280
280
  sender: SendingAddress;
281
- signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
281
+ signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
282
282
  rekeyTo?: ReadableAddress | undefined;
283
283
  note?: string | Uint8Array | undefined;
284
284
  lease?: string | Uint8Array | undefined;
@@ -304,17 +304,17 @@ declare class AppFactory {
304
304
  }>;
305
305
  /** Return params for a deployment update ABI call */
306
306
  deployUpdate: (params: {
307
- maxFee?: AlgoAmount | undefined;
308
- lease?: string | Uint8Array | undefined;
307
+ signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
309
308
  rekeyTo?: ReadableAddress | undefined;
310
- onComplete?: OnApplicationComplete | undefined;
311
- signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
312
309
  note?: string | Uint8Array | undefined;
310
+ lease?: string | Uint8Array | undefined;
313
311
  staticFee?: AlgoAmount | undefined;
314
312
  extraFee?: AlgoAmount | undefined;
313
+ maxFee?: AlgoAmount | undefined;
315
314
  validityWindow?: number | bigint | undefined;
316
315
  firstValidRound?: bigint | undefined;
317
316
  lastValidRound?: bigint | undefined;
317
+ onComplete?: OnApplicationComplete | undefined;
318
318
  accountReferences?: ReadableAddress[] | undefined;
319
319
  appReferences?: bigint[] | undefined;
320
320
  assetReferences?: bigint[] | undefined;
@@ -325,17 +325,17 @@ declare class AppFactory {
325
325
  method: string;
326
326
  args?: (ABIValue | AppMethodCallTransactionArgument | undefined)[] | undefined;
327
327
  }) => {
328
- maxFee?: AlgoAmount | undefined;
329
- lease?: string | Uint8Array | undefined;
328
+ signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
330
329
  rekeyTo?: ReadableAddress | undefined;
331
- onComplete?: OnApplicationComplete | undefined;
332
- signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
333
330
  note?: string | Uint8Array | undefined;
331
+ lease?: string | Uint8Array | undefined;
334
332
  staticFee?: AlgoAmount | undefined;
335
333
  extraFee?: AlgoAmount | undefined;
334
+ maxFee?: AlgoAmount | undefined;
336
335
  validityWindow?: number | bigint | undefined;
337
336
  firstValidRound?: bigint | undefined;
338
337
  lastValidRound?: bigint | undefined;
338
+ onComplete?: OnApplicationComplete | undefined;
339
339
  accountReferences?: ReadableAddress[] | undefined;
340
340
  appReferences?: bigint[] | undefined;
341
341
  assetReferences?: bigint[] | undefined;
@@ -347,21 +347,21 @@ declare class AppFactory {
347
347
  args?: (ABIValue | AppMethodCallTransactionArgument | undefined)[] | undefined;
348
348
  } & {
349
349
  sender: Address;
350
- signer: AddressWithTransactionSigner | TransactionSigner | undefined;
350
+ signer: TransactionSigner | AddressWithTransactionSigner | undefined;
351
351
  method: ABIMethod;
352
- args: (ABIValue | TransactionWithSigner | Transaction | Promise<Transaction> | AppMethodCall<{
353
- maxFee?: AlgoAmount | undefined;
352
+ args: (ABIValue | Transaction | Promise<Transaction> | TransactionWithSigner | AppMethodCall<{
354
353
  sender: SendingAddress;
355
- lease?: string | Uint8Array | undefined;
354
+ signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
356
355
  rekeyTo?: ReadableAddress | undefined;
357
- onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
358
- signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
359
356
  note?: string | Uint8Array | undefined;
357
+ lease?: string | Uint8Array | undefined;
360
358
  staticFee?: AlgoAmount | undefined;
361
359
  extraFee?: AlgoAmount | undefined;
360
+ maxFee?: AlgoAmount | undefined;
362
361
  validityWindow?: number | bigint | undefined;
363
362
  firstValidRound?: bigint | undefined;
364
363
  lastValidRound?: bigint | undefined;
364
+ onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
365
365
  args?: Uint8Array[] | undefined;
366
366
  accountReferences?: ReadableAddress[] | undefined;
367
367
  appReferences?: bigint[] | undefined;
@@ -381,7 +381,7 @@ declare class AppFactory {
381
381
  extraProgramPages?: number | undefined;
382
382
  }> | AppMethodCall<{
383
383
  sender: SendingAddress;
384
- signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
384
+ signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
385
385
  rekeyTo?: ReadableAddress | undefined;
386
386
  note?: string | Uint8Array | undefined;
387
387
  lease?: string | Uint8Array | undefined;
@@ -407,17 +407,17 @@ declare class AppFactory {
407
407
  };
408
408
  /** Return params for a deployment delete ABI call */
409
409
  deployDelete: (params: {
410
- maxFee?: AlgoAmount | undefined;
411
- lease?: string | Uint8Array | undefined;
410
+ signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
412
411
  rekeyTo?: ReadableAddress | undefined;
413
- onComplete?: OnApplicationComplete | undefined;
414
- signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
415
412
  note?: string | Uint8Array | undefined;
413
+ lease?: string | Uint8Array | undefined;
416
414
  staticFee?: AlgoAmount | undefined;
417
415
  extraFee?: AlgoAmount | undefined;
416
+ maxFee?: AlgoAmount | undefined;
418
417
  validityWindow?: number | bigint | undefined;
419
418
  firstValidRound?: bigint | undefined;
420
419
  lastValidRound?: bigint | undefined;
420
+ onComplete?: OnApplicationComplete | undefined;
421
421
  accountReferences?: ReadableAddress[] | undefined;
422
422
  appReferences?: bigint[] | undefined;
423
423
  assetReferences?: bigint[] | undefined;
@@ -428,17 +428,17 @@ declare class AppFactory {
428
428
  method: string;
429
429
  args?: (ABIValue | AppMethodCallTransactionArgument | undefined)[] | undefined;
430
430
  }) => {
431
- maxFee?: AlgoAmount | undefined;
432
- lease?: string | Uint8Array | undefined;
431
+ signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
433
432
  rekeyTo?: ReadableAddress | undefined;
434
- onComplete?: OnApplicationComplete | undefined;
435
- signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
436
433
  note?: string | Uint8Array | undefined;
434
+ lease?: string | Uint8Array | undefined;
437
435
  staticFee?: AlgoAmount | undefined;
438
436
  extraFee?: AlgoAmount | undefined;
437
+ maxFee?: AlgoAmount | undefined;
439
438
  validityWindow?: number | bigint | undefined;
440
439
  firstValidRound?: bigint | undefined;
441
440
  lastValidRound?: bigint | undefined;
441
+ onComplete?: OnApplicationComplete | undefined;
442
442
  accountReferences?: ReadableAddress[] | undefined;
443
443
  appReferences?: bigint[] | undefined;
444
444
  assetReferences?: bigint[] | undefined;
@@ -450,21 +450,21 @@ declare class AppFactory {
450
450
  args?: (ABIValue | AppMethodCallTransactionArgument | undefined)[] | undefined;
451
451
  } & {
452
452
  sender: Address;
453
- signer: AddressWithTransactionSigner | TransactionSigner | undefined;
453
+ signer: TransactionSigner | AddressWithTransactionSigner | undefined;
454
454
  method: ABIMethod;
455
- args: (ABIValue | TransactionWithSigner | Transaction | Promise<Transaction> | AppMethodCall<{
456
- maxFee?: AlgoAmount | undefined;
455
+ args: (ABIValue | Transaction | Promise<Transaction> | TransactionWithSigner | AppMethodCall<{
457
456
  sender: SendingAddress;
458
- lease?: string | Uint8Array | undefined;
457
+ signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
459
458
  rekeyTo?: ReadableAddress | undefined;
460
- onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
461
- signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
462
459
  note?: string | Uint8Array | undefined;
460
+ lease?: string | Uint8Array | undefined;
463
461
  staticFee?: AlgoAmount | undefined;
464
462
  extraFee?: AlgoAmount | undefined;
463
+ maxFee?: AlgoAmount | undefined;
465
464
  validityWindow?: number | bigint | undefined;
466
465
  firstValidRound?: bigint | undefined;
467
466
  lastValidRound?: bigint | undefined;
467
+ onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
468
468
  args?: Uint8Array[] | undefined;
469
469
  accountReferences?: ReadableAddress[] | undefined;
470
470
  appReferences?: bigint[] | undefined;
@@ -484,7 +484,7 @@ declare class AppFactory {
484
484
  extraProgramPages?: number | undefined;
485
485
  }> | AppMethodCall<{
486
486
  sender: SendingAddress;
487
- signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
487
+ signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
488
488
  rekeyTo?: ReadableAddress | undefined;
489
489
  note?: string | Uint8Array | undefined;
490
490
  lease?: string | Uint8Array | undefined;
@@ -511,13 +511,13 @@ declare class AppFactory {
511
511
  bare: {
512
512
  /** Return params for a create bare call, including deploy-time TEAL template replacements and compilation if provided */
513
513
  create: (params?: {
514
- maxFee?: AlgoAmount | undefined;
515
- lease?: string | Uint8Array | undefined;
514
+ signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
516
515
  rekeyTo?: ReadableAddress | undefined;
517
- signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
518
516
  note?: string | Uint8Array | undefined;
517
+ lease?: string | Uint8Array | undefined;
519
518
  staticFee?: AlgoAmount | undefined;
520
519
  extraFee?: AlgoAmount | undefined;
520
+ maxFee?: AlgoAmount | undefined;
521
521
  validityWindow?: number | bigint | undefined;
522
522
  firstValidRound?: bigint | undefined;
523
523
  lastValidRound?: bigint | undefined;
@@ -560,13 +560,13 @@ declare class AppFactory {
560
560
  /** The number of byte slices saved in local state. */
561
561
  localByteSlices: number;
562
562
  };
563
- maxFee?: AlgoAmount | undefined;
564
- lease?: string | Uint8Array | undefined;
563
+ signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
565
564
  rekeyTo?: ReadableAddress | undefined;
566
- signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
567
565
  note?: string | Uint8Array | undefined;
566
+ lease?: string | Uint8Array | undefined;
568
567
  staticFee?: AlgoAmount | undefined;
569
568
  extraFee?: AlgoAmount | undefined;
569
+ maxFee?: AlgoAmount | undefined;
570
570
  validityWindow?: number | bigint | undefined;
571
571
  firstValidRound?: bigint | undefined;
572
572
  lastValidRound?: bigint | undefined;
@@ -584,18 +584,18 @@ declare class AppFactory {
584
584
  extraProgramPages?: number | undefined;
585
585
  } & {
586
586
  sender: Address;
587
- signer: AddressWithTransactionSigner | TransactionSigner | undefined;
587
+ signer: TransactionSigner | AddressWithTransactionSigner | undefined;
588
588
  onComplete: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication;
589
589
  }>;
590
590
  /** Return params for a deployment update bare call */
591
591
  deployUpdate: (params?: {
592
- maxFee?: AlgoAmount | undefined;
593
- lease?: string | Uint8Array | undefined;
592
+ signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
594
593
  rekeyTo?: ReadableAddress | undefined;
595
- signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
596
594
  note?: string | Uint8Array | undefined;
595
+ lease?: string | Uint8Array | undefined;
597
596
  staticFee?: AlgoAmount | undefined;
598
597
  extraFee?: AlgoAmount | undefined;
598
+ maxFee?: AlgoAmount | undefined;
599
599
  validityWindow?: number | bigint | undefined;
600
600
  firstValidRound?: bigint | undefined;
601
601
  lastValidRound?: bigint | undefined;
@@ -608,13 +608,13 @@ declare class AppFactory {
608
608
  rejectVersion?: number | undefined;
609
609
  sender?: ReadableAddress | undefined;
610
610
  } | undefined) => {
611
- maxFee?: AlgoAmount | undefined;
612
- lease?: string | Uint8Array | undefined;
611
+ signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
613
612
  rekeyTo?: ReadableAddress | undefined;
614
- signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
615
613
  note?: string | Uint8Array | undefined;
614
+ lease?: string | Uint8Array | undefined;
616
615
  staticFee?: AlgoAmount | undefined;
617
616
  extraFee?: AlgoAmount | undefined;
617
+ maxFee?: AlgoAmount | undefined;
618
618
  validityWindow?: number | bigint | undefined;
619
619
  firstValidRound?: bigint | undefined;
620
620
  lastValidRound?: bigint | undefined;
@@ -628,18 +628,18 @@ declare class AppFactory {
628
628
  sender?: ReadableAddress | undefined;
629
629
  } & {
630
630
  sender: Address;
631
- signer: AddressWithTransactionSigner | TransactionSigner | undefined;
631
+ signer: TransactionSigner | AddressWithTransactionSigner | undefined;
632
632
  onComplete: OnApplicationComplete.UpdateApplication;
633
633
  };
634
634
  /** Return params for a deployment delete bare call */
635
635
  deployDelete: (params?: {
636
- maxFee?: AlgoAmount | undefined;
637
- lease?: string | Uint8Array | undefined;
636
+ signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
638
637
  rekeyTo?: ReadableAddress | undefined;
639
- signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
640
638
  note?: string | Uint8Array | undefined;
639
+ lease?: string | Uint8Array | undefined;
641
640
  staticFee?: AlgoAmount | undefined;
642
641
  extraFee?: AlgoAmount | undefined;
642
+ maxFee?: AlgoAmount | undefined;
643
643
  validityWindow?: number | bigint | undefined;
644
644
  firstValidRound?: bigint | undefined;
645
645
  lastValidRound?: bigint | undefined;
@@ -652,13 +652,13 @@ declare class AppFactory {
652
652
  rejectVersion?: number | undefined;
653
653
  sender?: ReadableAddress | undefined;
654
654
  } | undefined) => {
655
- maxFee?: AlgoAmount | undefined;
656
- lease?: string | Uint8Array | undefined;
655
+ signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
657
656
  rekeyTo?: ReadableAddress | undefined;
658
- signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
659
657
  note?: string | Uint8Array | undefined;
658
+ lease?: string | Uint8Array | undefined;
660
659
  staticFee?: AlgoAmount | undefined;
661
660
  extraFee?: AlgoAmount | undefined;
661
+ maxFee?: AlgoAmount | undefined;
662
662
  validityWindow?: number | bigint | undefined;
663
663
  firstValidRound?: bigint | undefined;
664
664
  lastValidRound?: bigint | undefined;
@@ -672,7 +672,7 @@ declare class AppFactory {
672
672
  sender?: ReadableAddress | undefined;
673
673
  } & {
674
674
  sender: Address;
675
- signer: AddressWithTransactionSigner | TransactionSigner | undefined;
675
+ signer: TransactionSigner | AddressWithTransactionSigner | undefined;
676
676
  onComplete: OnApplicationComplete.DeleteApplication;
677
677
  };
678
678
  };
@@ -1,18 +0,0 @@
1
- //#region rolldown:runtime
2
- var __defProp = Object.defineProperty;
3
- var __export = (all, symbols) => {
4
- let target = {};
5
- for (var name in all) {
6
- __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
10
- }
11
- if (symbols) {
12
- __defProp(target, Symbol.toStringTag, { value: "Module" });
13
- }
14
- return target;
15
- };
16
-
17
- //#endregion
18
- export { __export };
@@ -1 +0,0 @@
1
- {"version":3,"file":"indexer-lookup.js","names":["nextToken: string | undefined"],"sources":["../src/indexer-lookup.ts"],"sourcesContent":["import { Address } from '@algorandfoundation/algokit-common'\nimport {\n Application,\n ApplicationsResponse,\n AssetBalancesResponse,\n IndexerClient,\n MiniAssetHolding,\n TransactionsResponse,\n} from '@algorandfoundation/algokit-indexer-client'\nimport { LookupAssetHoldingsOptions } from './types/indexer'\nexport type SearchForTransactionsCriteria = Omit<NonNullable<Parameters<IndexerClient['searchForTransactions']>[0]>, 'limit' | 'next'>\n\nconst DEFAULT_INDEXER_MAX_API_RESOURCES_PER_ACCOUNT = 1000 //MaxAPIResourcesPerAccount: This is the default maximum, though may be provider specific\n\n/**\n * Looks up applications that were created by the given address; will automatically paginate through all data.\n * @param indexer An indexer instance\n * @param address The address of the creator to look up\n * @param getAll Whether or not to include deleted applications. Default true.\n * @param paginationLimit The number of records to return per paginated request, default 1000\n * @returns The list of application results\n */\nexport async function lookupAccountCreatedApplicationByAddress(\n indexer: IndexerClient,\n address: string | Address,\n getAll: boolean = true,\n paginationLimit?: number,\n): Promise<Application[]> {\n return await executePaginatedRequest(\n (response: ApplicationsResponse | { message: string }) => {\n if ('message' in response) {\n throw { status: 404, ...response }\n }\n return response.applications\n },\n (nextToken) => {\n return indexer.lookupAccountCreatedApplications(address, {\n includeAll: getAll,\n limit: paginationLimit ?? DEFAULT_INDEXER_MAX_API_RESOURCES_PER_ACCOUNT,\n ...(nextToken && { next: nextToken }),\n })\n },\n )\n}\n\n/**\n * Looks up asset holdings for the given asset; will automatically paginate through all data.\n * @param indexer An indexer instance\n * @param assetId The ID of the asset to look up holdings for\n * @param options Optional options to control the lookup\n * @param paginationLimit The number of records to return per paginated request, default 1000\n * @returns The list of application results\n */\nexport async function lookupAssetHoldings(\n indexer: IndexerClient,\n assetId: number | bigint,\n options?: LookupAssetHoldingsOptions,\n paginationLimit?: number,\n): Promise<MiniAssetHolding[]> {\n return await executePaginatedRequest(\n (response: AssetBalancesResponse | { message: string }) => {\n if ('message' in response) {\n throw { status: 404, ...response }\n }\n return response.balances\n },\n (nextToken) => {\n return indexer.lookupAssetBalances(assetId, {\n limit: paginationLimit ?? DEFAULT_INDEXER_MAX_API_RESOURCES_PER_ACCOUNT,\n ...(options?.currencyGreaterThan !== undefined && { currencyGreaterThan: options.currencyGreaterThan }),\n ...(options?.currencyLessThan !== undefined && { currencyLessThan: options.currencyLessThan }),\n ...(options?.includeAll !== undefined && { includeAll: options.includeAll }),\n ...(nextToken && { next: nextToken }),\n })\n },\n )\n}\n\n/**\n * Allows transactions to be searched for the given criteria.\n * @param indexer An indexer client\n * @param searchCriteria The criteria to search for\n * @param paginationLimit The number of records to return per paginated request, default 1000\n * @returns The search results\n */\nexport async function searchTransactions(\n indexer: IndexerClient,\n searchCriteria: SearchForTransactionsCriteria,\n paginationLimit?: number,\n): Promise<TransactionsResponse> {\n let currentRound = 0n\n const transactions = await executePaginatedRequest(\n (response: TransactionsResponse | { message: string }) => {\n if ('message' in response) {\n throw { status: 404, ...response }\n }\n if (response.currentRound > currentRound) {\n currentRound = response.currentRound\n }\n return response.transactions\n },\n (nextToken) => {\n return indexer.searchForTransactions({\n ...searchCriteria,\n limit: paginationLimit ?? DEFAULT_INDEXER_MAX_API_RESOURCES_PER_ACCOUNT,\n next: nextToken,\n })\n },\n )\n\n return {\n currentRound,\n nextToken: undefined,\n transactions,\n } satisfies TransactionsResponse\n}\n\n// https://dev.algorand.co/reference/rest-apis/indexer\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport async function executePaginatedRequest<TResult, TRequest extends Promise<any>>(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n extractItems: (response: any) => TResult[],\n buildRequest: (nextToken?: string) => TRequest,\n): Promise<TResult[]> {\n const results = []\n\n let nextToken: string | undefined = undefined\n while (true) {\n const request = buildRequest(nextToken)\n const response = await request\n const items = extractItems(response)\n if (items == null || items.length === 0) {\n break\n }\n results.push(...items)\n nextToken = response['nextToken']\n if (!nextToken) {\n break\n }\n }\n\n return results\n}\n"],"mappings":";;;;;;;;;AAYA,MAAM,gDAAgD;;;;;;;;;AAUtD,eAAsB,yCACpB,SACA,SACA,SAAkB,MAClB,iBACwB;AACxB,QAAO,MAAM,yBACV,aAAyD;AACxD,MAAI,aAAa,SACf,OAAM;GAAE,QAAQ;GAAK,GAAG;GAAU;AAEpC,SAAO,SAAS;KAEjB,cAAc;AACb,SAAO,QAAQ,iCAAiC,SAAS;GACvD,YAAY;GACZ,OAAO,mBAAmB;GAC1B,GAAI,aAAa,EAAE,MAAM,WAAW;GACrC,CAAC;GAEL;;;;;;;;;;AAWH,eAAsB,oBACpB,SACA,SACA,SACA,iBAC6B;AAC7B,QAAO,MAAM,yBACV,aAA0D;AACzD,MAAI,aAAa,SACf,OAAM;GAAE,QAAQ;GAAK,GAAG;GAAU;AAEpC,SAAO,SAAS;KAEjB,cAAc;AACb,SAAO,QAAQ,oBAAoB,SAAS;GAC1C,OAAO,mBAAmB;GAC1B,GAAI,SAAS,wBAAwB,UAAa,EAAE,qBAAqB,QAAQ,qBAAqB;GACtG,GAAI,SAAS,qBAAqB,UAAa,EAAE,kBAAkB,QAAQ,kBAAkB;GAC7F,GAAI,SAAS,eAAe,UAAa,EAAE,YAAY,QAAQ,YAAY;GAC3E,GAAI,aAAa,EAAE,MAAM,WAAW;GACrC,CAAC;GAEL;;;;;;;;;AAUH,eAAsB,mBACpB,SACA,gBACA,iBAC+B;CAC/B,IAAI,eAAe;CACnB,MAAM,eAAe,MAAM,yBACxB,aAAyD;AACxD,MAAI,aAAa,SACf,OAAM;GAAE,QAAQ;GAAK,GAAG;GAAU;AAEpC,MAAI,SAAS,eAAe,aAC1B,gBAAe,SAAS;AAE1B,SAAO,SAAS;KAEjB,cAAc;AACb,SAAO,QAAQ,sBAAsB;GACnC,GAAG;GACH,OAAO,mBAAmB;GAC1B,MAAM;GACP,CAAC;GAEL;AAED,QAAO;EACL;EACA,WAAW;EACX;EACD;;AAKH,eAAsB,wBAEpB,cACA,cACoB;CACpB,MAAM,UAAU,EAAE;CAElB,IAAIA,YAAgC;AACpC,QAAO,MAAM;EAEX,MAAM,WAAW,MADD,aAAa,UAAU;EAEvC,MAAM,QAAQ,aAAa,SAAS;AACpC,MAAI,SAAS,QAAQ,MAAM,WAAW,EACpC;AAEF,UAAQ,KAAK,GAAG,MAAM;AACtB,cAAY,SAAS;AACrB,MAAI,CAAC,UACH;;AAIJ,QAAO"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"indexer-lookup.mjs","names":["nextToken: string | undefined"],"sources":["../src/indexer-lookup.ts"],"sourcesContent":["import { Address } from '@algorandfoundation/algokit-common'\nimport {\n Application,\n ApplicationsResponse,\n AssetBalancesResponse,\n IndexerClient,\n MiniAssetHolding,\n TransactionsResponse,\n} from '@algorandfoundation/algokit-indexer-client'\nimport { LookupAssetHoldingsOptions } from './types/indexer'\nexport type SearchForTransactionsCriteria = Omit<NonNullable<Parameters<IndexerClient['searchForTransactions']>[0]>, 'limit' | 'next'>\n\nconst DEFAULT_INDEXER_MAX_API_RESOURCES_PER_ACCOUNT = 1000 //MaxAPIResourcesPerAccount: This is the default maximum, though may be provider specific\n\n/**\n * Looks up applications that were created by the given address; will automatically paginate through all data.\n * @param indexer An indexer instance\n * @param address The address of the creator to look up\n * @param getAll Whether or not to include deleted applications. Default true.\n * @param paginationLimit The number of records to return per paginated request, default 1000\n * @returns The list of application results\n */\nexport async function lookupAccountCreatedApplicationByAddress(\n indexer: IndexerClient,\n address: string | Address,\n getAll: boolean = true,\n paginationLimit?: number,\n): Promise<Application[]> {\n return await executePaginatedRequest(\n (response: ApplicationsResponse | { message: string }) => {\n if ('message' in response) {\n throw { status: 404, ...response }\n }\n return response.applications\n },\n (nextToken) => {\n return indexer.lookupAccountCreatedApplications(address, {\n includeAll: getAll,\n limit: paginationLimit ?? DEFAULT_INDEXER_MAX_API_RESOURCES_PER_ACCOUNT,\n ...(nextToken && { next: nextToken }),\n })\n },\n )\n}\n\n/**\n * Looks up asset holdings for the given asset; will automatically paginate through all data.\n * @param indexer An indexer instance\n * @param assetId The ID of the asset to look up holdings for\n * @param options Optional options to control the lookup\n * @param paginationLimit The number of records to return per paginated request, default 1000\n * @returns The list of application results\n */\nexport async function lookupAssetHoldings(\n indexer: IndexerClient,\n assetId: number | bigint,\n options?: LookupAssetHoldingsOptions,\n paginationLimit?: number,\n): Promise<MiniAssetHolding[]> {\n return await executePaginatedRequest(\n (response: AssetBalancesResponse | { message: string }) => {\n if ('message' in response) {\n throw { status: 404, ...response }\n }\n return response.balances\n },\n (nextToken) => {\n return indexer.lookupAssetBalances(assetId, {\n limit: paginationLimit ?? DEFAULT_INDEXER_MAX_API_RESOURCES_PER_ACCOUNT,\n ...(options?.currencyGreaterThan !== undefined && { currencyGreaterThan: options.currencyGreaterThan }),\n ...(options?.currencyLessThan !== undefined && { currencyLessThan: options.currencyLessThan }),\n ...(options?.includeAll !== undefined && { includeAll: options.includeAll }),\n ...(nextToken && { next: nextToken }),\n })\n },\n )\n}\n\n/**\n * Allows transactions to be searched for the given criteria.\n * @param indexer An indexer client\n * @param searchCriteria The criteria to search for\n * @param paginationLimit The number of records to return per paginated request, default 1000\n * @returns The search results\n */\nexport async function searchTransactions(\n indexer: IndexerClient,\n searchCriteria: SearchForTransactionsCriteria,\n paginationLimit?: number,\n): Promise<TransactionsResponse> {\n let currentRound = 0n\n const transactions = await executePaginatedRequest(\n (response: TransactionsResponse | { message: string }) => {\n if ('message' in response) {\n throw { status: 404, ...response }\n }\n if (response.currentRound > currentRound) {\n currentRound = response.currentRound\n }\n return response.transactions\n },\n (nextToken) => {\n return indexer.searchForTransactions({\n ...searchCriteria,\n limit: paginationLimit ?? DEFAULT_INDEXER_MAX_API_RESOURCES_PER_ACCOUNT,\n next: nextToken,\n })\n },\n )\n\n return {\n currentRound,\n nextToken: undefined,\n transactions,\n } satisfies TransactionsResponse\n}\n\n// https://dev.algorand.co/reference/rest-apis/indexer\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport async function executePaginatedRequest<TResult, TRequest extends Promise<any>>(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n extractItems: (response: any) => TResult[],\n buildRequest: (nextToken?: string) => TRequest,\n): Promise<TResult[]> {\n const results = []\n\n let nextToken: string | undefined = undefined\n while (true) {\n const request = buildRequest(nextToken)\n const response = await request\n const items = extractItems(response)\n if (items == null || items.length === 0) {\n break\n }\n results.push(...items)\n nextToken = response['nextToken']\n if (!nextToken) {\n break\n }\n }\n\n return results\n}\n"],"mappings":";;;;;;;;;AAYA,MAAM,gDAAgD;;;;;;;;;AAUtD,eAAsB,yCACpB,SACA,SACA,SAAkB,MAClB,iBACwB;AACxB,QAAO,MAAM,yBACV,aAAyD;AACxD,MAAI,aAAa,SACf,OAAM;GAAE,QAAQ;GAAK,GAAG;GAAU;AAEpC,SAAO,SAAS;KAEjB,cAAc;AACb,SAAO,QAAQ,iCAAiC,SAAS;GACvD,YAAY;GACZ,OAAO,mBAAmB;GAC1B,GAAI,aAAa,EAAE,MAAM,WAAW;GACrC,CAAC;GAEL;;;;;;;;;;AAWH,eAAsB,oBACpB,SACA,SACA,SACA,iBAC6B;AAC7B,QAAO,MAAM,yBACV,aAA0D;AACzD,MAAI,aAAa,SACf,OAAM;GAAE,QAAQ;GAAK,GAAG;GAAU;AAEpC,SAAO,SAAS;KAEjB,cAAc;AACb,SAAO,QAAQ,oBAAoB,SAAS;GAC1C,OAAO,mBAAmB;GAC1B,GAAI,SAAS,wBAAwB,UAAa,EAAE,qBAAqB,QAAQ,qBAAqB;GACtG,GAAI,SAAS,qBAAqB,UAAa,EAAE,kBAAkB,QAAQ,kBAAkB;GAC7F,GAAI,SAAS,eAAe,UAAa,EAAE,YAAY,QAAQ,YAAY;GAC3E,GAAI,aAAa,EAAE,MAAM,WAAW;GACrC,CAAC;GAEL;;;;;;;;;AAUH,eAAsB,mBACpB,SACA,gBACA,iBAC+B;CAC/B,IAAI,eAAe;CACnB,MAAM,eAAe,MAAM,yBACxB,aAAyD;AACxD,MAAI,aAAa,SACf,OAAM;GAAE,QAAQ;GAAK,GAAG;GAAU;AAEpC,MAAI,SAAS,eAAe,aAC1B,gBAAe,SAAS;AAE1B,SAAO,SAAS;KAEjB,cAAc;AACb,SAAO,QAAQ,sBAAsB;GACnC,GAAG;GACH,OAAO,mBAAmB;GAC1B,MAAM;GACP,CAAC;GAEL;AAED,QAAO;EACL;EACA,WAAW;EACX;EACD;;AAKH,eAAsB,wBAEpB,cACA,cACoB;CACpB,MAAM,UAAU,EAAE;CAElB,IAAIA,YAAgC;AACpC,QAAO,MAAM;EAEX,MAAM,WAAW,MADD,aAAa,UAAU;EAEvC,MAAM,QAAQ,aAAa,SAAS;AACpC,MAAI,SAAS,QAAQ,MAAM,WAAW,EACpC;AAEF,UAAQ,KAAK,GAAG,MAAM;AACtB,cAAY,SAAS;AACrB,MAAI,CAAC,UACH;;AAIJ,QAAO"}