@algorandfoundation/algokit-utils 7.0.0-beta.2 → 7.0.0-beta.20
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/LICENSE +21 -0
- package/README.md +3 -25
- package/account/account.d.ts +1 -2
- package/account/account.js +6 -4
- package/account/account.js.map +1 -1
- package/account/account.mjs +6 -4
- package/account/account.mjs.map +1 -1
- package/account/get-account-config-from-environment.d.ts +0 -1
- package/account/get-account-config-from-environment.js.map +1 -1
- package/account/get-account-config-from-environment.mjs.map +1 -1
- package/account/get-account.d.ts +0 -1
- package/account/get-account.js.map +1 -1
- package/account/get-account.mjs.map +1 -1
- package/account/get-dispenser-account.d.ts +0 -1
- package/account/get-dispenser-account.js.map +1 -1
- package/account/get-dispenser-account.mjs.map +1 -1
- package/account/index.d.ts +0 -1
- package/account/mnemonic-account.d.ts +0 -1
- package/account/mnemonic-account.js.map +1 -1
- package/account/mnemonic-account.mjs.map +1 -1
- package/amount.d.ts +14 -5
- package/amount.js +6 -0
- package/amount.js.map +1 -1
- package/amount.mjs +6 -0
- package/amount.mjs.map +1 -1
- package/app-client.d.ts +15 -1
- package/app-client.js +15 -0
- package/app-client.js.map +1 -1
- package/app-client.mjs +15 -0
- package/app-client.mjs.map +1 -1
- package/app-deploy.d.ts +0 -1
- package/app-deploy.js +4 -6
- package/app-deploy.js.map +1 -1
- package/app-deploy.mjs +7 -9
- package/app-deploy.mjs.map +1 -1
- package/app.d.ts +10 -11
- package/app.js +15 -11
- package/app.js.map +1 -1
- package/app.mjs +15 -11
- package/app.mjs.map +1 -1
- package/asset.d.ts +3 -4
- package/asset.js +3 -6
- package/asset.js.map +1 -1
- package/asset.mjs +3 -6
- package/asset.mjs.map +1 -1
- package/config.d.ts +0 -1
- package/config.js.map +1 -1
- package/config.mjs.map +1 -1
- package/debugging/debugging.d.ts +3 -5
- package/debugging/debugging.js +4 -128
- package/debugging/debugging.js.map +1 -1
- package/debugging/debugging.mjs +4 -109
- package/debugging/debugging.mjs.map +1 -1
- package/debugging/index.d.ts +0 -2
- package/dispenser-client.d.ts +0 -1
- package/dispenser-client.js.map +1 -1
- package/dispenser-client.mjs.map +1 -1
- package/index.d.ts +6 -5
- package/index.js +48 -38
- package/index.js.map +1 -1
- package/index.mjs +6 -5
- package/index.mjs.map +1 -1
- package/indexer-lookup.d.ts +0 -1
- package/indexer-lookup.js.map +1 -1
- package/indexer-lookup.mjs.map +1 -1
- package/localnet/get-kmd-wallet-account.d.ts +0 -1
- package/localnet/get-kmd-wallet-account.js.map +1 -1
- package/localnet/get-kmd-wallet-account.mjs.map +1 -1
- package/localnet/get-localnet-dispenser-account.d.ts +0 -1
- package/localnet/get-localnet-dispenser-account.js.map +1 -1
- package/localnet/get-localnet-dispenser-account.mjs.map +1 -1
- package/localnet/get-or-create-kmd-wallet-account.d.ts +0 -1
- package/localnet/get-or-create-kmd-wallet-account.js.map +1 -1
- package/localnet/get-or-create-kmd-wallet-account.mjs.map +1 -1
- package/localnet/index.d.ts +0 -1
- package/localnet/is-localnet.d.ts +0 -1
- package/localnet/is-localnet.js.map +1 -1
- package/localnet/is-localnet.mjs.map +1 -1
- package/network-client.d.ts +0 -1
- package/network-client.js.map +1 -1
- package/network-client.mjs.map +1 -1
- package/package.json +2 -2
- package/testing/_asset.d.ts +0 -1
- package/testing/account.d.ts +0 -1
- package/testing/account.js.map +1 -1
- package/testing/account.mjs.map +1 -1
- package/testing/fixtures/algokit-log-capture-fixture.d.ts +0 -1
- package/testing/fixtures/algokit-log-capture-fixture.js.map +1 -1
- package/testing/fixtures/algokit-log-capture-fixture.mjs.map +1 -1
- package/testing/fixtures/algorand-fixture.d.ts +0 -1
- package/testing/fixtures/algorand-fixture.js +1 -1
- package/testing/fixtures/algorand-fixture.js.map +1 -1
- package/testing/fixtures/algorand-fixture.mjs +1 -1
- package/testing/fixtures/algorand-fixture.mjs.map +1 -1
- package/testing/fixtures/index.d.ts +0 -1
- package/testing/index.d.ts +0 -1
- package/testing/indexer.d.ts +0 -1
- package/testing/indexer.js.map +1 -1
- package/testing/indexer.mjs.map +1 -1
- package/testing/test-logger.d.ts +0 -1
- package/testing/test-logger.js +1 -3
- package/testing/test-logger.js.map +1 -1
- package/testing/test-logger.mjs +1 -3
- package/testing/test-logger.mjs.map +1 -1
- package/testing/transaction-logger.d.ts +0 -1
- package/testing/transaction-logger.js.map +1 -1
- package/testing/transaction-logger.mjs.map +1 -1
- package/transaction/index.d.ts +0 -1
- package/transaction/legacy-bridge.d.ts +5 -6
- package/transaction/legacy-bridge.js +1 -1
- package/transaction/legacy-bridge.js.map +1 -1
- package/transaction/legacy-bridge.mjs +4 -4
- package/transaction/legacy-bridge.mjs.map +1 -1
- package/transaction/perform-atomic-transaction-composer-simulate.d.ts +0 -1
- package/transaction/perform-atomic-transaction-composer-simulate.js +1 -0
- package/transaction/perform-atomic-transaction-composer-simulate.js.map +1 -1
- package/transaction/perform-atomic-transaction-composer-simulate.mjs +1 -0
- package/transaction/perform-atomic-transaction-composer-simulate.mjs.map +1 -1
- package/transaction/transaction.d.ts +41 -6
- package/transaction/transaction.js +113 -61
- package/transaction/transaction.js.map +1 -1
- package/transaction/transaction.mjs +113 -62
- package/transaction/transaction.mjs.map +1 -1
- package/transfer/index.d.ts +0 -1
- package/transfer/transfer-algos.d.ts +1 -2
- package/transfer/transfer-algos.js +1 -1
- package/transfer/transfer-algos.js.map +1 -1
- package/transfer/transfer-algos.mjs +1 -1
- package/transfer/transfer-algos.mjs.map +1 -1
- package/transfer/transfer.d.ts +1 -2
- package/transfer/transfer.js +3 -3
- package/transfer/transfer.js.map +1 -1
- package/transfer/transfer.mjs +3 -3
- package/transfer/transfer.mjs.map +1 -1
- package/types/account-manager.d.ts +15 -7
- package/types/account-manager.js +27 -11
- package/types/account-manager.js.map +1 -1
- package/types/account-manager.mjs +29 -13
- package/types/account-manager.mjs.map +1 -1
- package/types/account.d.ts +9 -1
- package/types/account.js.map +1 -1
- package/types/account.mjs.map +1 -1
- package/types/algo-http-client-with-retry.d.ts +0 -1
- package/types/algo-http-client-with-retry.js.map +1 -1
- package/types/algo-http-client-with-retry.mjs.map +1 -1
- package/types/algorand-client-interface.d.ts +28 -0
- package/types/algorand-client-interface.js +3 -0
- package/types/algorand-client-interface.js.map +1 -0
- package/types/algorand-client-interface.mjs +2 -0
- package/types/algorand-client-interface.mjs.map +1 -0
- package/types/algorand-client-transaction-creator.d.ts +33 -34
- package/types/algorand-client-transaction-creator.js +31 -31
- package/types/algorand-client-transaction-creator.js.map +1 -1
- package/types/algorand-client-transaction-creator.mjs +31 -31
- package/types/algorand-client-transaction-creator.mjs.map +1 -1
- package/types/algorand-client-transaction-sender.d.ts +31 -32
- package/types/algorand-client-transaction-sender.js +25 -9
- package/types/algorand-client-transaction-sender.js.map +1 -1
- package/types/algorand-client-transaction-sender.mjs +25 -9
- package/types/algorand-client-transaction-sender.mjs.map +1 -1
- package/types/algorand-client.d.ts +13 -13
- package/types/algorand-client.js +10 -10
- package/types/algorand-client.js.map +1 -1
- package/types/algorand-client.mjs +12 -12
- package/types/algorand-client.mjs.map +1 -1
- package/types/amount.d.ts +10 -11
- package/types/amount.js +7 -7
- package/types/amount.js.map +1 -1
- package/types/amount.mjs +7 -7
- package/types/amount.mjs.map +1 -1
- package/types/app-arc56.d.ts +358 -0
- package/types/app-arc56.js +184 -0
- package/types/app-arc56.js.map +1 -0
- package/types/app-arc56.mjs +175 -0
- package/types/app-arc56.mjs.map +1 -0
- package/types/app-client.d.ts +1488 -8
- package/types/app-client.js +1000 -19
- package/types/app-client.js.map +1 -1
- package/types/app-client.mjs +1000 -20
- package/types/app-client.mjs.map +1 -1
- package/types/app-deployer.d.ts +19 -14
- package/types/app-deployer.js +25 -25
- package/types/app-deployer.js.map +1 -1
- package/types/app-deployer.mjs +27 -27
- package/types/app-deployer.mjs.map +1 -1
- package/types/app-factory.d.ts +846 -0
- package/types/app-factory.js +411 -0
- package/types/app-factory.js.map +1 -0
- package/types/app-factory.mjs +409 -0
- package/types/app-factory.mjs.map +1 -0
- package/types/app-manager.d.ts +12 -3
- package/types/app-manager.js +13 -15
- package/types/app-manager.js.map +1 -1
- package/types/app-manager.mjs +13 -15
- package/types/app-manager.mjs.map +1 -1
- package/types/app-spec.d.ts +2 -1
- package/types/app-spec.js +121 -0
- package/types/app-spec.js.map +1 -1
- package/types/app-spec.mjs +120 -0
- package/types/app-spec.mjs.map +1 -1
- package/types/app.d.ts +14 -9
- package/types/app.js.map +1 -1
- package/types/app.mjs.map +1 -1
- package/types/asset-manager.d.ts +7 -7
- package/types/asset-manager.js +5 -6
- package/types/asset-manager.js.map +1 -1
- package/types/asset-manager.mjs +5 -6
- package/types/asset-manager.mjs.map +1 -1
- package/types/asset.d.ts +0 -1
- package/types/async-event-emitter.d.ts +14 -0
- package/types/async-event-emitter.js +50 -0
- package/types/async-event-emitter.js.map +1 -0
- package/types/async-event-emitter.mjs +48 -0
- package/types/async-event-emitter.mjs.map +1 -0
- package/types/client-manager.d.ts +131 -51
- package/types/client-manager.js +143 -23
- package/types/client-manager.js.map +1 -1
- package/types/client-manager.mjs +144 -24
- package/types/client-manager.mjs.map +1 -1
- package/types/composer.d.ts +110 -37
- package/types/composer.js +139 -26
- package/types/composer.js.map +1 -1
- package/types/composer.mjs +140 -27
- package/types/composer.mjs.map +1 -1
- package/types/config.d.ts +3 -6
- package/types/config.js +5 -44
- package/types/config.js.map +1 -1
- package/types/config.mjs +5 -27
- package/types/config.mjs.map +1 -1
- package/types/debugging.d.ts +29 -101
- package/types/debugging.js +16 -109
- package/types/debugging.js.map +1 -1
- package/types/debugging.mjs +12 -107
- package/types/debugging.mjs.map +1 -1
- package/types/dispenser-client.d.ts +1 -2
- package/types/dispenser-client.js +6 -5
- package/types/dispenser-client.js.map +1 -1
- package/types/dispenser-client.mjs +6 -5
- package/types/dispenser-client.mjs.map +1 -1
- package/types/expand.d.ts +0 -1
- package/types/indexer.d.ts +0 -1
- package/types/indexer.js.map +1 -1
- package/types/indexer.mjs.map +1 -1
- package/types/kmd-account-manager.d.ts +0 -1
- package/types/kmd-account-manager.js +2 -2
- package/types/kmd-account-manager.js.map +1 -1
- package/types/kmd-account-manager.mjs +4 -4
- package/types/kmd-account-manager.mjs.map +1 -1
- package/types/lifecycle-events.d.ts +10 -0
- package/types/lifecycle-events.js +8 -0
- package/types/lifecycle-events.js.map +1 -0
- package/types/lifecycle-events.mjs +8 -0
- package/types/lifecycle-events.mjs.map +1 -0
- package/types/logging.d.ts +0 -1
- package/types/logging.js.map +1 -1
- package/types/logging.mjs.map +1 -1
- package/types/logic-error.d.ts +2 -4
- package/types/logic-error.js +3 -3
- package/types/logic-error.js.map +1 -1
- package/types/logic-error.mjs +3 -3
- package/types/logic-error.mjs.map +1 -1
- package/types/network-client.d.ts +13 -1
- package/types/network-client.js.map +1 -1
- package/types/network-client.mjs.map +1 -1
- package/types/testing.d.ts +3 -4
- package/types/transaction.d.ts +14 -4
- package/types/transfer.d.ts +0 -1
- package/types/urlTokenBaseHTTPClient.d.ts +0 -1
- package/types/urlTokenBaseHTTPClient.js +1 -1
- package/types/urlTokenBaseHTTPClient.js.map +1 -1
- package/types/urlTokenBaseHTTPClient.mjs +1 -1
- package/types/urlTokenBaseHTTPClient.mjs.map +1 -1
- package/util.d.ts +2 -2
- package/util.js +11 -10
- package/util.js.map +1 -1
- package/util.mjs +11 -10
- package/util.mjs.map +1 -1
- package/account/account.d.ts.map +0 -1
- package/account/get-account-config-from-environment.d.ts.map +0 -1
- package/account/get-account.d.ts.map +0 -1
- package/account/get-dispenser-account.d.ts.map +0 -1
- package/account/index.d.ts.map +0 -1
- package/account/mnemonic-account.d.ts.map +0 -1
- package/amount.d.ts.map +0 -1
- package/app-client.d.ts.map +0 -1
- package/app-deploy.d.ts.map +0 -1
- package/app.d.ts.map +0 -1
- package/asset.d.ts.map +0 -1
- package/config.d.ts.map +0 -1
- package/debugging/debugging.d.ts.map +0 -1
- package/debugging/index.d.ts.map +0 -1
- package/debugging/simulate-and-persist-response.d.ts +0 -20
- package/debugging/simulate-and-persist-response.d.ts.map +0 -1
- package/debugging/simulate-and-persist-response.js +0 -108
- package/debugging/simulate-and-persist-response.js.map +0 -1
- package/debugging/simulate-and-persist-response.mjs +0 -89
- package/debugging/simulate-and-persist-response.mjs.map +0 -1
- package/dispenser-client.d.ts.map +0 -1
- package/index.d.ts.map +0 -1
- package/indexer-lookup.d.ts.map +0 -1
- package/localnet/get-kmd-wallet-account.d.ts.map +0 -1
- package/localnet/get-localnet-dispenser-account.d.ts.map +0 -1
- package/localnet/get-or-create-kmd-wallet-account.d.ts.map +0 -1
- package/localnet/index.d.ts.map +0 -1
- package/localnet/is-localnet.d.ts.map +0 -1
- package/network-client.d.ts.map +0 -1
- package/testing/_asset.d.ts.map +0 -1
- package/testing/account.d.ts.map +0 -1
- package/testing/fixtures/algokit-log-capture-fixture.d.ts.map +0 -1
- package/testing/fixtures/algorand-fixture.d.ts.map +0 -1
- package/testing/fixtures/index.d.ts.map +0 -1
- package/testing/index.d.ts.map +0 -1
- package/testing/indexer.d.ts.map +0 -1
- package/testing/test-logger.d.ts.map +0 -1
- package/testing/transaction-logger.d.ts.map +0 -1
- package/transaction/index.d.ts.map +0 -1
- package/transaction/legacy-bridge.d.ts.map +0 -1
- package/transaction/perform-atomic-transaction-composer-simulate.d.ts.map +0 -1
- package/transaction/transaction.d.ts.map +0 -1
- package/transfer/index.d.ts.map +0 -1
- package/transfer/transfer-algos.d.ts.map +0 -1
- package/transfer/transfer.d.ts.map +0 -1
- package/types/account-manager.d.ts.map +0 -1
- package/types/account.d.ts.map +0 -1
- package/types/algo-http-client-with-retry.d.ts.map +0 -1
- package/types/algorand-client-transaction-creator.d.ts.map +0 -1
- package/types/algorand-client-transaction-sender.d.ts.map +0 -1
- package/types/algorand-client.d.ts.map +0 -1
- package/types/amount.d.ts.map +0 -1
- package/types/app-client.d.ts.map +0 -1
- package/types/app-deployer.d.ts.map +0 -1
- package/types/app-manager.d.ts.map +0 -1
- package/types/app-spec.d.ts.map +0 -1
- package/types/app.d.ts.map +0 -1
- package/types/asset-manager.d.ts.map +0 -1
- package/types/asset.d.ts.map +0 -1
- package/types/client-manager.d.ts.map +0 -1
- package/types/composer.d.ts.map +0 -1
- package/types/config.d.ts.map +0 -1
- package/types/debugging.d.ts.map +0 -1
- package/types/dispenser-client.d.ts.map +0 -1
- package/types/expand.d.ts.map +0 -1
- package/types/indexer.d.ts.map +0 -1
- package/types/kmd-account-manager.d.ts.map +0 -1
- package/types/logging.d.ts.map +0 -1
- package/types/logic-error.d.ts.map +0 -1
- package/types/network-client.d.ts.map +0 -1
- package/types/testing.d.ts.map +0 -1
- package/types/transaction.d.ts.map +0 -1
- package/types/transfer.d.ts.map +0 -1
- package/types/urlTokenBaseHTTPClient.d.ts.map +0 -1
- package/util.d.ts.map +0 -1
package/types/app-client.d.ts
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import algosdk from 'algosdk';
|
|
2
|
+
import { TransactionSignerAccount } from './account';
|
|
3
|
+
import { AlgorandClientInterface } from './algorand-client-interface';
|
|
2
4
|
import { AlgoAmount } from './amount';
|
|
3
|
-
import { ABIAppCallArgs, ABIReturn, AppCallArgs, AppCallTransactionResult, AppCallType, AppCompilationResult,
|
|
5
|
+
import { ABIAppCallArgs, ABIReturn, AppCallArgs, AppCallTransactionResult, AppCallType, AppCompilationResult, AppMetadata, AppReference, AppReturn, AppState, AppStorageSchema, BoxName, AppLookup as LegacyAppLookup, OnSchemaBreak, OnUpdate, RawAppCallArgs, SendAppTransactionResult, TealTemplateParams } from './app';
|
|
6
|
+
import { ABIStruct, Arc56Contract, Arc56Method, ProgramSourceInfo } from './app-arc56';
|
|
7
|
+
import { AppLookup } from './app-deployer';
|
|
8
|
+
import { AppManager, BoxIdentifier } from './app-manager';
|
|
4
9
|
import { AppSpec } from './app-spec';
|
|
5
|
-
import {
|
|
10
|
+
import TransactionComposer, { AppCallMethodCall, AppCallParams, AppDeleteMethodCall, AppDeleteParams, AppMethodCall, AppMethodCallTransactionArgument, CommonAppCallParams, PaymentParams } from './composer';
|
|
11
|
+
import { Expand } from './expand';
|
|
12
|
+
import { SendParams, SendTransactionFrom, SendTransactionParams, TransactionNote } from './transaction';
|
|
6
13
|
import ABIMethod = algosdk.ABIMethod;
|
|
7
14
|
import ABIMethodParams = algosdk.ABIMethodParams;
|
|
8
15
|
import ABIType = algosdk.ABIType;
|
|
@@ -10,7 +17,9 @@ import ABIValue = algosdk.ABIValue;
|
|
|
10
17
|
import Algodv2 = algosdk.Algodv2;
|
|
11
18
|
import Indexer = algosdk.Indexer;
|
|
12
19
|
import OnApplicationComplete = algosdk.OnApplicationComplete;
|
|
20
|
+
import SourceMap = algosdk.SourceMap;
|
|
13
21
|
import SuggestedParams = algosdk.SuggestedParams;
|
|
22
|
+
import TransactionSigner = algosdk.TransactionSigner;
|
|
14
23
|
/** Configuration to resolve app by creator and name `getCreatorAppsByName` */
|
|
15
24
|
export type ResolveAppByCreatorAndNameBase = {
|
|
16
25
|
/** The address of the app creator account to resolve the app by */
|
|
@@ -21,7 +30,7 @@ export type ResolveAppByCreatorAndNameBase = {
|
|
|
21
30
|
* * An indexer instance to search the creator account apps; or
|
|
22
31
|
* * The cached value of the existing apps for the given creator from `getCreatorAppsByName`
|
|
23
32
|
*/
|
|
24
|
-
findExistingUsing: Indexer |
|
|
33
|
+
findExistingUsing: Indexer | LegacyAppLookup;
|
|
25
34
|
};
|
|
26
35
|
/** Configuration to resolve app by creator and name `getCreatorAppsByName` */
|
|
27
36
|
export type ResolveAppByCreatorAndName = ResolveAppByCreatorAndNameBase & {
|
|
@@ -129,7 +138,9 @@ export type AppClientClearStateParams = AppClientCallRawArgs & AppClientCallCore
|
|
|
129
138
|
export interface AppClientCompilationParams {
|
|
130
139
|
/** Any deploy-time parameters to replace in the TEAL code */
|
|
131
140
|
deployTimeParams?: TealTemplateParams;
|
|
141
|
+
/** Whether or not the contract should have deploy-time immutability control set, undefined = ignore */
|
|
132
142
|
updatable?: boolean;
|
|
143
|
+
/** Whether or not the contract should have deploy-time permanence control set, undefined = ignore */
|
|
133
144
|
deletable?: boolean;
|
|
134
145
|
}
|
|
135
146
|
/** On-complete action parameter for creating a contract using ApplicationClient */
|
|
@@ -167,7 +178,1447 @@ export interface SourceMapExport {
|
|
|
167
178
|
names: string[];
|
|
168
179
|
mappings: string;
|
|
169
180
|
}
|
|
170
|
-
/**
|
|
181
|
+
/**
|
|
182
|
+
* The result of asking an `AppClient` to compile a program.
|
|
183
|
+
*
|
|
184
|
+
* Always contains the compiled bytecode, and may contain the result of compiling TEAL (including sourcemap) if it was available.
|
|
185
|
+
*/
|
|
186
|
+
export interface AppClientCompilationResult extends Partial<AppCompilationResult> {
|
|
187
|
+
/** The compiled bytecode of the approval program, ready to deploy to algod */
|
|
188
|
+
approvalProgram: Uint8Array;
|
|
189
|
+
/** The compiled bytecode of the clear state program, ready to deploy to algod */
|
|
190
|
+
clearStateProgram: Uint8Array;
|
|
191
|
+
}
|
|
192
|
+
/** Parameters to create an app client */
|
|
193
|
+
export interface AppClientParams {
|
|
194
|
+
/** The ID of the app instance this client should make calls against. */
|
|
195
|
+
appId: bigint;
|
|
196
|
+
/** The ARC-56 or ARC-32 application spec as either:
|
|
197
|
+
* * Parsed JSON ARC-56 `Contract`
|
|
198
|
+
* * Parsed JSON ARC-32 `AppSpec`
|
|
199
|
+
* * Raw JSON string (in either ARC-56 or ARC-32 format)
|
|
200
|
+
*/
|
|
201
|
+
appSpec: Arc56Contract | AppSpec | string;
|
|
202
|
+
/** An `AlgorandClient` instance */
|
|
203
|
+
algorand: AlgorandClientInterface;
|
|
204
|
+
/**
|
|
205
|
+
* Optional override for the app name; used for on-chain metadata and lookups.
|
|
206
|
+
* Defaults to the ARC-32/ARC-56 app spec name
|
|
207
|
+
*/
|
|
208
|
+
appName?: string;
|
|
209
|
+
/** Optional address to use for the account to use as the default sender for calls. */
|
|
210
|
+
defaultSender?: string;
|
|
211
|
+
/** Optional signer to use as the default signer for default sender calls (if not specified then the signer will be resolved from `AlgorandClient`). */
|
|
212
|
+
defaultSigner?: TransactionSigner;
|
|
213
|
+
/** Optional source map for the approval program */
|
|
214
|
+
approvalSourceMap?: SourceMap;
|
|
215
|
+
/** Optional source map for the clear state program */
|
|
216
|
+
clearSourceMap?: SourceMap;
|
|
217
|
+
}
|
|
218
|
+
/** Parameters to clone an app client */
|
|
219
|
+
export type CloneAppClientParams = Expand<Partial<Omit<AppClientParams, 'algorand' | 'appSpec'>>>;
|
|
220
|
+
/** onComplete parameter for a non-update app call */
|
|
221
|
+
export type CallOnComplete = {
|
|
222
|
+
/** On-complete of the call; defaults to no-op */
|
|
223
|
+
onComplete?: Exclude<OnApplicationComplete, OnApplicationComplete.UpdateApplicationOC>;
|
|
224
|
+
};
|
|
225
|
+
/** AppClient common parameters for a bare app call */
|
|
226
|
+
export type AppClientBareCallParams = Expand<Omit<CommonAppCallParams, 'appId' | 'sender' | 'onComplete'> & {
|
|
227
|
+
/** The address of the account sending the transaction, if undefined then the app client's defaultSender is used. */
|
|
228
|
+
sender?: string;
|
|
229
|
+
}>;
|
|
230
|
+
/** AppClient common parameters for an ABI method call */
|
|
231
|
+
export type AppClientMethodCallParams = Expand<Omit<CommonAppCallParams, 'appId' | 'sender' | 'method' | 'args'> & {
|
|
232
|
+
/** The address of the account sending the transaction, if undefined then the app client's defaultSender is used. */
|
|
233
|
+
sender?: string;
|
|
234
|
+
/** The method name or method signature to call if an ABI call is being emitted
|
|
235
|
+
* @example Method name
|
|
236
|
+
* `my_method`
|
|
237
|
+
* @example Method signature
|
|
238
|
+
* `my_method(unit64,string)bytes`
|
|
239
|
+
*/
|
|
240
|
+
method: string;
|
|
241
|
+
/** Arguments to the ABI method, either:
|
|
242
|
+
* * An ABI value
|
|
243
|
+
* * An ARC-56 struct
|
|
244
|
+
* * A transaction with explicit signer
|
|
245
|
+
* * A transaction (where the signer will be automatically assigned)
|
|
246
|
+
* * An unawaited transaction (e.g. from algorand.createTransaction.transactionType())
|
|
247
|
+
* * Another method call (via method call params object)
|
|
248
|
+
* * undefined (this represents a placeholder for either a default argument or a transaction argument that is fulfilled by another method call argument)
|
|
249
|
+
*/
|
|
250
|
+
args?: (ABIValue | ABIStruct | AppMethodCallTransactionArgument | undefined)[];
|
|
251
|
+
}>;
|
|
252
|
+
/** Parameters for funding an app account */
|
|
253
|
+
export type FundAppParams = Expand<Omit<PaymentParams, 'receiver' | 'sender'> & SendParams & {
|
|
254
|
+
/** The optional sender to send the transaction from, will use the application client's default sender by default if specified */
|
|
255
|
+
sender?: string;
|
|
256
|
+
}>;
|
|
257
|
+
/** Resolve an app client instance by looking up an app created by the given creator with the given name */
|
|
258
|
+
export type ResolveAppClientByCreatorAndName = Expand<Omit<AppClientParams, 'appId'> & {
|
|
259
|
+
/** The address of the creator account for the app */
|
|
260
|
+
creatorAddress: string;
|
|
261
|
+
/** An optional cached app lookup that matches a name to on-chain details;
|
|
262
|
+
* either this is needed or indexer is required to be passed in to this `ClientManager` on construction.
|
|
263
|
+
*/
|
|
264
|
+
appLookupCache?: AppLookup;
|
|
265
|
+
/** Whether or not to ignore the `AppDeployer` lookup cache and force an on-chain lookup, default: use any cached value */
|
|
266
|
+
ignoreCache?: boolean;
|
|
267
|
+
}>;
|
|
268
|
+
/** Resolve an app client instance by looking up the current network. */
|
|
269
|
+
export type ResolveAppClientByNetwork = Expand<Omit<AppClientParams, 'appId'>>;
|
|
270
|
+
/** ARC-56/ARC-32 application client that allows you to manage calls and
|
|
271
|
+
* state for a specific deployed instance of an app (with a known app ID). */
|
|
272
|
+
export declare class AppClient {
|
|
273
|
+
private _appId;
|
|
274
|
+
private _appAddress;
|
|
275
|
+
private _appName;
|
|
276
|
+
private _appSpec;
|
|
277
|
+
private _algorand;
|
|
278
|
+
private _defaultSender?;
|
|
279
|
+
private _defaultSigner?;
|
|
280
|
+
private _approvalSourceMap;
|
|
281
|
+
private _clearSourceMap;
|
|
282
|
+
private _localStateMethods;
|
|
283
|
+
private _globalStateMethods;
|
|
284
|
+
private _boxStateMethods;
|
|
285
|
+
private _paramsMethods;
|
|
286
|
+
private _createTransactionsMethods;
|
|
287
|
+
private _sendMethods;
|
|
288
|
+
constructor(params: AppClientParams);
|
|
289
|
+
clone(params: CloneAppClientParams): AppClient;
|
|
290
|
+
/** Start a new `TransactionComposer` transaction group */
|
|
291
|
+
newGroup(): TransactionComposer;
|
|
292
|
+
/**
|
|
293
|
+
* Returns a new `AppClient` client, resolving the app by creator address and name
|
|
294
|
+
* using AlgoKit app deployment semantics (i.e. looking for the app creation transaction note).
|
|
295
|
+
* @param params The parameters to create the app client
|
|
296
|
+
*/
|
|
297
|
+
static fromCreatorAndName(params: ResolveAppClientByCreatorAndName): Promise<AppClient>;
|
|
298
|
+
/**
|
|
299
|
+
* Returns an `AppClient` instance for the current network based on
|
|
300
|
+
* pre-determined network-specific app IDs specified in the ARC-56 app spec.
|
|
301
|
+
*
|
|
302
|
+
* If no IDs are in the app spec or the network isn't recognised, an error is thrown.
|
|
303
|
+
* @param params The parameters to create the app client
|
|
304
|
+
*/
|
|
305
|
+
static fromNetwork(params: ResolveAppClientByNetwork): Promise<AppClient>;
|
|
306
|
+
/**
|
|
307
|
+
* Takes a string or parsed JSON object that could be ARC-32 or ARC-56 format and
|
|
308
|
+
* normalises it into a parsed ARC-56 contract object.
|
|
309
|
+
* @param spec The spec to normalise
|
|
310
|
+
* @returns The normalised ARC-56 contract object
|
|
311
|
+
*/
|
|
312
|
+
static normaliseAppSpec(spec: Arc56Contract | AppSpec | string): Arc56Contract;
|
|
313
|
+
/** The ID of the app instance this client is linked to. */
|
|
314
|
+
get appId(): bigint;
|
|
315
|
+
/** The app address of the app instance this client is linked to. */
|
|
316
|
+
get appAddress(): string;
|
|
317
|
+
/** The name of the app (from the ARC-32 / ARC-56 app spec). */
|
|
318
|
+
get appName(): string;
|
|
319
|
+
/** The ARC-56 app spec being used */
|
|
320
|
+
get appSpec(): Arc56Contract;
|
|
321
|
+
/** A reference to the underlying `AlgorandClient` this app client is using. */
|
|
322
|
+
get algorand(): AlgorandClientInterface;
|
|
323
|
+
/** Get parameters to create transactions for the current app.
|
|
324
|
+
*
|
|
325
|
+
* A good mental model for this is that these parameters represent a deferred transaction creation.
|
|
326
|
+
* @example Create a transaction in the future using Algorand Client
|
|
327
|
+
* ```typescript
|
|
328
|
+
* const myMethodCall = appClient.params.call({method: 'my_method', args: [123, 'hello']})
|
|
329
|
+
* // ...
|
|
330
|
+
* await algorand.send.AppMethodCall(myMethodCall)
|
|
331
|
+
* ```
|
|
332
|
+
* @example Define a nested transaction as an ABI argument
|
|
333
|
+
* ```typescript
|
|
334
|
+
* const myMethodCall = appClient.params.call({method: 'my_method', args: [123, 'hello']})
|
|
335
|
+
* await appClient.send.call({method: 'my_method2', args: [myMethodCall]})
|
|
336
|
+
* ```
|
|
337
|
+
*/
|
|
338
|
+
get params(): {
|
|
339
|
+
/** Return params for a payment transaction to fund the app account */
|
|
340
|
+
fundAppAccount: (params: {
|
|
341
|
+
lease?: string | Uint8Array | undefined;
|
|
342
|
+
note?: string | Uint8Array | undefined;
|
|
343
|
+
amount: AlgoAmount;
|
|
344
|
+
closeRemainderTo?: string | undefined;
|
|
345
|
+
maxFee?: AlgoAmount | undefined;
|
|
346
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
347
|
+
rekeyTo?: string | undefined;
|
|
348
|
+
staticFee?: AlgoAmount | undefined;
|
|
349
|
+
extraFee?: AlgoAmount | undefined;
|
|
350
|
+
validityWindow?: number | undefined;
|
|
351
|
+
firstValidRound?: bigint | undefined;
|
|
352
|
+
lastValidRound?: bigint | undefined;
|
|
353
|
+
maxRoundsToWaitForConfirmation?: number | undefined;
|
|
354
|
+
suppressLog?: boolean | undefined;
|
|
355
|
+
populateAppCallResources?: boolean | undefined;
|
|
356
|
+
sender?: string | undefined;
|
|
357
|
+
}) => {
|
|
358
|
+
sender: string;
|
|
359
|
+
signer: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
360
|
+
receiver: string;
|
|
361
|
+
lease?: string | Uint8Array | undefined;
|
|
362
|
+
note?: string | Uint8Array | undefined;
|
|
363
|
+
amount: AlgoAmount;
|
|
364
|
+
closeRemainderTo?: string | undefined;
|
|
365
|
+
maxFee?: AlgoAmount | undefined;
|
|
366
|
+
rekeyTo?: string | undefined;
|
|
367
|
+
staticFee?: AlgoAmount | undefined;
|
|
368
|
+
extraFee?: AlgoAmount | undefined;
|
|
369
|
+
validityWindow?: number | undefined;
|
|
370
|
+
firstValidRound?: bigint | undefined;
|
|
371
|
+
lastValidRound?: bigint | undefined;
|
|
372
|
+
maxRoundsToWaitForConfirmation?: number | undefined;
|
|
373
|
+
suppressLog?: boolean | undefined;
|
|
374
|
+
populateAppCallResources?: boolean | undefined;
|
|
375
|
+
};
|
|
376
|
+
/** Return params for an update ABI call, including deploy-time TEAL template replacements and compilation if provided */
|
|
377
|
+
update: (params: {
|
|
378
|
+
lease?: string | Uint8Array | undefined;
|
|
379
|
+
note?: string | Uint8Array | undefined;
|
|
380
|
+
maxFee?: AlgoAmount | undefined;
|
|
381
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
382
|
+
rekeyTo?: string | undefined;
|
|
383
|
+
staticFee?: AlgoAmount | undefined;
|
|
384
|
+
extraFee?: AlgoAmount | undefined;
|
|
385
|
+
validityWindow?: number | undefined;
|
|
386
|
+
firstValidRound?: bigint | undefined;
|
|
387
|
+
lastValidRound?: bigint | undefined;
|
|
388
|
+
onComplete?: algosdk.OnApplicationComplete | undefined;
|
|
389
|
+
accountReferences?: string[] | undefined;
|
|
390
|
+
appReferences?: bigint[] | undefined;
|
|
391
|
+
assetReferences?: bigint[] | undefined;
|
|
392
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
393
|
+
sender?: string | undefined;
|
|
394
|
+
method: string;
|
|
395
|
+
args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
|
|
396
|
+
} & AppClientCompilationParams) => Promise<{
|
|
397
|
+
/** The compiled bytecode of the approval program, ready to deploy to algod */
|
|
398
|
+
approvalProgram: Uint8Array;
|
|
399
|
+
/** The compiled bytecode of the clear state program, ready to deploy to algod */
|
|
400
|
+
clearStateProgram: Uint8Array;
|
|
401
|
+
compiledApproval?: import("./app").CompiledTeal | undefined;
|
|
402
|
+
compiledClear?: import("./app").CompiledTeal | undefined;
|
|
403
|
+
lease?: string | Uint8Array | undefined;
|
|
404
|
+
note?: string | Uint8Array | undefined;
|
|
405
|
+
maxFee?: AlgoAmount | undefined;
|
|
406
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
407
|
+
rekeyTo?: string | undefined;
|
|
408
|
+
staticFee?: AlgoAmount | undefined;
|
|
409
|
+
extraFee?: AlgoAmount | undefined;
|
|
410
|
+
validityWindow?: number | undefined;
|
|
411
|
+
firstValidRound?: bigint | undefined;
|
|
412
|
+
lastValidRound?: bigint | undefined;
|
|
413
|
+
onComplete?: algosdk.OnApplicationComplete | undefined;
|
|
414
|
+
accountReferences?: string[] | undefined;
|
|
415
|
+
appReferences?: bigint[] | undefined;
|
|
416
|
+
assetReferences?: bigint[] | undefined;
|
|
417
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
418
|
+
sender?: string | undefined;
|
|
419
|
+
method: string;
|
|
420
|
+
args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
|
|
421
|
+
/** Any deploy-time parameters to replace in the TEAL code */
|
|
422
|
+
deployTimeParams?: TealTemplateParams | undefined;
|
|
423
|
+
/** Whether or not the contract should have deploy-time immutability control set, undefined = ignore */
|
|
424
|
+
updatable?: boolean | undefined;
|
|
425
|
+
/** Whether or not the contract should have deploy-time permanence control set, undefined = ignore */
|
|
426
|
+
deletable?: boolean | undefined;
|
|
427
|
+
} & {
|
|
428
|
+
appId: bigint;
|
|
429
|
+
sender: string;
|
|
430
|
+
signer: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
431
|
+
method: Arc56Method;
|
|
432
|
+
onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC;
|
|
433
|
+
args: (algosdk.Transaction | algosdk.ABIValue | algosdk.TransactionWithSigner | Promise<algosdk.Transaction> | AppMethodCall<{
|
|
434
|
+
lease?: string | Uint8Array | undefined;
|
|
435
|
+
note?: string | Uint8Array | undefined;
|
|
436
|
+
maxFee?: AlgoAmount | undefined;
|
|
437
|
+
args?: Uint8Array[] | undefined;
|
|
438
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
439
|
+
sender: string;
|
|
440
|
+
rekeyTo?: string | undefined;
|
|
441
|
+
staticFee?: AlgoAmount | undefined;
|
|
442
|
+
extraFee?: AlgoAmount | undefined;
|
|
443
|
+
validityWindow?: number | undefined;
|
|
444
|
+
firstValidRound?: bigint | undefined;
|
|
445
|
+
lastValidRound?: bigint | undefined;
|
|
446
|
+
onComplete?: algosdk.OnApplicationComplete.NoOpOC | algosdk.OnApplicationComplete.OptInOC | algosdk.OnApplicationComplete.CloseOutOC | algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.DeleteApplicationOC | undefined;
|
|
447
|
+
accountReferences?: string[] | undefined;
|
|
448
|
+
appReferences?: bigint[] | undefined;
|
|
449
|
+
assetReferences?: bigint[] | undefined;
|
|
450
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
451
|
+
approvalProgram: string | Uint8Array;
|
|
452
|
+
clearStateProgram: string | Uint8Array;
|
|
453
|
+
schema?: {
|
|
454
|
+
globalInts: number;
|
|
455
|
+
globalByteSlices: number;
|
|
456
|
+
localInts: number;
|
|
457
|
+
localByteSlices: number;
|
|
458
|
+
} | undefined;
|
|
459
|
+
extraProgramPages?: number | undefined;
|
|
460
|
+
}> | AppMethodCall<{
|
|
461
|
+
sender: string;
|
|
462
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
463
|
+
rekeyTo?: string | undefined;
|
|
464
|
+
note?: string | Uint8Array | undefined;
|
|
465
|
+
lease?: string | Uint8Array | undefined;
|
|
466
|
+
staticFee?: AlgoAmount | undefined;
|
|
467
|
+
extraFee?: AlgoAmount | undefined;
|
|
468
|
+
maxFee?: AlgoAmount | undefined;
|
|
469
|
+
validityWindow?: number | undefined;
|
|
470
|
+
firstValidRound?: bigint | undefined;
|
|
471
|
+
lastValidRound?: bigint | undefined;
|
|
472
|
+
appId: bigint;
|
|
473
|
+
onComplete?: algosdk.OnApplicationComplete.UpdateApplicationOC | undefined;
|
|
474
|
+
args?: Uint8Array[] | undefined;
|
|
475
|
+
accountReferences?: string[] | undefined;
|
|
476
|
+
appReferences?: bigint[] | undefined;
|
|
477
|
+
assetReferences?: bigint[] | undefined;
|
|
478
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
479
|
+
approvalProgram: string | Uint8Array;
|
|
480
|
+
clearStateProgram: string | Uint8Array;
|
|
481
|
+
}> | AppMethodCall<import("./composer").AppMethodCallParams> | undefined)[] | undefined;
|
|
482
|
+
}>;
|
|
483
|
+
/** Return params for an opt-in ABI call */
|
|
484
|
+
optIn: (params: {
|
|
485
|
+
lease?: string | Uint8Array | undefined;
|
|
486
|
+
note?: string | Uint8Array | undefined;
|
|
487
|
+
maxFee?: AlgoAmount | undefined;
|
|
488
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
489
|
+
rekeyTo?: string | undefined;
|
|
490
|
+
staticFee?: AlgoAmount | undefined;
|
|
491
|
+
extraFee?: AlgoAmount | undefined;
|
|
492
|
+
validityWindow?: number | undefined;
|
|
493
|
+
firstValidRound?: bigint | undefined;
|
|
494
|
+
lastValidRound?: bigint | undefined;
|
|
495
|
+
onComplete?: algosdk.OnApplicationComplete | undefined;
|
|
496
|
+
accountReferences?: string[] | undefined;
|
|
497
|
+
appReferences?: bigint[] | undefined;
|
|
498
|
+
assetReferences?: bigint[] | undefined;
|
|
499
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
500
|
+
sender?: string | undefined;
|
|
501
|
+
method: string;
|
|
502
|
+
args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
|
|
503
|
+
}) => Promise<AppCallMethodCall>;
|
|
504
|
+
/** Return params for an delete ABI call */
|
|
505
|
+
delete: (params: {
|
|
506
|
+
lease?: string | Uint8Array | undefined;
|
|
507
|
+
note?: string | Uint8Array | undefined;
|
|
508
|
+
maxFee?: AlgoAmount | undefined;
|
|
509
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
510
|
+
rekeyTo?: string | undefined;
|
|
511
|
+
staticFee?: AlgoAmount | undefined;
|
|
512
|
+
extraFee?: AlgoAmount | undefined;
|
|
513
|
+
validityWindow?: number | undefined;
|
|
514
|
+
firstValidRound?: bigint | undefined;
|
|
515
|
+
lastValidRound?: bigint | undefined;
|
|
516
|
+
onComplete?: algosdk.OnApplicationComplete | undefined;
|
|
517
|
+
accountReferences?: string[] | undefined;
|
|
518
|
+
appReferences?: bigint[] | undefined;
|
|
519
|
+
assetReferences?: bigint[] | undefined;
|
|
520
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
521
|
+
sender?: string | undefined;
|
|
522
|
+
method: string;
|
|
523
|
+
args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
|
|
524
|
+
}) => Promise<AppDeleteMethodCall>;
|
|
525
|
+
/** Return params for an close out ABI call */
|
|
526
|
+
closeOut: (params: {
|
|
527
|
+
lease?: string | Uint8Array | undefined;
|
|
528
|
+
note?: string | Uint8Array | undefined;
|
|
529
|
+
maxFee?: AlgoAmount | undefined;
|
|
530
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
531
|
+
rekeyTo?: string | undefined;
|
|
532
|
+
staticFee?: AlgoAmount | undefined;
|
|
533
|
+
extraFee?: AlgoAmount | undefined;
|
|
534
|
+
validityWindow?: number | undefined;
|
|
535
|
+
firstValidRound?: bigint | undefined;
|
|
536
|
+
lastValidRound?: bigint | undefined;
|
|
537
|
+
onComplete?: algosdk.OnApplicationComplete | undefined;
|
|
538
|
+
accountReferences?: string[] | undefined;
|
|
539
|
+
appReferences?: bigint[] | undefined;
|
|
540
|
+
assetReferences?: bigint[] | undefined;
|
|
541
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
542
|
+
sender?: string | undefined;
|
|
543
|
+
method: string;
|
|
544
|
+
args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
|
|
545
|
+
}) => Promise<AppCallMethodCall>;
|
|
546
|
+
/** Return params for an ABI call */
|
|
547
|
+
call: (params: {
|
|
548
|
+
lease?: string | Uint8Array | undefined;
|
|
549
|
+
note?: string | Uint8Array | undefined;
|
|
550
|
+
maxFee?: AlgoAmount | undefined;
|
|
551
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
552
|
+
rekeyTo?: string | undefined;
|
|
553
|
+
staticFee?: AlgoAmount | undefined;
|
|
554
|
+
extraFee?: AlgoAmount | undefined;
|
|
555
|
+
validityWindow?: number | undefined;
|
|
556
|
+
firstValidRound?: bigint | undefined;
|
|
557
|
+
lastValidRound?: bigint | undefined;
|
|
558
|
+
onComplete?: algosdk.OnApplicationComplete | undefined;
|
|
559
|
+
accountReferences?: string[] | undefined;
|
|
560
|
+
appReferences?: bigint[] | undefined;
|
|
561
|
+
assetReferences?: bigint[] | undefined;
|
|
562
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
563
|
+
sender?: string | undefined;
|
|
564
|
+
method: string;
|
|
565
|
+
args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
|
|
566
|
+
} & CallOnComplete) => Promise<AppCallMethodCall>;
|
|
567
|
+
} & {
|
|
568
|
+
/** Interact with bare (raw) call parameters */ bare: {
|
|
569
|
+
/** Return params for an update call, including deploy-time TEAL template replacements and compilation if provided */
|
|
570
|
+
update: (params?: ({
|
|
571
|
+
lease?: string | Uint8Array | undefined;
|
|
572
|
+
note?: string | Uint8Array | undefined;
|
|
573
|
+
maxFee?: AlgoAmount | undefined;
|
|
574
|
+
args?: Uint8Array[] | undefined;
|
|
575
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
576
|
+
rekeyTo?: string | undefined;
|
|
577
|
+
staticFee?: AlgoAmount | undefined;
|
|
578
|
+
extraFee?: AlgoAmount | undefined;
|
|
579
|
+
validityWindow?: number | undefined;
|
|
580
|
+
firstValidRound?: bigint | undefined;
|
|
581
|
+
lastValidRound?: bigint | undefined;
|
|
582
|
+
accountReferences?: string[] | undefined;
|
|
583
|
+
appReferences?: bigint[] | undefined;
|
|
584
|
+
assetReferences?: bigint[] | undefined;
|
|
585
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
586
|
+
sender?: string | undefined;
|
|
587
|
+
} & AppClientCompilationParams) | undefined) => Promise<{
|
|
588
|
+
sender: string;
|
|
589
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
590
|
+
rekeyTo?: string | undefined;
|
|
591
|
+
note?: string | Uint8Array | undefined;
|
|
592
|
+
lease?: string | Uint8Array | undefined;
|
|
593
|
+
staticFee?: AlgoAmount | undefined;
|
|
594
|
+
extraFee?: AlgoAmount | undefined;
|
|
595
|
+
maxFee?: AlgoAmount | undefined;
|
|
596
|
+
validityWindow?: number | undefined;
|
|
597
|
+
firstValidRound?: bigint | undefined;
|
|
598
|
+
lastValidRound?: bigint | undefined;
|
|
599
|
+
appId: bigint;
|
|
600
|
+
onComplete?: algosdk.OnApplicationComplete.UpdateApplicationOC | undefined;
|
|
601
|
+
args?: Uint8Array[] | undefined;
|
|
602
|
+
accountReferences?: string[] | undefined;
|
|
603
|
+
appReferences?: bigint[] | undefined;
|
|
604
|
+
assetReferences?: bigint[] | undefined;
|
|
605
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
606
|
+
approvalProgram: string | Uint8Array;
|
|
607
|
+
clearStateProgram: string | Uint8Array;
|
|
608
|
+
}>;
|
|
609
|
+
/** Return params for an opt-in call */
|
|
610
|
+
optIn: (params?: {
|
|
611
|
+
lease?: string | Uint8Array | undefined;
|
|
612
|
+
note?: string | Uint8Array | undefined;
|
|
613
|
+
maxFee?: AlgoAmount | undefined;
|
|
614
|
+
args?: Uint8Array[] | undefined;
|
|
615
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
616
|
+
rekeyTo?: string | undefined;
|
|
617
|
+
staticFee?: AlgoAmount | undefined;
|
|
618
|
+
extraFee?: AlgoAmount | undefined;
|
|
619
|
+
validityWindow?: number | undefined;
|
|
620
|
+
firstValidRound?: bigint | undefined;
|
|
621
|
+
lastValidRound?: bigint | undefined;
|
|
622
|
+
accountReferences?: string[] | undefined;
|
|
623
|
+
appReferences?: bigint[] | undefined;
|
|
624
|
+
assetReferences?: bigint[] | undefined;
|
|
625
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
626
|
+
sender?: string | undefined;
|
|
627
|
+
} | undefined) => AppCallParams;
|
|
628
|
+
/** Return params for a delete call */
|
|
629
|
+
delete: (params?: {
|
|
630
|
+
lease?: string | Uint8Array | undefined;
|
|
631
|
+
note?: string | Uint8Array | undefined;
|
|
632
|
+
maxFee?: AlgoAmount | undefined;
|
|
633
|
+
args?: Uint8Array[] | undefined;
|
|
634
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
635
|
+
rekeyTo?: string | undefined;
|
|
636
|
+
staticFee?: AlgoAmount | undefined;
|
|
637
|
+
extraFee?: AlgoAmount | undefined;
|
|
638
|
+
validityWindow?: number | undefined;
|
|
639
|
+
firstValidRound?: bigint | undefined;
|
|
640
|
+
lastValidRound?: bigint | undefined;
|
|
641
|
+
accountReferences?: string[] | undefined;
|
|
642
|
+
appReferences?: bigint[] | undefined;
|
|
643
|
+
assetReferences?: bigint[] | undefined;
|
|
644
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
645
|
+
sender?: string | undefined;
|
|
646
|
+
} | undefined) => AppDeleteParams;
|
|
647
|
+
/** Return params for a clear state call */
|
|
648
|
+
clearState: (params?: {
|
|
649
|
+
lease?: string | Uint8Array | undefined;
|
|
650
|
+
note?: string | Uint8Array | undefined;
|
|
651
|
+
maxFee?: AlgoAmount | undefined;
|
|
652
|
+
args?: Uint8Array[] | undefined;
|
|
653
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
654
|
+
rekeyTo?: string | undefined;
|
|
655
|
+
staticFee?: AlgoAmount | undefined;
|
|
656
|
+
extraFee?: AlgoAmount | undefined;
|
|
657
|
+
validityWindow?: number | undefined;
|
|
658
|
+
firstValidRound?: bigint | undefined;
|
|
659
|
+
lastValidRound?: bigint | undefined;
|
|
660
|
+
accountReferences?: string[] | undefined;
|
|
661
|
+
appReferences?: bigint[] | undefined;
|
|
662
|
+
assetReferences?: bigint[] | undefined;
|
|
663
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
664
|
+
sender?: string | undefined;
|
|
665
|
+
} | undefined) => AppCallParams;
|
|
666
|
+
/** Return params for a close out call */
|
|
667
|
+
closeOut: (params?: {
|
|
668
|
+
lease?: string | Uint8Array | undefined;
|
|
669
|
+
note?: string | Uint8Array | undefined;
|
|
670
|
+
maxFee?: AlgoAmount | undefined;
|
|
671
|
+
args?: Uint8Array[] | undefined;
|
|
672
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
673
|
+
rekeyTo?: string | undefined;
|
|
674
|
+
staticFee?: AlgoAmount | undefined;
|
|
675
|
+
extraFee?: AlgoAmount | undefined;
|
|
676
|
+
validityWindow?: number | undefined;
|
|
677
|
+
firstValidRound?: bigint | undefined;
|
|
678
|
+
lastValidRound?: bigint | undefined;
|
|
679
|
+
accountReferences?: string[] | undefined;
|
|
680
|
+
appReferences?: bigint[] | undefined;
|
|
681
|
+
assetReferences?: bigint[] | undefined;
|
|
682
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
683
|
+
sender?: string | undefined;
|
|
684
|
+
} | undefined) => AppCallParams;
|
|
685
|
+
/** Return params for a call (defaults to no-op) */
|
|
686
|
+
call: (params?: ({
|
|
687
|
+
lease?: string | Uint8Array | undefined;
|
|
688
|
+
note?: string | Uint8Array | undefined;
|
|
689
|
+
maxFee?: AlgoAmount | undefined;
|
|
690
|
+
args?: Uint8Array[] | undefined;
|
|
691
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
692
|
+
rekeyTo?: string | undefined;
|
|
693
|
+
staticFee?: AlgoAmount | undefined;
|
|
694
|
+
extraFee?: AlgoAmount | undefined;
|
|
695
|
+
validityWindow?: number | undefined;
|
|
696
|
+
firstValidRound?: bigint | undefined;
|
|
697
|
+
lastValidRound?: bigint | undefined;
|
|
698
|
+
accountReferences?: string[] | undefined;
|
|
699
|
+
appReferences?: bigint[] | undefined;
|
|
700
|
+
assetReferences?: bigint[] | undefined;
|
|
701
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
702
|
+
sender?: string | undefined;
|
|
703
|
+
} & CallOnComplete) | undefined) => AppCallParams;
|
|
704
|
+
};
|
|
705
|
+
};
|
|
706
|
+
/** Create transactions for the current app */
|
|
707
|
+
get createTransaction(): {
|
|
708
|
+
/** Return transaction for a payment transaction to fund the app account */
|
|
709
|
+
fundAppAccount: (params: {
|
|
710
|
+
lease?: string | Uint8Array | undefined;
|
|
711
|
+
note?: string | Uint8Array | undefined;
|
|
712
|
+
amount: AlgoAmount;
|
|
713
|
+
closeRemainderTo?: string | undefined;
|
|
714
|
+
maxFee?: AlgoAmount | undefined;
|
|
715
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
716
|
+
rekeyTo?: string | undefined;
|
|
717
|
+
staticFee?: AlgoAmount | undefined;
|
|
718
|
+
extraFee?: AlgoAmount | undefined;
|
|
719
|
+
validityWindow?: number | undefined;
|
|
720
|
+
firstValidRound?: bigint | undefined;
|
|
721
|
+
lastValidRound?: bigint | undefined;
|
|
722
|
+
maxRoundsToWaitForConfirmation?: number | undefined;
|
|
723
|
+
suppressLog?: boolean | undefined;
|
|
724
|
+
populateAppCallResources?: boolean | undefined;
|
|
725
|
+
sender?: string | undefined;
|
|
726
|
+
}) => Promise<algosdk.Transaction>;
|
|
727
|
+
/**
|
|
728
|
+
* Return transactions for an update ABI call, including deploy-time TEAL template replacements and compilation if provided
|
|
729
|
+
*/
|
|
730
|
+
update: (params: {
|
|
731
|
+
lease?: string | Uint8Array | undefined;
|
|
732
|
+
note?: string | Uint8Array | undefined;
|
|
733
|
+
maxFee?: AlgoAmount | undefined;
|
|
734
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
735
|
+
rekeyTo?: string | undefined;
|
|
736
|
+
staticFee?: AlgoAmount | undefined;
|
|
737
|
+
extraFee?: AlgoAmount | undefined;
|
|
738
|
+
validityWindow?: number | undefined;
|
|
739
|
+
firstValidRound?: bigint | undefined;
|
|
740
|
+
lastValidRound?: bigint | undefined;
|
|
741
|
+
onComplete?: algosdk.OnApplicationComplete | undefined;
|
|
742
|
+
accountReferences?: string[] | undefined;
|
|
743
|
+
appReferences?: bigint[] | undefined;
|
|
744
|
+
assetReferences?: bigint[] | undefined;
|
|
745
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
746
|
+
sender?: string | undefined;
|
|
747
|
+
method: string;
|
|
748
|
+
args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
|
|
749
|
+
} & AppClientCompilationParams) => Promise<{
|
|
750
|
+
transactions: algosdk.Transaction[];
|
|
751
|
+
methodCalls: Map<number, algosdk.ABIMethod>;
|
|
752
|
+
signers: Map<number, algosdk.TransactionSigner>;
|
|
753
|
+
}>;
|
|
754
|
+
/**
|
|
755
|
+
* Return transactions for an opt-in ABI call
|
|
756
|
+
*/
|
|
757
|
+
optIn: (params: {
|
|
758
|
+
lease?: string | Uint8Array | undefined;
|
|
759
|
+
note?: string | Uint8Array | undefined;
|
|
760
|
+
maxFee?: AlgoAmount | undefined;
|
|
761
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
762
|
+
rekeyTo?: string | undefined;
|
|
763
|
+
staticFee?: AlgoAmount | undefined;
|
|
764
|
+
extraFee?: AlgoAmount | undefined;
|
|
765
|
+
validityWindow?: number | undefined;
|
|
766
|
+
firstValidRound?: bigint | undefined;
|
|
767
|
+
lastValidRound?: bigint | undefined;
|
|
768
|
+
onComplete?: algosdk.OnApplicationComplete | undefined;
|
|
769
|
+
accountReferences?: string[] | undefined;
|
|
770
|
+
appReferences?: bigint[] | undefined;
|
|
771
|
+
assetReferences?: bigint[] | undefined;
|
|
772
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
773
|
+
sender?: string | undefined;
|
|
774
|
+
method: string;
|
|
775
|
+
args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
|
|
776
|
+
}) => Promise<{
|
|
777
|
+
transactions: algosdk.Transaction[];
|
|
778
|
+
methodCalls: Map<number, algosdk.ABIMethod>;
|
|
779
|
+
signers: Map<number, algosdk.TransactionSigner>;
|
|
780
|
+
}>;
|
|
781
|
+
/**
|
|
782
|
+
* Return transactions for a delete ABI call
|
|
783
|
+
*/
|
|
784
|
+
delete: (params: {
|
|
785
|
+
lease?: string | Uint8Array | undefined;
|
|
786
|
+
note?: string | Uint8Array | undefined;
|
|
787
|
+
maxFee?: AlgoAmount | undefined;
|
|
788
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
789
|
+
rekeyTo?: string | undefined;
|
|
790
|
+
staticFee?: AlgoAmount | undefined;
|
|
791
|
+
extraFee?: AlgoAmount | undefined;
|
|
792
|
+
validityWindow?: number | undefined;
|
|
793
|
+
firstValidRound?: bigint | undefined;
|
|
794
|
+
lastValidRound?: bigint | undefined;
|
|
795
|
+
onComplete?: algosdk.OnApplicationComplete | undefined;
|
|
796
|
+
accountReferences?: string[] | undefined;
|
|
797
|
+
appReferences?: bigint[] | undefined;
|
|
798
|
+
assetReferences?: bigint[] | undefined;
|
|
799
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
800
|
+
sender?: string | undefined;
|
|
801
|
+
method: string;
|
|
802
|
+
args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
|
|
803
|
+
}) => Promise<{
|
|
804
|
+
transactions: algosdk.Transaction[];
|
|
805
|
+
methodCalls: Map<number, algosdk.ABIMethod>;
|
|
806
|
+
signers: Map<number, algosdk.TransactionSigner>;
|
|
807
|
+
}>;
|
|
808
|
+
/**
|
|
809
|
+
* Return transactions for a close out ABI call
|
|
810
|
+
*/
|
|
811
|
+
closeOut: (params: {
|
|
812
|
+
lease?: string | Uint8Array | undefined;
|
|
813
|
+
note?: string | Uint8Array | undefined;
|
|
814
|
+
maxFee?: AlgoAmount | undefined;
|
|
815
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
816
|
+
rekeyTo?: string | undefined;
|
|
817
|
+
staticFee?: AlgoAmount | undefined;
|
|
818
|
+
extraFee?: AlgoAmount | undefined;
|
|
819
|
+
validityWindow?: number | undefined;
|
|
820
|
+
firstValidRound?: bigint | undefined;
|
|
821
|
+
lastValidRound?: bigint | undefined;
|
|
822
|
+
onComplete?: algosdk.OnApplicationComplete | undefined;
|
|
823
|
+
accountReferences?: string[] | undefined;
|
|
824
|
+
appReferences?: bigint[] | undefined;
|
|
825
|
+
assetReferences?: bigint[] | undefined;
|
|
826
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
827
|
+
sender?: string | undefined;
|
|
828
|
+
method: string;
|
|
829
|
+
args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
|
|
830
|
+
}) => Promise<{
|
|
831
|
+
transactions: algosdk.Transaction[];
|
|
832
|
+
methodCalls: Map<number, algosdk.ABIMethod>;
|
|
833
|
+
signers: Map<number, algosdk.TransactionSigner>;
|
|
834
|
+
}>;
|
|
835
|
+
/**
|
|
836
|
+
* Return transactions for an ABI call (defaults to no-op)
|
|
837
|
+
*/
|
|
838
|
+
call: (params: {
|
|
839
|
+
lease?: string | Uint8Array | undefined;
|
|
840
|
+
note?: string | Uint8Array | undefined;
|
|
841
|
+
maxFee?: AlgoAmount | undefined;
|
|
842
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
843
|
+
rekeyTo?: string | undefined;
|
|
844
|
+
staticFee?: AlgoAmount | undefined;
|
|
845
|
+
extraFee?: AlgoAmount | undefined;
|
|
846
|
+
validityWindow?: number | undefined;
|
|
847
|
+
firstValidRound?: bigint | undefined;
|
|
848
|
+
lastValidRound?: bigint | undefined;
|
|
849
|
+
onComplete?: algosdk.OnApplicationComplete | undefined;
|
|
850
|
+
accountReferences?: string[] | undefined;
|
|
851
|
+
appReferences?: bigint[] | undefined;
|
|
852
|
+
assetReferences?: bigint[] | undefined;
|
|
853
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
854
|
+
sender?: string | undefined;
|
|
855
|
+
method: string;
|
|
856
|
+
args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
|
|
857
|
+
} & CallOnComplete) => Promise<{
|
|
858
|
+
transactions: algosdk.Transaction[];
|
|
859
|
+
methodCalls: Map<number, algosdk.ABIMethod>;
|
|
860
|
+
signers: Map<number, algosdk.TransactionSigner>;
|
|
861
|
+
}>;
|
|
862
|
+
} & {
|
|
863
|
+
/** Interact with bare (raw) call transactions */ bare: {
|
|
864
|
+
/** Returns a transaction for an update call, including deploy-time TEAL template replacements and compilation if provided */
|
|
865
|
+
update: (params?: ({
|
|
866
|
+
lease?: string | Uint8Array | undefined;
|
|
867
|
+
note?: string | Uint8Array | undefined;
|
|
868
|
+
maxFee?: AlgoAmount | undefined;
|
|
869
|
+
args?: Uint8Array[] | undefined;
|
|
870
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
871
|
+
rekeyTo?: string | undefined;
|
|
872
|
+
staticFee?: AlgoAmount | undefined;
|
|
873
|
+
extraFee?: AlgoAmount | undefined;
|
|
874
|
+
validityWindow?: number | undefined;
|
|
875
|
+
firstValidRound?: bigint | undefined;
|
|
876
|
+
lastValidRound?: bigint | undefined;
|
|
877
|
+
accountReferences?: string[] | undefined;
|
|
878
|
+
appReferences?: bigint[] | undefined;
|
|
879
|
+
assetReferences?: bigint[] | undefined;
|
|
880
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
881
|
+
sender?: string | undefined;
|
|
882
|
+
} & AppClientCompilationParams) | undefined) => Promise<algosdk.Transaction>;
|
|
883
|
+
/** Returns a transaction for an opt-in call */
|
|
884
|
+
optIn: (params?: {
|
|
885
|
+
lease?: string | Uint8Array | undefined;
|
|
886
|
+
note?: string | Uint8Array | undefined;
|
|
887
|
+
maxFee?: AlgoAmount | undefined;
|
|
888
|
+
args?: Uint8Array[] | undefined;
|
|
889
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
890
|
+
rekeyTo?: string | undefined;
|
|
891
|
+
staticFee?: AlgoAmount | undefined;
|
|
892
|
+
extraFee?: AlgoAmount | undefined;
|
|
893
|
+
validityWindow?: number | undefined;
|
|
894
|
+
firstValidRound?: bigint | undefined;
|
|
895
|
+
lastValidRound?: bigint | undefined;
|
|
896
|
+
accountReferences?: string[] | undefined;
|
|
897
|
+
appReferences?: bigint[] | undefined;
|
|
898
|
+
assetReferences?: bigint[] | undefined;
|
|
899
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
900
|
+
sender?: string | undefined;
|
|
901
|
+
} | undefined) => Promise<algosdk.Transaction>;
|
|
902
|
+
/** Returns a transaction for a delete call */
|
|
903
|
+
delete: (params?: {
|
|
904
|
+
lease?: string | Uint8Array | undefined;
|
|
905
|
+
note?: string | Uint8Array | undefined;
|
|
906
|
+
maxFee?: AlgoAmount | undefined;
|
|
907
|
+
args?: Uint8Array[] | undefined;
|
|
908
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
909
|
+
rekeyTo?: string | undefined;
|
|
910
|
+
staticFee?: AlgoAmount | undefined;
|
|
911
|
+
extraFee?: AlgoAmount | undefined;
|
|
912
|
+
validityWindow?: number | undefined;
|
|
913
|
+
firstValidRound?: bigint | undefined;
|
|
914
|
+
lastValidRound?: bigint | undefined;
|
|
915
|
+
accountReferences?: string[] | undefined;
|
|
916
|
+
appReferences?: bigint[] | undefined;
|
|
917
|
+
assetReferences?: bigint[] | undefined;
|
|
918
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
919
|
+
sender?: string | undefined;
|
|
920
|
+
} | undefined) => Promise<algosdk.Transaction>;
|
|
921
|
+
/** Returns a transaction for a clear state call */
|
|
922
|
+
clearState: (params?: {
|
|
923
|
+
lease?: string | Uint8Array | undefined;
|
|
924
|
+
note?: string | Uint8Array | undefined;
|
|
925
|
+
maxFee?: AlgoAmount | undefined;
|
|
926
|
+
args?: Uint8Array[] | undefined;
|
|
927
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
928
|
+
rekeyTo?: string | undefined;
|
|
929
|
+
staticFee?: AlgoAmount | undefined;
|
|
930
|
+
extraFee?: AlgoAmount | undefined;
|
|
931
|
+
validityWindow?: number | undefined;
|
|
932
|
+
firstValidRound?: bigint | undefined;
|
|
933
|
+
lastValidRound?: bigint | undefined;
|
|
934
|
+
accountReferences?: string[] | undefined;
|
|
935
|
+
appReferences?: bigint[] | undefined;
|
|
936
|
+
assetReferences?: bigint[] | undefined;
|
|
937
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
938
|
+
sender?: string | undefined;
|
|
939
|
+
} | undefined) => Promise<algosdk.Transaction>;
|
|
940
|
+
/** Returns a transaction for a close out call */
|
|
941
|
+
closeOut: (params?: {
|
|
942
|
+
lease?: string | Uint8Array | undefined;
|
|
943
|
+
note?: string | Uint8Array | undefined;
|
|
944
|
+
maxFee?: AlgoAmount | undefined;
|
|
945
|
+
args?: Uint8Array[] | undefined;
|
|
946
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
947
|
+
rekeyTo?: string | undefined;
|
|
948
|
+
staticFee?: AlgoAmount | undefined;
|
|
949
|
+
extraFee?: AlgoAmount | undefined;
|
|
950
|
+
validityWindow?: number | undefined;
|
|
951
|
+
firstValidRound?: bigint | undefined;
|
|
952
|
+
lastValidRound?: bigint | undefined;
|
|
953
|
+
accountReferences?: string[] | undefined;
|
|
954
|
+
appReferences?: bigint[] | undefined;
|
|
955
|
+
assetReferences?: bigint[] | undefined;
|
|
956
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
957
|
+
sender?: string | undefined;
|
|
958
|
+
} | undefined) => Promise<algosdk.Transaction>;
|
|
959
|
+
/** Returns a transaction for a call (defaults to no-op) */
|
|
960
|
+
call: (params?: ({
|
|
961
|
+
lease?: string | Uint8Array | undefined;
|
|
962
|
+
note?: string | Uint8Array | undefined;
|
|
963
|
+
maxFee?: AlgoAmount | undefined;
|
|
964
|
+
args?: Uint8Array[] | undefined;
|
|
965
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
966
|
+
rekeyTo?: string | undefined;
|
|
967
|
+
staticFee?: AlgoAmount | undefined;
|
|
968
|
+
extraFee?: AlgoAmount | undefined;
|
|
969
|
+
validityWindow?: number | undefined;
|
|
970
|
+
firstValidRound?: bigint | undefined;
|
|
971
|
+
lastValidRound?: bigint | undefined;
|
|
972
|
+
accountReferences?: string[] | undefined;
|
|
973
|
+
appReferences?: bigint[] | undefined;
|
|
974
|
+
assetReferences?: bigint[] | undefined;
|
|
975
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
976
|
+
sender?: string | undefined;
|
|
977
|
+
} & CallOnComplete) | undefined) => Promise<algosdk.Transaction>;
|
|
978
|
+
};
|
|
979
|
+
};
|
|
980
|
+
/** Send transactions to the current app */
|
|
981
|
+
get send(): {
|
|
982
|
+
/** Sign and send transactions for a payment transaction to fund the app account */
|
|
983
|
+
fundAppAccount: (params: {
|
|
984
|
+
lease?: string | Uint8Array | undefined;
|
|
985
|
+
note?: string | Uint8Array | undefined;
|
|
986
|
+
amount: AlgoAmount;
|
|
987
|
+
closeRemainderTo?: string | undefined;
|
|
988
|
+
maxFee?: AlgoAmount | undefined;
|
|
989
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
990
|
+
rekeyTo?: string | undefined;
|
|
991
|
+
staticFee?: AlgoAmount | undefined;
|
|
992
|
+
extraFee?: AlgoAmount | undefined;
|
|
993
|
+
validityWindow?: number | undefined;
|
|
994
|
+
firstValidRound?: bigint | undefined;
|
|
995
|
+
lastValidRound?: bigint | undefined;
|
|
996
|
+
maxRoundsToWaitForConfirmation?: number | undefined;
|
|
997
|
+
suppressLog?: boolean | undefined;
|
|
998
|
+
populateAppCallResources?: boolean | undefined;
|
|
999
|
+
sender?: string | undefined;
|
|
1000
|
+
} & SendParams) => Promise<{
|
|
1001
|
+
groupId: string;
|
|
1002
|
+
txIds: string[];
|
|
1003
|
+
returns?: ABIReturn[] | undefined;
|
|
1004
|
+
confirmations: algosdk.modelsv2.PendingTransactionResponse[];
|
|
1005
|
+
transactions: algosdk.Transaction[];
|
|
1006
|
+
confirmation: algosdk.modelsv2.PendingTransactionResponse;
|
|
1007
|
+
transaction: algosdk.Transaction;
|
|
1008
|
+
}>;
|
|
1009
|
+
/**
|
|
1010
|
+
* Sign and send transactions for an update ABI call, including deploy-time TEAL template replacements and compilation if provided
|
|
1011
|
+
*/
|
|
1012
|
+
update: (params: {
|
|
1013
|
+
lease?: string | Uint8Array | undefined;
|
|
1014
|
+
note?: string | Uint8Array | undefined;
|
|
1015
|
+
maxFee?: AlgoAmount | undefined;
|
|
1016
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
1017
|
+
rekeyTo?: string | undefined;
|
|
1018
|
+
staticFee?: AlgoAmount | undefined;
|
|
1019
|
+
extraFee?: AlgoAmount | undefined;
|
|
1020
|
+
validityWindow?: number | undefined;
|
|
1021
|
+
firstValidRound?: bigint | undefined;
|
|
1022
|
+
lastValidRound?: bigint | undefined;
|
|
1023
|
+
onComplete?: algosdk.OnApplicationComplete | undefined;
|
|
1024
|
+
accountReferences?: string[] | undefined;
|
|
1025
|
+
appReferences?: bigint[] | undefined;
|
|
1026
|
+
assetReferences?: bigint[] | undefined;
|
|
1027
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
1028
|
+
sender?: string | undefined;
|
|
1029
|
+
method: string;
|
|
1030
|
+
args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
|
|
1031
|
+
} & AppClientCompilationParams & SendParams) => Promise<{
|
|
1032
|
+
compiledApproval?: import("./app").CompiledTeal | undefined;
|
|
1033
|
+
compiledClear?: import("./app").CompiledTeal | undefined;
|
|
1034
|
+
groupId: string;
|
|
1035
|
+
txIds: string[];
|
|
1036
|
+
returns?: ABIReturn[] | undefined;
|
|
1037
|
+
confirmations: algosdk.modelsv2.PendingTransactionResponse[];
|
|
1038
|
+
transactions: algosdk.Transaction[];
|
|
1039
|
+
confirmation: algosdk.modelsv2.PendingTransactionResponse;
|
|
1040
|
+
transaction: algosdk.Transaction;
|
|
1041
|
+
return?: algosdk.ABIValue | ABIStruct | undefined;
|
|
1042
|
+
}>;
|
|
1043
|
+
/**
|
|
1044
|
+
* Sign and send transactions for an opt-in ABI call
|
|
1045
|
+
*/
|
|
1046
|
+
optIn: (params: {
|
|
1047
|
+
lease?: string | Uint8Array | undefined;
|
|
1048
|
+
note?: string | Uint8Array | undefined;
|
|
1049
|
+
maxFee?: AlgoAmount | undefined;
|
|
1050
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
1051
|
+
rekeyTo?: string | undefined;
|
|
1052
|
+
staticFee?: AlgoAmount | undefined;
|
|
1053
|
+
extraFee?: AlgoAmount | undefined;
|
|
1054
|
+
validityWindow?: number | undefined;
|
|
1055
|
+
firstValidRound?: bigint | undefined;
|
|
1056
|
+
lastValidRound?: bigint | undefined;
|
|
1057
|
+
onComplete?: algosdk.OnApplicationComplete | undefined;
|
|
1058
|
+
accountReferences?: string[] | undefined;
|
|
1059
|
+
appReferences?: bigint[] | undefined;
|
|
1060
|
+
assetReferences?: bigint[] | undefined;
|
|
1061
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
1062
|
+
sender?: string | undefined;
|
|
1063
|
+
method: string;
|
|
1064
|
+
args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
|
|
1065
|
+
} & SendParams) => Promise<Omit<{
|
|
1066
|
+
groupId: string;
|
|
1067
|
+
txIds: string[];
|
|
1068
|
+
returns?: ABIReturn[] | undefined;
|
|
1069
|
+
confirmations: algosdk.modelsv2.PendingTransactionResponse[];
|
|
1070
|
+
transactions: algosdk.Transaction[];
|
|
1071
|
+
confirmation: algosdk.modelsv2.PendingTransactionResponse;
|
|
1072
|
+
transaction: algosdk.Transaction;
|
|
1073
|
+
return?: ABIReturn | undefined;
|
|
1074
|
+
}, "return"> & AppReturn<algosdk.ABIValue | ABIStruct | undefined>>;
|
|
1075
|
+
/**
|
|
1076
|
+
* Sign and send transactions for a delete ABI call
|
|
1077
|
+
*/
|
|
1078
|
+
delete: (params: {
|
|
1079
|
+
lease?: string | Uint8Array | undefined;
|
|
1080
|
+
note?: string | Uint8Array | undefined;
|
|
1081
|
+
maxFee?: AlgoAmount | undefined;
|
|
1082
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
1083
|
+
rekeyTo?: string | undefined;
|
|
1084
|
+
staticFee?: AlgoAmount | undefined;
|
|
1085
|
+
extraFee?: AlgoAmount | undefined;
|
|
1086
|
+
validityWindow?: number | undefined;
|
|
1087
|
+
firstValidRound?: bigint | undefined;
|
|
1088
|
+
lastValidRound?: bigint | undefined;
|
|
1089
|
+
onComplete?: algosdk.OnApplicationComplete | undefined;
|
|
1090
|
+
accountReferences?: string[] | undefined;
|
|
1091
|
+
appReferences?: bigint[] | undefined;
|
|
1092
|
+
assetReferences?: bigint[] | undefined;
|
|
1093
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
1094
|
+
sender?: string | undefined;
|
|
1095
|
+
method: string;
|
|
1096
|
+
args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
|
|
1097
|
+
} & SendParams) => Promise<Omit<{
|
|
1098
|
+
groupId: string;
|
|
1099
|
+
txIds: string[];
|
|
1100
|
+
returns?: ABIReturn[] | undefined;
|
|
1101
|
+
confirmations: algosdk.modelsv2.PendingTransactionResponse[];
|
|
1102
|
+
transactions: algosdk.Transaction[];
|
|
1103
|
+
confirmation: algosdk.modelsv2.PendingTransactionResponse;
|
|
1104
|
+
transaction: algosdk.Transaction;
|
|
1105
|
+
return?: ABIReturn | undefined;
|
|
1106
|
+
}, "return"> & AppReturn<algosdk.ABIValue | ABIStruct | undefined>>;
|
|
1107
|
+
/**
|
|
1108
|
+
* Sign and send transactions for a close out ABI call
|
|
1109
|
+
*/
|
|
1110
|
+
closeOut: (params: {
|
|
1111
|
+
lease?: string | Uint8Array | undefined;
|
|
1112
|
+
note?: string | Uint8Array | undefined;
|
|
1113
|
+
maxFee?: AlgoAmount | undefined;
|
|
1114
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
1115
|
+
rekeyTo?: string | undefined;
|
|
1116
|
+
staticFee?: AlgoAmount | undefined;
|
|
1117
|
+
extraFee?: AlgoAmount | undefined;
|
|
1118
|
+
validityWindow?: number | undefined;
|
|
1119
|
+
firstValidRound?: bigint | undefined;
|
|
1120
|
+
lastValidRound?: bigint | undefined;
|
|
1121
|
+
onComplete?: algosdk.OnApplicationComplete | undefined;
|
|
1122
|
+
accountReferences?: string[] | undefined;
|
|
1123
|
+
appReferences?: bigint[] | undefined;
|
|
1124
|
+
assetReferences?: bigint[] | undefined;
|
|
1125
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
1126
|
+
sender?: string | undefined;
|
|
1127
|
+
method: string;
|
|
1128
|
+
args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
|
|
1129
|
+
} & SendParams) => Promise<Omit<{
|
|
1130
|
+
groupId: string;
|
|
1131
|
+
txIds: string[];
|
|
1132
|
+
returns?: ABIReturn[] | undefined;
|
|
1133
|
+
confirmations: algosdk.modelsv2.PendingTransactionResponse[];
|
|
1134
|
+
transactions: algosdk.Transaction[];
|
|
1135
|
+
confirmation: algosdk.modelsv2.PendingTransactionResponse;
|
|
1136
|
+
transaction: algosdk.Transaction;
|
|
1137
|
+
return?: ABIReturn | undefined;
|
|
1138
|
+
}, "return"> & AppReturn<algosdk.ABIValue | ABIStruct | undefined>>;
|
|
1139
|
+
/**
|
|
1140
|
+
* Sign and send transactions for a call (defaults to no-op)
|
|
1141
|
+
*/
|
|
1142
|
+
call: (params: {
|
|
1143
|
+
lease?: string | Uint8Array | undefined;
|
|
1144
|
+
note?: string | Uint8Array | undefined;
|
|
1145
|
+
maxFee?: AlgoAmount | undefined;
|
|
1146
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
1147
|
+
rekeyTo?: string | undefined;
|
|
1148
|
+
staticFee?: AlgoAmount | undefined;
|
|
1149
|
+
extraFee?: AlgoAmount | undefined;
|
|
1150
|
+
validityWindow?: number | undefined;
|
|
1151
|
+
firstValidRound?: bigint | undefined;
|
|
1152
|
+
lastValidRound?: bigint | undefined;
|
|
1153
|
+
onComplete?: algosdk.OnApplicationComplete | undefined;
|
|
1154
|
+
accountReferences?: string[] | undefined;
|
|
1155
|
+
appReferences?: bigint[] | undefined;
|
|
1156
|
+
assetReferences?: bigint[] | undefined;
|
|
1157
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
1158
|
+
sender?: string | undefined;
|
|
1159
|
+
method: string;
|
|
1160
|
+
args?: (algosdk.ABIValue | AppMethodCallTransactionArgument | ABIStruct | undefined)[] | undefined;
|
|
1161
|
+
} & CallOnComplete & SendParams) => Promise<Omit<{
|
|
1162
|
+
groupId: string;
|
|
1163
|
+
txIds: string[];
|
|
1164
|
+
returns?: ABIReturn[] | undefined;
|
|
1165
|
+
confirmations: algosdk.modelsv2.PendingTransactionResponse[];
|
|
1166
|
+
transactions: algosdk.Transaction[];
|
|
1167
|
+
confirmation: algosdk.modelsv2.PendingTransactionResponse;
|
|
1168
|
+
transaction: algosdk.Transaction;
|
|
1169
|
+
return?: ABIReturn | undefined;
|
|
1170
|
+
}, "return"> & AppReturn<algosdk.ABIValue | ABIStruct | undefined>>;
|
|
1171
|
+
} & {
|
|
1172
|
+
/** Interact with bare (raw) calls */ bare: {
|
|
1173
|
+
/** Signs and sends an update call, including deploy-time TEAL template replacements and compilation if provided */
|
|
1174
|
+
update: (params?: ({
|
|
1175
|
+
lease?: string | Uint8Array | undefined;
|
|
1176
|
+
note?: string | Uint8Array | undefined;
|
|
1177
|
+
maxFee?: AlgoAmount | undefined;
|
|
1178
|
+
args?: Uint8Array[] | undefined;
|
|
1179
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
1180
|
+
rekeyTo?: string | undefined;
|
|
1181
|
+
staticFee?: AlgoAmount | undefined;
|
|
1182
|
+
extraFee?: AlgoAmount | undefined;
|
|
1183
|
+
validityWindow?: number | undefined;
|
|
1184
|
+
firstValidRound?: bigint | undefined;
|
|
1185
|
+
lastValidRound?: bigint | undefined;
|
|
1186
|
+
accountReferences?: string[] | undefined;
|
|
1187
|
+
appReferences?: bigint[] | undefined;
|
|
1188
|
+
assetReferences?: bigint[] | undefined;
|
|
1189
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
1190
|
+
sender?: string | undefined;
|
|
1191
|
+
} & AppClientCompilationParams & SendParams) | undefined) => Promise<{
|
|
1192
|
+
compiledApproval?: import("./app").CompiledTeal | undefined;
|
|
1193
|
+
compiledClear?: import("./app").CompiledTeal | undefined;
|
|
1194
|
+
groupId: string;
|
|
1195
|
+
txIds: string[];
|
|
1196
|
+
returns?: ABIReturn[] | undefined;
|
|
1197
|
+
confirmations: algosdk.modelsv2.PendingTransactionResponse[];
|
|
1198
|
+
transactions: algosdk.Transaction[];
|
|
1199
|
+
confirmation: algosdk.modelsv2.PendingTransactionResponse;
|
|
1200
|
+
transaction: algosdk.Transaction;
|
|
1201
|
+
return?: ABIReturn | undefined;
|
|
1202
|
+
}>;
|
|
1203
|
+
/** Signs and sends an opt-in call */
|
|
1204
|
+
optIn: (params?: ({
|
|
1205
|
+
lease?: string | Uint8Array | undefined;
|
|
1206
|
+
note?: string | Uint8Array | undefined;
|
|
1207
|
+
maxFee?: AlgoAmount | undefined;
|
|
1208
|
+
args?: Uint8Array[] | undefined;
|
|
1209
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
1210
|
+
rekeyTo?: string | undefined;
|
|
1211
|
+
staticFee?: AlgoAmount | undefined;
|
|
1212
|
+
extraFee?: AlgoAmount | undefined;
|
|
1213
|
+
validityWindow?: number | undefined;
|
|
1214
|
+
firstValidRound?: bigint | undefined;
|
|
1215
|
+
lastValidRound?: bigint | undefined;
|
|
1216
|
+
accountReferences?: string[] | undefined;
|
|
1217
|
+
appReferences?: bigint[] | undefined;
|
|
1218
|
+
assetReferences?: bigint[] | undefined;
|
|
1219
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
1220
|
+
sender?: string | undefined;
|
|
1221
|
+
} & SendParams) | undefined) => Promise<{
|
|
1222
|
+
groupId: string;
|
|
1223
|
+
txIds: string[];
|
|
1224
|
+
returns?: ABIReturn[] | undefined;
|
|
1225
|
+
confirmations: algosdk.modelsv2.PendingTransactionResponse[];
|
|
1226
|
+
transactions: algosdk.Transaction[];
|
|
1227
|
+
confirmation: algosdk.modelsv2.PendingTransactionResponse;
|
|
1228
|
+
transaction: algosdk.Transaction;
|
|
1229
|
+
return?: ABIReturn | undefined;
|
|
1230
|
+
}>;
|
|
1231
|
+
/** Signs and sends a delete call */
|
|
1232
|
+
delete: (params?: ({
|
|
1233
|
+
lease?: string | Uint8Array | undefined;
|
|
1234
|
+
note?: string | Uint8Array | undefined;
|
|
1235
|
+
maxFee?: AlgoAmount | undefined;
|
|
1236
|
+
args?: Uint8Array[] | undefined;
|
|
1237
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
1238
|
+
rekeyTo?: string | undefined;
|
|
1239
|
+
staticFee?: AlgoAmount | undefined;
|
|
1240
|
+
extraFee?: AlgoAmount | undefined;
|
|
1241
|
+
validityWindow?: number | undefined;
|
|
1242
|
+
firstValidRound?: bigint | undefined;
|
|
1243
|
+
lastValidRound?: bigint | undefined;
|
|
1244
|
+
accountReferences?: string[] | undefined;
|
|
1245
|
+
appReferences?: bigint[] | undefined;
|
|
1246
|
+
assetReferences?: bigint[] | undefined;
|
|
1247
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
1248
|
+
sender?: string | undefined;
|
|
1249
|
+
} & SendParams) | undefined) => Promise<{
|
|
1250
|
+
groupId: string;
|
|
1251
|
+
txIds: string[];
|
|
1252
|
+
returns?: ABIReturn[] | undefined;
|
|
1253
|
+
confirmations: algosdk.modelsv2.PendingTransactionResponse[];
|
|
1254
|
+
transactions: algosdk.Transaction[];
|
|
1255
|
+
confirmation: algosdk.modelsv2.PendingTransactionResponse;
|
|
1256
|
+
transaction: algosdk.Transaction;
|
|
1257
|
+
return?: ABIReturn | undefined;
|
|
1258
|
+
}>;
|
|
1259
|
+
/** Signs and sends a clear state call */
|
|
1260
|
+
clearState: (params?: ({
|
|
1261
|
+
lease?: string | Uint8Array | undefined;
|
|
1262
|
+
note?: string | Uint8Array | undefined;
|
|
1263
|
+
maxFee?: AlgoAmount | undefined;
|
|
1264
|
+
args?: Uint8Array[] | undefined;
|
|
1265
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
1266
|
+
rekeyTo?: string | undefined;
|
|
1267
|
+
staticFee?: AlgoAmount | undefined;
|
|
1268
|
+
extraFee?: AlgoAmount | undefined;
|
|
1269
|
+
validityWindow?: number | undefined;
|
|
1270
|
+
firstValidRound?: bigint | undefined;
|
|
1271
|
+
lastValidRound?: bigint | undefined;
|
|
1272
|
+
accountReferences?: string[] | undefined;
|
|
1273
|
+
appReferences?: bigint[] | undefined;
|
|
1274
|
+
assetReferences?: bigint[] | undefined;
|
|
1275
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
1276
|
+
sender?: string | undefined;
|
|
1277
|
+
} & SendParams) | undefined) => Promise<{
|
|
1278
|
+
groupId: string;
|
|
1279
|
+
txIds: string[];
|
|
1280
|
+
returns?: ABIReturn[] | undefined;
|
|
1281
|
+
confirmations: algosdk.modelsv2.PendingTransactionResponse[];
|
|
1282
|
+
transactions: algosdk.Transaction[];
|
|
1283
|
+
confirmation: algosdk.modelsv2.PendingTransactionResponse;
|
|
1284
|
+
transaction: algosdk.Transaction;
|
|
1285
|
+
return?: ABIReturn | undefined;
|
|
1286
|
+
}>;
|
|
1287
|
+
/** Signs and sends a close out call */
|
|
1288
|
+
closeOut: (params?: ({
|
|
1289
|
+
lease?: string | Uint8Array | undefined;
|
|
1290
|
+
note?: string | Uint8Array | undefined;
|
|
1291
|
+
maxFee?: AlgoAmount | undefined;
|
|
1292
|
+
args?: Uint8Array[] | undefined;
|
|
1293
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
1294
|
+
rekeyTo?: string | undefined;
|
|
1295
|
+
staticFee?: AlgoAmount | undefined;
|
|
1296
|
+
extraFee?: AlgoAmount | undefined;
|
|
1297
|
+
validityWindow?: number | undefined;
|
|
1298
|
+
firstValidRound?: bigint | undefined;
|
|
1299
|
+
lastValidRound?: bigint | undefined;
|
|
1300
|
+
accountReferences?: string[] | undefined;
|
|
1301
|
+
appReferences?: bigint[] | undefined;
|
|
1302
|
+
assetReferences?: bigint[] | undefined;
|
|
1303
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
1304
|
+
sender?: string | undefined;
|
|
1305
|
+
} & SendParams) | undefined) => Promise<{
|
|
1306
|
+
groupId: string;
|
|
1307
|
+
txIds: string[];
|
|
1308
|
+
returns?: ABIReturn[] | undefined;
|
|
1309
|
+
confirmations: algosdk.modelsv2.PendingTransactionResponse[];
|
|
1310
|
+
transactions: algosdk.Transaction[];
|
|
1311
|
+
confirmation: algosdk.modelsv2.PendingTransactionResponse;
|
|
1312
|
+
transaction: algosdk.Transaction;
|
|
1313
|
+
return?: ABIReturn | undefined;
|
|
1314
|
+
}>;
|
|
1315
|
+
/** Signs and sends a call (defaults to no-op) */
|
|
1316
|
+
call: (params?: ({
|
|
1317
|
+
lease?: string | Uint8Array | undefined;
|
|
1318
|
+
note?: string | Uint8Array | undefined;
|
|
1319
|
+
maxFee?: AlgoAmount | undefined;
|
|
1320
|
+
args?: Uint8Array[] | undefined;
|
|
1321
|
+
signer?: algosdk.TransactionSigner | TransactionSignerAccount | undefined;
|
|
1322
|
+
rekeyTo?: string | undefined;
|
|
1323
|
+
staticFee?: AlgoAmount | undefined;
|
|
1324
|
+
extraFee?: AlgoAmount | undefined;
|
|
1325
|
+
validityWindow?: number | undefined;
|
|
1326
|
+
firstValidRound?: bigint | undefined;
|
|
1327
|
+
lastValidRound?: bigint | undefined;
|
|
1328
|
+
accountReferences?: string[] | undefined;
|
|
1329
|
+
appReferences?: bigint[] | undefined;
|
|
1330
|
+
assetReferences?: bigint[] | undefined;
|
|
1331
|
+
boxReferences?: (BoxIdentifier | import("./app-manager").BoxReference)[] | undefined;
|
|
1332
|
+
sender?: string | undefined;
|
|
1333
|
+
} & CallOnComplete & SendParams) | undefined) => Promise<{
|
|
1334
|
+
groupId: string;
|
|
1335
|
+
txIds: string[];
|
|
1336
|
+
returns?: ABIReturn[] | undefined;
|
|
1337
|
+
confirmations: algosdk.modelsv2.PendingTransactionResponse[];
|
|
1338
|
+
transactions: algosdk.Transaction[];
|
|
1339
|
+
confirmation: algosdk.modelsv2.PendingTransactionResponse;
|
|
1340
|
+
transaction: algosdk.Transaction;
|
|
1341
|
+
return?: ABIReturn | undefined;
|
|
1342
|
+
}>;
|
|
1343
|
+
};
|
|
1344
|
+
};
|
|
1345
|
+
/** Get state (local, global, box) from the current app */
|
|
1346
|
+
get state(): {
|
|
1347
|
+
/**
|
|
1348
|
+
* Methods to access local state for the current app
|
|
1349
|
+
* @param address The address of the account to get the local state for
|
|
1350
|
+
*/
|
|
1351
|
+
local: (address: string) => {
|
|
1352
|
+
/**
|
|
1353
|
+
* Returns all single-key state values in a record keyed by the key name and the value a decoded ABI value.
|
|
1354
|
+
*/
|
|
1355
|
+
getAll: () => Promise<Record<string, any>>;
|
|
1356
|
+
/**
|
|
1357
|
+
* Returns a single state value for the current app with the value a decoded ABI value.
|
|
1358
|
+
* @param name The name of the state value to retrieve the value for
|
|
1359
|
+
* @param appState Optional cached value of the current state
|
|
1360
|
+
* @returns
|
|
1361
|
+
*/
|
|
1362
|
+
getValue: (name: string, appState?: AppState | undefined) => Promise<algosdk.ABIValue | ABIStruct | undefined>;
|
|
1363
|
+
/**
|
|
1364
|
+
* Returns a single value from the given map for the current app with the value a decoded ABI value.
|
|
1365
|
+
* @param mapName The name of the map to read from
|
|
1366
|
+
* @param key The key within the map (without any map prefix) as either a Buffer with the bytes or a value
|
|
1367
|
+
* that will be converted to bytes by encoding it using the specified ABI key type
|
|
1368
|
+
* in the ARC-56 spec
|
|
1369
|
+
* @param appState Optional cached value of the current state
|
|
1370
|
+
*/
|
|
1371
|
+
getMapValue: (mapName: string, key: any, appState?: AppState | undefined) => Promise<algosdk.ABIValue | ABIStruct | undefined>;
|
|
1372
|
+
/**
|
|
1373
|
+
* Returns all map values for the given map.
|
|
1374
|
+
* @param mapName The name of the map to read from
|
|
1375
|
+
* @param appState Optional cached value of the current state
|
|
1376
|
+
* @returns A map of all key-value pairs in the map as a `Record<string, ABIValue>`
|
|
1377
|
+
*/
|
|
1378
|
+
getMap: (mapName: string) => Promise<Map<algosdk.ABIValue | ABIStruct, algosdk.ABIValue | ABIStruct>>;
|
|
1379
|
+
};
|
|
1380
|
+
/**
|
|
1381
|
+
* Methods to access global state for the current app
|
|
1382
|
+
*/
|
|
1383
|
+
global: {
|
|
1384
|
+
/**
|
|
1385
|
+
* Returns all single-key state values in a record keyed by the key name and the value a decoded ABI value.
|
|
1386
|
+
*/
|
|
1387
|
+
getAll: () => Promise<Record<string, any>>;
|
|
1388
|
+
/**
|
|
1389
|
+
* Returns a single state value for the current app with the value a decoded ABI value.
|
|
1390
|
+
* @param name The name of the state value to retrieve the value for
|
|
1391
|
+
* @param appState Optional cached value of the current state
|
|
1392
|
+
* @returns
|
|
1393
|
+
*/
|
|
1394
|
+
getValue: (name: string, appState?: AppState | undefined) => Promise<algosdk.ABIValue | ABIStruct | undefined>;
|
|
1395
|
+
/**
|
|
1396
|
+
* Returns a single value from the given map for the current app with the value a decoded ABI value.
|
|
1397
|
+
* @param mapName The name of the map to read from
|
|
1398
|
+
* @param key The key within the map (without any map prefix) as either a Buffer with the bytes or a value
|
|
1399
|
+
* that will be converted to bytes by encoding it using the specified ABI key type
|
|
1400
|
+
* in the ARC-56 spec
|
|
1401
|
+
* @param appState Optional cached value of the current state
|
|
1402
|
+
*/
|
|
1403
|
+
getMapValue: (mapName: string, key: any, appState?: AppState | undefined) => Promise<algosdk.ABIValue | ABIStruct | undefined>;
|
|
1404
|
+
/**
|
|
1405
|
+
* Returns all map values for the given map.
|
|
1406
|
+
* @param mapName The name of the map to read from
|
|
1407
|
+
* @param appState Optional cached value of the current state
|
|
1408
|
+
* @returns A map of all key-value pairs in the map as a `Record<string, ABIValue>`
|
|
1409
|
+
*/
|
|
1410
|
+
getMap: (mapName: string) => Promise<Map<algosdk.ABIValue | ABIStruct, algosdk.ABIValue | ABIStruct>>;
|
|
1411
|
+
};
|
|
1412
|
+
/**
|
|
1413
|
+
* Methods to access box storage for the current app
|
|
1414
|
+
*/
|
|
1415
|
+
box: {
|
|
1416
|
+
/**
|
|
1417
|
+
* Returns all single-key state values in a record keyed by the key name and the value a decoded ABI value.
|
|
1418
|
+
*/
|
|
1419
|
+
getAll: () => Promise<Record<string, any>>;
|
|
1420
|
+
/**
|
|
1421
|
+
* Returns a single state value for the current app with the value a decoded ABI value.
|
|
1422
|
+
* @param name The name of the state value to retrieve the value for
|
|
1423
|
+
* @returns
|
|
1424
|
+
*/
|
|
1425
|
+
getValue: (name: string) => Promise<algosdk.ABIValue | ABIStruct>;
|
|
1426
|
+
/**
|
|
1427
|
+
*
|
|
1428
|
+
* @param mapName The name of the map to read from
|
|
1429
|
+
* @param key The key within the map (without any map prefix) as either a Buffer with the bytes or a value
|
|
1430
|
+
* that will be converted to bytes by encoding it using the specified ABI key type
|
|
1431
|
+
* in the ARC-56 spec
|
|
1432
|
+
*/
|
|
1433
|
+
getMapValue: (mapName: string, key: any) => Promise<algosdk.ABIValue | ABIStruct>;
|
|
1434
|
+
/**
|
|
1435
|
+
*
|
|
1436
|
+
* @param mapName The name of the map to read from
|
|
1437
|
+
* @param key The key within the map as either a Buffer with the bytes or a value
|
|
1438
|
+
* that will be converted to bytes by encoding it using the specified ABI key type
|
|
1439
|
+
* in the ARC-56 spec
|
|
1440
|
+
* @param appState
|
|
1441
|
+
*/
|
|
1442
|
+
getMap: (mapName: string) => Promise<Map<algosdk.ABIValue | ABIStruct, algosdk.ABIValue | ABIStruct>>;
|
|
1443
|
+
};
|
|
1444
|
+
};
|
|
1445
|
+
/**
|
|
1446
|
+
* Funds Algo into the app account for this app.
|
|
1447
|
+
*
|
|
1448
|
+
* An alias for `appClient.send.fundAppAccount(params)`.
|
|
1449
|
+
* @param params The parameters for the funding transaction
|
|
1450
|
+
* @returns The result of the funding
|
|
1451
|
+
*/
|
|
1452
|
+
fundAppAccount(params: FundAppParams): Promise<{
|
|
1453
|
+
groupId: string;
|
|
1454
|
+
txIds: string[];
|
|
1455
|
+
returns?: ABIReturn[] | undefined;
|
|
1456
|
+
confirmations: algosdk.modelsv2.PendingTransactionResponse[];
|
|
1457
|
+
transactions: algosdk.Transaction[];
|
|
1458
|
+
confirmation: algosdk.modelsv2.PendingTransactionResponse;
|
|
1459
|
+
transaction: algosdk.Transaction;
|
|
1460
|
+
}>;
|
|
1461
|
+
/**
|
|
1462
|
+
* Returns raw global state for the current app.
|
|
1463
|
+
* @returns The global state
|
|
1464
|
+
*/
|
|
1465
|
+
getGlobalState(): Promise<AppState>;
|
|
1466
|
+
/**
|
|
1467
|
+
* Returns raw local state for the given account address.
|
|
1468
|
+
* @param address The address of the account to get the local state for
|
|
1469
|
+
* @returns The local state
|
|
1470
|
+
*/
|
|
1471
|
+
getLocalState(address: string): Promise<AppState>;
|
|
1472
|
+
/**
|
|
1473
|
+
* Returns the names of all current boxes for the current app.
|
|
1474
|
+
* @returns The names of the boxes
|
|
1475
|
+
*/
|
|
1476
|
+
getBoxNames(): Promise<BoxName[]>;
|
|
1477
|
+
/**
|
|
1478
|
+
* Returns the value of the given box for the current app.
|
|
1479
|
+
* @param name The identifier of the box to return
|
|
1480
|
+
* @returns The current box value as a byte array
|
|
1481
|
+
*/
|
|
1482
|
+
getBoxValue(name: BoxIdentifier): Promise<Uint8Array>;
|
|
1483
|
+
/**
|
|
1484
|
+
* Returns the value of the given box for the current app.
|
|
1485
|
+
* @param name The identifier of the box to return
|
|
1486
|
+
* @param type
|
|
1487
|
+
* @returns The current box value as a byte array
|
|
1488
|
+
*/
|
|
1489
|
+
getBoxValueFromABIType(name: BoxIdentifier, type: ABIType): Promise<ABIValue>;
|
|
1490
|
+
/**
|
|
1491
|
+
* Returns the values of all current boxes for the current app.
|
|
1492
|
+
* Note: This will issue multiple HTTP requests (one per box) and it's not an atomic operation so values may be out of sync.
|
|
1493
|
+
* @param filter Optional filter to filter which boxes' values are returned
|
|
1494
|
+
* @returns The (name, value) pair of the boxes with values as raw byte arrays
|
|
1495
|
+
*/
|
|
1496
|
+
getBoxValues(filter?: (name: BoxName) => boolean): Promise<{
|
|
1497
|
+
name: BoxName;
|
|
1498
|
+
value: Uint8Array;
|
|
1499
|
+
}[]>;
|
|
1500
|
+
/**
|
|
1501
|
+
* Returns the values of all current boxes for the current app decoded using an ABI Type.
|
|
1502
|
+
* Note: This will issue multiple HTTP requests (one per box) and it's not an atomic operation so values may be out of sync.
|
|
1503
|
+
* @param type The ABI type to decode the values with
|
|
1504
|
+
* @param filter Optional filter to filter which boxes' values are returned
|
|
1505
|
+
* @returns The (name, value) pair of the boxes with values as the ABI Value
|
|
1506
|
+
*/
|
|
1507
|
+
getBoxValuesFromABIType(type: ABIType, filter?: (name: BoxName) => boolean): Promise<{
|
|
1508
|
+
name: BoxName;
|
|
1509
|
+
value: ABIValue;
|
|
1510
|
+
}[]>;
|
|
1511
|
+
/**
|
|
1512
|
+
* Takes an error that may include a logic error from a call to the current app and re-exposes the
|
|
1513
|
+
* error to include source code information via the source map and ARC-56 spec.
|
|
1514
|
+
* @param e The error to parse
|
|
1515
|
+
* @param isClearStateProgram Whether or not the code was running the clear state program (defaults to approval program)
|
|
1516
|
+
* @returns The new error, or if there was no logic error or source map then the wrapped error with source details
|
|
1517
|
+
*/
|
|
1518
|
+
exposeLogicError(e: Error, isClearStateProgram?: boolean): Promise<Error>;
|
|
1519
|
+
/**
|
|
1520
|
+
* Export the current source maps for the app.
|
|
1521
|
+
* @returns The source maps
|
|
1522
|
+
*/
|
|
1523
|
+
exportSourceMaps(): AppSourceMaps;
|
|
1524
|
+
/**
|
|
1525
|
+
* Import source maps for the app.
|
|
1526
|
+
* @param sourceMaps The source maps to import
|
|
1527
|
+
*/
|
|
1528
|
+
importSourceMaps(sourceMaps: AppSourceMaps): void;
|
|
1529
|
+
/**
|
|
1530
|
+
* Returns the ABI Method spec for the given method string for the app represented by this application client instance
|
|
1531
|
+
* @param methodNameOrSignature The method name or method signature to call if an ABI call is being emitted.
|
|
1532
|
+
* e.g. `my_method` or `my_method(unit64,string)bytes`
|
|
1533
|
+
* @returns A tuple with: [ARC-56 `Method`, algosdk `ABIMethod`]
|
|
1534
|
+
*/
|
|
1535
|
+
getABIMethod(methodNameOrSignature: string): Arc56Method;
|
|
1536
|
+
/**
|
|
1537
|
+
* Checks for decode errors on the SendAppTransactionResult and maps the return value to the specified type
|
|
1538
|
+
* on the ARC-56 method, replacing the `return` property with the decoded type.
|
|
1539
|
+
*
|
|
1540
|
+
* If the return type is an ARC-56 struct then the struct will be returned.
|
|
1541
|
+
*
|
|
1542
|
+
* @param result The SendAppTransactionResult to be mapped
|
|
1543
|
+
* @param method The method that was called
|
|
1544
|
+
* @returns The smart contract response with an updated return value
|
|
1545
|
+
*/
|
|
1546
|
+
processMethodCallReturn<TReturn extends Uint8Array | ABIValue | ABIStruct | undefined, TResult extends SendAppTransactionResult = SendAppTransactionResult>(result: Promise<TResult> | TResult, method: Arc56Method): Promise<Omit<TResult, 'return'> & AppReturn<TReturn>>;
|
|
1547
|
+
/**
|
|
1548
|
+
* Compiles the approval and clear state programs (if TEAL templates provided),
|
|
1549
|
+
* performing any provided deploy-time parameter replacement and stores
|
|
1550
|
+
* the source maps.
|
|
1551
|
+
*
|
|
1552
|
+
* If no TEAL templates provided it will use any byte code provided in the app spec.
|
|
1553
|
+
*
|
|
1554
|
+
* Will store any generated source maps for later use in debugging.
|
|
1555
|
+
*/
|
|
1556
|
+
compile(compilation?: AppClientCompilationParams): Promise<AppClientCompilationResult>;
|
|
1557
|
+
/**
|
|
1558
|
+
* Takes an error that may include a logic error from a call to the current app and re-exposes the
|
|
1559
|
+
* error to include source code information via the source map and ARC-56 spec.
|
|
1560
|
+
* @param e The error to parse
|
|
1561
|
+
* @param appSpec The app spec for the app
|
|
1562
|
+
* @param details Additional information to inform the error
|
|
1563
|
+
* @returns The new error, or if there was no logic error or source map then the wrapped error with source details
|
|
1564
|
+
*/
|
|
1565
|
+
static exposeLogicError(e: Error, appSpec: Arc56Contract, details: {
|
|
1566
|
+
/** Whether or not the code was running the clear state program (defaults to approval program) */ isClearStateProgram?: boolean;
|
|
1567
|
+
/** Approval program source map */ approvalSourceMap?: SourceMap;
|
|
1568
|
+
/** Clear state program source map */ clearSourceMap?: SourceMap;
|
|
1569
|
+
/** program bytes */ program?: Uint8Array;
|
|
1570
|
+
/** ARC56 approval source info */ approvalSourceInfo?: ProgramSourceInfo;
|
|
1571
|
+
/** ARC56 clear source info */ clearSourceInfo?: ProgramSourceInfo;
|
|
1572
|
+
}): Error;
|
|
1573
|
+
/**
|
|
1574
|
+
* Compiles the approval and clear state programs (if TEAL templates provided),
|
|
1575
|
+
* performing any provided deploy-time parameter replacement and returns
|
|
1576
|
+
* the compiled code and any compilation results (including source maps).
|
|
1577
|
+
*
|
|
1578
|
+
* If no TEAL templates provided it will use any byte code provided in the app spec.
|
|
1579
|
+
*
|
|
1580
|
+
* Will store any generated source maps for later use in debugging.
|
|
1581
|
+
* @param appSpec The app spec for the app
|
|
1582
|
+
* @param compilation Any compilation parameters to use
|
|
1583
|
+
*/
|
|
1584
|
+
static compile(appSpec: Arc56Contract, appManager: AppManager, compilation?: AppClientCompilationParams): Promise<AppClientCompilationResult>;
|
|
1585
|
+
/**
|
|
1586
|
+
* Returns ABI method arguments ready for a method call params object with default values populated
|
|
1587
|
+
* and structs replaced with tuples.
|
|
1588
|
+
*
|
|
1589
|
+
* It does this by replacing any `undefined` values with the equivalent default value from the given ARC-56 app spec.
|
|
1590
|
+
* @param methodNameOrSignature The method name or method signature to call if an ABI call is being emitted.
|
|
1591
|
+
* e.g. `my_method` or `my_method(unit64,string)bytes`
|
|
1592
|
+
* @param args The arguments to the method with `undefined` for any that should be populated with a default value
|
|
1593
|
+
*/
|
|
1594
|
+
private getABIArgsWithDefaultValues;
|
|
1595
|
+
private getBareParamsMethods;
|
|
1596
|
+
private getBareCreateTransactionMethods;
|
|
1597
|
+
private getBareSendMethods;
|
|
1598
|
+
private getMethodCallParamsMethods;
|
|
1599
|
+
private getMethodCallSendMethods;
|
|
1600
|
+
private getMethodCallCreateTransactionMethods;
|
|
1601
|
+
/** Returns the sender for a call, using the provided sender or using the `defaultSender`
|
|
1602
|
+
* if none provided and throws an error if neither provided */
|
|
1603
|
+
private getSender;
|
|
1604
|
+
/** Returns the signer for a call, using the provided signer or the `defaultSigner`
|
|
1605
|
+
* if no signer was provided and the call will use default sender
|
|
1606
|
+
* or `undefined` otherwise (so the signer is resolved from `AlgorandClient`) */
|
|
1607
|
+
private getSigner;
|
|
1608
|
+
private getBareParams;
|
|
1609
|
+
private getABIParams;
|
|
1610
|
+
/** Make the given call and catch any errors, augmenting with debugging information before re-throwing. */
|
|
1611
|
+
private handleCallErrors;
|
|
1612
|
+
private getBoxMethods;
|
|
1613
|
+
private getStateMethods;
|
|
1614
|
+
}
|
|
1615
|
+
/**
|
|
1616
|
+
* @deprecated Use `AppClient` instead e.g. via `algorand.client.getAppClientById` or
|
|
1617
|
+
* `algorand.client.getAppClientByCreatorAndName`.
|
|
1618
|
+
* If you want to `create` or `deploy` then use `AppFactory` e.g. via `algorand.client.getAppFactory`,
|
|
1619
|
+
* which will in turn give you an `AppClient` instance against the created/deployed app to make other calls.
|
|
1620
|
+
*
|
|
1621
|
+
* Application client - a class that wraps an ARC-0032 app spec and provides high productivity methods to deploy and call the app */
|
|
171
1622
|
export declare class ApplicationClient {
|
|
172
1623
|
private algod;
|
|
173
1624
|
private indexer?;
|
|
@@ -183,15 +1634,22 @@ export declare class ApplicationClient {
|
|
|
183
1634
|
private _approvalSourceMap;
|
|
184
1635
|
private _clearSourceMap;
|
|
185
1636
|
/**
|
|
1637
|
+
* @deprecated Use `AppClient` instead e.g. via `algorand.client.getAppClientById` or
|
|
1638
|
+
* `algorand.client.getAppClientByCreatorAndName`.
|
|
1639
|
+
* If you want to `create` or `deploy` then use `AppFactory` e.g. via `algorand.client.getAppFactory`,
|
|
1640
|
+
* which will in turn give you an `AppClient` instance against the created/deployed app to make other calls.
|
|
1641
|
+
*
|
|
186
1642
|
* Create a new ApplicationClient instance
|
|
187
1643
|
* @param appDetails The details of the app
|
|
188
1644
|
* @param algod An algod instance
|
|
189
1645
|
*/
|
|
190
1646
|
constructor(appDetails: AppSpecAppDetails, algod: Algodv2);
|
|
191
1647
|
/**
|
|
192
|
-
*
|
|
1648
|
+
* @deprecated Use `AppClient.compile()` instead.
|
|
1649
|
+
*
|
|
1650
|
+
* Compiles the approval and clear state programs and sets up the source map.
|
|
193
1651
|
* @param compilation The deploy-time parameters for the compilation
|
|
194
|
-
* @returns The compiled approval and clear programs
|
|
1652
|
+
* @returns The compiled approval and clear state programs
|
|
195
1653
|
*/
|
|
196
1654
|
compile(compilation?: AppClientCompilationParams): Promise<{
|
|
197
1655
|
approvalCompiled: import("./app").CompiledTeal;
|
|
@@ -208,6 +1666,8 @@ export declare class ApplicationClient {
|
|
|
208
1666
|
*/
|
|
209
1667
|
importSourceMaps(sourceMaps: AppSourceMaps): void;
|
|
210
1668
|
/**
|
|
1669
|
+
* @deprecated Use `deploy` from an `AppFactory` instance instead.
|
|
1670
|
+
*
|
|
211
1671
|
* Idempotently deploy (create, update/delete if changed) an app against the given name via the given creator account, including deploy-time template placeholder substitutions.
|
|
212
1672
|
*
|
|
213
1673
|
* To understand the architecture decisions behind this functionality please see https://github.com/algorandfoundation/algokit-cli/blob/main/docs/architecture-decisions/2023-01-12_smart-contract-deployment.md
|
|
@@ -262,6 +1722,8 @@ export declare class ApplicationClient {
|
|
|
262
1722
|
operationPerformed: "replace";
|
|
263
1723
|
}>;
|
|
264
1724
|
/**
|
|
1725
|
+
* @deprecated Use `create` from an `AppFactory` instance instead.
|
|
1726
|
+
*
|
|
265
1727
|
* Creates a smart contract app, returns the details of the created app.
|
|
266
1728
|
* @param create The parameters to create the app with
|
|
267
1729
|
* @returns The details of the created app, or the transaction to create it if `skipSending` and the compilation result
|
|
@@ -278,6 +1740,8 @@ export declare class ApplicationClient {
|
|
|
278
1740
|
appAddress: string;
|
|
279
1741
|
}>;
|
|
280
1742
|
/**
|
|
1743
|
+
* @deprecated Use `appClient.send.update` or `appClient.createTransaction.update` from an `AppClient` instance instead.
|
|
1744
|
+
*
|
|
281
1745
|
* Updates the smart contract app.
|
|
282
1746
|
* @param update The parameters to update the app with
|
|
283
1747
|
* @returns The transaction send result and the compilation result
|
|
@@ -292,36 +1756,48 @@ export declare class ApplicationClient {
|
|
|
292
1756
|
confirmation?: algosdk.modelsv2.PendingTransactionResponse | undefined;
|
|
293
1757
|
}>;
|
|
294
1758
|
/**
|
|
1759
|
+
* @deprecated Use `appClient.send.call` or `appClient.createTransaction.call` from an `AppClient` instance instead.
|
|
1760
|
+
*
|
|
295
1761
|
* Issues a no_op (normal) call to the app.
|
|
296
1762
|
* @param call The call details.
|
|
297
1763
|
* @returns The result of the call
|
|
298
1764
|
*/
|
|
299
1765
|
call(call?: AppClientCallParams): Promise<AppCallTransactionResult>;
|
|
300
1766
|
/**
|
|
1767
|
+
* @deprecated Use `appClient.send.optIn` or `appClient.createTransaction.optIn` from an `AppClient` instance instead.
|
|
1768
|
+
*
|
|
301
1769
|
* Issues a opt_in call to the app.
|
|
302
1770
|
* @param call The call details.
|
|
303
1771
|
* @returns The result of the call
|
|
304
1772
|
*/
|
|
305
1773
|
optIn(call?: AppClientCallParams): Promise<AppCallTransactionResult>;
|
|
306
1774
|
/**
|
|
1775
|
+
* @deprecated Use `appClient.send.closeOut` or `appClient.createTransaction.closeOut` from an `AppClient` instance instead.
|
|
1776
|
+
*
|
|
307
1777
|
* Issues a close_out call to the app.
|
|
308
1778
|
* @param call The call details.
|
|
309
1779
|
* @returns The result of the call
|
|
310
1780
|
*/
|
|
311
1781
|
closeOut(call?: AppClientCallParams): Promise<AppCallTransactionResult>;
|
|
312
1782
|
/**
|
|
1783
|
+
* @deprecated Use `appClient.send.clearState` or `appClient.createTransaction.clearState` from an `AppClient` instance instead.
|
|
1784
|
+
*
|
|
313
1785
|
* Issues a clear_state call to the app.
|
|
314
1786
|
* @param call The call details.
|
|
315
1787
|
* @returns The result of the call
|
|
316
1788
|
*/
|
|
317
1789
|
clearState(call?: AppClientClearStateParams): Promise<AppCallTransactionResult>;
|
|
318
1790
|
/**
|
|
1791
|
+
* @deprecated Use `appClient.send.delete` or `appClient.createTransaction.delete` from an `AppClient` instance instead.
|
|
1792
|
+
*
|
|
319
1793
|
* Issues a delete_application call to the app.
|
|
320
1794
|
* @param call The call details.
|
|
321
1795
|
* @returns The result of the call
|
|
322
1796
|
*/
|
|
323
1797
|
delete(call?: AppClientCallParams): Promise<AppCallTransactionResult>;
|
|
324
1798
|
/**
|
|
1799
|
+
* @deprecated Use `appClient.send.call` or `appClient.createTransaction.call` from an `AppClient` instance instead.
|
|
1800
|
+
*
|
|
325
1801
|
* Issues a call to the app with the given call type.
|
|
326
1802
|
* @param call The call details.
|
|
327
1803
|
* @param callType The call type
|
|
@@ -342,7 +1818,6 @@ export declare class ApplicationClient {
|
|
|
342
1818
|
confirmation: algosdk.modelsv2.PendingTransactionResponse;
|
|
343
1819
|
transaction: algosdk.Transaction;
|
|
344
1820
|
}) & {
|
|
345
|
-
/** The address of the app creator account to resolve the app by */
|
|
346
1821
|
transactions: algosdk.Transaction[];
|
|
347
1822
|
}>;
|
|
348
1823
|
/**
|
|
@@ -395,6 +1870,8 @@ export declare class ApplicationClient {
|
|
|
395
1870
|
value: ABIValue;
|
|
396
1871
|
}[]>;
|
|
397
1872
|
/**
|
|
1873
|
+
* @deprecated Use `appClient.params.*` from an `AppClient` instance instead.
|
|
1874
|
+
*
|
|
398
1875
|
* Returns the arguments for an app call for the given ABI method or raw method specification.
|
|
399
1876
|
* @param args The call args specific to this application client
|
|
400
1877
|
* @param sender The sender of this call. Will be used to fetch any default argument values if applicable
|
|
@@ -402,6 +1879,8 @@ export declare class ApplicationClient {
|
|
|
402
1879
|
*/
|
|
403
1880
|
getCallArgs(args: AppClientCallArgs | undefined, sender: SendTransactionFrom): Promise<AppCallArgs | undefined>;
|
|
404
1881
|
/**
|
|
1882
|
+
* @deprecated Use `appClient.getABIMethod` instead.
|
|
1883
|
+
*
|
|
405
1884
|
* Returns the ABI Method parameters for the given method name string for the app represented by this application client instance
|
|
406
1885
|
* @param method Either the name of the method or the ABI method spec definition string
|
|
407
1886
|
* @returns The ABI method params for the given method
|
|
@@ -414,6 +1893,8 @@ export declare class ApplicationClient {
|
|
|
414
1893
|
*/
|
|
415
1894
|
getABIMethod(method: string): ABIMethod | undefined;
|
|
416
1895
|
/**
|
|
1896
|
+
* @deprecated Use `appClient.appId` and `appClient.appAddress` from an `AppClient` instance instead.
|
|
1897
|
+
*
|
|
417
1898
|
* Gets the reference information for the current application instance.
|
|
418
1899
|
* `appId` will be 0 if it can't find an app.
|
|
419
1900
|
* @returns The app reference, or if deployed using the `deploy` method, the app metadata too
|
|
@@ -430,4 +1911,3 @@ export declare class ApplicationClient {
|
|
|
430
1911
|
exposeLogicError(e: Error, isClear?: boolean): Error;
|
|
431
1912
|
private getABIMethodSignature;
|
|
432
1913
|
}
|
|
433
|
-
//# sourceMappingURL=app-client.d.ts.map
|