Skip to content

types/composer

@algorandfoundation/algokit-utils / types/composer

Ƭ AppCallMethodCall: AppMethodCall<AppMethodCallParams>

Parameters to define an ABI method call transaction.

src/types/composer.ts:426


Ƭ AppCallParams: CommonAppCallParams & { onComplete?: Exclude<algosdk.OnApplicationComplete, algosdk.OnApplicationComplete.UpdateApplicationOC> }

Parameters to define an application call transaction.

src/types/composer.ts:402


Ƭ AppCreateMethodCall: AppMethodCall<AppCreateParams>

Parameters to define an ABI method call create transaction.

src/types/composer.ts:420


Ƭ AppCreateParams: Expand<Omit<CommonAppCallParams, "appId"> & { approvalProgram: string | Uint8Array ; clearStateProgram: string | Uint8Array ; extraProgramPages?: number ; onComplete?: Exclude<algosdk.OnApplicationComplete, algosdk.OnApplicationComplete.ClearStateOC> ; schema?: { globalByteSlices: number ; globalInts: number ; localByteSlices: number ; localInts: number } }>

Parameters to define an app create transaction

src/types/composer.ts:365


Ƭ AppDeleteMethodCall: AppMethodCall<AppDeleteParams>

Parameters to define an ABI method call delete transaction.

src/types/composer.ts:424


Ƭ AppDeleteParams: CommonAppCallParams & { onComplete?: algosdk.OnApplicationComplete.DeleteApplicationOC }

Parameters to define an application delete call transaction.

src/types/composer.ts:415


Ƭ AppMethodCall<T>: Expand<Omit<T, "args">> & { args?: (algosdk.ABIValue | TransactionWithSigner | Transaction | Promise<Transaction> | AppMethodCall<AppCreateParams> | AppMethodCall<AppUpdateParams> | AppMethodCall<AppMethodCallParams> | undefined)[] ; method: algosdk.ABIMethod }

Parameters to define an ABI method call.

Name
T

src/types/composer.ts:439


Ƭ AppMethodCallParams: CommonAppCallParams & { onComplete?: Exclude<algosdk.OnApplicationComplete, algosdk.OnApplicationComplete.UpdateApplicationOC | algosdk.OnApplicationComplete.ClearStateOC> }

Common parameters to define an ABI method call transaction.

src/types/composer.ts:407


Ƭ AppMethodCallTransactionArgument: TransactionWithSigner | Transaction | Promise<Transaction> | AppMethodCall<AppCreateParams> | AppMethodCall<AppUpdateParams> | AppMethodCall<AppMethodCallParams>

Types that can be used to define a transaction argument for an ABI call transaction.

src/types/composer.ts:429


Ƭ AppUpdateMethodCall: AppMethodCall<AppUpdateParams>

Parameters to define an ABI method call update transaction.

src/types/composer.ts:422


Ƭ AppUpdateParams: Expand<CommonAppCallParams & { approvalProgram: string | Uint8Array ; clearStateProgram: string | Uint8Array ; onComplete?: algosdk.OnApplicationComplete.UpdateApplicationOC }>

Parameters to define an app update transaction

src/types/composer.ts:391


Ƭ AssetConfigParams: CommonTransactionParams & { assetId: bigint ; clawback?: string | Address ; freeze?: string | Address ; manager: string | Address | undefined ; reserve?: string | Address }

Parameters to define an asset reconfiguration transaction.

Note: The manager, reserve, freeze, and clawback addresses are immutably empty if they are not set. If manager is not set then all fields are immutable from that point forward.

src/types/composer.ts:218


Ƭ AssetCreateParams: CommonTransactionParams & { assetName?: string ; clawback?: string | Address ; decimals?: number ; defaultFrozen?: boolean ; freeze?: string | Address ; manager?: string | Address ; metadataHash?: string | Uint8Array ; reserve?: string | Address ; total: bigint ; unitName?: string ; url?: string }

Parameters to define an asset create transaction.

The account that sends this transaction will automatically be opted in to the asset and will hold all units after creation.

src/types/composer.ts:102


Ƭ AssetDestroyParams: CommonTransactionParams & { assetId: bigint }

Parameters to define an asset destroy transaction.

Created assets can be destroyed only by the asset manager account. All of the assets must be owned by the creator of the asset before the asset can be deleted.

src/types/composer.ts:276


Ƭ AssetFreezeParams: CommonTransactionParams & { account: string | Address ; assetId: bigint ; frozen: boolean }

Parameters to define an asset freeze transaction.

src/types/composer.ts:263


Ƭ AssetOptInParams: CommonTransactionParams & { assetId: bigint }

Parameters to define an asset opt-in transaction.

src/types/composer.ts:304


Ƭ AssetOptOutParams: CommonTransactionParams & { assetId: bigint ; creator: string | Address }

Parameters to define an asset opt-out transaction.

src/types/composer.ts:310


Ƭ AssetTransferParams: CommonTransactionParams & { amount: bigint ; assetId: bigint ; clawbackTarget?: string | Address ; closeAssetTo?: string | Address ; receiver: string | Address }

Parameters to define an asset transfer transaction.

src/types/composer.ts:282


Ƭ CommonAppCallParams: CommonTransactionParams & { accountReferences?: (string | Address)[] ; appId: bigint ; appReferences?: bigint[] ; args?: Uint8Array[] ; assetReferences?: bigint[] ; boxReferences?: (BoxReference | BoxIdentifier)[] ; onComplete?: algosdk.OnApplicationComplete }

