@algorandfoundation/algokit-utils 10.0.0-alpha.16 → 10.0.0-alpha.18
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/_virtual/rolldown_runtime.js +0 -14
- package/index.d.ts +1 -2
- package/index.js +0 -7
- package/index.mjs +1 -2
- package/indexer-client/index.d.ts +2 -1
- package/indexer-client/index.js +6 -1
- package/indexer-client/index.mjs +2 -1
- package/{indexer-lookup.d.ts → indexer-client/indexer-lookup.d.ts} +8 -11
- package/{indexer-lookup.mjs → indexer-client/indexer-lookup.js} +6 -10
- package/indexer-client/indexer-lookup.js.map +1 -0
- package/{indexer-lookup.js → indexer-client/indexer-lookup.mjs} +3 -18
- package/indexer-client/indexer-lookup.mjs.map +1 -0
- package/package.json +1 -1
- package/types/algorand-client-transaction-creator.d.ts +73 -73
- package/types/algorand-client-transaction-sender.d.ts +75 -75
- package/types/app-client.d.ts +231 -231
- package/types/app-deployer.js +1 -1
- package/types/app-deployer.js.map +1 -1
- package/types/app-deployer.mjs +1 -1
- package/types/app-deployer.mjs.map +1 -1
- package/types/app-factory.d.ts +84 -84
- package/types/expand.d.ts +2 -0
- package/types/expand.js +0 -0
- package/types/expand.mjs +0 -0
- package/_virtual/rolldown_runtime.mjs +0 -18
- package/indexer-lookup.js.map +0 -1
- package/indexer-lookup.mjs.map +0 -1
|
@@ -5,19 +5,6 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (all, symbols) => {
|
|
9
|
-
let target = {};
|
|
10
|
-
for (var name in all) {
|
|
11
|
-
__defProp(target, name, {
|
|
12
|
-
get: all[name],
|
|
13
|
-
enumerable: true
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
if (symbols) {
|
|
17
|
-
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
18
|
-
}
|
|
19
|
-
return target;
|
|
20
|
-
};
|
|
21
8
|
var __copyProps = (to, from, except, desc) => {
|
|
22
9
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
23
10
|
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
@@ -39,5 +26,4 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
39
26
|
|
|
40
27
|
//#endregion
|
|
41
28
|
|
|
42
|
-
exports.__export = __export;
|
|
43
29
|
exports.__toESM = __toESM;
|
package/index.d.ts
CHANGED
|
@@ -5,6 +5,5 @@ import { TransactionWithSigner, encodeLease, populateAppCallResources, prepareGr
|
|
|
5
5
|
import { ALGOKIT_DIR, AVMTracesEventData, DEFAULT_MAX_SEARCH_DEPTH, SOURCES_DIR, TEAL_FILE_EXT, TEAL_SOURCEMAP_EXT, TealSourceDebugEventData, TealSourcesDebugEventData } from "./types/debugging.js";
|
|
6
6
|
import { EventDataMap, EventType } from "./types/lifecycle-events.js";
|
|
7
7
|
import { Config } from "./config.js";
|
|
8
|
-
import { indexer_lookup_d_exports } from "./indexer-lookup.js";
|
|
9
8
|
import { AlgorandClient } from "./types/algorand-client.js";
|
|
10
|
-
export { ALGOKIT_DIR, ALGORAND_MIN_TX_FEE, ALGORAND_ZERO_ADDRESS_STRING, AVMTracesEventData, Address, type Addressable, AlgorandClient, Config, DEFAULT_MAX_SEARCH_DEPTH, EventDataMap, EventType, type ReadableAddress, SOURCES_DIR, TEAL_FILE_EXT, TEAL_SOURCEMAP_EXT, TealSourceDebugEventData, TealSourcesDebugEventData, TransactionWithSigner, algo, algos, decodeAddress, encodeAddress, encodeLease, getAddress, getApplicationAddress, getOptionalAddress,
|
|
9
|
+
export { ALGOKIT_DIR, ALGORAND_MIN_TX_FEE, ALGORAND_ZERO_ADDRESS_STRING, AVMTracesEventData, Address, type Addressable, AlgorandClient, Config, DEFAULT_MAX_SEARCH_DEPTH, EventDataMap, EventType, type ReadableAddress, SOURCES_DIR, TEAL_FILE_EXT, TEAL_SOURCEMAP_EXT, TealSourceDebugEventData, TealSourcesDebugEventData, TransactionWithSigner, algo, algos, decodeAddress, encodeAddress, encodeLease, getAddress, getApplicationAddress, getOptionalAddress, microAlgo, microAlgos, performTransactionComposerSimulate, populateAppCallResources, prepareGroupForSending, sendTransactionComposer, transactionFees, waitForConfirmation };
|
package/index.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
const require_address = require('./packages/common/src/address.js');
|
|
2
2
|
const require_amount = require('./amount.js');
|
|
3
3
|
const require_config = require('./config.js');
|
|
4
|
-
const require_indexer_lookup = require('./indexer-lookup.js');
|
|
5
4
|
const require_perform_transaction_composer_simulate = require('./transaction/perform-transaction-composer-simulate.js');
|
|
6
5
|
const require_transaction = require('./transaction/transaction.js');
|
|
7
6
|
const require_lifecycle_events = require('./types/lifecycle-events.js');
|
|
@@ -27,12 +26,6 @@ exports.encodeLease = require_transaction.encodeLease;
|
|
|
27
26
|
exports.getAddress = require_address.getAddress;
|
|
28
27
|
exports.getApplicationAddress = require_address.getApplicationAddress;
|
|
29
28
|
exports.getOptionalAddress = require_address.getOptionalAddress;
|
|
30
|
-
Object.defineProperty(exports, 'indexer', {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function () {
|
|
33
|
-
return require_indexer_lookup.indexer_lookup_exports;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
29
|
exports.microAlgo = require_amount.microAlgo;
|
|
37
30
|
exports.microAlgos = require_amount.microAlgos;
|
|
38
31
|
exports.performTransactionComposerSimulate = require_perform_transaction_composer_simulate.performTransactionComposerSimulate;
|
package/index.mjs
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { ALGORAND_ZERO_ADDRESS_STRING, Address, decodeAddress, encodeAddress, getAddress, getApplicationAddress, getOptionalAddress } from "./packages/common/src/address.mjs";
|
|
2
2
|
import { ALGORAND_MIN_TX_FEE, algo, algos, microAlgo, microAlgos, transactionFees } from "./amount.mjs";
|
|
3
3
|
import { Config } from "./config.mjs";
|
|
4
|
-
import { indexer_lookup_exports } from "./indexer-lookup.mjs";
|
|
5
4
|
import { performTransactionComposerSimulate } from "./transaction/perform-transaction-composer-simulate.mjs";
|
|
6
5
|
import { encodeLease, populateAppCallResources, prepareGroupForSending, sendTransactionComposer, waitForConfirmation } from "./transaction/transaction.mjs";
|
|
7
6
|
import { EventType } from "./types/lifecycle-events.mjs";
|
|
8
7
|
import { AlgorandClient } from "./types/algorand-client.mjs";
|
|
9
8
|
import { ALGOKIT_DIR, DEFAULT_MAX_SEARCH_DEPTH, SOURCES_DIR, TEAL_FILE_EXT, TEAL_SOURCEMAP_EXT } from "./types/debugging.mjs";
|
|
10
9
|
|
|
11
|
-
export { ALGOKIT_DIR, ALGORAND_MIN_TX_FEE, ALGORAND_ZERO_ADDRESS_STRING, Address, AlgorandClient, Config, DEFAULT_MAX_SEARCH_DEPTH, EventType, SOURCES_DIR, TEAL_FILE_EXT, TEAL_SOURCEMAP_EXT, algo, algos, decodeAddress, encodeAddress, encodeLease, getAddress, getApplicationAddress, getOptionalAddress,
|
|
10
|
+
export { ALGOKIT_DIR, ALGORAND_MIN_TX_FEE, ALGORAND_ZERO_ADDRESS_STRING, Address, AlgorandClient, Config, DEFAULT_MAX_SEARCH_DEPTH, EventType, SOURCES_DIR, TEAL_FILE_EXT, TEAL_SOURCEMAP_EXT, algo, algos, decodeAddress, encodeAddress, encodeLease, getAddress, getApplicationAddress, getOptionalAddress, microAlgo, microAlgos, performTransactionComposerSimulate, populateAppCallResources, prepareGroupForSending, sendTransactionComposer, transactionFees, waitForConfirmation };
|
|
@@ -74,4 +74,5 @@ import { TransactionResponse } from "../packages/indexer_client/src/models/trans
|
|
|
74
74
|
import { TransactionsResponse } from "../packages/indexer_client/src/models/transactions-response.js";
|
|
75
75
|
import { IndexerApi } from "../packages/indexer_client/src/apis/api-service.js";
|
|
76
76
|
import { IndexerClient } from "../packages/indexer_client/src/client.js";
|
|
77
|
-
|
|
77
|
+
import { SearchForTransactionsCriteria, executePaginatedRequest, lookupAccountCreatedApplicationByAddress, lookupAssetHoldings, searchTransactions } from "./indexer-lookup.js";
|
|
78
|
+
export { Account, AccountParticipation, AccountResponse, AccountStateDelta, AccountsResponse, ApiError, ApiRequestOptions, Application, ApplicationLocalState, ApplicationLocalStatesResponse, ApplicationLogData, ApplicationLogsResponse, ApplicationParams, ApplicationResponse, ApplicationStateSchema, ApplicationsResponse, Asset, AssetBalancesResponse, AssetHolding, AssetHoldingsResponse, AssetParams, AssetResponse, AssetsResponse, BaseHttpRequest, Block, BlockHeadersResponse, BlockRewards, BlockUpgradeState, BlockUpgradeVote, Box, BoxDescriptor, BoxReference, BoxesResponse, ClientConfig, EvalDelta, EvalDeltaKeyValue, FetchHttpRequest, HashFactory, HbProofFields, HealthCheck, HoldingRef, IndexerApi, IndexerClient, IndexerStateProofMessage, LocalsRef, MerkleArrayProof, MiniAssetHolding, OnCompletion, ParticipationUpdates, ResourceRef, SearchForTransactionsCriteria, StateDelta, StateProofFields, StateProofParticipant, StateProofReveal, StateProofSigSlot, StateProofSignature, StateProofTracking, StateProofVerifier, StateSchema, TealKeyValue, TealKeyValueStore, TealValue, Transaction, TransactionApplication, TransactionAssetConfig, TransactionAssetFreeze, TransactionAssetTransfer, TransactionHeartbeat, TransactionKeyreg, TransactionPayment, TransactionResponse, TransactionSignature, TransactionSignatureLogicsig, TransactionSignatureMultisig, TransactionSignatureMultisigSubsignature, TransactionStateProof, TransactionsResponse, executePaginatedRequest, inputValueAsString, lookupAccountCreatedApplicationByAddress, lookupAssetHoldings, searchTransactions };
|
package/indexer-client/index.js
CHANGED
|
@@ -3,10 +3,15 @@ const require_api_error = require('../packages/indexer_client/src/core/api-error
|
|
|
3
3
|
const require_fetch_http_request = require('../packages/indexer_client/src/core/fetch-http-request.js');
|
|
4
4
|
const require_api_service = require('../packages/indexer_client/src/apis/api-service.js');
|
|
5
5
|
const require_client = require('../packages/indexer_client/src/client.js');
|
|
6
|
+
const require_indexer_lookup = require('./indexer-lookup.js');
|
|
6
7
|
|
|
7
8
|
exports.ApiError = require_api_error.ApiError;
|
|
8
9
|
exports.BaseHttpRequest = require_base_http_request.BaseHttpRequest;
|
|
9
10
|
exports.FetchHttpRequest = require_fetch_http_request.FetchHttpRequest;
|
|
10
11
|
exports.IndexerApi = require_api_service.IndexerApi;
|
|
11
12
|
exports.IndexerClient = require_client.IndexerClient;
|
|
12
|
-
exports.
|
|
13
|
+
exports.executePaginatedRequest = require_indexer_lookup.executePaginatedRequest;
|
|
14
|
+
exports.inputValueAsString = require_base_http_request.inputValueAsString;
|
|
15
|
+
exports.lookupAccountCreatedApplicationByAddress = require_indexer_lookup.lookupAccountCreatedApplicationByAddress;
|
|
16
|
+
exports.lookupAssetHoldings = require_indexer_lookup.lookupAssetHoldings;
|
|
17
|
+
exports.searchTransactions = require_indexer_lookup.searchTransactions;
|
package/indexer-client/index.mjs
CHANGED
|
@@ -3,5 +3,6 @@ import { ApiError } from "../packages/indexer_client/src/core/api-error.mjs";
|
|
|
3
3
|
import { FetchHttpRequest } from "../packages/indexer_client/src/core/fetch-http-request.mjs";
|
|
4
4
|
import { IndexerApi } from "../packages/indexer_client/src/apis/api-service.mjs";
|
|
5
5
|
import { IndexerClient } from "../packages/indexer_client/src/client.mjs";
|
|
6
|
+
import { executePaginatedRequest, lookupAccountCreatedApplicationByAddress, lookupAssetHoldings, searchTransactions } from "./indexer-lookup.mjs";
|
|
6
7
|
|
|
7
|
-
export { ApiError, BaseHttpRequest, FetchHttpRequest, IndexerApi, IndexerClient, inputValueAsString };
|
|
8
|
+
export { ApiError, BaseHttpRequest, FetchHttpRequest, IndexerApi, IndexerClient, executePaginatedRequest, inputValueAsString, lookupAccountCreatedApplicationByAddress, lookupAssetHoldings, searchTransactions };
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import { Address } from "
|
|
2
|
-
import { Application } from "
|
|
3
|
-
import { MiniAssetHolding } from "
|
|
4
|
-
import { TransactionsResponse } from "
|
|
5
|
-
import { IndexerClient } from "
|
|
6
|
-
import { LookupAssetHoldingsOptions } from "
|
|
1
|
+
import { Address } from "../packages/common/src/address.js";
|
|
2
|
+
import { Application } from "../packages/indexer_client/src/models/application.js";
|
|
3
|
+
import { MiniAssetHolding } from "../packages/indexer_client/src/models/mini-asset-holding.js";
|
|
4
|
+
import { TransactionsResponse } from "../packages/indexer_client/src/models/transactions-response.js";
|
|
5
|
+
import { IndexerClient } from "../packages/indexer_client/src/client.js";
|
|
6
|
+
import { LookupAssetHoldingsOptions } from "../types/indexer.js";
|
|
7
7
|
|
|
8
|
-
//#region src/indexer-lookup.d.ts
|
|
9
|
-
declare namespace indexer_lookup_d_exports {
|
|
10
|
-
export { SearchForTransactionsCriteria, executePaginatedRequest, lookupAccountCreatedApplicationByAddress, lookupAssetHoldings, searchTransactions };
|
|
11
|
-
}
|
|
8
|
+
//#region src/indexer-client/indexer-lookup.d.ts
|
|
12
9
|
type SearchForTransactionsCriteria = Omit<NonNullable<Parameters<IndexerClient['searchForTransactions']>[0]>, 'limit' | 'next'>;
|
|
13
10
|
/**
|
|
14
11
|
* Looks up applications that were created by the given address; will automatically paginate through all data.
|
|
@@ -38,5 +35,5 @@ declare function lookupAssetHoldings(indexer: IndexerClient, assetId: number | b
|
|
|
38
35
|
declare function searchTransactions(indexer: IndexerClient, searchCriteria: SearchForTransactionsCriteria, paginationLimit?: number): Promise<TransactionsResponse>;
|
|
39
36
|
declare function executePaginatedRequest<TResult, TRequest extends Promise<any>>(extractItems: (response: any) => TResult[], buildRequest: (nextToken?: string) => TRequest): Promise<TResult[]>;
|
|
40
37
|
//#endregion
|
|
41
|
-
export {
|
|
38
|
+
export { SearchForTransactionsCriteria, executePaginatedRequest, lookupAccountCreatedApplicationByAddress, lookupAssetHoldings, searchTransactions };
|
|
42
39
|
//# sourceMappingURL=indexer-lookup.d.ts.map
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import { __export } from "./_virtual/rolldown_runtime.mjs";
|
|
2
1
|
|
|
3
|
-
//#region src/indexer-lookup.ts
|
|
4
|
-
var indexer_lookup_exports = /* @__PURE__ */ __export({
|
|
5
|
-
executePaginatedRequest: () => executePaginatedRequest,
|
|
6
|
-
lookupAccountCreatedApplicationByAddress: () => lookupAccountCreatedApplicationByAddress,
|
|
7
|
-
lookupAssetHoldings: () => lookupAssetHoldings,
|
|
8
|
-
searchTransactions: () => searchTransactions
|
|
9
|
-
});
|
|
2
|
+
//#region src/indexer-client/indexer-lookup.ts
|
|
10
3
|
const DEFAULT_INDEXER_MAX_API_RESOURCES_PER_ACCOUNT = 1e3;
|
|
11
4
|
/**
|
|
12
5
|
* Looks up applications that were created by the given address; will automatically paginate through all data.
|
|
@@ -100,5 +93,8 @@ async function executePaginatedRequest(extractItems, buildRequest) {
|
|
|
100
93
|
}
|
|
101
94
|
|
|
102
95
|
//#endregion
|
|
103
|
-
|
|
104
|
-
|
|
96
|
+
exports.executePaginatedRequest = executePaginatedRequest;
|
|
97
|
+
exports.lookupAccountCreatedApplicationByAddress = lookupAccountCreatedApplicationByAddress;
|
|
98
|
+
exports.lookupAssetHoldings = lookupAssetHoldings;
|
|
99
|
+
exports.searchTransactions = searchTransactions;
|
|
100
|
+
//# sourceMappingURL=indexer-lookup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indexer-lookup.js","names":["nextToken: string | undefined"],"sources":["../../src/indexer-client/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,12 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
//#region src/indexer-lookup.ts
|
|
4
|
-
var indexer_lookup_exports = /* @__PURE__ */ require_rolldown_runtime.__export({
|
|
5
|
-
executePaginatedRequest: () => executePaginatedRequest,
|
|
6
|
-
lookupAccountCreatedApplicationByAddress: () => lookupAccountCreatedApplicationByAddress,
|
|
7
|
-
lookupAssetHoldings: () => lookupAssetHoldings,
|
|
8
|
-
searchTransactions: () => searchTransactions
|
|
9
|
-
});
|
|
1
|
+
//#region src/indexer-client/indexer-lookup.ts
|
|
10
2
|
const DEFAULT_INDEXER_MAX_API_RESOURCES_PER_ACCOUNT = 1e3;
|
|
11
3
|
/**
|
|
12
4
|
* Looks up applications that were created by the given address; will automatically paginate through all data.
|
|
@@ -100,12 +92,5 @@ async function executePaginatedRequest(extractItems, buildRequest) {
|
|
|
100
92
|
}
|
|
101
93
|
|
|
102
94
|
//#endregion
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
get: function () {
|
|
106
|
-
return indexer_lookup_exports;
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
exports.lookupAccountCreatedApplicationByAddress = lookupAccountCreatedApplicationByAddress;
|
|
110
|
-
exports.searchTransactions = searchTransactions;
|
|
111
|
-
//# sourceMappingURL=indexer-lookup.js.map
|
|
95
|
+
export { executePaginatedRequest, lookupAccountCreatedApplicationByAddress, lookupAssetHoldings, searchTransactions };
|
|
96
|
+
//# sourceMappingURL=indexer-lookup.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indexer-lookup.mjs","names":["nextToken: string | undefined"],"sources":["../../src/indexer-client/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"}
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"**"
|
|
7
7
|
],
|
|
8
8
|
"name": "@algorandfoundation/algokit-utils",
|
|
9
|
-
"version": "10.0.0-alpha.
|
|
9
|
+
"version": "10.0.0-alpha.18",
|
|
10
10
|
"private": false,
|
|
11
11
|
"description": "A set of core Algorand utilities written in TypeScript and released via npm that make it easier to build solutions on Algorand.",
|
|
12
12
|
"author": "Algorand Foundation",
|
|
@@ -348,23 +348,23 @@ declare class AlgorandClientTransactionCreator {
|
|
|
348
348
|
* @returns The application create transaction
|
|
349
349
|
*/
|
|
350
350
|
appCreate: (params: {
|
|
351
|
-
maxFee?: AlgoAmount | undefined;
|
|
352
351
|
sender: SendingAddress;
|
|
353
|
-
|
|
352
|
+
signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
|
|
354
353
|
rekeyTo?: ReadableAddress | undefined;
|
|
355
|
-
onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
|
|
356
|
-
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
357
354
|
note?: string | Uint8Array | undefined;
|
|
355
|
+
lease?: string | Uint8Array | undefined;
|
|
358
356
|
staticFee?: AlgoAmount | undefined;
|
|
359
357
|
extraFee?: AlgoAmount | undefined;
|
|
358
|
+
maxFee?: AlgoAmount | undefined;
|
|
360
359
|
validityWindow?: number | bigint | undefined;
|
|
361
360
|
firstValidRound?: bigint | undefined;
|
|
362
361
|
lastValidRound?: bigint | undefined;
|
|
362
|
+
onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
|
|
363
363
|
args?: Uint8Array[] | undefined;
|
|
364
364
|
accountReferences?: ReadableAddress[] | undefined;
|
|
365
365
|
appReferences?: bigint[] | undefined;
|
|
366
366
|
assetReferences?: bigint[] | undefined;
|
|
367
|
-
boxReferences?: (
|
|
367
|
+
boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
|
|
368
368
|
accessReferences?: ResourceReference[] | undefined;
|
|
369
369
|
rejectVersion?: number | undefined;
|
|
370
370
|
appId?: 0 | undefined;
|
|
@@ -417,7 +417,7 @@ declare class AlgorandClientTransactionCreator {
|
|
|
417
417
|
*/
|
|
418
418
|
appUpdate: (params: {
|
|
419
419
|
sender: SendingAddress;
|
|
420
|
-
signer?:
|
|
420
|
+
signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
|
|
421
421
|
rekeyTo?: ReadableAddress | undefined;
|
|
422
422
|
note?: string | Uint8Array | undefined;
|
|
423
423
|
lease?: string | Uint8Array | undefined;
|
|
@@ -433,7 +433,7 @@ declare class AlgorandClientTransactionCreator {
|
|
|
433
433
|
accountReferences?: ReadableAddress[] | undefined;
|
|
434
434
|
appReferences?: bigint[] | undefined;
|
|
435
435
|
assetReferences?: bigint[] | undefined;
|
|
436
|
-
boxReferences?: (
|
|
436
|
+
boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
|
|
437
437
|
accessReferences?: ResourceReference[] | undefined;
|
|
438
438
|
rejectVersion?: number | undefined;
|
|
439
439
|
approvalProgram: string | Uint8Array;
|
|
@@ -568,53 +568,53 @@ declare class AlgorandClientTransactionCreator {
|
|
|
568
568
|
* @returns The application ABI method create transaction
|
|
569
569
|
*/
|
|
570
570
|
appCreateMethodCall: (params: {
|
|
571
|
-
|
|
572
|
-
schema?: {
|
|
573
|
-
globalInts: number;
|
|
574
|
-
globalByteSlices: number;
|
|
575
|
-
localInts: number;
|
|
576
|
-
localByteSlices: number;
|
|
577
|
-
} | undefined;
|
|
571
|
+
appId?: 0 | undefined;
|
|
578
572
|
sender: SendingAddress;
|
|
579
|
-
|
|
573
|
+
signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
|
|
580
574
|
rekeyTo?: ReadableAddress | undefined;
|
|
581
|
-
approvalProgram: string | Uint8Array;
|
|
582
|
-
clearStateProgram: string | Uint8Array;
|
|
583
|
-
appId?: 0 | undefined;
|
|
584
|
-
onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
|
|
585
|
-
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
586
575
|
note?: string | Uint8Array | undefined;
|
|
576
|
+
lease?: string | Uint8Array | undefined;
|
|
587
577
|
staticFee?: AlgoAmount | undefined;
|
|
588
578
|
extraFee?: AlgoAmount | undefined;
|
|
579
|
+
maxFee?: AlgoAmount | undefined;
|
|
589
580
|
validityWindow?: number | bigint | undefined;
|
|
590
581
|
firstValidRound?: bigint | undefined;
|
|
591
582
|
lastValidRound?: bigint | undefined;
|
|
583
|
+
onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
|
|
592
584
|
accountReferences?: ReadableAddress[] | undefined;
|
|
593
585
|
appReferences?: bigint[] | undefined;
|
|
594
586
|
assetReferences?: bigint[] | undefined;
|
|
595
|
-
boxReferences?: (
|
|
587
|
+
boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
|
|
596
588
|
accessReferences?: ResourceReference[] | undefined;
|
|
597
589
|
rejectVersion?: number | undefined;
|
|
590
|
+
approvalProgram: string | Uint8Array;
|
|
591
|
+
clearStateProgram: string | Uint8Array;
|
|
592
|
+
schema?: {
|
|
593
|
+
globalInts: number;
|
|
594
|
+
globalByteSlices: number;
|
|
595
|
+
localInts: number;
|
|
596
|
+
localByteSlices: number;
|
|
597
|
+
} | undefined;
|
|
598
598
|
extraProgramPages?: number | undefined;
|
|
599
599
|
method: ABIMethod;
|
|
600
|
-
args?: (
|
|
601
|
-
maxFee?: AlgoAmount | undefined;
|
|
600
|
+
args?: (Transaction | Promise<Transaction> | ABIValue | TransactionWithSigner | AppMethodCall<{
|
|
602
601
|
sender: SendingAddress;
|
|
603
|
-
|
|
602
|
+
signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
|
|
604
603
|
rekeyTo?: ReadableAddress | undefined;
|
|
605
|
-
onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
|
|
606
|
-
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
607
604
|
note?: string | Uint8Array | undefined;
|
|
605
|
+
lease?: string | Uint8Array | undefined;
|
|
608
606
|
staticFee?: AlgoAmount | undefined;
|
|
609
607
|
extraFee?: AlgoAmount | undefined;
|
|
608
|
+
maxFee?: AlgoAmount | undefined;
|
|
610
609
|
validityWindow?: number | bigint | undefined;
|
|
611
610
|
firstValidRound?: bigint | undefined;
|
|
612
611
|
lastValidRound?: bigint | undefined;
|
|
612
|
+
onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
|
|
613
613
|
args?: Uint8Array[] | undefined;
|
|
614
614
|
accountReferences?: ReadableAddress[] | undefined;
|
|
615
615
|
appReferences?: bigint[] | undefined;
|
|
616
616
|
assetReferences?: bigint[] | undefined;
|
|
617
|
-
boxReferences?: (
|
|
617
|
+
boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
|
|
618
618
|
accessReferences?: ResourceReference[] | undefined;
|
|
619
619
|
rejectVersion?: number | undefined;
|
|
620
620
|
appId?: 0 | undefined;
|
|
@@ -629,7 +629,7 @@ declare class AlgorandClientTransactionCreator {
|
|
|
629
629
|
extraProgramPages?: number | undefined;
|
|
630
630
|
}> | AppMethodCall<{
|
|
631
631
|
sender: SendingAddress;
|
|
632
|
-
signer?:
|
|
632
|
+
signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
|
|
633
633
|
rekeyTo?: ReadableAddress | undefined;
|
|
634
634
|
note?: string | Uint8Array | undefined;
|
|
635
635
|
lease?: string | Uint8Array | undefined;
|
|
@@ -645,7 +645,7 @@ declare class AlgorandClientTransactionCreator {
|
|
|
645
645
|
accountReferences?: ReadableAddress[] | undefined;
|
|
646
646
|
appReferences?: bigint[] | undefined;
|
|
647
647
|
assetReferences?: bigint[] | undefined;
|
|
648
|
-
boxReferences?: (
|
|
648
|
+
boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
|
|
649
649
|
accessReferences?: ResourceReference[] | undefined;
|
|
650
650
|
rejectVersion?: number | undefined;
|
|
651
651
|
approvalProgram: string | Uint8Array;
|
|
@@ -702,46 +702,46 @@ declare class AlgorandClientTransactionCreator {
|
|
|
702
702
|
* @returns The application ABI method update transaction
|
|
703
703
|
*/
|
|
704
704
|
appUpdateMethodCall: (params: {
|
|
705
|
-
|
|
705
|
+
appId: bigint;
|
|
706
706
|
sender: SendingAddress;
|
|
707
|
-
|
|
707
|
+
signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
|
|
708
708
|
rekeyTo?: ReadableAddress | undefined;
|
|
709
|
-
approvalProgram: string | Uint8Array;
|
|
710
|
-
clearStateProgram: string | Uint8Array;
|
|
711
|
-
appId: bigint;
|
|
712
|
-
onComplete?: OnApplicationComplete.UpdateApplication | undefined;
|
|
713
|
-
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
714
709
|
note?: string | Uint8Array | undefined;
|
|
710
|
+
lease?: string | Uint8Array | undefined;
|
|
715
711
|
staticFee?: AlgoAmount | undefined;
|
|
716
712
|
extraFee?: AlgoAmount | undefined;
|
|
713
|
+
maxFee?: AlgoAmount | undefined;
|
|
717
714
|
validityWindow?: number | bigint | undefined;
|
|
718
715
|
firstValidRound?: bigint | undefined;
|
|
719
716
|
lastValidRound?: bigint | undefined;
|
|
717
|
+
onComplete?: OnApplicationComplete.UpdateApplication | undefined;
|
|
720
718
|
accountReferences?: ReadableAddress[] | undefined;
|
|
721
719
|
appReferences?: bigint[] | undefined;
|
|
722
720
|
assetReferences?: bigint[] | undefined;
|
|
723
|
-
boxReferences?: (
|
|
721
|
+
boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
|
|
724
722
|
accessReferences?: ResourceReference[] | undefined;
|
|
725
723
|
rejectVersion?: number | undefined;
|
|
724
|
+
approvalProgram: string | Uint8Array;
|
|
725
|
+
clearStateProgram: string | Uint8Array;
|
|
726
726
|
method: ABIMethod;
|
|
727
|
-
args?: (
|
|
728
|
-
maxFee?: AlgoAmount | undefined;
|
|
727
|
+
args?: (Transaction | Promise<Transaction> | ABIValue | TransactionWithSigner | AppMethodCall<{
|
|
729
728
|
sender: SendingAddress;
|
|
730
|
-
|
|
729
|
+
signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
|
|
731
730
|
rekeyTo?: ReadableAddress | undefined;
|
|
732
|
-
onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
|
|
733
|
-
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
734
731
|
note?: string | Uint8Array | undefined;
|
|
732
|
+
lease?: string | Uint8Array | undefined;
|
|
735
733
|
staticFee?: AlgoAmount | undefined;
|
|
736
734
|
extraFee?: AlgoAmount | undefined;
|
|
735
|
+
maxFee?: AlgoAmount | undefined;
|
|
737
736
|
validityWindow?: number | bigint | undefined;
|
|
738
737
|
firstValidRound?: bigint | undefined;
|
|
739
738
|
lastValidRound?: bigint | undefined;
|
|
739
|
+
onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
|
|
740
740
|
args?: Uint8Array[] | undefined;
|
|
741
741
|
accountReferences?: ReadableAddress[] | undefined;
|
|
742
742
|
appReferences?: bigint[] | undefined;
|
|
743
743
|
assetReferences?: bigint[] | undefined;
|
|
744
|
-
boxReferences?: (
|
|
744
|
+
boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
|
|
745
745
|
accessReferences?: ResourceReference[] | undefined;
|
|
746
746
|
rejectVersion?: number | undefined;
|
|
747
747
|
appId?: 0 | undefined;
|
|
@@ -756,7 +756,7 @@ declare class AlgorandClientTransactionCreator {
|
|
|
756
756
|
extraProgramPages?: number | undefined;
|
|
757
757
|
}> | AppMethodCall<{
|
|
758
758
|
sender: SendingAddress;
|
|
759
|
-
signer?:
|
|
759
|
+
signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
|
|
760
760
|
rekeyTo?: ReadableAddress | undefined;
|
|
761
761
|
note?: string | Uint8Array | undefined;
|
|
762
762
|
lease?: string | Uint8Array | undefined;
|
|
@@ -772,7 +772,7 @@ declare class AlgorandClientTransactionCreator {
|
|
|
772
772
|
accountReferences?: ReadableAddress[] | undefined;
|
|
773
773
|
appReferences?: bigint[] | undefined;
|
|
774
774
|
assetReferences?: bigint[] | undefined;
|
|
775
|
-
boxReferences?: (
|
|
775
|
+
boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
|
|
776
776
|
accessReferences?: ResourceReference[] | undefined;
|
|
777
777
|
rejectVersion?: number | undefined;
|
|
778
778
|
approvalProgram: string | Uint8Array;
|
|
@@ -827,44 +827,44 @@ declare class AlgorandClientTransactionCreator {
|
|
|
827
827
|
* @returns The application ABI method delete transaction
|
|
828
828
|
*/
|
|
829
829
|
appDeleteMethodCall: (params: {
|
|
830
|
-
|
|
830
|
+
appId: bigint;
|
|
831
831
|
sender: SendingAddress;
|
|
832
|
-
|
|
832
|
+
signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
|
|
833
833
|
rekeyTo?: ReadableAddress | undefined;
|
|
834
|
-
appId: bigint;
|
|
835
|
-
onComplete?: OnApplicationComplete.DeleteApplication | undefined;
|
|
836
|
-
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
837
834
|
note?: string | Uint8Array | undefined;
|
|
835
|
+
lease?: string | Uint8Array | undefined;
|
|
838
836
|
staticFee?: AlgoAmount | undefined;
|
|
839
837
|
extraFee?: AlgoAmount | undefined;
|
|
838
|
+
maxFee?: AlgoAmount | undefined;
|
|
840
839
|
validityWindow?: number | bigint | undefined;
|
|
841
840
|
firstValidRound?: bigint | undefined;
|
|
842
841
|
lastValidRound?: bigint | undefined;
|
|
842
|
+
onComplete?: OnApplicationComplete.DeleteApplication | undefined;
|
|
843
843
|
accountReferences?: ReadableAddress[] | undefined;
|
|
844
844
|
appReferences?: bigint[] | undefined;
|
|
845
845
|
assetReferences?: bigint[] | undefined;
|
|
846
|
-
boxReferences?: (
|
|
846
|
+
boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
|
|
847
847
|
accessReferences?: ResourceReference[] | undefined;
|
|
848
848
|
rejectVersion?: number | undefined;
|
|
849
849
|
method: ABIMethod;
|
|
850
|
-
args?: (
|
|
851
|
-
maxFee?: AlgoAmount | undefined;
|
|
850
|
+
args?: (Transaction | Promise<Transaction> | ABIValue | TransactionWithSigner | AppMethodCall<{
|
|
852
851
|
sender: SendingAddress;
|
|
853
|
-
|
|
852
|
+
signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
|
|
854
853
|
rekeyTo?: ReadableAddress | undefined;
|
|
855
|
-
onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
|
|
856
|
-
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
857
854
|
note?: string | Uint8Array | undefined;
|
|
855
|
+
lease?: string | Uint8Array | undefined;
|
|
858
856
|
staticFee?: AlgoAmount | undefined;
|
|
859
857
|
extraFee?: AlgoAmount | undefined;
|
|
858
|
+
maxFee?: AlgoAmount | undefined;
|
|
860
859
|
validityWindow?: number | bigint | undefined;
|
|
861
860
|
firstValidRound?: bigint | undefined;
|
|
862
861
|
lastValidRound?: bigint | undefined;
|
|
862
|
+
onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
|
|
863
863
|
args?: Uint8Array[] | undefined;
|
|
864
864
|
accountReferences?: ReadableAddress[] | undefined;
|
|
865
865
|
appReferences?: bigint[] | undefined;
|
|
866
866
|
assetReferences?: bigint[] | undefined;
|
|
867
|
-
boxReferences?: (
|
|
867
|
+
boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
|
|
868
868
|
accessReferences?: ResourceReference[] | undefined;
|
|
869
869
|
rejectVersion?: number | undefined;
|
|
870
870
|
appId?: 0 | undefined;
|
|
@@ -879,7 +879,7 @@ declare class AlgorandClientTransactionCreator {
|
|
|
879
879
|
extraProgramPages?: number | undefined;
|
|
880
880
|
}> | AppMethodCall<{
|
|
881
881
|
sender: SendingAddress;
|
|
882
|
-
signer?:
|
|
882
|
+
signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
|
|
883
883
|
rekeyTo?: ReadableAddress | undefined;
|
|
884
884
|
note?: string | Uint8Array | undefined;
|
|
885
885
|
lease?: string | Uint8Array | undefined;
|
|
@@ -895,7 +895,7 @@ declare class AlgorandClientTransactionCreator {
|
|
|
895
895
|
accountReferences?: ReadableAddress[] | undefined;
|
|
896
896
|
appReferences?: bigint[] | undefined;
|
|
897
897
|
assetReferences?: bigint[] | undefined;
|
|
898
|
-
boxReferences?: (
|
|
898
|
+
boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
|
|
899
899
|
accessReferences?: ResourceReference[] | undefined;
|
|
900
900
|
rejectVersion?: number | undefined;
|
|
901
901
|
approvalProgram: string | Uint8Array;
|
|
@@ -950,44 +950,44 @@ declare class AlgorandClientTransactionCreator {
|
|
|
950
950
|
* @returns The application ABI method call transaction
|
|
951
951
|
*/
|
|
952
952
|
appCallMethodCall: (params: {
|
|
953
|
-
|
|
953
|
+
appId: bigint;
|
|
954
954
|
sender: SendingAddress;
|
|
955
|
-
|
|
955
|
+
signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
|
|
956
956
|
rekeyTo?: ReadableAddress | undefined;
|
|
957
|
-
appId: bigint;
|
|
958
|
-
onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.DeleteApplication | undefined;
|
|
959
|
-
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
960
957
|
note?: string | Uint8Array | undefined;
|
|
958
|
+
lease?: string | Uint8Array | undefined;
|
|
961
959
|
staticFee?: AlgoAmount | undefined;
|
|
962
960
|
extraFee?: AlgoAmount | undefined;
|
|
961
|
+
maxFee?: AlgoAmount | undefined;
|
|
963
962
|
validityWindow?: number | bigint | undefined;
|
|
964
963
|
firstValidRound?: bigint | undefined;
|
|
965
964
|
lastValidRound?: bigint | undefined;
|
|
965
|
+
onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.DeleteApplication | undefined;
|
|
966
966
|
accountReferences?: ReadableAddress[] | undefined;
|
|
967
967
|
appReferences?: bigint[] | undefined;
|
|
968
968
|
assetReferences?: bigint[] | undefined;
|
|
969
|
-
boxReferences?: (
|
|
969
|
+
boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
|
|
970
970
|
accessReferences?: ResourceReference[] | undefined;
|
|
971
971
|
rejectVersion?: number | undefined;
|
|
972
972
|
method: ABIMethod;
|
|
973
|
-
args?: (
|
|
974
|
-
maxFee?: AlgoAmount | undefined;
|
|
973
|
+
args?: (Transaction | Promise<Transaction> | ABIValue | TransactionWithSigner | AppMethodCall<{
|
|
975
974
|
sender: SendingAddress;
|
|
976
|
-
|
|
975
|
+
signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
|
|
977
976
|
rekeyTo?: ReadableAddress | undefined;
|
|
978
|
-
onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
|
|
979
|
-
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
980
977
|
note?: string | Uint8Array | undefined;
|
|
978
|
+
lease?: string | Uint8Array | undefined;
|
|
981
979
|
staticFee?: AlgoAmount | undefined;
|
|
982
980
|
extraFee?: AlgoAmount | undefined;
|
|
981
|
+
maxFee?: AlgoAmount | undefined;
|
|
983
982
|
validityWindow?: number | bigint | undefined;
|
|
984
983
|
firstValidRound?: bigint | undefined;
|
|
985
984
|
lastValidRound?: bigint | undefined;
|
|
985
|
+
onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
|
|
986
986
|
args?: Uint8Array[] | undefined;
|
|
987
987
|
accountReferences?: ReadableAddress[] | undefined;
|
|
988
988
|
appReferences?: bigint[] | undefined;
|
|
989
989
|
assetReferences?: bigint[] | undefined;
|
|
990
|
-
boxReferences?: (
|
|
990
|
+
boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
|
|
991
991
|
accessReferences?: ResourceReference[] | undefined;
|
|
992
992
|
rejectVersion?: number | undefined;
|
|
993
993
|
appId?: 0 | undefined;
|
|
@@ -1002,7 +1002,7 @@ declare class AlgorandClientTransactionCreator {
|
|
|
1002
1002
|
extraProgramPages?: number | undefined;
|
|
1003
1003
|
}> | AppMethodCall<{
|
|
1004
1004
|
sender: SendingAddress;
|
|
1005
|
-
signer?:
|
|
1005
|
+
signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
|
|
1006
1006
|
rekeyTo?: ReadableAddress | undefined;
|
|
1007
1007
|
note?: string | Uint8Array | undefined;
|
|
1008
1008
|
lease?: string | Uint8Array | undefined;
|
|
@@ -1018,7 +1018,7 @@ declare class AlgorandClientTransactionCreator {
|
|
|
1018
1018
|
accountReferences?: ReadableAddress[] | undefined;
|
|
1019
1019
|
appReferences?: bigint[] | undefined;
|
|
1020
1020
|
assetReferences?: bigint[] | undefined;
|
|
1021
|
-
boxReferences?: (
|
|
1021
|
+
boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
|
|
1022
1022
|
accessReferences?: ResourceReference[] | undefined;
|
|
1023
1023
|
rejectVersion?: number | undefined;
|
|
1024
1024
|
approvalProgram: string | Uint8Array;
|