Skip to content

types/composer

@algorandfoundation/algokit-utils / types/composer

Table of contents

Classes

Interfaces

Type Aliases

Variables

Type Aliases

AppCallMethodCall

Ƭ AppCallMethodCall: AppMethodCall<AppMethodCallParams>

Parameters to define an ABI method call transaction.

Defined in

src/types/composer.ts:426


AppCallParams

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

Parameters to define an application call transaction.

Defined in

src/types/composer.ts:402


AppCreateMethodCall

Ƭ AppCreateMethodCall: AppMethodCall<AppCreateParams>

Parameters to define an ABI method call create transaction.

Defined in

src/types/composer.ts:420


AppCreateParams

Ƭ 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

Defined in

src/types/composer.ts:365


AppDeleteMethodCall

Ƭ AppDeleteMethodCall: AppMethodCall<AppDeleteParams>

Parameters to define an ABI method call delete transaction.

Defined in

src/types/composer.ts:424


AppDeleteParams

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

Parameters to define an application delete call transaction.

Defined in

src/types/composer.ts:415


AppMethodCall

Ƭ 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.

Type parameters

Name
T

Defined in

src/types/composer.ts:439


AppMethodCallParams

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

Common parameters to define an ABI method call transaction.

Defined in

src/types/composer.ts:407


AppMethodCallTransactionArgument

Ƭ 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.

Defined in

src/types/composer.ts:429


AppUpdateMethodCall

Ƭ AppUpdateMethodCall: AppMethodCall<AppUpdateParams>

Parameters to define an ABI method call update transaction.

Defined in

src/types/composer.ts:422


AppUpdateParams

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

Parameters to define an app update transaction

Defined in

src/types/composer.ts:391


AssetConfigParams

Ƭ 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.

Defined in

src/types/composer.ts:218


AssetCreateParams

Ƭ 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.

Defined in

src/types/composer.ts:102


AssetDestroyParams

Ƭ 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.

Defined in

src/types/composer.ts:276


AssetFreezeParams

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

Parameters to define an asset freeze transaction.

Defined in

src/types/composer.ts:263


AssetOptInParams

Ƭ AssetOptInParams: CommonTransactionParams & { assetId: bigint }

Parameters to define an asset opt-in transaction.

Defined in

src/types/composer.ts:304


AssetOptOutParams

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

Parameters to define an asset opt-out transaction.

Defined in

src/types/composer.ts:310


AssetTransferParams

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

Parameters to define an asset transfer transaction.

Defined in

src/types/composer.ts:282


CommonAppCallParams

Ƭ 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.

Defined in

src/types/composer.ts:343


CommonTransactionParams

Ƭ CommonTransactionParams: Object

Common parameters for defining a transaction.

Type declaration

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.

Defined in

src/types/composer.ts:45


ErrorTransformer

Ƭ 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.

Type declaration

▸ (error): Promise<Error>

Parameters
NameType
errorError
Returns

Promise<Error>

Defined in

src/types/composer.ts:484


OfflineKeyRegistrationParams

Ƭ OfflineKeyRegistrationParams: CommonTransactionParams & { preventAccountFromEverParticipatingAgain?: boolean }

Parameters to define an offline key registration transaction.

Defined in

src/types/composer.ts:337


OnlineKeyRegistrationParams

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

Parameters to define an online key registration transaction.

Defined in

src/types/composer.ts:321


PaymentParams

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

Parameters to define a payment transaction.

Defined in

src/types/composer.ts:86


RawSimulateOptions

Ƭ 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

Defined in

src/types/composer.ts:39


SimulateOptions

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

All options to control a simulate request

Defined in

src/types/composer.ts:42


SkipSignaturesSimulateOptions

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

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

Defined in

src/types/composer.ts:27


TransactionComposerParams

Ƭ TransactionComposerParams: Object

Parameters to create an TransactionComposer.

Type declaration

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>-

Defined in

src/types/composer.ts:499


Txn

Ƭ 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" }

Defined in

src/types/composer.ts:463

Variables

MAX_TRANSACTION_GROUP_SIZE

Const MAX_TRANSACTION_GROUP_SIZE: 16

Defined in

src/types/composer.ts:24