Common parameters for defining an application call transaction.

src/types/composer.ts:343


Ƭ CommonTransactionParams: Object

Common parameters for defining a transaction.

NameTypeDescription
extraFee?AlgoAmountThe fee to pay IN ADDITION to the suggested fee. Useful for manually covering inner transaction fees.
firstValidRound?bigintSet the first round this transaction is valid. If left undefined, the value from algod will be used. We recommend you only set this when you intentionally want this to be some time in the future.
lastValidRound?bigintThe last round this transaction is valid. It is recommended to use validityWindow instead.
lease?Uint8Array | stringPrevent multiple transactions with the same lease being included within the validity window. A lease enforces a mutually exclusive transaction (useful to prevent double-posting and other scenarios).
maxFee?AlgoAmountThrow an error if the fee for the transaction is more than this amount; prevents overspending on fees during high congestion periods.
note?Uint8Array | stringNote to attach to the transaction. Max of 1000 bytes.
rekeyTo?string | AddressChange the signing key of the sender to the given address. Warning: Please be careful with this parameter and be sure to read the official rekey guidance.
senderstring | AddressThe address of the account sending the transaction.
signer?algosdk.TransactionSigner | TransactionSignerAccountThe function used to sign transaction(s); if not specified then an attempt will be made to find a registered signer for the given sender or use a default signer (if configured).
staticFee?AlgoAmountThe static transaction fee. In most cases you want to use extraFee unless setting the fee to 0 to be covered by another transaction.
validityWindow?number | bigintHow many rounds the transaction should be valid for, if not specified then the registered default validity window will be used.

src/types/composer.ts:45


Ƭ ErrorTransformer: (error: Error) => Promise<Error>

A function that transforms an error into a new error.

In most cases, an ErrorTransformer should first check if it can or should transform the error and return the input error if it cannot or should not transform it.

▸ (error): Promise<Error>

NameType
errorError

Promise<Error>

src/types/composer.ts:484


Ƭ OfflineKeyRegistrationParams: CommonTransactionParams & { preventAccountFromEverParticipatingAgain?: boolean }

Parameters to define an offline key registration transaction.

src/types/composer.ts:337


Ƭ OnlineKeyRegistrationParams: CommonTransactionParams & { selectionKey: Uint8Array ; stateProofKey?: Uint8Array ; voteFirst: bigint ; voteKey: Uint8Array ; voteKeyDilution: bigint ; voteLast: bigint }

Parameters to define an online key registration transaction.

src/types/composer.ts:321


Ƭ PaymentParams: CommonTransactionParams & { amount: AlgoAmount ; closeRemainderTo?: string | Address ; receiver: string | Address }

Parameters to define a payment transaction.

src/types/composer.ts:86


Ƭ RawSimulateOptions: Expand<Omit<ConstructorParameters<typeof modelsv2.SimulateRequest>[0], "txnGroups">>

The raw API options to control a simulate request. See algod API docs for more information: https://dev.algorand.co/reference/rest-apis/algod/#simulatetransaction

src/types/composer.ts:39


Ƭ SimulateOptions: Expand<Partial<SkipSignaturesSimulateOptions> & RawSimulateOptions>

All options to control a simulate request

src/types/composer.ts:42


Ƭ SkipSignaturesSimulateOptions: Expand<Omit<RawSimulateOptions, "fixSigners" | "allowEmptySignatures"> & { skipSignatures: boolean }>

Options to control a simulate request, that does not require transaction signing

src/types/composer.ts:27


Ƭ TransactionComposerParams: Object

Parameters to create an TransactionComposer.

NameTypeDescription
algodalgosdk.Algodv2The algod client to use to get suggestedParams and send the transaction group
appManager?AppManagerAn existing AppManager to use to manage app compilation and cache compilation results. If not specified then an ephemeral one will be created.
defaultValidityWindow?bigintHow many rounds a transaction should be valid for by default; if not specified then will be 10 rounds (or 1000 rounds if issuing transactions to LocalNet).
errorTransformers?ErrorTransformer[]An array of error transformers to use when an error is caught in simulate or execute callbacks can later be registered with registerErrorTransformer
getSigner(address: string | Address) => algosdk.TransactionSigner-
getSuggestedParams?() => Promise<algosdk.SuggestedParams>-

src/types/composer.ts:499


Ƭ Txn: PaymentParams & { type: "pay" } | AssetCreateParams & { type: "assetCreate" } | AssetConfigParams & { type: "assetConfig" } | AssetFreezeParams & { type: "assetFreeze" } | AssetDestroyParams & { type: "assetDestroy" } | AssetTransferParams & { type: "assetTransfer" } | AssetOptInParams & { type: "assetOptIn" } | AssetOptOutParams & { type: "assetOptOut" } | AppCallParams | AppCreateParams | AppUpdateParams & { type: "appCall" } | OnlineKeyRegistrationParams | OfflineKeyRegistrationParams & { type: "keyReg" } | algosdk.TransactionWithSigner & { type: "txnWithSigner" } | { atc: algosdk.AtomicTransactionComposer ; type: "atc" } | AppCallMethodCall | AppCreateMethodCall | AppUpdateMethodCall & { type: "methodCall" }

src/types/composer.ts:463

Const MAX_TRANSACTION_GROUP_SIZE: 16

src/types/composer.ts:24