AlgorandClientTransactionSender
@algorandfoundation/algokit-utils / types/algorand-client-transaction-sender / AlgorandClientTransactionSender
types/algorand-client-transaction-sender.AlgorandClientTransactionSender
Orchestrates sending transactions for AlgorandClient.
Table of contents
Section titled “Table of contents”Constructors
Section titled “Constructors”Properties
Section titled “Properties”- _appManager
- _assetManager
- _newGroup
- appCall
- appCallMethodCall
- appCreate
- appCreateMethodCall
- appDelete
- appDeleteMethodCall
- appUpdate
- appUpdateMethodCall
- assetConfig
- assetDestroy
- assetFreeze
- assetOptIn
- assetTransfer
- offlineKeyRegistration
- onlineKeyRegistration
- payment
Methods
Section titled “Methods”Constructors
Section titled “Constructors”constructor
Section titled “constructor”• new AlgorandClientTransactionSender(newGroup, assetManager, appManager): AlgorandClientTransactionSender
Creates a new AlgorandClientSender
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
newGroup | () => TransactionComposer | A lambda that starts a new TransactionComposer transaction group |
assetManager | AssetManager | An AssetManager instance |
appManager | AppManager | An AppManager instance |
Returns
Section titled “Returns”AlgorandClientTransactionSender
Example
const transactionSender = new AlgorandClientTransactionSender( () => new TransactionComposer(), assetManager, appManager,);Defined in
Section titled “Defined in”src/types/algorand-client-transaction-sender.ts:51
Properties
Section titled “Properties”_appManager
Section titled “_appManager”• Private _appManager: AppManager
Defined in
Section titled “Defined in”src/types/algorand-client-transaction-sender.ts:39
_assetManager
Section titled “_assetManager”• Private _assetManager: AssetManager
Defined in
Section titled “Defined in”src/types/algorand-client-transaction-sender.ts:38
_newGroup
Section titled “_newGroup”• Private _newGroup: () => TransactionComposer
Type declaration
Section titled “Type declaration”▸ (): TransactionComposer
Returns
Section titled “Returns”Defined in
Section titled “Defined in”src/types/algorand-client-transaction-sender.ts:37
appCall
Section titled “appCall”• appCall: (params: CommonTransactionParams & { accountReferences?: (string | Address)[] ; appId: bigint ; appReferences?: bigint[] ; args?: Uint8Array[] ; assetReferences?: bigint[] ; boxReferences?: (BoxIdentifier | BoxReference)[] ; onComplete?: OnApplicationComplete } & { onComplete?: NoOpOC | OptInOC | CloseOutOC | ClearStateOC | DeleteApplicationOC } & SendParams) => Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Call a smart contract.
Note: you may prefer to use algorand.client to get an app client for more advanced functionality.
Example
await algorand.send.appCall({ sender: 'CREATORADDRESS' });Example
await algorand.send.appCall({ sender: 'CREATORADDRESS', onComplete: algosdk.OnApplicationComplete.OptInOC, args: [new Uint8Array(1, 2, 3, 4)] accountReferences: ["ACCOUNT_1"] appReferences: [123n, 1234n] assetReferences: [12345n] boxReferences: ["box1", {appId: 1234n, name: "box2"}] lease: 'lease', note: 'note', // You wouldn't normally set this field firstValidRound: 1000n, validityWindow: 10, extraFee: (1000).microAlgo(), staticFee: (1000).microAlgo(), // Max fee doesn't make sense with extraFee AND staticFee // already specified, but here for completeness maxFee: (3000).microAlgo(), // Signer only needed if you want to provide one, // generally you'd register it with AlgorandClient // against the sender and not need to pass it in signer: transactionSigner, maxRoundsToWaitForConfirmation: 5, suppressLog: true,})Type declaration
Section titled “Type declaration”▸ (params): Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
params | CommonTransactionParams & { accountReferences?: (string | Address)[] ; appId: bigint ; appReferences?: bigint[] ; args?: Uint8Array[] ; assetReferences?: bigint[] ; boxReferences?: (BoxIdentifier | BoxReference)[] ; onComplete?: OnApplicationComplete } & { onComplete?: NoOpOC | OptInOC | CloseOutOC | ClearStateOC | DeleteApplicationOC } & SendParams | The parameters for the app call transaction |
Returns
Section titled “Returns”Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Defined in
Section titled “Defined in”src/types/algorand-client-transaction-sender.ts:731
appCallMethodCall
Section titled “appCallMethodCall”• appCallMethodCall: (params: { accountReferences?: (string | Address)[] ; appId: bigint ; appReferences?: bigint[] ; assetReferences?: bigint[] ; boxReferences?: (BoxIdentifier | BoxReference)[] ; extraFee?: AlgoAmount ; firstValidRound?: bigint ; lastValidRound?: bigint ; lease?: string | Uint8Array ; maxFee?: AlgoAmount ; note?: string | Uint8Array ; onComplete?: NoOpOC | OptInOC | CloseOutOC | DeleteApplicationOC ; rekeyTo?: string | Address ; sender: string | Address ; signer?: TransactionSigner | TransactionSignerAccount ; staticFee?: AlgoAmount ; validityWindow?: number | bigint } & { args?: (undefined | Transaction | ABIValue | TransactionWithSigner | Promise<Transaction> | AppMethodCall<{ accountReferences?: (… | …)[] ; appReferences?: bigint[] ; approvalProgram: string | Uint8Array ; args?: Uint8Array[] ; assetReferences?: bigint[] ; boxReferences?: BoxIdentifier | BoxReference[] ; clearStateProgram: string | Uint8Array ; extraFee?: AlgoAmount ; extraProgramPages?: number ; firstValidRound?: bigint ; lastValidRound?: bigint ; lease?: string | Uint8Array ; maxFee?: AlgoAmount ; note?: string | Uint8Array ; onComplete?: NoOpOC | OptInOC | CloseOutOC | UpdateApplicationOC | DeleteApplicationOC ; rekeyTo?: string | Address ; schema?: { globalByteSlices: number ; globalInts: number ; localByteSlices: number ; localInts: number } ; sender: string | Address ; signer?: TransactionSigner | TransactionSignerAccount ; staticFee?: AlgoAmount ; validityWindow?: number | bigint }> | AppMethodCall<{ accountReferences?: (… | …)[] ; appId: bigint ; appReferences?: bigint[] ; approvalProgram: string | Uint8Array ; args?: Uint8Array[] ; assetReferences?: bigint[] ; boxReferences?: BoxIdentifier | BoxReference[] ; clearStateProgram: string | Uint8Array ; extraFee?: AlgoAmount ; firstValidRound?: bigint ; lastValidRound?: bigint ; lease?: string | Uint8Array ; maxFee?: AlgoAmount ; note?: string | Uint8Array ; onComplete?: UpdateApplicationOC ; rekeyTo?: string | Address ; sender: string | Address ; signer?: TransactionSigner | TransactionSignerAccount ; staticFee?: AlgoAmount ; validityWindow?: number | bigint }> | AppMethodCall<AppMethodCallParams>)[] ; method: ABIMethod } & SendParams) => Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Call a smart contract via an ABI method.
Note: you may prefer to use algorand.client to get an app client for more advanced functionality.
Example
const method = new ABIMethod({ name: 'method', args: [{ name: 'arg1', type: 'string' }], returns: { type: 'string' },});await algorand.send.appCallMethodCall({ sender: 'CREATORADDRESS', method: method, args: ['arg1_value'],});Example
const method = new ABIMethod({ name: 'method', args: [{ name: 'arg1', type: 'string' }], returns: { type: 'string' },})await algorand.send.appCallMethodCall({ sender: 'CREATORADDRESS', method: method, args: ["arg1_value"], onComplete: algosdk.OnApplicationComplete.OptInOC, args: [new Uint8Array(1, 2, 3, 4)] accountReferences: ["ACCOUNT_1"] appReferences: [123n, 1234n] assetReferences: [12345n] boxReferences: ["box1", {appId: 1234n, name: "box2"}] lease: 'lease', note: 'note', // You wouldn't normally set this field firstValidRound: 1000n, validityWindow: 10, extraFee: (1000).microAlgo(), staticFee: (1000).microAlgo(), // Max fee doesn't make sense with extraFee AND staticFee // already specified, but here for completeness maxFee: (3000).microAlgo(), // Signer only needed if you want to provide one, // generally you'd register it with AlgorandClient // against the sender and not need to pass it in signer: transactionSigner, maxRoundsToWaitForConfirmation: 5, suppressLog: true,})Type declaration
Section titled “Type declaration”▸ (params): Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
params | { accountReferences?: (string | Address)[] ; appId: bigint ; appReferences?: bigint[] ; assetReferences?: bigint[] ; boxReferences?: (BoxIdentifier | BoxReference)[] ; extraFee?: AlgoAmount ; firstValidRound?: bigint ; lastValidRound?: bigint ; lease?: string | Uint8Array ; maxFee?: AlgoAmount ; note?: string | Uint8Array ; onComplete?: NoOpOC | OptInOC | CloseOutOC | DeleteApplicationOC ; rekeyTo?: string | Address ; sender: string | Address ; signer?: TransactionSigner | TransactionSignerAccount ; staticFee?: AlgoAmount ; validityWindow?: number | bigint } & { args?: (undefined | Transaction | ABIValue | TransactionWithSigner | Promise<Transaction> | AppMethodCall<{ accountReferences?: (… | …)[] ; appReferences?: bigint[] ; approvalProgram: string | Uint8Array ; args?: Uint8Array[] ; assetReferences?: bigint[] ; boxReferences?: BoxIdentifier | BoxReference[] ; clearStateProgram: string | Uint8Array ; extraFee?: AlgoAmount ; extraProgramPages?: number ; firstValidRound?: bigint ; lastValidRound?: bigint ; lease?: string | Uint8Array ; maxFee?: AlgoAmount ; note?: string | Uint8Array ; onComplete?: NoOpOC | OptInOC | CloseOutOC | UpdateApplicationOC | DeleteApplicationOC ; rekeyTo?: string | Address ; schema?: { globalByteSlices: number ; globalInts: number ; localByteSlices: number ; localInts: number } ; sender: string | Address ; signer?: TransactionSigner | TransactionSignerAccount ; staticFee?: AlgoAmount ; validityWindow?: number | bigint }> | AppMethodCall<{ accountReferences?: (… | …)[] ; appId: bigint ; appReferences?: bigint[] ; approvalProgram: string | Uint8Array ; args?: Uint8Array[] ; assetReferences?: bigint[] ; boxReferences?: BoxIdentifier | BoxReference[] ; clearStateProgram: string | Uint8Array ; extraFee?: AlgoAmount ; firstValidRound?: bigint ; lastValidRound?: bigint ; lease?: string | Uint8Array ; maxFee?: AlgoAmount ; note?: string | Uint8Array ; onComplete?: UpdateApplicationOC ; rekeyTo?: string | Address ; sender: string | Address ; signer?: TransactionSigner | TransactionSignerAccount ; staticFee?: AlgoAmount ; validityWindow?: number | bigint }> | AppMethodCall<AppMethodCallParams>)[] ; method: ABIMethod } & SendParams | The parameters for the app call transaction |
Returns
Section titled “Returns”Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Defined in
Section titled “Defined in”src/types/algorand-client-transaction-sender.ts:971
appCreate
Section titled “appCreate”• appCreate: (params: { accountReferences?: (string | Address)[] ; appReferences?: bigint[] ; approvalProgram: string | Uint8Array ; args?: Uint8Array[] ; assetReferences?: bigint[] ; boxReferences?: (BoxIdentifier | BoxReference)[] ; clearStateProgram: string | Uint8Array ; extraFee?: AlgoAmount ; extraProgramPages?: number ; firstValidRound?: bigint ; lastValidRound?: bigint ; lease?: string | Uint8Array ; maxFee?: AlgoAmount ; note?: string | Uint8Array ; onComplete?: NoOpOC | OptInOC | CloseOutOC | UpdateApplicationOC | DeleteApplicationOC ; rekeyTo?: string | Address ; schema?: { globalByteSlices: number ; globalInts: number ; localByteSlices: number ; localInts: number } ; sender: string | Address ; signer?: TransactionSigner | TransactionSignerAccount ; staticFee?: AlgoAmount ; validityWindow?: number | bigint } & SendParams) => Promise<{ appAddress: Address ; appId: bigint ; compiledApproval?: CompiledTeal ; compiledClear?: CompiledTeal ; confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Create a smart contract.
Note: you may prefer to use algorand.client to get an app client for more advanced functionality.
Example
const result = await algorand.send.appCreate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE',});const createdAppId = result.appId;Example
await algorand.send.appCreate({ sender: 'CREATORADDRESS', approvalProgram: "TEALCODE", clearStateProgram: "TEALCODE", schema: { globalInts: 1, globalByteSlices: 2, localInts: 3, localByteSlices: 4 }, extraProgramPages: 1, onComplete: algosdk.OnApplicationComplete.OptInOC, args: [new Uint8Array(1, 2, 3, 4)] accountReferences: ["ACCOUNT_1"] appReferences: [123n, 1234n] assetReferences: [12345n] boxReferences: ["box1", {appId: 1234n, name: "box2"}] lease: 'lease', note: 'note', // You wouldn't normally set this field firstValidRound: 1000n, validityWindow: 10, extraFee: (1000).microAlgo(), staticFee: (1000).microAlgo(), // Max fee doesn't make sense with extraFee AND staticFee // already specified, but here for completeness maxFee: (3000).microAlgo(), // Signer only needed if you want to provide one, // generally you'd register it with AlgorandClient // against the sender and not need to pass it in signer: transactionSigner, maxRoundsToWaitForConfirmation: 5, suppressLog: true,})Type declaration
Section titled “Type declaration”▸ (params): Promise<{ appAddress: Address ; appId: bigint ; compiledApproval?: CompiledTeal ; compiledClear?: CompiledTeal ; confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
params | { accountReferences?: (string | Address)[] ; appReferences?: bigint[] ; approvalProgram: string | Uint8Array ; args?: Uint8Array[] ; assetReferences?: bigint[] ; boxReferences?: (BoxIdentifier | BoxReference)[] ; clearStateProgram: string | Uint8Array ; extraFee?: AlgoAmount ; extraProgramPages?: number ; firstValidRound?: bigint ; lastValidRound?: bigint ; lease?: string | Uint8Array ; maxFee?: AlgoAmount ; note?: string | Uint8Array ; onComplete?: NoOpOC | OptInOC | CloseOutOC | UpdateApplicationOC | DeleteApplicationOC ; rekeyTo?: string | Address ; schema?: { globalByteSlices: number ; globalInts: number ; localByteSlices: number ; localInts: number } ; sender: string | Address ; signer?: TransactionSigner | TransactionSignerAccount ; staticFee?: AlgoAmount ; validityWindow?: number | bigint } & SendParams | The parameters for the app creation transaction |
Returns
Section titled “Returns”Promise<{ appAddress: Address ; appId: bigint ; compiledApproval?: CompiledTeal ; compiledClear?: CompiledTeal ; confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Defined in
Section titled “Defined in”src/types/algorand-client-transaction-sender.ts:594
appCreateMethodCall
Section titled “appCreateMethodCall”• appCreateMethodCall: (params: { accountReferences?: (string | Address)[] ; appReferences?: bigint[] ; approvalProgram: string | Uint8Array ; assetReferences?: bigint[] ; boxReferences?: (BoxIdentifier | BoxReference)[] ; clearStateProgram: string | Uint8Array ; extraFee?: AlgoAmount ; extraProgramPages?: number ; firstValidRound?: bigint ; lastValidRound?: bigint ; lease?: string | Uint8Array ; maxFee?: AlgoAmount ; note?: string | Uint8Array ; onComplete?: NoOpOC | OptInOC | CloseOutOC | UpdateApplicationOC | DeleteApplicationOC ; rekeyTo?: string | Address ; schema?: { globalByteSlices: number ; globalInts: number ; localByteSlices: number ; localInts: number } ; sender: string | Address ; signer?: TransactionSigner | TransactionSignerAccount ; staticFee?: AlgoAmount ; validityWindow?: number | bigint } & { args?: (undefined | Transaction | ABIValue | TransactionWithSigner | Promise<Transaction> | AppMethodCall<{ accountReferences?: (… | …)[] ; appReferences?: bigint[] ; approvalProgram: string | Uint8Array ; args?: Uint8Array[] ; assetReferences?: bigint[] ; boxReferences?: BoxIdentifier | BoxReference[] ; clearStateProgram: string | Uint8Array ; extraFee?: AlgoAmount ; extraProgramPages?: number ; firstValidRound?: bigint ; lastValidRound?: bigint ; lease?: string | Uint8Array ; maxFee?: AlgoAmount ; note?: string | Uint8Array ; onComplete?: NoOpOC | OptInOC | CloseOutOC | UpdateApplicationOC | DeleteApplicationOC ; rekeyTo?: string | Address ; schema?: { globalByteSlices: number ; globalInts: number ; localByteSlices: number ; localInts: number } ; sender: string | Address ; signer?: TransactionSigner | TransactionSignerAccount ; staticFee?: AlgoAmount ; validityWindow?: number | bigint }> | AppMethodCall<{ accountReferences?: (… | …)[] ; appId: bigint ; appReferences?: bigint[] ; approvalProgram: string | Uint8Array ; args?: Uint8Array[] ; assetReferences?: bigint[] ; boxReferences?: BoxIdentifier | BoxReference[] ; clearStateProgram: string | Uint8Array ; extraFee?: AlgoAmount ; firstValidRound?: bigint ; lastValidRound?: bigint ; lease?: string | Uint8Array ; maxFee?: AlgoAmount ; note?: string | Uint8Array ; onComplete?: UpdateApplicationOC ; rekeyTo?: string | Address ; sender: string | Address ; signer?: TransactionSigner | TransactionSignerAccount ; staticFee?: AlgoAmount ; validityWindow?: number | bigint }> | AppMethodCall<AppMethodCallParams>)[] ; method: ABIMethod } & SendParams) => Promise<{ appAddress: Address ; appId: bigint ; compiledApproval?: CompiledTeal ; compiledClear?: CompiledTeal ; confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Create a smart contract via an ABI method.
Note: you may prefer to use algorand.client to get an app client for more advanced functionality.
Example
const method = new ABIMethod({ name: 'method', args: [{ name: 'arg1', type: 'string' }], returns: { type: 'string' },});const result = await algorand.send.appCreateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: ['arg1_value'],});const createdAppId = result.appId;Example
const method = new ABIMethod({ name: 'method', args: [{ name: 'arg1', type: 'string' }], returns: { type: 'string' },})await algorand.send.appCreateMethodCall({ sender: 'CREATORADDRESS', method: method, args: ["arg1_value"], approvalProgram: "TEALCODE", clearStateProgram: "TEALCODE", schema: { globalInts: 1, globalByteSlices: 2, localInts: 3, localByteSlices: 4 }, extraProgramPages: 1, onComplete: algosdk.OnApplicationComplete.OptInOC, args: [new Uint8Array(1, 2, 3, 4)] accountReferences: ["ACCOUNT_1"] appReferences: [123n, 1234n] assetReferences: [12345n] boxReferences: ["box1", {appId: 1234n, name: "box2"}] lease: 'lease', note: 'note', // You wouldn't normally set this field firstValidRound: 1000n, validityWindow: 10, extraFee: (1000).microAlgo(), staticFee: (1000).microAlgo(), // Max fee doesn't make sense with extraFee AND staticFee // already specified, but here for completeness maxFee: (3000).microAlgo(), // Signer only needed if you want to provide one, // generally you'd register it with AlgorandClient // against the sender and not need to pass it in signer: transactionSigner, maxRoundsToWaitForConfirmation: 5, suppressLog: true,})Type declaration
Section titled “Type declaration”▸ (params): Promise<{ appAddress: Address ; appId: bigint ; compiledApproval?: CompiledTeal ; compiledClear?: CompiledTeal ; confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
params | { accountReferences?: (string | Address)[] ; appReferences?: bigint[] ; approvalProgram: string | Uint8Array ; assetReferences?: bigint[] ; boxReferences?: (BoxIdentifier | BoxReference)[] ; clearStateProgram: string | Uint8Array ; extraFee?: AlgoAmount ; extraProgramPages?: number ; firstValidRound?: bigint ; lastValidRound?: bigint ; lease?: string | Uint8Array ; maxFee?: AlgoAmount ; note?: string | Uint8Array ; onComplete?: NoOpOC | OptInOC | CloseOutOC | UpdateApplicationOC | DeleteApplicationOC ; rekeyTo?: string | Address ; schema?: { globalByteSlices: number ; globalInts: number ; localByteSlices: number ; localInts: number } ; sender: string | Address ; signer?: TransactionSigner | TransactionSignerAccount ; staticFee?: AlgoAmount ; validityWindow?: number | bigint } & { args?: (undefined | Transaction | ABIValue | TransactionWithSigner | Promise<Transaction> | AppMethodCall<{ accountReferences?: (… | …)[] ; appReferences?: bigint[] ; approvalProgram: string | Uint8Array ; args?: Uint8Array[] ; assetReferences?: bigint[] ; boxReferences?: BoxIdentifier | BoxReference[] ; clearStateProgram: string | Uint8Array ; extraFee?: AlgoAmount ; extraProgramPages?: number ; firstValidRound?: bigint ; lastValidRound?: bigint ; lease?: string | Uint8Array ; maxFee?: AlgoAmount ; note?: string | Uint8Array ; onComplete?: NoOpOC | OptInOC | CloseOutOC | UpdateApplicationOC | DeleteApplicationOC ; rekeyTo?: string | Address ; schema?: { globalByteSlices: number ; globalInts: number ; localByteSlices: number ; localInts: number } ; sender: string | Address ; signer?: TransactionSigner | TransactionSignerAccount ; staticFee?: AlgoAmount ; validityWindow?: number | bigint }> | AppMethodCall<{ accountReferences?: (… | …)[] ; appId: bigint ; appReferences?: bigint[] ; approvalProgram: string | Uint8Array ; args?: Uint8Array[] ; assetReferences?: bigint[] ; boxReferences?: BoxIdentifier | BoxReference[] ; clearStateProgram: string | Uint8Array ; extraFee?: AlgoAmount ; firstValidRound?: bigint ; lastValidRound?: bigint ; lease?: string | Uint8Array ; maxFee?: AlgoAmount ; note?: string | Uint8Array ; onComplete?: UpdateApplicationOC ; rekeyTo?: string | Address ; sender: string | Address ; signer?: TransactionSigner | TransactionSignerAccount ; staticFee?: AlgoAmount ; validityWindow?: number | bigint }> | AppMethodCall<AppMethodCallParams>)[] ; method: ABIMethod } & SendParams | The parameters for the app creation transaction |
Returns
Section titled “Returns”Promise<{ appAddress: Address ; appId: bigint ; compiledApproval?: CompiledTeal ; compiledClear?: CompiledTeal ; confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Defined in
Section titled “Defined in”src/types/algorand-client-transaction-sender.ts:798
appDelete
Section titled “appDelete”• appDelete: (params: CommonTransactionParams & { accountReferences?: (string | Address)[] ; appId: bigint ; appReferences?: bigint[] ; args?: Uint8Array[] ; assetReferences?: bigint[] ; boxReferences?: (BoxIdentifier | BoxReference)[] ; onComplete?: OnApplicationComplete } & { onComplete?: DeleteApplicationOC } & SendParams) => Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Delete a smart contract.
Note: you may prefer to use algorand.client to get an app client for more advanced functionality.
Example
await algorand.send.appDelete({ sender: 'CREATORADDRESS' });Example
await algorand.send.appDelete({ sender: 'CREATORADDRESS', onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC, args: [new Uint8Array(1, 2, 3, 4)] accountReferences: ["ACCOUNT_1"] appReferences: [123n, 1234n] assetReferences: [12345n] boxReferences: ["box1", {appId: 1234n, name: "box2"}] lease: 'lease', note: 'note', // You wouldn't normally set this field firstValidRound: 1000n, validityWindow: 10, extraFee: (1000).microAlgo(), staticFee: (1000).microAlgo(), // Max fee doesn't make sense with extraFee AND staticFee // already specified, but here for completeness maxFee: (3000).microAlgo(), // Signer only needed if you want to provide one, // generally you'd register it with AlgorandClient // against the sender and not need to pass it in signer: transactionSigner, maxRoundsToWaitForConfirmation: 5, suppressLog: true,})Type declaration
Section titled “Type declaration”▸ (params): Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
params | CommonTransactionParams & { accountReferences?: (string | Address)[] ; appId: bigint ; appReferences?: bigint[] ; args?: Uint8Array[] ; assetReferences?: bigint[] ; boxReferences?: (BoxIdentifier | BoxReference)[] ; onComplete?: OnApplicationComplete } & { onComplete?: DeleteApplicationOC } & SendParams | The parameters for the app deletion transaction |
Returns
Section titled “Returns”Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Defined in
Section titled “Defined in”src/types/algorand-client-transaction-sender.ts:686
appDeleteMethodCall
Section titled “appDeleteMethodCall”• appDeleteMethodCall: (params: { accountReferences?: (string | Address)[] ; appId: bigint ; appReferences?: bigint[] ; assetReferences?: bigint[] ; boxReferences?: (BoxIdentifier | BoxReference)[] ; extraFee?: AlgoAmount ; firstValidRound?: bigint ; lastValidRound?: bigint ; lease?: string | Uint8Array ; maxFee?: AlgoAmount ; note?: string | Uint8Array ; onComplete?: DeleteApplicationOC ; rekeyTo?: string | Address ; sender: string | Address ; signer?: TransactionSigner | TransactionSignerAccount ; staticFee?: AlgoAmount ; validityWindow?: number | bigint } & { args?: (undefined | Transaction | ABIValue | TransactionWithSigner | Promise<Transaction> | AppMethodCall<{ accountReferences?: (… | …)[] ; appReferences?: bigint[] ; approvalProgram: string | Uint8Array ; args?: Uint8Array[] ; assetReferences?: bigint[] ; boxReferences?: BoxIdentifier | BoxReference[] ; clearStateProgram: string | Uint8Array ; extraFee?: AlgoAmount ; extraProgramPages?: number ; firstValidRound?: bigint ; lastValidRound?: bigint ; lease?: string | Uint8Array ; maxFee?: AlgoAmount ; note?: string | Uint8Array ; onComplete?: NoOpOC | OptInOC | CloseOutOC | UpdateApplicationOC | DeleteApplicationOC ; rekeyTo?: string | Address ; schema?: { globalByteSlices: number ; globalInts: number ; localByteSlices: number ; localInts: number } ; sender: string | Address ; signer?: TransactionSigner | TransactionSignerAccount ; staticFee?: AlgoAmount ; validityWindow?: number | bigint }> | AppMethodCall<{ accountReferences?: (… | …)[] ; appId: bigint ; appReferences?: bigint[] ; approvalProgram: string | Uint8Array ; args?: Uint8Array[] ; assetReferences?: bigint[] ; boxReferences?: BoxIdentifier | BoxReference[] ; clearStateProgram: string | Uint8Array ; extraFee?: AlgoAmount ; firstValidRound?: bigint ; lastValidRound?: bigint ; lease?: string | Uint8Array ; maxFee?: AlgoAmount ; note?: string | Uint8Array ; onComplete?: UpdateApplicationOC ; rekeyTo?: string | Address ; sender: string | Address ; signer?: TransactionSigner | TransactionSignerAccount ; staticFee?: AlgoAmount ; validityWindow?: number | bigint }> | AppMethodCall<AppMethodCallParams>)[] ; method: ABIMethod } & SendParams) => Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Delete a smart contract via an ABI method.
Note: you may prefer to use algorand.client to get an app client for more advanced functionality.
Example
const method = new ABIMethod({ name: 'method', args: [{ name: 'arg1', type: 'string' }], returns: { type: 'string' },});await algorand.send.appDeleteMethodCall({ sender: 'CREATORADDRESS', method: method, args: ['arg1_value'],});Example
const method = new ABIMethod({ name: 'method', args: [{ name: 'arg1', type: 'string' }], returns: { type: 'string' },})await algorand.send.appDeleteMethodCall({ sender: 'CREATORADDRESS', method: method, args: ["arg1_value"], onComplete: algosdk.OnApplicationComplete.DeleteApplicationOC, args: [new Uint8Array(1, 2, 3, 4)] accountReferences: ["ACCOUNT_1"] appReferences: [123n, 1234n] assetReferences: [12345n] boxReferences: ["box1", {appId: 1234n, name: "box2"}] lease: 'lease', note: 'note', // You wouldn't normally set this field firstValidRound: 1000n, validityWindow: 10, extraFee: (1000).microAlgo(), staticFee: (1000).microAlgo(), // Max fee doesn't make sense with extraFee AND staticFee // already specified, but here for completeness maxFee: (3000).microAlgo(), // Signer only needed if you want to provide one, // generally you'd register it with AlgorandClient // against the sender and not need to pass it in signer: transactionSigner, maxRoundsToWaitForConfirmation: 5, suppressLog: true,})Type declaration
Section titled “Type declaration”▸ (params): Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
params | { accountReferences?: (string | Address)[] ; appId: bigint ; appReferences?: bigint[] ; assetReferences?: bigint[] ; boxReferences?: (BoxIdentifier | BoxReference)[] ; extraFee?: AlgoAmount ; firstValidRound?: bigint ; lastValidRound?: bigint ; lease?: string | Uint8Array ; maxFee?: AlgoAmount ; note?: string | Uint8Array ; onComplete?: DeleteApplicationOC ; rekeyTo?: string | Address ; sender: string | Address ; signer?: TransactionSigner | TransactionSignerAccount ; staticFee?: AlgoAmount ; validityWindow?: number | bigint } & { args?: (undefined | Transaction | ABIValue | TransactionWithSigner | Promise<Transaction> | AppMethodCall<{ accountReferences?: (… | …)[] ; appReferences?: bigint[] ; approvalProgram: string | Uint8Array ; args?: Uint8Array[] ; assetReferences?: bigint[] ; boxReferences?: BoxIdentifier | BoxReference[] ; clearStateProgram: string | Uint8Array ; extraFee?: AlgoAmount ; extraProgramPages?: number ; firstValidRound?: bigint ; lastValidRound?: bigint ; lease?: string | Uint8Array ; maxFee?: AlgoAmount ; note?: string | Uint8Array ; onComplete?: NoOpOC | OptInOC | CloseOutOC | UpdateApplicationOC | DeleteApplicationOC ; rekeyTo?: string | Address ; schema?: { globalByteSlices: number ; globalInts: number ; localByteSlices: number ; localInts: number } ; sender: string | Address ; signer?: TransactionSigner | TransactionSignerAccount ; staticFee?: AlgoAmount ; validityWindow?: number | bigint }> | AppMethodCall<{ accountReferences?: (… | …)[] ; appId: bigint ; appReferences?: bigint[] ; approvalProgram: string | Uint8Array ; args?: Uint8Array[] ; assetReferences?: bigint[] ; boxReferences?: BoxIdentifier | BoxReference[] ; clearStateProgram: string | Uint8Array ; extraFee?: AlgoAmount ; firstValidRound?: bigint ; lastValidRound?: bigint ; lease?: string | Uint8Array ; maxFee?: AlgoAmount ; note?: string | Uint8Array ; onComplete?: UpdateApplicationOC ; rekeyTo?: string | Address ; sender: string | Address ; signer?: TransactionSigner | TransactionSignerAccount ; staticFee?: AlgoAmount ; validityWindow?: number | bigint }> | AppMethodCall<AppMethodCallParams>)[] ; method: ABIMethod } & SendParams | The parameters for the app deletion transaction |
Returns
Section titled “Returns”Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Defined in
Section titled “Defined in”src/types/algorand-client-transaction-sender.ts:914
appUpdate
Section titled “appUpdate”• appUpdate: (params: { accountReferences?: (string | Address)[] ; appId: bigint ; appReferences?: bigint[] ; approvalProgram: string | Uint8Array ; args?: Uint8Array[] ; assetReferences?: bigint[] ; boxReferences?: (BoxIdentifier | BoxReference)[] ; clearStateProgram: string | Uint8Array ; extraFee?: AlgoAmount ; firstValidRound?: bigint ; lastValidRound?: bigint ; lease?: string | Uint8Array ; maxFee?: AlgoAmount ; note?: string | Uint8Array ; onComplete?: UpdateApplicationOC ; rekeyTo?: string | Address ; sender: string | Address ; signer?: TransactionSigner | TransactionSignerAccount ; staticFee?: AlgoAmount ; validityWindow?: number | bigint } & SendParams) => Promise<{ compiledApproval?: CompiledTeal ; compiledClear?: CompiledTeal ; confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Update a smart contract.
Note: you may prefer to use algorand.client to get an app client for more advanced functionality.
Example
await algorand.send.appUpdate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE',});Example
await algorand.send.appUpdate({ sender: 'CREATORADDRESS', approvalProgram: "TEALCODE", clearStateProgram: "TEALCODE", onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC, args: [new Uint8Array(1, 2, 3, 4)] accountReferences: ["ACCOUNT_1"] appReferences: [123n, 1234n] assetReferences: [12345n] boxReferences: ["box1", {appId: 1234n, name: "box2"}] lease: 'lease', note: 'note', // You wouldn't normally set this field firstValidRound: 1000n, validityWindow: 10, extraFee: (1000).microAlgo(), staticFee: (1000).microAlgo(), // Max fee doesn't make sense with extraFee AND staticFee // already specified, but here for completeness maxFee: (3000).microAlgo(), // Signer only needed if you want to provide one, // generally you'd register it with AlgorandClient // against the sender and not need to pass it in signer: transactionSigner, maxRoundsToWaitForConfirmation: 5, suppressLog: true,})Type declaration
Section titled “Type declaration”▸ (params): Promise<{ compiledApproval?: CompiledTeal ; compiledClear?: CompiledTeal ; confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
params | { accountReferences?: (string | Address)[] ; appId: bigint ; appReferences?: bigint[] ; approvalProgram: string | Uint8Array ; args?: Uint8Array[] ; assetReferences?: bigint[] ; boxReferences?: (BoxIdentifier | BoxReference)[] ; clearStateProgram: string | Uint8Array ; extraFee?: AlgoAmount ; firstValidRound?: bigint ; lastValidRound?: bigint ; lease?: string | Uint8Array ; maxFee?: AlgoAmount ; note?: string | Uint8Array ; onComplete?: UpdateApplicationOC ; rekeyTo?: string | Address ; sender: string | Address ; signer?: TransactionSigner | TransactionSignerAccount ; staticFee?: AlgoAmount ; validityWindow?: number | bigint } & SendParams | The parameters for the app update transaction |
Returns
Section titled “Returns”Promise<{ compiledApproval?: CompiledTeal ; compiledClear?: CompiledTeal ; confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Defined in
Section titled “Defined in”src/types/algorand-client-transaction-sender.ts:641
appUpdateMethodCall
Section titled “appUpdateMethodCall”• appUpdateMethodCall: (params: { accountReferences?: (string | Address)[] ; appId: bigint ; appReferences?: bigint[] ; approvalProgram: string | Uint8Array ; assetReferences?: bigint[] ; boxReferences?: (BoxIdentifier | BoxReference)[] ; clearStateProgram: string | Uint8Array ; extraFee?: AlgoAmount ; firstValidRound?: bigint ; lastValidRound?: bigint ; lease?: string | Uint8Array ; maxFee?: AlgoAmount ; note?: string | Uint8Array ; onComplete?: UpdateApplicationOC ; rekeyTo?: string | Address ; sender: string | Address ; signer?: TransactionSigner | TransactionSignerAccount ; staticFee?: AlgoAmount ; validityWindow?: number | bigint } & { args?: (undefined | Transaction | ABIValue | TransactionWithSigner | Promise<Transaction> | AppMethodCall<{ accountReferences?: (… | …)[] ; appReferences?: bigint[] ; approvalProgram: string | Uint8Array ; args?: Uint8Array[] ; assetReferences?: bigint[] ; boxReferences?: BoxIdentifier | BoxReference[] ; clearStateProgram: string | Uint8Array ; extraFee?: AlgoAmount ; extraProgramPages?: number ; firstValidRound?: bigint ; lastValidRound?: bigint ; lease?: string | Uint8Array ; maxFee?: AlgoAmount ; note?: string | Uint8Array ; onComplete?: NoOpOC | OptInOC | CloseOutOC | UpdateApplicationOC | DeleteApplicationOC ; rekeyTo?: string | Address ; schema?: { globalByteSlices: number ; globalInts: number ; localByteSlices: number ; localInts: number } ; sender: string | Address ; signer?: TransactionSigner | TransactionSignerAccount ; staticFee?: AlgoAmount ; validityWindow?: number | bigint }> | AppMethodCall<{ accountReferences?: (… | …)[] ; appId: bigint ; appReferences?: bigint[] ; approvalProgram: string | Uint8Array ; args?: Uint8Array[] ; assetReferences?: bigint[] ; boxReferences?: BoxIdentifier | BoxReference[] ; clearStateProgram: string | Uint8Array ; extraFee?: AlgoAmount ; firstValidRound?: bigint ; lastValidRound?: bigint ; lease?: string | Uint8Array ; maxFee?: AlgoAmount ; note?: string | Uint8Array ; onComplete?: UpdateApplicationOC ; rekeyTo?: string | Address ; sender: string | Address ; signer?: TransactionSigner | TransactionSignerAccount ; staticFee?: AlgoAmount ; validityWindow?: number | bigint }> | AppMethodCall<AppMethodCallParams>)[] ; method: ABIMethod } & SendParams) => Promise<{ compiledApproval?: CompiledTeal ; compiledClear?: CompiledTeal ; confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Update a smart contract via an ABI method.
Note: you may prefer to use algorand.client to get an app client for more advanced functionality.
Example
const method = new ABIMethod({ name: 'method', args: [{ name: 'arg1', type: 'string' }], returns: { type: 'string' },});await algorand.send.appUpdateMethodCall({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE', method: method, args: ['arg1_value'],});Example
const method = new ABIMethod({ name: 'method', args: [{ name: 'arg1', type: 'string' }], returns: { type: 'string' },})await algorand.send.appUpdateMethodCall({ sender: 'CREATORADDRESS', method: method, args: ["arg1_value"], approvalProgram: "TEALCODE", clearStateProgram: "TEALCODE", onComplete: algosdk.OnApplicationComplete.UpdateApplicationOC, args: [new Uint8Array(1, 2, 3, 4)] accountReferences: ["ACCOUNT_1"] appReferences: [123n, 1234n] assetReferences: [12345n] boxReferences: ["box1", {appId: 1234n, name: "box2"}] lease: 'lease', note: 'note', // You wouldn't normally set this field firstValidRound: 1000n, validityWindow: 10, extraFee: (1000).microAlgo(), staticFee: (1000).microAlgo(), // Max fee doesn't make sense with extraFee AND staticFee // already specified, but here for completeness maxFee: (3000).microAlgo(), // Signer only needed if you want to provide one, // generally you'd register it with AlgorandClient // against the sender and not need to pass it in signer: transactionSigner, maxRoundsToWaitForConfirmation: 5, suppressLog: true,})Type declaration
Section titled “Type declaration”▸ (params): Promise<{ compiledApproval?: CompiledTeal ; compiledClear?: CompiledTeal ; confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
params | { accountReferences?: (string | Address)[] ; appId: bigint ; appReferences?: bigint[] ; approvalProgram: string | Uint8Array ; assetReferences?: bigint[] ; boxReferences?: (BoxIdentifier | BoxReference)[] ; clearStateProgram: string | Uint8Array ; extraFee?: AlgoAmount ; firstValidRound?: bigint ; lastValidRound?: bigint ; lease?: string | Uint8Array ; maxFee?: AlgoAmount ; note?: string | Uint8Array ; onComplete?: UpdateApplicationOC ; rekeyTo?: string | Address ; sender: string | Address ; signer?: TransactionSigner | TransactionSignerAccount ; staticFee?: AlgoAmount ; validityWindow?: number | bigint } & { args?: (undefined | Transaction | ABIValue | TransactionWithSigner | Promise<Transaction> | AppMethodCall<{ accountReferences?: (… | …)[] ; appReferences?: bigint[] ; approvalProgram: string | Uint8Array ; args?: Uint8Array[] ; assetReferences?: bigint[] ; boxReferences?: BoxIdentifier | BoxReference[] ; clearStateProgram: string | Uint8Array ; extraFee?: AlgoAmount ; extraProgramPages?: number ; firstValidRound?: bigint ; lastValidRound?: bigint ; lease?: string | Uint8Array ; maxFee?: AlgoAmount ; note?: string | Uint8Array ; onComplete?: NoOpOC | OptInOC | CloseOutOC | UpdateApplicationOC | DeleteApplicationOC ; rekeyTo?: string | Address ; schema?: { globalByteSlices: number ; globalInts: number ; localByteSlices: number ; localInts: number } ; sender: string | Address ; signer?: TransactionSigner | TransactionSignerAccount ; staticFee?: AlgoAmount ; validityWindow?: number | bigint }> | AppMethodCall<{ accountReferences?: (… | …)[] ; appId: bigint ; appReferences?: bigint[] ; approvalProgram: string | Uint8Array ; args?: Uint8Array[] ; assetReferences?: bigint[] ; boxReferences?: BoxIdentifier | BoxReference[] ; clearStateProgram: string | Uint8Array ; extraFee?: AlgoAmount ; firstValidRound?: bigint ; lastValidRound?: bigint ; lease?: string | Uint8Array ; maxFee?: AlgoAmount ; note?: string | Uint8Array ; onComplete?: UpdateApplicationOC ; rekeyTo?: string | Address ; sender: string | Address ; signer?: TransactionSigner | TransactionSignerAccount ; staticFee?: AlgoAmount ; validityWindow?: number | bigint }> | AppMethodCall<AppMethodCallParams>)[] ; method: ABIMethod } & SendParams | The parameters for the app update transaction |
Returns
Section titled “Returns”Promise<{ compiledApproval?: CompiledTeal ; compiledClear?: CompiledTeal ; confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Defined in
Section titled “Defined in”src/types/algorand-client-transaction-sender.ts:857
assetConfig
Section titled “assetConfig”• assetConfig: (params: CommonTransactionParams & { assetId: bigint ; clawback?: string | Address ; freeze?: string | Address ; manager: undefined | string | Address ; reserve?: string | Address } & SendParams) => Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Configure an existing Algorand Standard Asset.
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.
Example
await algorand.send.assetConfig({ sender: 'MANAGERADDRESS', assetId: 123456n, manager: 'MANAGERADDRESS',});Example
await algorand.send.assetConfig({ sender: 'MANAGERADDRESS', assetId: 123456n, manager: 'MANAGERADDRESS', reserve: 'RESERVEADDRESS', freeze: 'FREEZEADDRESS', clawback: 'CLAWBACKADDRESS', lease: 'lease', note: 'note', // You wouldn't normally set this field firstValidRound: 1000n, validityWindow: 10, extraFee: (1000).microAlgo(), staticFee: (1000).microAlgo(), // Max fee doesn't make sense with extraFee AND staticFee // already specified, but here for completeness maxFee: (3000).microAlgo(), // Signer only needed if you want to provide one, // generally you'd register it with AlgorandClient // against the sender and not need to pass it in signer: transactionSigner, maxRoundsToWaitForConfirmation: 5, suppressLog: true,});Type declaration
Section titled “Type declaration”▸ (params): Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
params | CommonTransactionParams & { assetId: bigint ; clawback?: string | Address ; freeze?: string | Address ; manager: undefined | string | Address ; reserve?: string | Address } & SendParams | The parameters for the asset config transaction |
Returns
Section titled “Returns”Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Defined in
Section titled “Defined in”src/types/algorand-client-transaction-sender.ts:304
assetDestroy
Section titled “assetDestroy”• assetDestroy: (params: CommonTransactionParams & { assetId: bigint } & SendParams) => Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Destroys an Algorand Standard Asset.
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.
Example
await algorand.send.assetDestroy({ sender: 'MANAGERADDRESS', assetId: 123456n });Example
await algorand.send.assetDestroy({ sender: 'MANAGERADDRESS', assetId: 123456n, lease: 'lease', note: 'note', // You wouldn't normally set this field firstValidRound: 1000n, validityWindow: 10, extraFee: (1000).microAlgo(), staticFee: (1000).microAlgo(), // Max fee doesn't make sense with extraFee AND staticFee // already specified, but here for completeness maxFee: (3000).microAlgo(), // Signer only needed if you want to provide one, // generally you'd register it with AlgorandClient // against the sender and not need to pass it in signer: transactionSigner, maxRoundsToWaitForConfirmation: 5, suppressLog: true,});Type declaration
Section titled “Type declaration”▸ (params): Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
params | CommonTransactionParams & { assetId: bigint } & SendParams | The parameters for the asset destroy transaction |
Returns
Section titled “Returns”Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Defined in
Section titled “Defined in”src/types/algorand-client-transaction-sender.ts:384
assetFreeze
Section titled “assetFreeze”• assetFreeze: (params: CommonTransactionParams & { account: string | Address ; assetId: bigint ; frozen: boolean } & SendParams) => Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Freeze or unfreeze an Algorand Standard Asset for an account.
Example
await algorand.send.assetFreeze({ sender: 'MANAGERADDRESS', assetId: 123456n, account: 'ACCOUNTADDRESS', frozen: true,});Example
await algorand.send.assetFreeze({ sender: 'MANAGERADDRESS', assetId: 123456n, account: 'ACCOUNTADDRESS', frozen: true, lease: 'lease', note: 'note', // You wouldn't normally set this field firstValidRound: 1000n, validityWindow: 10, extraFee: (1000).microAlgo(), staticFee: (1000).microAlgo(), // Max fee doesn't make sense with extraFee AND staticFee // already specified, but here for completeness maxFee: (3000).microAlgo(), // Signer only needed if you want to provide one, // generally you'd register it with AlgorandClient // against the sender and not need to pass it in signer: transactionSigner, maxRoundsToWaitForConfirmation: 5, suppressLog: true,});Type declaration
Section titled “Type declaration”▸ (params): Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
params | CommonTransactionParams & { account: string | Address ; assetId: bigint ; frozen: boolean } & SendParams | The parameters for the asset freeze transaction |
Returns
Section titled “Returns”Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Defined in
Section titled “Defined in”src/types/algorand-client-transaction-sender.ts:343
assetOptIn
Section titled “assetOptIn”• assetOptIn: (params: CommonTransactionParams & { assetId: bigint } & SendParams) => Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Opt an account into an Algorand Standard Asset.
Example
await algorand.send.assetOptIn({ sender: 'SENDERADDRESS', assetId: 123456n });Example
await algorand.send.assetOptIn({ sender: 'SENDERADDRESS', assetId: 123456n, lease: 'lease', note: 'note', // You wouldn't normally set this field firstValidRound: 1000n, validityWindow: 10, extraFee: (1000).microAlgo(), staticFee: (1000).microAlgo(), // Max fee doesn't make sense with extraFee AND staticFee // already specified, but here for completeness maxFee: (3000).microAlgo(), // Signer only needed if you want to provide one, // generally you'd register it with AlgorandClient // against the sender and not need to pass it in signer: transactionSigner, maxRoundsToWaitForConfirmation: 5, suppressLog: true,});Type declaration
Section titled “Type declaration”▸ (params): Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
params | CommonTransactionParams & { assetId: bigint } & SendParams | The parameters for the asset opt-in transaction |
Returns
Section titled “Returns”Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Defined in
Section titled “Defined in”src/types/algorand-client-transaction-sender.ts:464
assetTransfer
Section titled “assetTransfer”• assetTransfer: (params: CommonTransactionParams & { amount: bigint ; assetId: bigint ; clawbackTarget?: string | Address ; closeAssetTo?: string | Address ; receiver: string | Address } & SendParams) => Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Transfer an Algorand Standard Asset.
Example
await algorand.send.assetTransfer({ sender: 'HOLDERADDRESS', assetId: 123456n, amount: 1n, receiver: 'RECEIVERADDRESS',});Example
await algorand.send.assetTransfer({ sender: 'CLAWBACKADDRESS', assetId: 123456n, amount: 1n, receiver: 'RECEIVERADDRESS', clawbackTarget: 'HOLDERADDRESS', // This field needs to be used with caution closeAssetTo: 'ADDRESSTOCLOSETO' lease: 'lease', note: 'note', // You wouldn't normally set this field firstValidRound: 1000n, validityWindow: 10, extraFee: (1000).microAlgo(), staticFee: (1000).microAlgo(), // Max fee doesn't make sense with extraFee AND staticFee // already specified, but here for completeness maxFee: (3000).microAlgo(), // Signer only needed if you want to provide one, // generally you'd register it with AlgorandClient // against the sender and not need to pass it in signer: transactionSigner, maxRoundsToWaitForConfirmation: 5, suppressLog: true,})Type declaration
Section titled “Type declaration”▸ (params): Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
params | CommonTransactionParams & { amount: bigint ; assetId: bigint ; clawbackTarget?: string | Address ; closeAssetTo?: string | Address ; receiver: string | Address } & SendParams | The parameters for the asset transfer transaction |
Returns
Section titled “Returns”Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Defined in
Section titled “Defined in”src/types/algorand-client-transaction-sender.ts:426
offlineKeyRegistration
Section titled “offlineKeyRegistration”• offlineKeyRegistration: (params: CommonTransactionParams & { preventAccountFromEverParticipatingAgain?: boolean } & SendParams) => Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Register an offline key.
Example
const result = await algorand.send.offlineKeyRegistration({ sender: 'SENDERADDRESS',});Example
const result = await algorand.send.offlineKeyRegistration({ sender: 'SENDERADDRESS', lease: 'lease', note: 'note', // Use this with caution, it's generally better to use algorand.account.rekeyAccount rekeyTo: 'REKEYTOADDRESS', // You wouldn't normally set this field firstValidRound: 1000n, validityWindow: 10, extraFee: (1000).microAlgo(), staticFee: (1000).microAlgo(), // Max fee doesn't make sense with extraFee AND staticFee // already specified, but here for completeness maxFee: (3000).microAlgo(),});Type declaration
Section titled “Type declaration”▸ (params): Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
params | CommonTransactionParams & { preventAccountFromEverParticipatingAgain?: boolean } & SendParams | The parameters for the key registration transaction |
Returns
Section titled “Returns”Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Defined in
Section titled “Defined in”src/types/algorand-client-transaction-sender.ts:1050
onlineKeyRegistration
Section titled “onlineKeyRegistration”• onlineKeyRegistration: (params: CommonTransactionParams & { selectionKey: Uint8Array ; stateProofKey?: Uint8Array ; voteFirst: bigint ; voteKey: Uint8Array ; voteKeyDilution: bigint ; voteLast: bigint } & SendParams) => Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Register an online key.
Example
const result = await algorand.send.onlineKeyRegistration({ sender: 'SENDERADDRESS', voteKey: Uint8Array.from(Buffer.from('voteKeyBase64', 'base64')), selectionKey: Uint8Array.from(Buffer.from('selectionKeyBase64', 'base64')), stateProofKey: Uint8Array.from(Buffer.from('stateProofKeyBase64', 'base64')), voteFirst: 1n, voteLast: 1000n, voteKeyDilution: 1n,});Example
const result = await algorand.send.onlineKeyRegistration({ sender: 'SENDERADDRESS', voteKey: Uint8Array.from(Buffer.from('voteKeyBase64', 'base64')), selectionKey: Uint8Array.from(Buffer.from('selectionKeyBase64', 'base64')), stateProofKey: Uint8Array.from(Buffer.from('stateProofKeyBase64', 'base64')), voteFirst: 1n, voteLast: 1000n, voteKeyDilution: 1n, lease: 'lease', note: 'note', // Use this with caution, it's generally better to use algorand.account.rekeyAccount rekeyTo: 'REKEYTOADDRESS', // You wouldn't normally set this field firstValidRound: 1000n, validityWindow: 10, extraFee: (1000).microAlgo(), staticFee: (1000).microAlgo(), // Max fee doesn't make sense with extraFee AND staticFee // already specified, but here for completeness maxFee: (3000).microAlgo(),});Type declaration
Section titled “Type declaration”▸ (params): Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
params | CommonTransactionParams & { selectionKey: Uint8Array ; stateProofKey?: Uint8Array ; voteFirst: bigint ; voteKey: Uint8Array ; voteKeyDilution: bigint ; voteLast: bigint } & SendParams | The parameters for the key registration transaction |
Returns
Section titled “Returns”Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Defined in
Section titled “Defined in”src/types/algorand-client-transaction-sender.ts:1017
payment
Section titled “payment”• payment: (params: CommonTransactionParams & { amount: AlgoAmount ; closeRemainderTo?: string | Address ; receiver: string | Address } & SendParams) => Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Send a payment transaction to transfer Algo between accounts.
Example
const result = await algorand.send.payment({ sender: 'SENDERADDRESS', receiver: 'RECEIVERADDRESS', amount: (4).algo(),});Example
const result = await algorand.send.payment({ amount: (4).algo(), receiver: 'RECEIVERADDRESS', sender: 'SENDERADDRESS', closeRemainderTo: 'CLOSEREMAINDERTOADDRESS', lease: 'lease', note: 'note', // Use this with caution, it's generally better to use algorand.account.rekeyAccount rekeyTo: 'REKEYTOADDRESS', // You wouldn't normally set this field firstValidRound: 1000n, validityWindow: 10, extraFee: (1000).microAlgo(), staticFee: (1000).microAlgo(), // Max fee doesn't make sense with extraFee AND staticFee // already specified, but here for completeness maxFee: (3000).microAlgo(), // Signer only needed if you want to provide one, // generally you'd register it with AlgorandClient // against the sender and not need to pass it in signer: transactionSigner, maxRoundsToWaitForConfirmation: 5, suppressLog: true,});Type declaration
Section titled “Type declaration”▸ (params): Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
params | CommonTransactionParams & { amount: AlgoAmount ; closeRemainderTo?: string | Address ; receiver: string | Address } & SendParams | The parameters for the payment transaction |
Returns
Section titled “Returns”Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Defined in
Section titled “Defined in”src/types/algorand-client-transaction-sender.ts:204
Methods
Section titled “Methods”▸ _send<T>(c, log?): (params: T & SendParams) => Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Type parameters
Section titled “Type parameters”| Name |
|---|
T |
Parameters
Section titled “Parameters”| Name | Type |
|---|---|
c | (c: TransactionComposer) => (params: T) => TransactionComposer |
log? | Object |
log.postLog? | (params: T, result: { confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }) => string |
log.preLog? | (params: T, transaction: Transaction) => string |
Returns
Section titled “Returns”fn
▸ (params): Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Parameters
Section titled “Parameters”| Name | Type |
|---|---|
params | T & SendParams |
Returns
Section titled “Returns”Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Defined in
Section titled “Defined in”src/types/algorand-client-transaction-sender.ts:68
_sendAppCall
Section titled “_sendAppCall”▸ _sendAppCall<T>(c, log?): (params: T & SendParams) => Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Type parameters
Section titled “Type parameters”| Name | Type |
|---|---|
T | extends { accountReferences?: (string | Address)[] ; appReferences?: bigint[] ; approvalProgram: string | Uint8Array ; args?: Uint8Array[] ; assetReferences?: bigint[] ; boxReferences?: (BoxIdentifier | BoxReference)[] ; clearStateProgram: string | Uint8Array ; extraFee?: AlgoAmount ; extraProgramPages?: number ; firstValidRound?: bigint ; lastValidRound?: bigint ; lease?: string | Uint8Array ; maxFee?: AlgoAmount ; note?: string | Uint8Array ; onComplete?: NoOpOC | OptInOC | CloseOutOC | UpdateApplicationOC | DeleteApplicationOC ; rekeyTo?: string | Address ; schema?: { globalByteSlices: number ; globalInts: number ; localByteSlices: number ; localInts: number } ; sender: string | Address ; signer?: TransactionSigner | TransactionSignerAccount ; staticFee?: AlgoAmount ; validityWindow?: number | bigint } | { accountReferences?: (string | Address)[] ; appId: bigint ; appReferences?: bigint[] ; approvalProgram: string | Uint8Array ; args?: Uint8Array[] ; assetReferences?: bigint[] ; boxReferences?: (BoxIdentifier | BoxReference)[] ; clearStateProgram: string | Uint8Array ; extraFee?: AlgoAmount ; firstValidRound?: bigint ; lastValidRound?: bigint ; lease?: string | Uint8Array ; maxFee?: AlgoAmount ; note?: string | Uint8Array ; onComplete?: UpdateApplicationOC ; rekeyTo?: string | Address ; sender: string | Address ; signer?: TransactionSigner | TransactionSignerAccount ; staticFee?: AlgoAmount ; validityWindow?: number | bigint } | AppCallParams | AppDeleteParams | AppCreateMethodCall | AppUpdateMethodCall | AppDeleteMethodCall | AppCallMethodCall |
Parameters
Section titled “Parameters”| Name | Type |
|---|---|
c | (c: TransactionComposer) => (params: T) => TransactionComposer |
log? | Object |
log.postLog? | (params: T, result: { confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }) => string |
log.preLog? | (params: T, transaction: Transaction) => string |
Returns
Section titled “Returns”fn
▸ (params): Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Parameters
Section titled “Parameters”| Name | Type |
|---|---|
params | T & SendParams |
Returns
Section titled “Returns”Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Defined in
Section titled “Defined in”src/types/algorand-client-transaction-sender.ts:103
_sendAppCreateCall
Section titled “_sendAppCreateCall”▸ _sendAppCreateCall<T>(c, log?): (params: T & SendParams) => Promise<{ appAddress: Address ; appId: bigint ; compiledApproval?: CompiledTeal ; compiledClear?: CompiledTeal ; confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Type parameters
Section titled “Type parameters”| Name | Type |
|---|---|
T | extends { accountReferences?: (string | Address)[] ; appReferences?: bigint[] ; approvalProgram: string | Uint8Array ; args?: Uint8Array[] ; assetReferences?: bigint[] ; boxReferences?: (BoxIdentifier | BoxReference)[] ; clearStateProgram: string | Uint8Array ; extraFee?: AlgoAmount ; extraProgramPages?: number ; firstValidRound?: bigint ; lastValidRound?: bigint ; lease?: string | Uint8Array ; maxFee?: AlgoAmount ; note?: string | Uint8Array ; onComplete?: NoOpOC | OptInOC | CloseOutOC | UpdateApplicationOC | DeleteApplicationOC ; rekeyTo?: string | Address ; schema?: { globalByteSlices: number ; globalInts: number ; localByteSlices: number ; localInts: number } ; sender: string | Address ; signer?: TransactionSigner | TransactionSignerAccount ; staticFee?: AlgoAmount ; validityWindow?: number | bigint } | AppCreateMethodCall |
Parameters
Section titled “Parameters”| Name | Type |
|---|---|
c | (c: TransactionComposer) => (params: T) => TransactionComposer |
log? | Object |
log.postLog? | (params: T, result: { confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }) => string |
log.preLog? | (params: T, transaction: Transaction) => string |
Returns
Section titled “Returns”fn
▸ (params): Promise<{ appAddress: Address ; appId: bigint ; compiledApproval?: CompiledTeal ; compiledClear?: CompiledTeal ; confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Parameters
Section titled “Parameters”| Name | Type |
|---|---|
params | T & SendParams |
Returns
Section titled “Returns”Promise<{ appAddress: Address ; appId: bigint ; compiledApproval?: CompiledTeal ; compiledClear?: CompiledTeal ; confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Defined in
Section titled “Defined in”src/types/algorand-client-transaction-sender.ts:146
_sendAppUpdateCall
Section titled “_sendAppUpdateCall”▸ _sendAppUpdateCall<T>(c, log?): (params: T & SendParams) => Promise<{ compiledApproval?: CompiledTeal ; compiledClear?: CompiledTeal ; confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Type parameters
Section titled “Type parameters”| Name | Type |
|---|---|
T | extends { accountReferences?: (string | Address)[] ; appReferences?: bigint[] ; approvalProgram: string | Uint8Array ; args?: Uint8Array[] ; assetReferences?: bigint[] ; boxReferences?: (BoxIdentifier | BoxReference)[] ; clearStateProgram: string | Uint8Array ; extraFee?: AlgoAmount ; extraProgramPages?: number ; firstValidRound?: bigint ; lastValidRound?: bigint ; lease?: string | Uint8Array ; maxFee?: AlgoAmount ; note?: string | Uint8Array ; onComplete?: NoOpOC | OptInOC | CloseOutOC | UpdateApplicationOC | DeleteApplicationOC ; rekeyTo?: string | Address ; schema?: { globalByteSlices: number ; globalInts: number ; localByteSlices: number ; localInts: number } ; sender: string | Address ; signer?: TransactionSigner | TransactionSignerAccount ; staticFee?: AlgoAmount ; validityWindow?: number | bigint } | { accountReferences?: (string | Address)[] ; appId: bigint ; appReferences?: bigint[] ; approvalProgram: string | Uint8Array ; args?: Uint8Array[] ; assetReferences?: bigint[] ; boxReferences?: (BoxIdentifier | BoxReference)[] ; clearStateProgram: string | Uint8Array ; extraFee?: AlgoAmount ; firstValidRound?: bigint ; lastValidRound?: bigint ; lease?: string | Uint8Array ; maxFee?: AlgoAmount ; note?: string | Uint8Array ; onComplete?: UpdateApplicationOC ; rekeyTo?: string | Address ; sender: string | Address ; signer?: TransactionSigner | TransactionSignerAccount ; staticFee?: AlgoAmount ; validityWindow?: number | bigint } | AppCreateMethodCall | AppUpdateMethodCall |
Parameters
Section titled “Parameters”| Name | Type |
|---|---|
c | (c: TransactionComposer) => (params: T) => TransactionComposer |
log? | Object |
log.postLog? | (params: T, result: { confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }) => string |
log.preLog? | (params: T, transaction: Transaction) => string |
Returns
Section titled “Returns”fn
▸ (params): Promise<{ compiledApproval?: CompiledTeal ; compiledClear?: CompiledTeal ; confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Parameters
Section titled “Parameters”| Name | Type |
|---|---|
params | T & SendParams |
Returns
Section titled “Returns”Promise<{ compiledApproval?: CompiledTeal ; compiledClear?: CompiledTeal ; confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Defined in
Section titled “Defined in”src/types/algorand-client-transaction-sender.ts:127
assetCreate
Section titled “assetCreate”▸ assetCreate(params): Promise<{ assetId: bigint ; confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Create a new Algorand Standard Asset.
The account that sends this transaction will automatically be opted in to the asset and will hold all units after creation.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
params | 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 } & SendParams | The parameters for the asset creation transaction |
Returns
Section titled “Returns”Promise<{ assetId: bigint ; confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
The result of the asset create transaction and the transaction that was sent
Example
await algorand.send.assetCreate({ sender: 'CREATORADDRESS', total: 100n });Example
await algorand.send.assetCreate({ sender: 'CREATORADDRESS', total: 100n, decimals: 2, assetName: 'asset', unitName: 'unit', url: 'url', metadataHash: 'metadataHash', defaultFrozen: false, manager: 'MANAGERADDRESS', reserve: 'RESERVEADDRESS', freeze: 'FREEZEADDRESS', clawback: 'CLAWBACKADDRESS', lease: 'lease', note: 'note', // You wouldn't normally set this field firstValidRound: 1000n, validityWindow: 10, extraFee: (1000).microAlgo(), staticFee: (1000).microAlgo(), // Max fee doesn't make sense with extraFee AND staticFee // already specified, but here for completeness maxFee: (3000).microAlgo(), // Signer only needed if you want to provide one, // generally you'd register it with AlgorandClient // against the sender and not need to pass it in signer: transactionSigner, maxRoundsToWaitForConfirmation: 5, suppressLog: true,});Defined in
Section titled “Defined in”src/types/algorand-client-transaction-sender.ts:255
assetOptOut
Section titled “assetOptOut”▸ assetOptOut(params): Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
Opt an account out of an Algorand Standard Asset.
Note: If the account has a balance of the asset,
it will not be able to opt-out unless ensureZeroBalance
is set to false (but then the account will lose the assets).
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
params | Omit<AssetOptOutParams, "creator"> & { creator?: string | Address ; ensureZeroBalance: boolean } & SendParams | The parameters for the asset opt-out transaction |
Returns
Section titled “Returns”Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>
The result of the asset opt-out transaction and the transaction that was sent
Example
await algorand.send.assetOptOut({ sender: 'SENDERADDRESS', assetId: 123456n, ensureZeroBalance: true,});Example
await algorand.send.assetOptOut({ sender: 'SENDERADDRESS', creator: 'CREATORADDRESS', assetId: 123456n, ensureZeroBalance: true,});Example
await algorand.send.assetOptOut({ sender: 'SENDERADDRESS', assetId: 123456n, creator: 'CREATORADDRESS', ensureZeroBalance: true, lease: 'lease', note: 'note', // You wouldn't normally set this field firstValidRound: 1000n, validityWindow: 10, extraFee: (1000).microAlgo(), staticFee: (1000).microAlgo(), // Max fee doesn't make sense with extraFee AND staticFee // already specified, but here for completeness maxFee: (3000).microAlgo(), // Signer only needed if you want to provide one, // generally you'd register it with AlgorandClient // against the sender and not need to pass it in signer: transactionSigner, maxRoundsToWaitForConfirmation: 5, suppressLog: true,});Defined in
Section titled “Defined in”src/types/algorand-client-transaction-sender.ts:511
newGroup
Section titled “newGroup”▸ newGroup(): TransactionComposer
Start a new TransactionComposer transaction group
Returns
Section titled “Returns”A new instance of TransactionComposer.
Example
const composer = AlgorandClient.mainNet().send.newGroup();const result = await composer.addTransaction(payment).send();