@algorandfoundation/algokit-utils 10.0.0-alpha.1 → 10.0.0-alpha.11
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/README.md +27 -5
- package/_virtual/rolldown_runtime.js +20 -11
- package/_virtual/rolldown_runtime.mjs +10 -5
- package/algo25/index.d.ts +2 -0
- package/algo25/index.js +9 -0
- package/algo25/index.mjs +3 -0
- package/algod-client/index.d.ts +2 -5
- package/package.json +1 -1
- package/packages/abi/src/abi-method.d.ts +1 -1
- package/packages/abi/src/abi-method.js.map +1 -1
- package/packages/abi/src/abi-method.mjs.map +1 -1
- package/packages/abi/src/abi-type.d.ts +1 -1
- package/packages/abi/src/abi-type.js +4 -2
- package/packages/abi/src/abi-type.js.map +1 -1
- package/packages/abi/src/abi-type.mjs +4 -2
- package/packages/abi/src/abi-type.mjs.map +1 -1
- package/packages/abi/src/arc56-contract.js +1 -0
- package/packages/abi/src/arc56-contract.js.map +1 -1
- package/packages/abi/src/arc56-contract.mjs +1 -0
- package/packages/abi/src/arc56-contract.mjs.map +1 -1
- package/packages/algo25/src/english.js.map +1 -1
- package/packages/algo25/src/english.mjs.map +1 -1
- package/packages/algo25/src/index.d.ts +40 -0
- package/packages/algo25/src/index.js +44 -0
- package/packages/algo25/src/index.js.map +1 -1
- package/packages/algo25/src/index.mjs +39 -1
- package/packages/algo25/src/index.mjs.map +1 -1
- package/packages/algod_client/src/apis/api-service.d.ts +44 -44
- package/packages/algod_client/src/apis/api-service.js +153 -153
- package/packages/algod_client/src/apis/api-service.js.map +1 -1
- package/packages/algod_client/src/apis/api-service.mjs +153 -153
- package/packages/algod_client/src/apis/api-service.mjs.map +1 -1
- package/packages/algod_client/src/core/api-error.js +3 -1
- package/packages/algod_client/src/core/api-error.js.map +1 -1
- package/packages/algod_client/src/core/api-error.mjs +3 -1
- package/packages/algod_client/src/core/api-error.mjs.map +1 -1
- package/packages/algod_client/src/core/model-runtime.js +4 -4
- package/packages/algod_client/src/core/model-runtime.js.map +1 -1
- package/packages/algod_client/src/core/model-runtime.mjs +6 -6
- package/packages/algod_client/src/core/model-runtime.mjs.map +1 -1
- package/packages/algod_client/src/models/account-participation.js +4 -4
- package/packages/algod_client/src/models/account-participation.js.map +1 -1
- package/packages/algod_client/src/models/account-participation.mjs +4 -4
- package/packages/algod_client/src/models/account-participation.mjs.map +1 -1
- package/packages/algod_client/src/models/application-state-schema.d.ts +2 -2
- package/packages/algod_client/src/models/application-state-schema.js +2 -2
- package/packages/algod_client/src/models/application-state-schema.js.map +1 -1
- package/packages/algod_client/src/models/application-state-schema.mjs +2 -2
- package/packages/algod_client/src/models/application-state-schema.mjs.map +1 -1
- package/packages/algod_client/src/models/asset-params.js +2 -1
- package/packages/algod_client/src/models/asset-params.js.map +1 -1
- package/packages/algod_client/src/models/asset-params.mjs +2 -1
- package/packages/algod_client/src/models/asset-params.mjs.map +1 -1
- package/packages/algod_client/src/models/block-response.js +1 -2
- package/packages/algod_client/src/models/block-response.js.map +1 -1
- package/packages/algod_client/src/models/block-response.mjs +2 -3
- package/packages/algod_client/src/models/block-response.mjs.map +1 -1
- package/packages/algod_client/src/models/block.d.ts +49 -29
- package/packages/algod_client/src/models/block.js +174 -98
- package/packages/algod_client/src/models/block.js.map +1 -1
- package/packages/algod_client/src/models/block.mjs +174 -98
- package/packages/algod_client/src/models/block.mjs.map +1 -1
- package/packages/algod_client/src/models/ledger-state-delta.js +1 -1
- package/packages/algod_client/src/models/ledger-state-delta.js.map +1 -1
- package/packages/algod_client/src/models/ledger-state-delta.mjs +2 -2
- package/packages/algod_client/src/models/ledger-state-delta.mjs.map +1 -1
- package/packages/algod_client/src/models/simulate-unnamed-resources-accessed.d.ts +3 -5
- package/packages/algod_client/src/models/simulate-unnamed-resources-accessed.js +4 -6
- package/packages/algod_client/src/models/simulate-unnamed-resources-accessed.js.map +1 -1
- package/packages/algod_client/src/models/simulate-unnamed-resources-accessed.mjs +3 -5
- package/packages/algod_client/src/models/simulate-unnamed-resources-accessed.mjs.map +1 -1
- package/packages/algod_client/src/models/transaction-parameters-response.js +2 -2
- package/packages/algod_client/src/models/transaction-parameters-response.js.map +1 -1
- package/packages/algod_client/src/models/transaction-parameters-response.mjs +2 -2
- package/packages/algod_client/src/models/transaction-parameters-response.mjs.map +1 -1
- package/packages/common/src/address.js +0 -14
- package/packages/common/src/address.js.map +1 -1
- package/packages/common/src/address.mjs +1 -14
- package/packages/common/src/address.mjs.map +1 -1
- package/packages/common/src/codecs/composite/map.js +7 -4
- package/packages/common/src/codecs/composite/map.js.map +1 -1
- package/packages/common/src/codecs/composite/map.mjs +7 -4
- package/packages/common/src/codecs/composite/map.mjs.map +1 -1
- package/packages/common/src/codecs/composite/record.js +0 -1
- package/packages/common/src/codecs/composite/record.js.map +1 -1
- package/packages/common/src/codecs/primitives/address.js +0 -1
- package/packages/common/src/codecs/primitives/address.js.map +1 -1
- package/packages/common/src/codecs/primitives/bytes.js +0 -1
- package/packages/common/src/codecs/primitives/bytes.js.map +1 -1
- package/packages/common/src/codecs/primitives/fixed-bytes.js +0 -1
- package/packages/common/src/codecs/primitives/fixed-bytes.js.map +1 -1
- package/packages/common/src/codecs/wire.js +0 -1
- package/packages/common/src/codecs/wire.js.map +1 -1
- package/packages/common/src/msgpack.js +0 -1
- package/packages/common/src/msgpack.js.map +1 -1
- package/packages/indexer_client/src/apis/api-service.d.ts +1 -1
- package/packages/indexer_client/src/apis/api-service.js +12 -12
- package/packages/indexer_client/src/apis/api-service.js.map +1 -1
- package/packages/indexer_client/src/apis/api-service.mjs +12 -12
- package/packages/indexer_client/src/apis/api-service.mjs.map +1 -1
- package/packages/indexer_client/src/core/api-error.js +3 -1
- package/packages/indexer_client/src/core/api-error.js.map +1 -1
- package/packages/indexer_client/src/core/api-error.mjs +3 -1
- package/packages/indexer_client/src/core/api-error.mjs.map +1 -1
- package/packages/indexer_client/src/core/model-runtime.js +4 -4
- package/packages/indexer_client/src/core/model-runtime.js.map +1 -1
- package/packages/indexer_client/src/core/model-runtime.mjs +6 -6
- package/packages/indexer_client/src/core/model-runtime.mjs.map +1 -1
- package/packages/indexer_client/src/models/account-participation.js +4 -4
- package/packages/indexer_client/src/models/account-participation.js.map +1 -1
- package/packages/indexer_client/src/models/account-participation.mjs +4 -4
- package/packages/indexer_client/src/models/account-participation.mjs.map +1 -1
- package/packages/indexer_client/src/models/application-state-schema.d.ts +2 -2
- package/packages/indexer_client/src/models/application-state-schema.js +2 -2
- package/packages/indexer_client/src/models/application-state-schema.js.map +1 -1
- package/packages/indexer_client/src/models/application-state-schema.mjs +2 -2
- package/packages/indexer_client/src/models/application-state-schema.mjs.map +1 -1
- package/packages/indexer_client/src/models/asset-params.js +2 -1
- package/packages/indexer_client/src/models/asset-params.js.map +1 -1
- package/packages/indexer_client/src/models/asset-params.mjs +2 -1
- package/packages/indexer_client/src/models/asset-params.mjs.map +1 -1
- package/packages/indexer_client/src/models/block.js +8 -8
- package/packages/indexer_client/src/models/block.js.map +1 -1
- package/packages/indexer_client/src/models/block.mjs +8 -8
- package/packages/indexer_client/src/models/block.mjs.map +1 -1
- package/packages/indexer_client/src/models/eval-delta-key-value.d.ts +1 -1
- package/packages/indexer_client/src/models/eval-delta-key-value.js +2 -2
- package/packages/indexer_client/src/models/eval-delta-key-value.js.map +1 -1
- package/packages/indexer_client/src/models/eval-delta-key-value.mjs +2 -2
- package/packages/indexer_client/src/models/eval-delta-key-value.mjs.map +1 -1
- package/packages/indexer_client/src/models/eval-delta.d.ts +1 -1
- package/packages/indexer_client/src/models/eval-delta.js +2 -2
- package/packages/indexer_client/src/models/eval-delta.js.map +1 -1
- package/packages/indexer_client/src/models/eval-delta.mjs +2 -2
- package/packages/indexer_client/src/models/eval-delta.mjs.map +1 -1
- package/packages/indexer_client/src/models/hb-proof-fields.js +6 -6
- package/packages/indexer_client/src/models/hb-proof-fields.js.map +1 -1
- package/packages/indexer_client/src/models/hb-proof-fields.mjs +6 -6
- package/packages/indexer_client/src/models/hb-proof-fields.mjs.map +1 -1
- package/packages/indexer_client/src/models/state-proof-verifier.js +2 -2
- package/packages/indexer_client/src/models/state-proof-verifier.js.map +1 -1
- package/packages/indexer_client/src/models/state-proof-verifier.mjs +2 -2
- package/packages/indexer_client/src/models/state-proof-verifier.mjs.map +1 -1
- package/packages/indexer_client/src/models/state-schema.d.ts +2 -2
- package/packages/indexer_client/src/models/state-schema.js +2 -2
- package/packages/indexer_client/src/models/state-schema.js.map +1 -1
- package/packages/indexer_client/src/models/state-schema.mjs +2 -2
- package/packages/indexer_client/src/models/state-schema.mjs.map +1 -1
- package/packages/indexer_client/src/models/teal-key-value.d.ts +1 -1
- package/packages/indexer_client/src/models/teal-key-value.js +2 -2
- package/packages/indexer_client/src/models/teal-key-value.js.map +1 -1
- package/packages/indexer_client/src/models/teal-key-value.mjs +2 -2
- package/packages/indexer_client/src/models/teal-key-value.mjs.map +1 -1
- package/packages/indexer_client/src/models/transaction-heartbeat.js +2 -1
- package/packages/indexer_client/src/models/transaction-heartbeat.js.map +1 -1
- package/packages/indexer_client/src/models/transaction-heartbeat.mjs +2 -1
- package/packages/indexer_client/src/models/transaction-heartbeat.mjs.map +1 -1
- package/packages/indexer_client/src/models/transaction-keyreg.js +4 -4
- package/packages/indexer_client/src/models/transaction-keyreg.js.map +1 -1
- package/packages/indexer_client/src/models/transaction-keyreg.mjs +4 -4
- package/packages/indexer_client/src/models/transaction-keyreg.mjs.map +1 -1
- package/packages/indexer_client/src/models/transaction-signature-logicsig.js +2 -1
- package/packages/indexer_client/src/models/transaction-signature-logicsig.js.map +1 -1
- package/packages/indexer_client/src/models/transaction-signature-logicsig.mjs +2 -1
- package/packages/indexer_client/src/models/transaction-signature-logicsig.mjs.map +1 -1
- package/packages/indexer_client/src/models/transaction-signature-multisig-subsignature.js +3 -3
- package/packages/indexer_client/src/models/transaction-signature-multisig-subsignature.js.map +1 -1
- package/packages/indexer_client/src/models/transaction-signature-multisig-subsignature.mjs +3 -3
- package/packages/indexer_client/src/models/transaction-signature-multisig-subsignature.mjs.map +1 -1
- package/packages/indexer_client/src/models/transaction.d.ts +2 -2
- package/packages/indexer_client/src/models/transaction.js +6 -5
- package/packages/indexer_client/src/models/transaction.js.map +1 -1
- package/packages/indexer_client/src/models/transaction.mjs +6 -5
- package/packages/indexer_client/src/models/transaction.mjs.map +1 -1
- package/packages/kmd_client/src/apis/api-service.d.ts +5 -5
- package/packages/kmd_client/src/apis/api-service.js +32 -32
- package/packages/kmd_client/src/apis/api-service.js.map +1 -1
- package/packages/kmd_client/src/apis/api-service.mjs +32 -32
- package/packages/kmd_client/src/apis/api-service.mjs.map +1 -1
- package/packages/kmd_client/src/core/api-error.js +3 -1
- package/packages/kmd_client/src/core/api-error.js.map +1 -1
- package/packages/kmd_client/src/core/api-error.mjs +3 -1
- package/packages/kmd_client/src/core/api-error.mjs.map +1 -1
- package/packages/kmd_client/src/core/model-runtime.js +4 -4
- package/packages/kmd_client/src/core/model-runtime.js.map +1 -1
- package/packages/kmd_client/src/core/model-runtime.mjs +6 -6
- package/packages/kmd_client/src/core/model-runtime.mjs.map +1 -1
- package/packages/sdk/src/encoding/encoding.js +12 -2
- package/packages/sdk/src/encoding/encoding.js.map +1 -1
- package/packages/sdk/src/encoding/encoding.mjs +12 -1
- package/packages/sdk/src/encoding/encoding.mjs.map +1 -1
- package/packages/sdk/src/encoding/schema/map.js +0 -2
- package/packages/sdk/src/encoding/schema/map.js.map +1 -1
- package/packages/transact/src/logicsig.d.ts +3 -15
- package/packages/transact/src/logicsig.js +16 -36
- package/packages/transact/src/logicsig.js.map +1 -1
- package/packages/transact/src/logicsig.mjs +18 -36
- package/packages/transact/src/logicsig.mjs.map +1 -1
- package/packages/transact/src/multisig.d.ts +7 -115
- package/packages/transact/src/multisig.js +86 -136
- package/packages/transact/src/multisig.js.map +1 -1
- package/packages/transact/src/multisig.mjs +87 -117
- package/packages/transact/src/multisig.mjs.map +1 -1
- package/packages/transact/src/transactions/app-call.d.ts +10 -10
- package/packages/transact/src/transactions/app-call.js.map +1 -1
- package/packages/transact/src/transactions/app-call.mjs.map +1 -1
- package/packages/transact/src/transactions/reference-types-meta.d.ts +26 -0
- package/packages/transact/src/transactions/reference-types-meta.js +71 -0
- package/packages/transact/src/transactions/reference-types-meta.js.map +1 -0
- package/packages/transact/src/transactions/reference-types-meta.mjs +69 -0
- package/packages/transact/src/transactions/reference-types-meta.mjs.map +1 -0
- package/packages/transact/src/transactions/signed-transaction-meta.js +2 -3
- package/packages/transact/src/transactions/signed-transaction-meta.js.map +1 -1
- package/packages/transact/src/transactions/signed-transaction-meta.mjs +3 -3
- package/packages/transact/src/transactions/signed-transaction-meta.mjs.map +1 -1
- package/packages/transact/src/transactions/signed-transaction.d.ts +2 -2
- package/packages/transact/src/transactions/signed-transaction.js.map +1 -1
- package/packages/transact/src/transactions/signed-transaction.mjs.map +1 -1
- package/packages/transact/src/transactions/transaction-meta.js +29 -23
- package/packages/transact/src/transactions/transaction-meta.js.map +1 -1
- package/packages/transact/src/transactions/transaction-meta.mjs +29 -23
- package/packages/transact/src/transactions/transaction-meta.mjs.map +1 -1
- package/packages/transact/src/transactions/transaction.js +1 -0
- package/packages/transact/src/transactions/transaction.js.map +1 -1
- package/packages/transact/src/transactions/transaction.mjs +1 -0
- package/packages/transact/src/transactions/transaction.mjs.map +1 -1
- package/sdk/index.js +1 -1
- package/testing/account.js +2 -5
- package/testing/account.js.map +1 -1
- package/testing/account.mjs +2 -5
- package/testing/account.mjs.map +1 -1
- package/testing/fixtures/algorand-fixture.d.ts +3 -3
- package/testing/fixtures/algorand-fixture.js.map +1 -1
- package/testing/fixtures/algorand-fixture.mjs.map +1 -1
- package/transact/index.d.ts +5 -4
- package/transact/index.js +4 -22
- package/transact/index.mjs +4 -3
- package/transaction/transaction.js +2 -2
- package/transaction/transaction.js.map +1 -1
- package/transaction/transaction.mjs +2 -2
- package/transaction/transaction.mjs.map +1 -1
- package/transactions/app-call.d.ts +4 -3
- package/transactions/app-call.js +15 -15
- package/transactions/app-call.js.map +1 -1
- package/transactions/app-call.mjs +15 -15
- package/transactions/app-call.mjs.map +1 -1
- package/transactions/asset-config.d.ts +1 -1
- package/transactions/asset-config.js +1 -1
- package/transactions/asset-config.js.map +1 -1
- package/transactions/asset-config.mjs +1 -1
- package/transactions/asset-config.mjs.map +1 -1
- package/transactions/method-call.js +69 -77
- package/transactions/method-call.js.map +1 -1
- package/transactions/method-call.mjs +69 -77
- package/transactions/method-call.mjs.map +1 -1
- package/types/account-manager.d.ts +1 -1
- package/types/account-manager.js +3 -3
- package/types/account-manager.js.map +1 -1
- package/types/account-manager.mjs +3 -3
- package/types/account-manager.mjs.map +1 -1
- package/types/algorand-client-transaction-creator.d.ts +97 -83
- package/types/algorand-client-transaction-creator.js +8 -0
- package/types/algorand-client-transaction-creator.js.map +1 -1
- package/types/algorand-client-transaction-creator.mjs +8 -0
- package/types/algorand-client-transaction-creator.mjs.map +1 -1
- package/types/algorand-client-transaction-sender.d.ts +100 -86
- package/types/algorand-client-transaction-sender.js +8 -1
- package/types/algorand-client-transaction-sender.js.map +1 -1
- package/types/algorand-client-transaction-sender.mjs +8 -0
- package/types/algorand-client-transaction-sender.mjs.map +1 -1
- package/types/app-client.d.ts +265 -260
- package/types/app-client.js +0 -1
- package/types/app-client.js.map +1 -1
- package/types/app-deployer.js +1 -1
- package/types/app-deployer.js.map +1 -1
- package/types/app-deployer.mjs +1 -1
- package/types/app-deployer.mjs.map +1 -1
- package/types/app-factory.d.ts +91 -88
- package/types/app-manager.d.ts +3 -1
- package/types/app-manager.js +16 -10
- package/types/app-manager.js.map +1 -1
- package/types/app-manager.mjs +16 -10
- package/types/app-manager.mjs.map +1 -1
- package/types/app-spec.js +12 -5
- package/types/app-spec.js.map +1 -1
- package/types/app-spec.mjs +12 -5
- package/types/app-spec.mjs.map +1 -1
- package/types/asset-manager.js +1 -1
- package/types/asset-manager.js.map +1 -1
- package/types/asset-manager.mjs +1 -1
- package/types/asset-manager.mjs.map +1 -1
- package/types/composer.d.ts +9 -0
- package/types/composer.js +28 -13
- package/types/composer.js.map +1 -1
- package/types/composer.mjs +28 -12
- package/types/composer.mjs.map +1 -1
- package/types/kmd-account-manager.d.ts +1 -0
- package/types/kmd-account-manager.js +21 -10
- package/types/kmd-account-manager.js.map +1 -1
- package/types/kmd-account-manager.mjs +22 -11
- package/types/kmd-account-manager.mjs.map +1 -1
- package/types/testing.d.ts +2 -2
- package/packages/algod_client/src/models/application-local-reference.d.ts +0 -20
- package/packages/algod_client/src/models/application-local-reference.js +0 -23
- package/packages/algod_client/src/models/application-local-reference.js.map +0 -1
- package/packages/algod_client/src/models/application-local-reference.mjs +0 -23
- package/packages/algod_client/src/models/application-local-reference.mjs.map +0 -1
- package/packages/algod_client/src/models/asset-holding-reference.d.ts +0 -20
- package/packages/algod_client/src/models/asset-holding-reference.js +0 -23
- package/packages/algod_client/src/models/asset-holding-reference.js.map +0 -1
- package/packages/algod_client/src/models/asset-holding-reference.mjs +0 -23
- package/packages/algod_client/src/models/asset-holding-reference.mjs.map +0 -1
- package/packages/algod_client/src/models/box-reference.d.ts +0 -17
- package/packages/algod_client/src/models/box-reference.js +0 -23
- package/packages/algod_client/src/models/box-reference.js.map +0 -1
- package/packages/algod_client/src/models/box-reference.mjs +0 -23
- package/packages/algod_client/src/models/box-reference.mjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReadableAddress } from "../packages/common/src/address.js";
|
|
2
2
|
import { ABIValue } from "../packages/abi/src/abi-value.js";
|
|
3
3
|
import { ABIMethod } from "../packages/abi/src/abi-method.js";
|
|
4
|
-
import {
|
|
4
|
+
import { OnApplicationComplete, ResourceReference } from "../packages/transact/src/transactions/app-call.js";
|
|
5
5
|
import { Transaction } from "../packages/transact/src/transactions/transaction.js";
|
|
6
6
|
import { AddressWithTransactionSigner, SendingAddress, TransactionSigner } from "../packages/transact/src/signer.js";
|
|
7
7
|
import { AlgoAmount } from "./amount.js";
|
|
@@ -342,30 +342,32 @@ declare class AlgorandClientTransactionCreator {
|
|
|
342
342
|
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
343
343
|
* // already specified, but here for completeness
|
|
344
344
|
* maxFee: (3000).microAlgo(),
|
|
345
|
+
* rejectVersion: 1,
|
|
345
346
|
*})
|
|
346
347
|
* ```
|
|
347
348
|
* @returns The application create transaction
|
|
348
349
|
*/
|
|
349
350
|
appCreate: (params: {
|
|
350
|
-
|
|
351
|
-
note?: string | Uint8Array | undefined;
|
|
352
|
-
maxFee?: AlgoAmount | undefined;
|
|
351
|
+
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
353
352
|
sender: SendingAddress;
|
|
354
|
-
lease?: string | Uint8Array | undefined;
|
|
355
353
|
rekeyTo?: ReadableAddress | undefined;
|
|
356
|
-
|
|
357
|
-
|
|
354
|
+
note?: string | Uint8Array | undefined;
|
|
355
|
+
lease?: string | Uint8Array | undefined;
|
|
358
356
|
staticFee?: AlgoAmount | undefined;
|
|
359
357
|
extraFee?: AlgoAmount | undefined;
|
|
358
|
+
maxFee?: AlgoAmount | undefined;
|
|
360
359
|
validityWindow?: number | bigint | undefined;
|
|
361
360
|
firstValidRound?: bigint | undefined;
|
|
362
361
|
lastValidRound?: bigint | undefined;
|
|
362
|
+
onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
|
|
363
|
+
args?: Uint8Array[] | undefined;
|
|
363
364
|
accountReferences?: ReadableAddress[] | undefined;
|
|
364
365
|
appReferences?: bigint[] | undefined;
|
|
365
366
|
assetReferences?: bigint[] | undefined;
|
|
366
367
|
boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
|
|
367
|
-
accessReferences?:
|
|
368
|
+
accessReferences?: ResourceReference[] | undefined;
|
|
368
369
|
rejectVersion?: number | undefined;
|
|
370
|
+
appId?: 0 | undefined;
|
|
369
371
|
approvalProgram: string | Uint8Array;
|
|
370
372
|
clearStateProgram: string | Uint8Array;
|
|
371
373
|
schema?: {
|
|
@@ -408,6 +410,7 @@ declare class AlgorandClientTransactionCreator {
|
|
|
408
410
|
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
409
411
|
* // already specified, but here for completeness
|
|
410
412
|
* maxFee: (3000).microAlgo(),
|
|
413
|
+
* rejectVersion: 1,
|
|
411
414
|
*})
|
|
412
415
|
* ```
|
|
413
416
|
* @returns The application update transaction
|
|
@@ -431,7 +434,7 @@ declare class AlgorandClientTransactionCreator {
|
|
|
431
434
|
appReferences?: bigint[] | undefined;
|
|
432
435
|
assetReferences?: bigint[] | undefined;
|
|
433
436
|
boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
|
|
434
|
-
accessReferences?:
|
|
437
|
+
accessReferences?: ResourceReference[] | undefined;
|
|
435
438
|
rejectVersion?: number | undefined;
|
|
436
439
|
approvalProgram: string | Uint8Array;
|
|
437
440
|
clearStateProgram: string | Uint8Array;
|
|
@@ -466,6 +469,7 @@ declare class AlgorandClientTransactionCreator {
|
|
|
466
469
|
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
467
470
|
* // already specified, but here for completeness
|
|
468
471
|
* maxFee: (3000).microAlgo(),
|
|
472
|
+
* rejectVersion: 1,
|
|
469
473
|
*})
|
|
470
474
|
* ```
|
|
471
475
|
* @returns The application delete transaction
|
|
@@ -501,6 +505,7 @@ declare class AlgorandClientTransactionCreator {
|
|
|
501
505
|
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
502
506
|
* // already specified, but here for completeness
|
|
503
507
|
* maxFee: (3000).microAlgo(),
|
|
508
|
+
* rejectVersion: 1,
|
|
504
509
|
*})
|
|
505
510
|
* ```
|
|
506
511
|
* @returns The application call transaction
|
|
@@ -557,59 +562,62 @@ declare class AlgorandClientTransactionCreator {
|
|
|
557
562
|
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
558
563
|
* // already specified, but here for completeness
|
|
559
564
|
* maxFee: (3000).microAlgo(),
|
|
565
|
+
* rejectVersion: 1,
|
|
560
566
|
*})
|
|
561
567
|
* ```
|
|
562
568
|
* @returns The application ABI method create transaction
|
|
563
569
|
*/
|
|
564
570
|
appCreateMethodCall: (params: {
|
|
565
|
-
|
|
566
|
-
approvalProgram: string | Uint8Array;
|
|
567
|
-
clearStateProgram: string | Uint8Array;
|
|
568
|
-
extraProgramPages?: number | undefined;
|
|
569
|
-
maxFee?: AlgoAmount | undefined;
|
|
570
|
-
schema?: {
|
|
571
|
-
globalInts: number;
|
|
572
|
-
globalByteSlices: number;
|
|
573
|
-
localInts: number;
|
|
574
|
-
localByteSlices: number;
|
|
575
|
-
} | undefined;
|
|
571
|
+
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
576
572
|
sender: SendingAddress;
|
|
577
|
-
lease?: string | Uint8Array | undefined;
|
|
578
573
|
rekeyTo?: ReadableAddress | undefined;
|
|
579
|
-
|
|
580
|
-
|
|
574
|
+
note?: string | Uint8Array | undefined;
|
|
575
|
+
lease?: string | Uint8Array | undefined;
|
|
581
576
|
staticFee?: AlgoAmount | undefined;
|
|
582
577
|
extraFee?: AlgoAmount | undefined;
|
|
578
|
+
maxFee?: AlgoAmount | undefined;
|
|
583
579
|
validityWindow?: number | bigint | undefined;
|
|
584
580
|
firstValidRound?: bigint | undefined;
|
|
585
581
|
lastValidRound?: bigint | undefined;
|
|
582
|
+
appId?: 0 | undefined;
|
|
583
|
+
onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
|
|
586
584
|
accountReferences?: ReadableAddress[] | undefined;
|
|
587
585
|
appReferences?: bigint[] | undefined;
|
|
588
586
|
assetReferences?: bigint[] | undefined;
|
|
589
587
|
boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
|
|
590
|
-
accessReferences?:
|
|
588
|
+
accessReferences?: ResourceReference[] | undefined;
|
|
591
589
|
rejectVersion?: number | undefined;
|
|
590
|
+
approvalProgram: string | Uint8Array;
|
|
591
|
+
clearStateProgram: string | Uint8Array;
|
|
592
|
+
schema?: {
|
|
593
|
+
globalInts: number;
|
|
594
|
+
globalByteSlices: number;
|
|
595
|
+
localInts: number;
|
|
596
|
+
localByteSlices: number;
|
|
597
|
+
} | undefined;
|
|
598
|
+
extraProgramPages?: number | undefined;
|
|
592
599
|
method: ABIMethod;
|
|
593
|
-
args?: (
|
|
594
|
-
|
|
595
|
-
note?: string | Uint8Array | undefined;
|
|
596
|
-
maxFee?: AlgoAmount | undefined;
|
|
600
|
+
args?: (Transaction | Promise<Transaction> | ABIValue | TransactionWithSigner | AppMethodCall<{
|
|
601
|
+
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
597
602
|
sender: SendingAddress;
|
|
598
|
-
lease?: string | Uint8Array | undefined;
|
|
599
603
|
rekeyTo?: ReadableAddress | undefined;
|
|
600
|
-
|
|
601
|
-
|
|
604
|
+
note?: string | Uint8Array | undefined;
|
|
605
|
+
lease?: string | Uint8Array | undefined;
|
|
602
606
|
staticFee?: AlgoAmount | undefined;
|
|
603
607
|
extraFee?: AlgoAmount | undefined;
|
|
608
|
+
maxFee?: AlgoAmount | undefined;
|
|
604
609
|
validityWindow?: number | bigint | undefined;
|
|
605
610
|
firstValidRound?: bigint | undefined;
|
|
606
611
|
lastValidRound?: bigint | undefined;
|
|
612
|
+
onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
|
|
613
|
+
args?: Uint8Array[] | undefined;
|
|
607
614
|
accountReferences?: ReadableAddress[] | undefined;
|
|
608
615
|
appReferences?: bigint[] | undefined;
|
|
609
616
|
assetReferences?: bigint[] | undefined;
|
|
610
617
|
boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
|
|
611
|
-
accessReferences?:
|
|
618
|
+
accessReferences?: ResourceReference[] | undefined;
|
|
612
619
|
rejectVersion?: number | undefined;
|
|
620
|
+
appId?: 0 | undefined;
|
|
613
621
|
approvalProgram: string | Uint8Array;
|
|
614
622
|
clearStateProgram: string | Uint8Array;
|
|
615
623
|
schema?: {
|
|
@@ -638,7 +646,7 @@ declare class AlgorandClientTransactionCreator {
|
|
|
638
646
|
appReferences?: bigint[] | undefined;
|
|
639
647
|
assetReferences?: bigint[] | undefined;
|
|
640
648
|
boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
|
|
641
|
-
accessReferences?:
|
|
649
|
+
accessReferences?: ResourceReference[] | undefined;
|
|
642
650
|
rejectVersion?: number | undefined;
|
|
643
651
|
approvalProgram: string | Uint8Array;
|
|
644
652
|
clearStateProgram: string | Uint8Array;
|
|
@@ -688,53 +696,55 @@ declare class AlgorandClientTransactionCreator {
|
|
|
688
696
|
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
689
697
|
* // already specified, but here for completeness
|
|
690
698
|
* maxFee: (3000).microAlgo(),
|
|
699
|
+
* rejectVersion: 1,
|
|
691
700
|
*})
|
|
692
701
|
* ```
|
|
693
702
|
* @returns The application ABI method update transaction
|
|
694
703
|
*/
|
|
695
704
|
appUpdateMethodCall: (params: {
|
|
696
|
-
|
|
697
|
-
note?: string | Uint8Array | undefined;
|
|
698
|
-
approvalProgram: string | Uint8Array;
|
|
699
|
-
clearStateProgram: string | Uint8Array;
|
|
700
|
-
maxFee?: AlgoAmount | undefined;
|
|
705
|
+
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
701
706
|
sender: SendingAddress;
|
|
702
|
-
lease?: string | Uint8Array | undefined;
|
|
703
707
|
rekeyTo?: ReadableAddress | undefined;
|
|
704
|
-
|
|
705
|
-
|
|
708
|
+
note?: string | Uint8Array | undefined;
|
|
709
|
+
lease?: string | Uint8Array | undefined;
|
|
706
710
|
staticFee?: AlgoAmount | undefined;
|
|
707
711
|
extraFee?: AlgoAmount | undefined;
|
|
712
|
+
maxFee?: AlgoAmount | undefined;
|
|
708
713
|
validityWindow?: number | bigint | undefined;
|
|
709
714
|
firstValidRound?: bigint | undefined;
|
|
710
715
|
lastValidRound?: bigint | undefined;
|
|
716
|
+
appId: bigint;
|
|
717
|
+
onComplete?: OnApplicationComplete.UpdateApplication | undefined;
|
|
711
718
|
accountReferences?: ReadableAddress[] | undefined;
|
|
712
719
|
appReferences?: bigint[] | undefined;
|
|
713
720
|
assetReferences?: bigint[] | undefined;
|
|
714
721
|
boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
|
|
715
|
-
accessReferences?:
|
|
722
|
+
accessReferences?: ResourceReference[] | undefined;
|
|
716
723
|
rejectVersion?: number | undefined;
|
|
724
|
+
approvalProgram: string | Uint8Array;
|
|
725
|
+
clearStateProgram: string | Uint8Array;
|
|
717
726
|
method: ABIMethod;
|
|
718
|
-
args?: (
|
|
719
|
-
|
|
720
|
-
note?: string | Uint8Array | undefined;
|
|
721
|
-
maxFee?: AlgoAmount | undefined;
|
|
727
|
+
args?: (Transaction | Promise<Transaction> | ABIValue | TransactionWithSigner | AppMethodCall<{
|
|
728
|
+
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
722
729
|
sender: SendingAddress;
|
|
723
|
-
lease?: string | Uint8Array | undefined;
|
|
724
730
|
rekeyTo?: ReadableAddress | undefined;
|
|
725
|
-
|
|
726
|
-
|
|
731
|
+
note?: string | Uint8Array | undefined;
|
|
732
|
+
lease?: string | Uint8Array | undefined;
|
|
727
733
|
staticFee?: AlgoAmount | undefined;
|
|
728
734
|
extraFee?: AlgoAmount | undefined;
|
|
735
|
+
maxFee?: AlgoAmount | undefined;
|
|
729
736
|
validityWindow?: number | bigint | undefined;
|
|
730
737
|
firstValidRound?: bigint | undefined;
|
|
731
738
|
lastValidRound?: bigint | undefined;
|
|
739
|
+
onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
|
|
740
|
+
args?: Uint8Array[] | undefined;
|
|
732
741
|
accountReferences?: ReadableAddress[] | undefined;
|
|
733
742
|
appReferences?: bigint[] | undefined;
|
|
734
743
|
assetReferences?: bigint[] | undefined;
|
|
735
744
|
boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
|
|
736
|
-
accessReferences?:
|
|
745
|
+
accessReferences?: ResourceReference[] | undefined;
|
|
737
746
|
rejectVersion?: number | undefined;
|
|
747
|
+
appId?: 0 | undefined;
|
|
738
748
|
approvalProgram: string | Uint8Array;
|
|
739
749
|
clearStateProgram: string | Uint8Array;
|
|
740
750
|
schema?: {
|
|
@@ -763,7 +773,7 @@ declare class AlgorandClientTransactionCreator {
|
|
|
763
773
|
appReferences?: bigint[] | undefined;
|
|
764
774
|
assetReferences?: bigint[] | undefined;
|
|
765
775
|
boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
|
|
766
|
-
accessReferences?:
|
|
776
|
+
accessReferences?: ResourceReference[] | undefined;
|
|
767
777
|
rejectVersion?: number | undefined;
|
|
768
778
|
approvalProgram: string | Uint8Array;
|
|
769
779
|
clearStateProgram: string | Uint8Array;
|
|
@@ -811,51 +821,53 @@ declare class AlgorandClientTransactionCreator {
|
|
|
811
821
|
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
812
822
|
* // already specified, but here for completeness
|
|
813
823
|
* maxFee: (3000).microAlgo(),
|
|
824
|
+
* rejectVersion: 1,
|
|
814
825
|
*})
|
|
815
826
|
* ```
|
|
816
827
|
* @returns The application ABI method delete transaction
|
|
817
828
|
*/
|
|
818
829
|
appDeleteMethodCall: (params: {
|
|
819
|
-
|
|
820
|
-
note?: string | Uint8Array | undefined;
|
|
821
|
-
maxFee?: AlgoAmount | undefined;
|
|
830
|
+
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
822
831
|
sender: SendingAddress;
|
|
823
|
-
lease?: string | Uint8Array | undefined;
|
|
824
832
|
rekeyTo?: ReadableAddress | undefined;
|
|
825
|
-
|
|
826
|
-
|
|
833
|
+
note?: string | Uint8Array | undefined;
|
|
834
|
+
lease?: string | Uint8Array | undefined;
|
|
827
835
|
staticFee?: AlgoAmount | undefined;
|
|
828
836
|
extraFee?: AlgoAmount | undefined;
|
|
837
|
+
maxFee?: AlgoAmount | undefined;
|
|
829
838
|
validityWindow?: number | bigint | undefined;
|
|
830
839
|
firstValidRound?: bigint | undefined;
|
|
831
840
|
lastValidRound?: bigint | undefined;
|
|
841
|
+
appId: bigint;
|
|
842
|
+
onComplete?: OnApplicationComplete.DeleteApplication | undefined;
|
|
832
843
|
accountReferences?: ReadableAddress[] | undefined;
|
|
833
844
|
appReferences?: bigint[] | undefined;
|
|
834
845
|
assetReferences?: bigint[] | undefined;
|
|
835
846
|
boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
|
|
836
|
-
accessReferences?:
|
|
847
|
+
accessReferences?: ResourceReference[] | undefined;
|
|
837
848
|
rejectVersion?: number | undefined;
|
|
838
849
|
method: ABIMethod;
|
|
839
|
-
args?: (
|
|
840
|
-
|
|
841
|
-
note?: string | Uint8Array | undefined;
|
|
842
|
-
maxFee?: AlgoAmount | undefined;
|
|
850
|
+
args?: (Transaction | Promise<Transaction> | ABIValue | TransactionWithSigner | AppMethodCall<{
|
|
851
|
+
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
843
852
|
sender: SendingAddress;
|
|
844
|
-
lease?: string | Uint8Array | undefined;
|
|
845
853
|
rekeyTo?: ReadableAddress | undefined;
|
|
846
|
-
|
|
847
|
-
|
|
854
|
+
note?: string | Uint8Array | undefined;
|
|
855
|
+
lease?: string | Uint8Array | undefined;
|
|
848
856
|
staticFee?: AlgoAmount | undefined;
|
|
849
857
|
extraFee?: AlgoAmount | undefined;
|
|
858
|
+
maxFee?: AlgoAmount | undefined;
|
|
850
859
|
validityWindow?: number | bigint | undefined;
|
|
851
860
|
firstValidRound?: bigint | undefined;
|
|
852
861
|
lastValidRound?: bigint | undefined;
|
|
862
|
+
onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
|
|
863
|
+
args?: Uint8Array[] | undefined;
|
|
853
864
|
accountReferences?: ReadableAddress[] | undefined;
|
|
854
865
|
appReferences?: bigint[] | undefined;
|
|
855
866
|
assetReferences?: bigint[] | undefined;
|
|
856
867
|
boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
|
|
857
|
-
accessReferences?:
|
|
868
|
+
accessReferences?: ResourceReference[] | undefined;
|
|
858
869
|
rejectVersion?: number | undefined;
|
|
870
|
+
appId?: 0 | undefined;
|
|
859
871
|
approvalProgram: string | Uint8Array;
|
|
860
872
|
clearStateProgram: string | Uint8Array;
|
|
861
873
|
schema?: {
|
|
@@ -884,7 +896,7 @@ declare class AlgorandClientTransactionCreator {
|
|
|
884
896
|
appReferences?: bigint[] | undefined;
|
|
885
897
|
assetReferences?: bigint[] | undefined;
|
|
886
898
|
boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
|
|
887
|
-
accessReferences?:
|
|
899
|
+
accessReferences?: ResourceReference[] | undefined;
|
|
888
900
|
rejectVersion?: number | undefined;
|
|
889
901
|
approvalProgram: string | Uint8Array;
|
|
890
902
|
clearStateProgram: string | Uint8Array;
|
|
@@ -932,51 +944,53 @@ declare class AlgorandClientTransactionCreator {
|
|
|
932
944
|
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
933
945
|
* // already specified, but here for completeness
|
|
934
946
|
* maxFee: (3000).microAlgo(),
|
|
947
|
+
* rejectVersion: 1,
|
|
935
948
|
*})
|
|
936
949
|
* ```
|
|
937
950
|
* @returns The application ABI method call transaction
|
|
938
951
|
*/
|
|
939
952
|
appCallMethodCall: (params: {
|
|
940
|
-
|
|
941
|
-
note?: string | Uint8Array | undefined;
|
|
942
|
-
maxFee?: AlgoAmount | undefined;
|
|
953
|
+
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
943
954
|
sender: SendingAddress;
|
|
944
|
-
lease?: string | Uint8Array | undefined;
|
|
945
955
|
rekeyTo?: ReadableAddress | undefined;
|
|
946
|
-
|
|
947
|
-
|
|
956
|
+
note?: string | Uint8Array | undefined;
|
|
957
|
+
lease?: string | Uint8Array | undefined;
|
|
948
958
|
staticFee?: AlgoAmount | undefined;
|
|
949
959
|
extraFee?: AlgoAmount | undefined;
|
|
960
|
+
maxFee?: AlgoAmount | undefined;
|
|
950
961
|
validityWindow?: number | bigint | undefined;
|
|
951
962
|
firstValidRound?: bigint | undefined;
|
|
952
963
|
lastValidRound?: bigint | undefined;
|
|
964
|
+
appId: bigint;
|
|
965
|
+
onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.DeleteApplication | undefined;
|
|
953
966
|
accountReferences?: ReadableAddress[] | undefined;
|
|
954
967
|
appReferences?: bigint[] | undefined;
|
|
955
968
|
assetReferences?: bigint[] | undefined;
|
|
956
969
|
boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
|
|
957
|
-
accessReferences?:
|
|
970
|
+
accessReferences?: ResourceReference[] | undefined;
|
|
958
971
|
rejectVersion?: number | undefined;
|
|
959
972
|
method: ABIMethod;
|
|
960
|
-
args?: (
|
|
961
|
-
|
|
962
|
-
note?: string | Uint8Array | undefined;
|
|
963
|
-
maxFee?: AlgoAmount | undefined;
|
|
973
|
+
args?: (Transaction | Promise<Transaction> | ABIValue | TransactionWithSigner | AppMethodCall<{
|
|
974
|
+
signer?: AddressWithTransactionSigner | TransactionSigner | undefined;
|
|
964
975
|
sender: SendingAddress;
|
|
965
|
-
lease?: string | Uint8Array | undefined;
|
|
966
976
|
rekeyTo?: ReadableAddress | undefined;
|
|
967
|
-
|
|
968
|
-
|
|
977
|
+
note?: string | Uint8Array | undefined;
|
|
978
|
+
lease?: string | Uint8Array | undefined;
|
|
969
979
|
staticFee?: AlgoAmount | undefined;
|
|
970
980
|
extraFee?: AlgoAmount | undefined;
|
|
981
|
+
maxFee?: AlgoAmount | undefined;
|
|
971
982
|
validityWindow?: number | bigint | undefined;
|
|
972
983
|
firstValidRound?: bigint | undefined;
|
|
973
984
|
lastValidRound?: bigint | undefined;
|
|
985
|
+
onComplete?: OnApplicationComplete.NoOp | OnApplicationComplete.OptIn | OnApplicationComplete.CloseOut | OnApplicationComplete.UpdateApplication | OnApplicationComplete.DeleteApplication | undefined;
|
|
986
|
+
args?: Uint8Array[] | undefined;
|
|
974
987
|
accountReferences?: ReadableAddress[] | undefined;
|
|
975
988
|
appReferences?: bigint[] | undefined;
|
|
976
989
|
assetReferences?: bigint[] | undefined;
|
|
977
990
|
boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
|
|
978
|
-
accessReferences?:
|
|
991
|
+
accessReferences?: ResourceReference[] | undefined;
|
|
979
992
|
rejectVersion?: number | undefined;
|
|
993
|
+
appId?: 0 | undefined;
|
|
980
994
|
approvalProgram: string | Uint8Array;
|
|
981
995
|
clearStateProgram: string | Uint8Array;
|
|
982
996
|
schema?: {
|
|
@@ -1005,7 +1019,7 @@ declare class AlgorandClientTransactionCreator {
|
|
|
1005
1019
|
appReferences?: bigint[] | undefined;
|
|
1006
1020
|
assetReferences?: bigint[] | undefined;
|
|
1007
1021
|
boxReferences?: (BoxReference | BoxIdentifier)[] | undefined;
|
|
1008
|
-
accessReferences?:
|
|
1022
|
+
accessReferences?: ResourceReference[] | undefined;
|
|
1009
1023
|
rejectVersion?: number | undefined;
|
|
1010
1024
|
approvalProgram: string | Uint8Array;
|
|
1011
1025
|
clearStateProgram: string | Uint8Array;
|
|
@@ -337,6 +337,7 @@ var AlgorandClientTransactionCreator = class {
|
|
|
337
337
|
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
338
338
|
* // already specified, but here for completeness
|
|
339
339
|
* maxFee: (3000).microAlgo(),
|
|
340
|
+
* rejectVersion: 1,
|
|
340
341
|
*})
|
|
341
342
|
* ```
|
|
342
343
|
* @returns The application create transaction
|
|
@@ -374,6 +375,7 @@ var AlgorandClientTransactionCreator = class {
|
|
|
374
375
|
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
375
376
|
* // already specified, but here for completeness
|
|
376
377
|
* maxFee: (3000).microAlgo(),
|
|
378
|
+
* rejectVersion: 1,
|
|
377
379
|
*})
|
|
378
380
|
* ```
|
|
379
381
|
* @returns The application update transaction
|
|
@@ -409,6 +411,7 @@ var AlgorandClientTransactionCreator = class {
|
|
|
409
411
|
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
410
412
|
* // already specified, but here for completeness
|
|
411
413
|
* maxFee: (3000).microAlgo(),
|
|
414
|
+
* rejectVersion: 1,
|
|
412
415
|
*})
|
|
413
416
|
* ```
|
|
414
417
|
* @returns The application delete transaction
|
|
@@ -444,6 +447,7 @@ var AlgorandClientTransactionCreator = class {
|
|
|
444
447
|
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
445
448
|
* // already specified, but here for completeness
|
|
446
449
|
* maxFee: (3000).microAlgo(),
|
|
450
|
+
* rejectVersion: 1,
|
|
447
451
|
*})
|
|
448
452
|
* ```
|
|
449
453
|
* @returns The application call transaction
|
|
@@ -500,6 +504,7 @@ var AlgorandClientTransactionCreator = class {
|
|
|
500
504
|
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
501
505
|
* // already specified, but here for completeness
|
|
502
506
|
* maxFee: (3000).microAlgo(),
|
|
507
|
+
* rejectVersion: 1,
|
|
503
508
|
*})
|
|
504
509
|
* ```
|
|
505
510
|
* @returns The application ABI method create transaction
|
|
@@ -549,6 +554,7 @@ var AlgorandClientTransactionCreator = class {
|
|
|
549
554
|
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
550
555
|
* // already specified, but here for completeness
|
|
551
556
|
* maxFee: (3000).microAlgo(),
|
|
557
|
+
* rejectVersion: 1,
|
|
552
558
|
*})
|
|
553
559
|
* ```
|
|
554
560
|
* @returns The application ABI method update transaction
|
|
@@ -596,6 +602,7 @@ var AlgorandClientTransactionCreator = class {
|
|
|
596
602
|
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
597
603
|
* // already specified, but here for completeness
|
|
598
604
|
* maxFee: (3000).microAlgo(),
|
|
605
|
+
* rejectVersion: 1,
|
|
599
606
|
*})
|
|
600
607
|
* ```
|
|
601
608
|
* @returns The application ABI method delete transaction
|
|
@@ -643,6 +650,7 @@ var AlgorandClientTransactionCreator = class {
|
|
|
643
650
|
* // Max fee doesn't make sense with extraFee AND staticFee
|
|
644
651
|
* // already specified, but here for completeness
|
|
645
652
|
* maxFee: (3000).microAlgo(),
|
|
653
|
+
* rejectVersion: 1,
|
|
646
654
|
*})
|
|
647
655
|
* ```
|
|
648
656
|
* @returns The application ABI method call transaction
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"algorand-client-transaction-creator.js","names":[],"sources":["../../src/types/algorand-client-transaction-creator.ts"],"sourcesContent":["import { Transaction } from '@algorandfoundation/algokit-transact'\nimport { BuiltTransactions, TransactionComposer, TransactionComposerConfig } from './composer'\nimport { Expand } from './expand'\n\n/** Orchestrates creating transactions for `AlgorandClient`. */\nexport class AlgorandClientTransactionCreator {\n private _newGroup: () => TransactionComposer\n\n /**\n * Creates a new `AlgorandClientTransactionCreator`\n * @param newGroup A lambda that starts a new `TransactionComposer` transaction group\n * @example\n * ```typescript\n * const transactionCreator = new AlgorandClientTransactionCreator(() => new TransactionComposer())\n * ```\n */\n constructor(newGroup: (config?: TransactionComposerConfig) => TransactionComposer) {\n this._newGroup = newGroup\n }\n\n private _transaction<T>(c: (c: TransactionComposer) => (params: T) => TransactionComposer): (params: T) => Promise<Transaction> {\n return async (params: T) => {\n const composer = this._newGroup()\n const result = await c(composer).apply(composer, [params]).buildTransactions()\n return result.transactions.at(-1)!\n }\n }\n\n private _transactions<T>(\n c: (c: TransactionComposer) => (params: T) => TransactionComposer,\n ): (params: T) => Promise<Expand<BuiltTransactions>> {\n return async (params: T) => {\n const composer = this._newGroup()\n return await c(composer).apply(composer, [params]).buildTransactions()\n }\n }\n\n /**\n * Create a payment transaction to transfer Algo between accounts.\n * @param params The parameters for the payment transaction\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.payment({\n * sender: 'SENDERADDRESS',\n * receiver: 'RECEIVERADDRESS',\n * amount: (4).algo(),\n * })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.payment({\n * amount: (4).algo(),\n * receiver: 'RECEIVERADDRESS',\n * sender: 'SENDERADDRESS',\n * closeRemainderTo: 'CLOSEREMAINDERTOADDRESS',\n * lease: 'lease',\n * note: 'note',\n * // Use this with caution, it's generally better to use algorand.account.rekeyAccount\n * rekeyTo: 'REKEYTOADDRESS',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The payment transaction\n */\n payment = this._transaction((c) => c.addPayment)\n /** Create a create Algorand Standard Asset transaction.\n *\n * The account that sends this transaction will automatically be\n * opted in to the asset and will hold all units after creation.\n *\n * @param params The parameters for the asset creation transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.assetCreate({ sender: \"CREATORADDRESS\", total: 100n})\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.assetCreate({\n * sender: 'CREATORADDRESS',\n * total: 100n,\n * decimals: 2,\n * assetName: 'asset',\n * unitName: 'unit',\n * url: 'url',\n * metadataHash: 'metadataHash',\n * defaultFrozen: false,\n * manager: 'MANAGERADDRESS',\n * reserve: 'RESERVEADDRESS',\n * freeze: 'FREEZEADDRESS',\n * clawback: 'CLAWBACKADDRESS',\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset create transaction\n */\n assetCreate = this._transaction((c) => c.addAssetCreate)\n /** Create an asset config transaction to reconfigure an existing Algorand Standard Asset.\n *\n * **Note:** The manager, reserve, freeze, and clawback addresses\n * are immutably empty if they are not set. If manager is not set then\n * all fields are immutable from that point forward.\n *\n * @param params The parameters for the asset config transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.assetConfig({ sender: \"MANAGERADDRESS\", assetId: 123456n, manager: \"MANAGERADDRESS\" })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.assetConfig({\n * sender: 'MANAGERADDRESS',\n * assetId: 123456n,\n * manager: 'MANAGERADDRESS',\n * reserve: 'RESERVEADDRESS',\n * freeze: 'FREEZEADDRESS',\n * clawback: 'CLAWBACKADDRESS',\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset config transaction\n */\n assetConfig = this._transaction((c) => c.addAssetConfig)\n /** Create an Algorand Standard Asset freeze transaction.\n *\n * @param params The parameters for the asset freeze transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.assetFreeze({ sender: \"MANAGERADDRESS\", assetId: 123456n, account: \"ACCOUNTADDRESS\", frozen: true })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.assetFreeze({\n * sender: 'MANAGERADDRESS',\n * assetId: 123456n,\n * account: 'ACCOUNTADDRESS',\n * frozen: true,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset freeze transaction\n */\n assetFreeze = this._transaction((c) => c.addAssetFreeze)\n /** Create an Algorand Standard Asset destroy transaction.\n *\n * Created assets can be destroyed only by the asset manager account.\n * All of the assets must be owned by the creator of the asset before\n * the asset can be deleted.\n *\n * @param params The parameters for the asset destroy transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.assetDestroy({ sender: \"MANAGERADDRESS\", assetId: 123456n })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.assetDestroy({\n * sender: 'MANAGERADDRESS',\n * assetId: 123456n,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset destroy transaction\n */\n assetDestroy = this._transaction((c) => c.addAssetDestroy)\n /** Create an Algorand Standard Asset transfer transaction.\n *\n * @param params The parameters for the asset transfer transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.assetTransfer({ sender: \"HOLDERADDRESS\", assetId: 123456n, amount: 1n, receiver: \"RECEIVERADDRESS\" })\n * ```\n * @example Advanced example (with clawback)\n * ```typescript\n * await algorand.createTransaction.assetTransfer({\n * sender: 'CLAWBACKADDRESS',\n * assetId: 123456n,\n * amount: 1n,\n * receiver: 'RECEIVERADDRESS',\n * clawbackTarget: 'HOLDERADDRESS',\n * // This field needs to be used with caution\n * closeAssetTo: 'ADDRESSTOCLOSETO'\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The result of the asset transfer transaction\n */\n assetTransfer = this._transaction((c) => c.addAssetTransfer)\n /** Create an Algorand Standard Asset opt-in transaction.\n *\n * @param params The parameters for the asset opt-in transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.assetOptIn({ sender: \"SENDERADDRESS\", assetId: 123456n })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.assetOptIn({\n * sender: 'SENDERADDRESS',\n * assetId: 123456n,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset opt-in transaction\n */\n assetOptIn = this._transaction((c) => c.addAssetOptIn)\n /** Create an asset opt-out transaction.\n *\n * *Note:* If the account has a balance of the asset,\n * it will lose those assets\n *\n * @param params The parameters for the asset opt-out transaction\n *\n * @example Basic example (without creator, will be retrieved from algod)\n * ```typescript\n * await algorand.createTransaction.assetOptOut({ sender: \"SENDERADDRESS\", assetId: 123456n, ensureZeroBalance: true })\n * ```\n * @example Basic example (with creator)\n * ```typescript\n * await algorand.createTransaction.assetOptOut({ sender: \"SENDERADDRESS\", creator: \"CREATORADDRESS\", assetId: 123456n, ensureZeroBalance: true })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.assetOptOut({\n * sender: 'SENDERADDRESS',\n * assetId: 123456n,\n * creator: 'CREATORADDRESS',\n * ensureZeroBalance: true,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset opt-out transaction\n */\n assetOptOut = this._transaction((c) => c.addAssetOptOut)\n /** Create an application create transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app creation transaction\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.appCreate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.appCreate({\n * sender: 'CREATORADDRESS',\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * schema: {\n * globalInts: 1,\n * globalByteSlices: 2,\n * localInts: 3,\n * localByteSlices: 4\n * },\n * extraProgramPages: 1,\n * onComplete: OnApplicationComplete.OptIn,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * accessReferences: [{ appId: 1234n }]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n *})\n * ```\n * @returns The application create transaction\n */\n appCreate = this._transaction((c) => c.addAppCreate)\n /** Create an application update transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app update transaction\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.appUpdate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.appUpdate({\n * sender: 'CREATORADDRESS',\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * onComplete: OnApplicationComplete.UpdateApplication,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * accessReferences: [{ appId: 1234n }]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n *})\n * ```\n * @returns The application update transaction\n */\n appUpdate = this._transaction((c) => c.addAppUpdate)\n /** Create an application delete transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app deletion transaction\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.appDelete({ sender: 'CREATORADDRESS' })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.appDelete({\n * sender: 'CREATORADDRESS',\n * onComplete: OnApplicationComplete.DeleteApplication,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * accessReferences: [{ appId: 1234n }]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n *})\n * ```\n * @returns The application delete transaction\n */\n appDelete = this._transaction((c) => c.addAppDelete)\n /** Create an application call transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app call transaction\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.appCall({ sender: 'CREATORADDRESS' })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.appCall({\n * sender: 'CREATORADDRESS',\n * onComplete: OnApplicationComplete.OptIn,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * accessReferences: [{ appId: 1234n }]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n *})\n * ```\n * @returns The application call transaction\n */\n appCall = this._transaction((c) => c.addAppCall)\n /** Create an application create call with ABI method call transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app creation transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.createTransaction.appCreateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: [\"arg1_value\"] })\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.createTransaction.appCreateMethodCall({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * schema: {\n * globalInts: 1,\n * globalByteSlices: 2,\n * localInts: 3,\n * localByteSlices: 4\n * },\n * extraProgramPages: 1,\n * onComplete: OnApplicationComplete.OptIn,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * accessReferences: [{ appId: 1234n }]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n *})\n * ```\n * @returns The application ABI method create transaction\n */\n appCreateMethodCall = this._transactions((c) => c.addAppCreateMethodCall)\n /** Create an application update call with ABI method call transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app update transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.createTransaction.appUpdateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: [\"arg1_value\"] })\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.createTransaction.appUpdateMethodCall({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * onComplete: OnApplicationComplete.UpdateApplication,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * accessReferences: [{ appId: 1234n }]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n *})\n * ```\n * @returns The application ABI method update transaction\n */\n appUpdateMethodCall = this._transactions((c) => c.addAppUpdateMethodCall)\n /** Create an application delete call with ABI method call transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app deletion transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.createTransaction.appDeleteMethodCall({ sender: 'CREATORADDRESS', method: method, args: [\"arg1_value\"] })\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.createTransaction.appDeleteMethodCall({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * onComplete: OnApplicationComplete.DeleteApplication,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * accessReferences: [{ appId: 1234n }]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n *})\n * ```\n * @returns The application ABI method delete transaction\n */\n appDeleteMethodCall = this._transactions((c) => c.addAppDeleteMethodCall)\n /** Create an application call with ABI method call transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app call transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.createTransaction.appCallMethodCall({ sender: 'CREATORADDRESS', method: method, args: [\"arg1_value\"] })\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.createTransaction.appCallMethodCall({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * onComplete: OnApplicationComplete.OptIn,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * accessReferences: [{ appId: 1234n }]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n *})\n * ```\n * @returns The application ABI method call transaction\n */\n appCallMethodCall = this._transactions((c) => c.addAppCallMethodCall)\n /**\n * Create an online key registration transaction.\n * @param params The parameters for the key registration transaction\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.onlineKeyRegistration({\n * sender: 'SENDERADDRESS',\n * voteKey: Uint8Array.from(Buffer.from(\"voteKeyBase64\", 'base64')),\n * selectionKey: Uint8Array.from(Buffer.from(\"selectionKeyBase64\", 'base64')),\n * stateProofKey: Uint8Array.from(Buffer.from(\"stateProofKeyBase64\", 'base64')),\n * voteFirst: 1n,\n * voteLast: 1000n,\n * voteKeyDilution: 1n,\n * })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.onlineKeyRegistration({\n * sender: 'SENDERADDRESS',\n * voteKey: Uint8Array.from(Buffer.from(\"voteKeyBase64\", 'base64')),\n * selectionKey: Uint8Array.from(Buffer.from(\"selectionKeyBase64\", 'base64')),\n * stateProofKey: Uint8Array.from(Buffer.from(\"stateProofKeyBase64\", 'base64')),\n * voteFirst: 1n,\n * voteLast: 1000n,\n * voteKeyDilution: 1n,\n * lease: 'lease',\n * note: 'note',\n * // Use this with caution, it's generally better to use algorand.account.rekeyAccount\n * rekeyTo: 'REKEYTOADDRESS',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The online key registration transaction\n */\n onlineKeyRegistration = this._transaction((c) => c.addOnlineKeyRegistration)\n /**\n * Create an offline key registration transaction.\n * @param params The parameters for the key registration transaction\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.offlineKeyRegistration({\n * sender: 'SENDERADDRESS',\n * })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.offlineKeyRegistration({\n * sender: 'SENDERADDRESS',\n * lease: 'lease',\n * note: 'note',\n * // Use this with caution, it's generally better to use algorand.account.rekeyAccount\n * rekeyTo: 'REKEYTOADDRESS',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The offline key registration transaction\n */\n offlineKeyRegistration = this._transaction((c) => c.addOfflineKeyRegistration)\n}\n"],"mappings":";;;AAKA,IAAa,mCAAb,MAA8C;CAC5C,AAAQ;;;;;;;;;CAUR,YAAY,UAAuE;AACjF,OAAK,YAAY;;CAGnB,AAAQ,aAAgB,GAAwG;AAC9H,SAAO,OAAO,WAAc;GAC1B,MAAM,WAAW,KAAK,WAAW;AAEjC,WADe,MAAM,EAAE,SAAS,CAAC,MAAM,UAAU,CAAC,OAAO,CAAC,CAAC,mBAAmB,EAChE,aAAa,GAAG,GAAG;;;CAIrC,AAAQ,cACN,GACmD;AACnD,SAAO,OAAO,WAAc;GAC1B,MAAM,WAAW,KAAK,WAAW;AACjC,UAAO,MAAM,EAAE,SAAS,CAAC,MAAM,UAAU,CAAC,OAAO,CAAC,CAAC,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsC1E,UAAU,KAAK,cAAc,MAAM,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyChD,cAAc,KAAK,cAAc,MAAM,EAAE,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCxD,cAAc,KAAK,cAAc,MAAM,EAAE,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BxD,cAAc,KAAK,cAAc,MAAM,EAAE,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCxD,eAAe,KAAK,cAAc,MAAM,EAAE,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiC1D,gBAAgB,KAAK,cAAc,MAAM,EAAE,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4B5D,aAAa,KAAK,cAAc,MAAM,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCtD,cAAc,KAAK,cAAc,MAAM,EAAE,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CxD,YAAY,KAAK,cAAc,MAAM,EAAE,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCpD,YAAY,KAAK,cAAc,MAAM,EAAE,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCpD,YAAY,KAAK,cAAc,MAAM,EAAE,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCpD,UAAU,KAAK,cAAc,MAAM,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDhD,sBAAsB,KAAK,eAAe,MAAM,EAAE,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiDzE,sBAAsB,KAAK,eAAe,MAAM,EAAE,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+CzE,sBAAsB,KAAK,eAAe,MAAM,EAAE,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+CzE,oBAAoB,KAAK,eAAe,MAAM,EAAE,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0CrE,wBAAwB,KAAK,cAAc,MAAM,EAAE,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8B5E,yBAAyB,KAAK,cAAc,MAAM,EAAE,0BAA0B"}
|
|
1
|
+
{"version":3,"file":"algorand-client-transaction-creator.js","names":[],"sources":["../../src/types/algorand-client-transaction-creator.ts"],"sourcesContent":["import { Transaction } from '@algorandfoundation/algokit-transact'\nimport { BuiltTransactions, TransactionComposer, TransactionComposerConfig } from './composer'\nimport { Expand } from './expand'\n\n/** Orchestrates creating transactions for `AlgorandClient`. */\nexport class AlgorandClientTransactionCreator {\n private _newGroup: () => TransactionComposer\n\n /**\n * Creates a new `AlgorandClientTransactionCreator`\n * @param newGroup A lambda that starts a new `TransactionComposer` transaction group\n * @example\n * ```typescript\n * const transactionCreator = new AlgorandClientTransactionCreator(() => new TransactionComposer())\n * ```\n */\n constructor(newGroup: (config?: TransactionComposerConfig) => TransactionComposer) {\n this._newGroup = newGroup\n }\n\n private _transaction<T>(c: (c: TransactionComposer) => (params: T) => TransactionComposer): (params: T) => Promise<Transaction> {\n return async (params: T) => {\n const composer = this._newGroup()\n const result = await c(composer).apply(composer, [params]).buildTransactions()\n return result.transactions.at(-1)!\n }\n }\n\n private _transactions<T>(\n c: (c: TransactionComposer) => (params: T) => TransactionComposer,\n ): (params: T) => Promise<Expand<BuiltTransactions>> {\n return async (params: T) => {\n const composer = this._newGroup()\n return await c(composer).apply(composer, [params]).buildTransactions()\n }\n }\n\n /**\n * Create a payment transaction to transfer Algo between accounts.\n * @param params The parameters for the payment transaction\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.payment({\n * sender: 'SENDERADDRESS',\n * receiver: 'RECEIVERADDRESS',\n * amount: (4).algo(),\n * })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.payment({\n * amount: (4).algo(),\n * receiver: 'RECEIVERADDRESS',\n * sender: 'SENDERADDRESS',\n * closeRemainderTo: 'CLOSEREMAINDERTOADDRESS',\n * lease: 'lease',\n * note: 'note',\n * // Use this with caution, it's generally better to use algorand.account.rekeyAccount\n * rekeyTo: 'REKEYTOADDRESS',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The payment transaction\n */\n payment = this._transaction((c) => c.addPayment)\n /** Create a create Algorand Standard Asset transaction.\n *\n * The account that sends this transaction will automatically be\n * opted in to the asset and will hold all units after creation.\n *\n * @param params The parameters for the asset creation transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.assetCreate({ sender: \"CREATORADDRESS\", total: 100n})\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.assetCreate({\n * sender: 'CREATORADDRESS',\n * total: 100n,\n * decimals: 2,\n * assetName: 'asset',\n * unitName: 'unit',\n * url: 'url',\n * metadataHash: 'metadataHash',\n * defaultFrozen: false,\n * manager: 'MANAGERADDRESS',\n * reserve: 'RESERVEADDRESS',\n * freeze: 'FREEZEADDRESS',\n * clawback: 'CLAWBACKADDRESS',\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset create transaction\n */\n assetCreate = this._transaction((c) => c.addAssetCreate)\n /** Create an asset config transaction to reconfigure an existing Algorand Standard Asset.\n *\n * **Note:** The manager, reserve, freeze, and clawback addresses\n * are immutably empty if they are not set. If manager is not set then\n * all fields are immutable from that point forward.\n *\n * @param params The parameters for the asset config transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.assetConfig({ sender: \"MANAGERADDRESS\", assetId: 123456n, manager: \"MANAGERADDRESS\" })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.assetConfig({\n * sender: 'MANAGERADDRESS',\n * assetId: 123456n,\n * manager: 'MANAGERADDRESS',\n * reserve: 'RESERVEADDRESS',\n * freeze: 'FREEZEADDRESS',\n * clawback: 'CLAWBACKADDRESS',\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset config transaction\n */\n assetConfig = this._transaction((c) => c.addAssetConfig)\n /** Create an Algorand Standard Asset freeze transaction.\n *\n * @param params The parameters for the asset freeze transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.assetFreeze({ sender: \"MANAGERADDRESS\", assetId: 123456n, account: \"ACCOUNTADDRESS\", frozen: true })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.assetFreeze({\n * sender: 'MANAGERADDRESS',\n * assetId: 123456n,\n * account: 'ACCOUNTADDRESS',\n * frozen: true,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset freeze transaction\n */\n assetFreeze = this._transaction((c) => c.addAssetFreeze)\n /** Create an Algorand Standard Asset destroy transaction.\n *\n * Created assets can be destroyed only by the asset manager account.\n * All of the assets must be owned by the creator of the asset before\n * the asset can be deleted.\n *\n * @param params The parameters for the asset destroy transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.assetDestroy({ sender: \"MANAGERADDRESS\", assetId: 123456n })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.assetDestroy({\n * sender: 'MANAGERADDRESS',\n * assetId: 123456n,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset destroy transaction\n */\n assetDestroy = this._transaction((c) => c.addAssetDestroy)\n /** Create an Algorand Standard Asset transfer transaction.\n *\n * @param params The parameters for the asset transfer transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.assetTransfer({ sender: \"HOLDERADDRESS\", assetId: 123456n, amount: 1n, receiver: \"RECEIVERADDRESS\" })\n * ```\n * @example Advanced example (with clawback)\n * ```typescript\n * await algorand.createTransaction.assetTransfer({\n * sender: 'CLAWBACKADDRESS',\n * assetId: 123456n,\n * amount: 1n,\n * receiver: 'RECEIVERADDRESS',\n * clawbackTarget: 'HOLDERADDRESS',\n * // This field needs to be used with caution\n * closeAssetTo: 'ADDRESSTOCLOSETO'\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The result of the asset transfer transaction\n */\n assetTransfer = this._transaction((c) => c.addAssetTransfer)\n /** Create an Algorand Standard Asset opt-in transaction.\n *\n * @param params The parameters for the asset opt-in transaction\n *\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.assetOptIn({ sender: \"SENDERADDRESS\", assetId: 123456n })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.assetOptIn({\n * sender: 'SENDERADDRESS',\n * assetId: 123456n,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset opt-in transaction\n */\n assetOptIn = this._transaction((c) => c.addAssetOptIn)\n /** Create an asset opt-out transaction.\n *\n * *Note:* If the account has a balance of the asset,\n * it will lose those assets\n *\n * @param params The parameters for the asset opt-out transaction\n *\n * @example Basic example (without creator, will be retrieved from algod)\n * ```typescript\n * await algorand.createTransaction.assetOptOut({ sender: \"SENDERADDRESS\", assetId: 123456n, ensureZeroBalance: true })\n * ```\n * @example Basic example (with creator)\n * ```typescript\n * await algorand.createTransaction.assetOptOut({ sender: \"SENDERADDRESS\", creator: \"CREATORADDRESS\", assetId: 123456n, ensureZeroBalance: true })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.assetOptOut({\n * sender: 'SENDERADDRESS',\n * assetId: 123456n,\n * creator: 'CREATORADDRESS',\n * ensureZeroBalance: true,\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The asset opt-out transaction\n */\n assetOptOut = this._transaction((c) => c.addAssetOptOut)\n /** Create an application create transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app creation transaction\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.appCreate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.appCreate({\n * sender: 'CREATORADDRESS',\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * schema: {\n * globalInts: 1,\n * globalByteSlices: 2,\n * localInts: 3,\n * localByteSlices: 4\n * },\n * extraProgramPages: 1,\n * onComplete: OnApplicationComplete.OptIn,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * accessReferences: [{ appId: 1234n }]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * rejectVersion: 1,\n *})\n * ```\n * @returns The application create transaction\n */\n appCreate = this._transaction((c) => c.addAppCreate)\n /** Create an application update transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app update transaction\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.appUpdate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.appUpdate({\n * sender: 'CREATORADDRESS',\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * onComplete: OnApplicationComplete.UpdateApplication,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * accessReferences: [{ appId: 1234n }]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * rejectVersion: 1,\n *})\n * ```\n * @returns The application update transaction\n */\n appUpdate = this._transaction((c) => c.addAppUpdate)\n /** Create an application delete transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app deletion transaction\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.appDelete({ sender: 'CREATORADDRESS' })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.appDelete({\n * sender: 'CREATORADDRESS',\n * onComplete: OnApplicationComplete.DeleteApplication,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * accessReferences: [{ appId: 1234n }]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * rejectVersion: 1,\n *})\n * ```\n * @returns The application delete transaction\n */\n appDelete = this._transaction((c) => c.addAppDelete)\n /** Create an application call transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app call transaction\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.appCall({ sender: 'CREATORADDRESS' })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.appCall({\n * sender: 'CREATORADDRESS',\n * onComplete: OnApplicationComplete.OptIn,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * accessReferences: [{ appId: 1234n }]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * rejectVersion: 1,\n *})\n * ```\n * @returns The application call transaction\n */\n appCall = this._transaction((c) => c.addAppCall)\n /** Create an application create call with ABI method call transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app creation transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.createTransaction.appCreateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: [\"arg1_value\"] })\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.createTransaction.appCreateMethodCall({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * schema: {\n * globalInts: 1,\n * globalByteSlices: 2,\n * localInts: 3,\n * localByteSlices: 4\n * },\n * extraProgramPages: 1,\n * onComplete: OnApplicationComplete.OptIn,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * accessReferences: [{ appId: 1234n }]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * rejectVersion: 1,\n *})\n * ```\n * @returns The application ABI method create transaction\n */\n appCreateMethodCall = this._transactions((c) => c.addAppCreateMethodCall)\n /** Create an application update call with ABI method call transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app update transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.createTransaction.appUpdateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: [\"arg1_value\"] })\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.createTransaction.appUpdateMethodCall({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * approvalProgram: \"TEALCODE\",\n * clearStateProgram: \"TEALCODE\",\n * onComplete: OnApplicationComplete.UpdateApplication,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * accessReferences: [{ appId: 1234n }]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * rejectVersion: 1,\n *})\n * ```\n * @returns The application ABI method update transaction\n */\n appUpdateMethodCall = this._transactions((c) => c.addAppUpdateMethodCall)\n /** Create an application delete call with ABI method call transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app deletion transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.createTransaction.appDeleteMethodCall({ sender: 'CREATORADDRESS', method: method, args: [\"arg1_value\"] })\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.createTransaction.appDeleteMethodCall({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * onComplete: OnApplicationComplete.DeleteApplication,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * accessReferences: [{ appId: 1234n }]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * rejectVersion: 1,\n *})\n * ```\n * @returns The application ABI method delete transaction\n */\n appDeleteMethodCall = this._transactions((c) => c.addAppDeleteMethodCall)\n /** Create an application call with ABI method call transaction.\n *\n * Note: you may prefer to use `algorand.client` to get an app client for more advanced functionality.\n *\n * @param params The parameters for the app call transaction\n * @example Basic example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.createTransaction.appCallMethodCall({ sender: 'CREATORADDRESS', method: method, args: [\"arg1_value\"] })\n * ```\n * @example Advanced example\n * ```typescript\n * const method = new ABIMethod({\n * name: 'method',\n * args: [{ name: 'arg1', type: 'string' }],\n * returns: { type: 'string' },\n * })\n * await algorand.createTransaction.appCallMethodCall({\n * sender: 'CREATORADDRESS',\n * method: method,\n * args: [\"arg1_value\"],\n * onComplete: OnApplicationComplete.OptIn,\n * args: [new Uint8Array(1, 2, 3, 4)]\n * accountReferences: [\"ACCOUNT_1\"]\n * appReferences: [123n, 1234n]\n * assetReferences: [12345n]\n * boxReferences: [\"box1\", {appId: 1234n, name: \"box2\"}]\n * accessReferences: [{ appId: 1234n }]\n * lease: 'lease',\n * note: 'note',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * rejectVersion: 1,\n *})\n * ```\n * @returns The application ABI method call transaction\n */\n appCallMethodCall = this._transactions((c) => c.addAppCallMethodCall)\n /**\n * Create an online key registration transaction.\n * @param params The parameters for the key registration transaction\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.onlineKeyRegistration({\n * sender: 'SENDERADDRESS',\n * voteKey: Uint8Array.from(Buffer.from(\"voteKeyBase64\", 'base64')),\n * selectionKey: Uint8Array.from(Buffer.from(\"selectionKeyBase64\", 'base64')),\n * stateProofKey: Uint8Array.from(Buffer.from(\"stateProofKeyBase64\", 'base64')),\n * voteFirst: 1n,\n * voteLast: 1000n,\n * voteKeyDilution: 1n,\n * })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.onlineKeyRegistration({\n * sender: 'SENDERADDRESS',\n * voteKey: Uint8Array.from(Buffer.from(\"voteKeyBase64\", 'base64')),\n * selectionKey: Uint8Array.from(Buffer.from(\"selectionKeyBase64\", 'base64')),\n * stateProofKey: Uint8Array.from(Buffer.from(\"stateProofKeyBase64\", 'base64')),\n * voteFirst: 1n,\n * voteLast: 1000n,\n * voteKeyDilution: 1n,\n * lease: 'lease',\n * note: 'note',\n * // Use this with caution, it's generally better to use algorand.account.rekeyAccount\n * rekeyTo: 'REKEYTOADDRESS',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The online key registration transaction\n */\n onlineKeyRegistration = this._transaction((c) => c.addOnlineKeyRegistration)\n /**\n * Create an offline key registration transaction.\n * @param params The parameters for the key registration transaction\n * @example Basic example\n * ```typescript\n * await algorand.createTransaction.offlineKeyRegistration({\n * sender: 'SENDERADDRESS',\n * })\n * ```\n * @example Advanced example\n * ```typescript\n * await algorand.createTransaction.offlineKeyRegistration({\n * sender: 'SENDERADDRESS',\n * lease: 'lease',\n * note: 'note',\n * // Use this with caution, it's generally better to use algorand.account.rekeyAccount\n * rekeyTo: 'REKEYTOADDRESS',\n * // You wouldn't normally set this field\n * firstValidRound: 1000n,\n * validityWindow: 10,\n * extraFee: (1000).microAlgo(),\n * staticFee: (1000).microAlgo(),\n * // Max fee doesn't make sense with extraFee AND staticFee\n * // already specified, but here for completeness\n * maxFee: (3000).microAlgo(),\n * })\n * ```\n * @returns The offline key registration transaction\n */\n offlineKeyRegistration = this._transaction((c) => c.addOfflineKeyRegistration)\n}\n"],"mappings":";;;AAKA,IAAa,mCAAb,MAA8C;CAC5C,AAAQ;;;;;;;;;CAUR,YAAY,UAAuE;AACjF,OAAK,YAAY;;CAGnB,AAAQ,aAAgB,GAAwG;AAC9H,SAAO,OAAO,WAAc;GAC1B,MAAM,WAAW,KAAK,WAAW;AAEjC,WADe,MAAM,EAAE,SAAS,CAAC,MAAM,UAAU,CAAC,OAAO,CAAC,CAAC,mBAAmB,EAChE,aAAa,GAAG,GAAG;;;CAIrC,AAAQ,cACN,GACmD;AACnD,SAAO,OAAO,WAAc;GAC1B,MAAM,WAAW,KAAK,WAAW;AACjC,UAAO,MAAM,EAAE,SAAS,CAAC,MAAM,UAAU,CAAC,OAAO,CAAC,CAAC,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsC1E,UAAU,KAAK,cAAc,MAAM,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyChD,cAAc,KAAK,cAAc,MAAM,EAAE,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCxD,cAAc,KAAK,cAAc,MAAM,EAAE,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BxD,cAAc,KAAK,cAAc,MAAM,EAAE,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCxD,eAAe,KAAK,cAAc,MAAM,EAAE,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiC1D,gBAAgB,KAAK,cAAc,MAAM,EAAE,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4B5D,aAAa,KAAK,cAAc,MAAM,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqCtD,cAAc,KAAK,cAAc,MAAM,EAAE,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6CxD,YAAY,KAAK,cAAc,MAAM,EAAE,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCpD,YAAY,KAAK,cAAc,MAAM,EAAE,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCpD,YAAY,KAAK,cAAc,MAAM,EAAE,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoCpD,UAAU,KAAK,cAAc,MAAM,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyDhD,sBAAsB,KAAK,eAAe,MAAM,EAAE,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkDzE,sBAAsB,KAAK,eAAe,MAAM,EAAE,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDzE,sBAAsB,KAAK,eAAe,MAAM,EAAE,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDzE,oBAAoB,KAAK,eAAe,MAAM,EAAE,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0CrE,wBAAwB,KAAK,cAAc,MAAM,EAAE,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8B5E,yBAAyB,KAAK,cAAc,MAAM,EAAE,0BAA0B"}
|