@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.
- 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/packages/common/src/json.mjs +2 -2
- package/packages/common/src/json.mjs.map +1 -1
- package/packages/sdk/src/utils/utils.mjs +2 -2
- package/packages/sdk/src/utils/utils.mjs.map +1 -1
- package/types/algorand-client-transaction-creator.d.ts +58 -58
- package/types/algorand-client-transaction-sender.d.ts +58 -58
- package/types/app-client.d.ts +182 -182
- 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 +66 -66
- 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,SA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
@@ -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,SA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;;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.17",
|
|
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",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.mjs","names":[
|
|
1
|
+
{"version":3,"file":"json.mjs","names":[],"sources":["../../../../packages/common/src/json.ts"],"sourcesContent":["import JSONbigFactory from 'json-bigint'\n\nconst JSONbig = JSONbigFactory({\n useNativeBigInt: true,\n strict: true,\n})\n\n/**\n * Parse JSON with bigint support.\n * @param str - The JSON string to parse.\n */\nexport function parseJson(str: string) {\n return JSONbig.parse(str, (_: string, value: unknown): unknown => {\n if (value != null && typeof value === 'object' && Object.getPrototypeOf(value) == null) {\n // JSONbig.parse objects are created with Object.create(null) and thus have a null prototype\n Object.setPrototypeOf(value, Object.prototype)\n }\n\n if (typeof value === 'bigint') {\n if (value > Number.MAX_SAFE_INTEGER) {\n return value\n }\n // JSONbig.parse converts number to BigInts if they are >= 10**15. This is smaller than\n // Number.MAX_SAFE_INTEGER, so we can convert some BigInts back to normal numbers.\n return Number(value)\n }\n\n return value\n })\n}\n\n/**\n * Convert a JavaScript value to a JSON string with bigint support.\n *\n * @param value - A JavaScript value, usually an object or array, to be converted.\n * @param replacer - A function that transforms the results.\n * @param space - Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.\n */\nexport function stringifyJson(\n value: unknown,\n replacer?: (this: unknown, key: string, value: unknown) => unknown,\n space?: string | number,\n): string {\n return JSONbig.stringify(value, replacer, space)\n}\n"],"mappings":";;;AAEA,MAAM,UAAU,eAAe;CAC7B,iBAAiB;CACjB,QAAQ;CACT,CAAC;;;;;AAMF,SAAgB,UAAU,KAAa;AACrC,QAAO,QAAQ,MAAM,MAAM,GAAW,UAA4B;AAChE,MAAI,SAAS,QAAQ,OAAO,UAAU,YAAY,OAAO,eAAe,MAAM,IAAI,KAEhF,QAAO,eAAe,OAAO,OAAO,UAAU;AAGhD,MAAI,OAAO,UAAU,UAAU;AAC7B,OAAI,QAAQ,OAAO,iBACjB,QAAO;AAIT,UAAO,OAAO,MAAM;;AAGtB,SAAO;GACP;;;;;;;;;AAUJ,SAAgB,cACd,OACA,UACA,OACQ;AACR,QAAO,QAAQ,UAAU,OAAO,UAAU,MAAM"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import intDecoding_default from "../types/intDecoding.mjs";
|
|
2
|
-
import
|
|
2
|
+
import JSONbigFactory from "json-bigint";
|
|
3
3
|
|
|
4
4
|
//#region packages/sdk/src/utils/utils.ts
|
|
5
|
-
const JSONbig =
|
|
5
|
+
const JSONbig = JSONbigFactory({
|
|
6
6
|
useNativeBigInt: true,
|
|
7
7
|
strict: true
|
|
8
8
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.mjs","names":["IntDecoding"],"sources":["../../../../../packages/sdk/src/utils/utils.ts"],"sourcesContent":["import JSONbigWithoutConfig from 'json-bigint'\nimport IntDecoding from '../types/intDecoding.js'\n\nconst JSONbig = JSONbigWithoutConfig({\n useNativeBigInt: true,\n strict: true,\n})\n\nexport interface ParseJSONOptions {\n intDecoding: IntDecoding\n}\n\n/**\n * Parse JSON with additional options.\n * @param str - The JSON string to parse.\n * @param options - Configures how integers in this JSON string will be decoded. See the\n * `IntDecoding` enum for more details.\n */\nexport function parseJSON(str: string, { intDecoding }: ParseJSONOptions) {\n if (\n intDecoding !== IntDecoding.SAFE &&\n intDecoding !== IntDecoding.UNSAFE &&\n intDecoding !== IntDecoding.BIGINT &&\n intDecoding !== IntDecoding.MIXED\n ) {\n throw new Error(`Invalid intDecoding option: ${intDecoding}`)\n }\n return JSONbig.parse(str, (_: string, value: any): any => {\n if (value != null && typeof value === 'object' && Object.getPrototypeOf(value) == null) {\n // JSONbig.parse objects are created with Object.create(null) and thus have a null prototype\n // let us remedy that\n Object.setPrototypeOf(value, Object.prototype)\n }\n\n if (typeof value === 'bigint') {\n if (intDecoding === IntDecoding.SAFE && value > Number.MAX_SAFE_INTEGER) {\n throw new Error(`Integer exceeds maximum safe integer: ${value.toString()}. Try parsing with a different intDecoding option.`)\n }\n if (intDecoding === IntDecoding.BIGINT || (intDecoding === IntDecoding.MIXED && value > Number.MAX_SAFE_INTEGER)) {\n return value\n }\n // JSONbig.parse converts number to BigInts if they are >= 10**15. This is smaller than\n // Number.MAX_SAFE_INTEGER, so we can convert some BigInts back to normal numbers.\n return Number(value)\n }\n\n if (typeof value === 'number') {\n if (intDecoding === IntDecoding.BIGINT && Number.isInteger(value)) {\n return BigInt(value)\n }\n }\n\n return value\n })\n}\n\n/**\n * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.\n *\n * This functions differs from the built-in JSON.stringify in that it supports serializing BigInts.\n *\n * This function takes the same arguments as the built-in JSON.stringify function.\n *\n * @param value - A JavaScript value, usually an object or array, to be converted.\n * @param replacer - A function that transforms the results.\n * @param space - Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.\n */\nexport function stringifyJSON(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string {\n return JSONbig.stringify(value, replacer, space)\n}\n\n/**\n * ArrayEqual takes two arrays and return true if equal, false otherwise\n */\nexport function arrayEqual<T>(a: ArrayLike<T>, b: ArrayLike<T>): boolean {\n if (a.length !== b.length) {\n return false\n }\n return Array.from(a).every((val, i) => val === b[i])\n}\n\n/**\n * ConcatArrays takes n number arrays and returns a joint Uint8Array\n * @param arrs - An arbitrary number of n array-like number list arguments\n * @returns [a,b]\n */\nexport function concatArrays(...arrs: ArrayLike<number>[]) {\n const size = arrs.reduce((sum, arr) => sum + arr.length, 0)\n const c = new Uint8Array(size)\n\n let offset = 0\n for (let i = 0; i < arrs.length; i++) {\n c.set(arrs[i], offset)\n offset += arrs[i].length\n }\n\n return c\n}\n\n/**\n * Remove undefined properties from an object\n * @param obj - An object, preferably one with some undefined properties\n * @returns A copy of the object with undefined properties removed\n */\nexport function removeUndefinedProperties(obj: Record<string | number | symbol, any>) {\n const mutableCopy = { ...obj }\n Object.keys(mutableCopy).forEach((key) => {\n if (typeof mutableCopy[key] === 'undefined') delete mutableCopy[key]\n })\n return mutableCopy\n}\n\n/**\n * Check whether the environment is Node.js (as opposed to the browser)\n * @returns True if Node.js environment, false otherwise\n */\nexport function isNode() {\n return (\n // @ts-ignore\n typeof process === 'object' &&\n // @ts-ignore\n typeof process.versions === 'object' &&\n // @ts-ignore\n typeof process.versions.node !== 'undefined'\n )\n}\n\n/**\n * Check whether the environment is ReactNative\n * @returns True if ReactNative, false otherwise\n */\nexport function isReactNative() {\n const { navigator } = globalThis as { navigator?: { product?: string } }\n if (typeof navigator === 'object' && navigator.product === 'ReactNative') {\n return true\n }\n return false\n}\n\nexport function ensureSafeInteger(value: unknown): number {\n if (typeof value === 'undefined') {\n throw new Error('Value is undefined')\n }\n if (typeof value === 'bigint') {\n if (value > BigInt(Number.MAX_SAFE_INTEGER) || value < BigInt(Number.MIN_SAFE_INTEGER)) {\n throw new Error(`BigInt value ${value} is not a safe integer`)\n }\n return Number(value)\n }\n if (typeof value === 'number') {\n if (Number.isSafeInteger(value)) {\n return value\n }\n throw new Error(`Value ${value} is not a safe integer`)\n }\n throw new Error(`Unexpected type ${typeof value}, ${value}`)\n}\n\nexport function ensureSafeUnsignedInteger(value: unknown): number {\n const intValue = ensureSafeInteger(value)\n if (intValue < 0) {\n throw new Error(`Value ${intValue} is negative`)\n }\n return intValue\n}\n\nexport function ensureBigInt(value: unknown): bigint {\n if (typeof value === 'undefined') {\n throw new Error('Value is undefined')\n }\n if (typeof value === 'bigint') {\n return value\n }\n if (typeof value === 'number') {\n if (!Number.isSafeInteger(value)) {\n throw new Error(`Value ${value} is not a safe integer`)\n }\n return BigInt(value)\n }\n throw new Error(`Unexpected type ${typeof value}, ${value}`)\n}\n\nexport function ensureUint64(value: unknown): bigint {\n const bigIntValue = ensureBigInt(value)\n if (bigIntValue < 0 || bigIntValue > BigInt('0xffffffffffffffff')) {\n throw new Error(`Value ${bigIntValue} is not a uint64`)\n }\n return bigIntValue\n}\n"],"mappings":";;;;AAGA,MAAM,
|
|
1
|
+
{"version":3,"file":"utils.mjs","names":["JSONbigWithoutConfig","IntDecoding"],"sources":["../../../../../packages/sdk/src/utils/utils.ts"],"sourcesContent":["import JSONbigWithoutConfig from 'json-bigint'\nimport IntDecoding from '../types/intDecoding.js'\n\nconst JSONbig = JSONbigWithoutConfig({\n useNativeBigInt: true,\n strict: true,\n})\n\nexport interface ParseJSONOptions {\n intDecoding: IntDecoding\n}\n\n/**\n * Parse JSON with additional options.\n * @param str - The JSON string to parse.\n * @param options - Configures how integers in this JSON string will be decoded. See the\n * `IntDecoding` enum for more details.\n */\nexport function parseJSON(str: string, { intDecoding }: ParseJSONOptions) {\n if (\n intDecoding !== IntDecoding.SAFE &&\n intDecoding !== IntDecoding.UNSAFE &&\n intDecoding !== IntDecoding.BIGINT &&\n intDecoding !== IntDecoding.MIXED\n ) {\n throw new Error(`Invalid intDecoding option: ${intDecoding}`)\n }\n return JSONbig.parse(str, (_: string, value: any): any => {\n if (value != null && typeof value === 'object' && Object.getPrototypeOf(value) == null) {\n // JSONbig.parse objects are created with Object.create(null) and thus have a null prototype\n // let us remedy that\n Object.setPrototypeOf(value, Object.prototype)\n }\n\n if (typeof value === 'bigint') {\n if (intDecoding === IntDecoding.SAFE && value > Number.MAX_SAFE_INTEGER) {\n throw new Error(`Integer exceeds maximum safe integer: ${value.toString()}. Try parsing with a different intDecoding option.`)\n }\n if (intDecoding === IntDecoding.BIGINT || (intDecoding === IntDecoding.MIXED && value > Number.MAX_SAFE_INTEGER)) {\n return value\n }\n // JSONbig.parse converts number to BigInts if they are >= 10**15. This is smaller than\n // Number.MAX_SAFE_INTEGER, so we can convert some BigInts back to normal numbers.\n return Number(value)\n }\n\n if (typeof value === 'number') {\n if (intDecoding === IntDecoding.BIGINT && Number.isInteger(value)) {\n return BigInt(value)\n }\n }\n\n return value\n })\n}\n\n/**\n * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.\n *\n * This functions differs from the built-in JSON.stringify in that it supports serializing BigInts.\n *\n * This function takes the same arguments as the built-in JSON.stringify function.\n *\n * @param value - A JavaScript value, usually an object or array, to be converted.\n * @param replacer - A function that transforms the results.\n * @param space - Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.\n */\nexport function stringifyJSON(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string {\n return JSONbig.stringify(value, replacer, space)\n}\n\n/**\n * ArrayEqual takes two arrays and return true if equal, false otherwise\n */\nexport function arrayEqual<T>(a: ArrayLike<T>, b: ArrayLike<T>): boolean {\n if (a.length !== b.length) {\n return false\n }\n return Array.from(a).every((val, i) => val === b[i])\n}\n\n/**\n * ConcatArrays takes n number arrays and returns a joint Uint8Array\n * @param arrs - An arbitrary number of n array-like number list arguments\n * @returns [a,b]\n */\nexport function concatArrays(...arrs: ArrayLike<number>[]) {\n const size = arrs.reduce((sum, arr) => sum + arr.length, 0)\n const c = new Uint8Array(size)\n\n let offset = 0\n for (let i = 0; i < arrs.length; i++) {\n c.set(arrs[i], offset)\n offset += arrs[i].length\n }\n\n return c\n}\n\n/**\n * Remove undefined properties from an object\n * @param obj - An object, preferably one with some undefined properties\n * @returns A copy of the object with undefined properties removed\n */\nexport function removeUndefinedProperties(obj: Record<string | number | symbol, any>) {\n const mutableCopy = { ...obj }\n Object.keys(mutableCopy).forEach((key) => {\n if (typeof mutableCopy[key] === 'undefined') delete mutableCopy[key]\n })\n return mutableCopy\n}\n\n/**\n * Check whether the environment is Node.js (as opposed to the browser)\n * @returns True if Node.js environment, false otherwise\n */\nexport function isNode() {\n return (\n // @ts-ignore\n typeof process === 'object' &&\n // @ts-ignore\n typeof process.versions === 'object' &&\n // @ts-ignore\n typeof process.versions.node !== 'undefined'\n )\n}\n\n/**\n * Check whether the environment is ReactNative\n * @returns True if ReactNative, false otherwise\n */\nexport function isReactNative() {\n const { navigator } = globalThis as { navigator?: { product?: string } }\n if (typeof navigator === 'object' && navigator.product === 'ReactNative') {\n return true\n }\n return false\n}\n\nexport function ensureSafeInteger(value: unknown): number {\n if (typeof value === 'undefined') {\n throw new Error('Value is undefined')\n }\n if (typeof value === 'bigint') {\n if (value > BigInt(Number.MAX_SAFE_INTEGER) || value < BigInt(Number.MIN_SAFE_INTEGER)) {\n throw new Error(`BigInt value ${value} is not a safe integer`)\n }\n return Number(value)\n }\n if (typeof value === 'number') {\n if (Number.isSafeInteger(value)) {\n return value\n }\n throw new Error(`Value ${value} is not a safe integer`)\n }\n throw new Error(`Unexpected type ${typeof value}, ${value}`)\n}\n\nexport function ensureSafeUnsignedInteger(value: unknown): number {\n const intValue = ensureSafeInteger(value)\n if (intValue < 0) {\n throw new Error(`Value ${intValue} is negative`)\n }\n return intValue\n}\n\nexport function ensureBigInt(value: unknown): bigint {\n if (typeof value === 'undefined') {\n throw new Error('Value is undefined')\n }\n if (typeof value === 'bigint') {\n return value\n }\n if (typeof value === 'number') {\n if (!Number.isSafeInteger(value)) {\n throw new Error(`Value ${value} is not a safe integer`)\n }\n return BigInt(value)\n }\n throw new Error(`Unexpected type ${typeof value}, ${value}`)\n}\n\nexport function ensureUint64(value: unknown): bigint {\n const bigIntValue = ensureBigInt(value)\n if (bigIntValue < 0 || bigIntValue > BigInt('0xffffffffffffffff')) {\n throw new Error(`Value ${bigIntValue} is not a uint64`)\n }\n return bigIntValue\n}\n"],"mappings":";;;;AAGA,MAAM,UAAUA,eAAqB;CACnC,iBAAiB;CACjB,QAAQ;CACT,CAAC;;;;;;;AAYF,SAAgB,UAAU,KAAa,EAAE,eAAiC;AACxE,KACE,gBAAgBC,oBAAY,QAC5B,gBAAgBA,oBAAY,UAC5B,gBAAg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D,SAAgB,aAAa,OAAwB;CACnD,MAAM,cAAc,aAAa,MAAM;AACvC,KAAI,cAAc,KAAK,cAAc,OAAO,qBAAqB,CAC/D,OAAM,IAAI,MAAM,SAAS,YAAY,kBAAkB;AAEzD,QAAO"}
|
|
@@ -348,18 +348,18 @@ 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;
|
|
@@ -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;
|
|
@@ -568,48 +568,48 @@ declare class AlgorandClientTransactionCreator {
|
|
|
568
568
|
* @returns The application ABI method create transaction
|
|
569
569
|
*/
|
|
570
570
|
appCreateMethodCall: (params: {
|
|
571
|
-
maxFee?: AlgoAmount | undefined;
|
|
572
|
-
schema?: {
|
|
573
|
-
globalInts: number;
|
|
574
|
-
globalByteSlices: number;
|
|
575
|
-
localInts: number;
|
|
576
|
-
localByteSlices: number;
|
|
577
|
-
} | undefined;
|
|
578
|
-
sender: SendingAddress;
|
|
579
|
-
lease?: string | Uint8Array | undefined;
|
|
580
|
-
rekeyTo?: ReadableAddress | undefined;
|
|
581
571
|
approvalProgram: string | Uint8Array;
|
|
582
572
|
clearStateProgram: string | Uint8Array;
|
|
583
573
|
appId?: 0 | undefined;
|
|
584
|
-
|
|
585
|
-
|
|
574
|
+
extraProgramPages?: number | undefined;
|
|
575
|
+
sender: SendingAddress;
|
|
576
|
+
signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
|
|
577
|
+
rekeyTo?: ReadableAddress | undefined;
|
|
586
578
|
note?: string | Uint8Array | undefined;
|
|
579
|
+
lease?: string | Uint8Array | undefined;
|
|
587
580
|
staticFee?: AlgoAmount | undefined;
|
|
588
581
|
extraFee?: AlgoAmount | undefined;
|
|
582
|
+
maxFee?: AlgoAmount | undefined;
|
|
589
583
|
validityWindow?: number | bigint | undefined;
|
|
590
584
|
firstValidRound?: bigint | undefined;
|
|
591
585
|
lastValidRound?: bigint | undefined;
|
|
586
|
+
onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
|
|
592
587
|
accountReferences?: ReadableAddress[] | undefined;
|
|
593
588
|
appReferences?: bigint[] | undefined;
|
|
594
589
|
assetReferences?: bigint[] | undefined;
|
|
595
590
|
boxReferences?: (BoxIdentifier | BoxReference)[] | undefined;
|
|
596
591
|
accessReferences?: ResourceReference[] | undefined;
|
|
597
592
|
rejectVersion?: number | undefined;
|
|
598
|
-
|
|
593
|
+
schema?: {
|
|
594
|
+
globalInts: number;
|
|
595
|
+
globalByteSlices: number;
|
|
596
|
+
localInts: number;
|
|
597
|
+
localByteSlices: number;
|
|
598
|
+
} | undefined;
|
|
599
599
|
method: ABIMethod;
|
|
600
|
-
args?: (ABIValue |
|
|
601
|
-
maxFee?: AlgoAmount | undefined;
|
|
600
|
+
args?: (ABIValue | Transaction | Promise<Transaction> | 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;
|
|
@@ -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;
|
|
@@ -702,21 +702,21 @@ declare class AlgorandClientTransactionCreator {
|
|
|
702
702
|
* @returns The application ABI method update transaction
|
|
703
703
|
*/
|
|
704
704
|
appUpdateMethodCall: (params: {
|
|
705
|
-
maxFee?: AlgoAmount | undefined;
|
|
706
|
-
sender: SendingAddress;
|
|
707
|
-
lease?: string | Uint8Array | undefined;
|
|
708
|
-
rekeyTo?: ReadableAddress | undefined;
|
|
709
705
|
approvalProgram: string | Uint8Array;
|
|
710
706
|
clearStateProgram: string | Uint8Array;
|
|
711
707
|
appId: bigint;
|
|
712
|
-
|
|
713
|
-
signer?:
|
|
708
|
+
sender: SendingAddress;
|
|
709
|
+
signer?: TransactionSigner | AddressWithTransactionSigner | undefined;
|
|
710
|
+
rekeyTo?: ReadableAddress | undefined;
|
|
714
711
|
note?: string | Uint8Array | undefined;
|
|
712
|
+
lease?: string | Uint8Array | undefined;
|
|
715
713
|
staticFee?: AlgoAmount | undefined;
|
|
716
714
|
extraFee?: AlgoAmount | undefined;
|
|
715
|
+
maxFee?: AlgoAmount | undefined;
|
|
717
716
|
validityWindow?: number | bigint | undefined;
|
|
718
717
|
firstValidRound?: bigint | undefined;
|
|
719
718
|
lastValidRound?: bigint | undefined;
|
|
719
|
+
onComplete?: OnApplicationComplete.UpdateApplication | undefined;
|
|
720
720
|
accountReferences?: ReadableAddress[] | undefined;
|
|
721
721
|
appReferences?: bigint[] | undefined;
|
|
722
722
|
assetReferences?: bigint[] | undefined;
|
|
@@ -724,19 +724,19 @@ declare class AlgorandClientTransactionCreator {
|
|
|
724
724
|
accessReferences?: ResourceReference[] | undefined;
|
|
725
725
|
rejectVersion?: number | undefined;
|
|
726
726
|
method: ABIMethod;
|
|
727
|
-
args?: (ABIValue |
|
|
728
|
-
maxFee?: AlgoAmount | undefined;
|
|
727
|
+
args?: (ABIValue | Transaction | Promise<Transaction> | 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;
|
|
@@ -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;
|
|
@@ -827,19 +827,19 @@ 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;
|
|
@@ -847,19 +847,19 @@ declare class AlgorandClientTransactionCreator {
|
|
|
847
847
|
accessReferences?: ResourceReference[] | undefined;
|
|
848
848
|
rejectVersion?: number | undefined;
|
|
849
849
|
method: ABIMethod;
|
|
850
|
-
args?: (ABIValue |
|
|
851
|
-
maxFee?: AlgoAmount | undefined;
|
|
850
|
+
args?: (ABIValue | Transaction | Promise<Transaction> | 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;
|
|
@@ -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;
|
|
@@ -950,19 +950,19 @@ 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;
|
|
@@ -970,19 +970,19 @@ declare class AlgorandClientTransactionCreator {
|
|
|
970
970
|
accessReferences?: ResourceReference[] | undefined;
|
|
971
971
|
rejectVersion?: number | undefined;
|
|
972
972
|
method: ABIMethod;
|
|
973
|
-
args?: (ABIValue |
|
|
974
|
-
maxFee?: AlgoAmount | undefined;
|
|
973
|
+
args?: (ABIValue | Transaction | Promise<Transaction> | 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;
|
|
@@ -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;
|