Skip to content

AlgorandClientTransactionSender

@algorandfoundation/algokit-utils / types/algorand-client-transaction-sender / AlgorandClientTransactionSender

types/algorand-client-transaction-sender.AlgorandClientTransactionSender

Orchestrates sending transactions for AlgorandClient.

new AlgorandClientTransactionSender(newGroup, assetManager, appManager): AlgorandClientTransactionSender

Creates a new AlgorandClientSender

NameTypeDescription
newGroup() => TransactionComposerA lambda that starts a new TransactionComposer transaction group
assetManagerAssetManagerAn AssetManager instance
appManagerAppManagerAn AppManager instance

AlgorandClientTransactionSender

Example

const transactionSender = new AlgorandClientTransactionSender(
() => new TransactionComposer(),
assetManager,
appManager,
);

src/types/algorand-client-transaction-sender.ts:51

Private _appManager: AppManager

src/types/algorand-client-transaction-sender.ts:39


Private _assetManager: AssetManager

src/types/algorand-client-transaction-sender.ts:38


Private _newGroup: () => TransactionComposer

▸ (): TransactionComposer

TransactionComposer

src/types/algorand-client-transaction-sender.ts:37


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,
})

▸ (params): Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

NameTypeDescription
paramsCommonTransactionParams & { accountReferences?: (string | Address)[] ; appId: bigint ; appReferences?: bigint[] ; args?: Uint8Array[] ; assetReferences?: bigint[] ; boxReferences?: (BoxIdentifier | BoxReference)[] ; onComplete?: OnApplicationComplete } & { onComplete?: NoOpOC | OptInOC | CloseOutOC | ClearStateOC | DeleteApplicationOC } & SendParamsThe parameters for the app call transaction

Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

src/types/algorand-client-transaction-sender.ts:731


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,
})

▸ (params): Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

NameTypeDescription
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 } & SendParamsThe parameters for the app call transaction

Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

src/types/algorand-client-transaction-sender.ts:971


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,
})

▸ (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[] }>

NameTypeDescription
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 } & SendParamsThe parameters for the app creation transaction

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[] }>

src/types/algorand-client-transaction-sender.ts:594


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,
})

▸ (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[] }>

NameTypeDescription
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 } & SendParamsThe parameters for the app creation transaction

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[] }>

src/types/algorand-client-transaction-sender.ts:798


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,
})

▸ (params): Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

NameTypeDescription
paramsCommonTransactionParams & { accountReferences?: (string | Address)[] ; appId: bigint ; appReferences?: bigint[] ; args?: Uint8Array[] ; assetReferences?: bigint[] ; boxReferences?: (BoxIdentifier | BoxReference)[] ; onComplete?: OnApplicationComplete } & { onComplete?: DeleteApplicationOC } & SendParamsThe parameters for the app deletion transaction

Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

src/types/algorand-client-transaction-sender.ts:686


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,
})

▸ (params): Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

NameTypeDescription
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 } & SendParamsThe parameters for the app deletion transaction

Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

src/types/algorand-client-transaction-sender.ts:914


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,
})

▸ (params): Promise<{ compiledApproval?: CompiledTeal ; compiledClear?: CompiledTeal ; confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

NameTypeDescription
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 } & SendParamsThe parameters for the app update transaction

Promise<{ compiledApproval?: CompiledTeal ; compiledClear?: CompiledTeal ; confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

src/types/algorand-client-transaction-sender.ts:641


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,
})

▸ (params): Promise<{ compiledApproval?: CompiledTeal ; compiledClear?: CompiledTeal ; confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

NameTypeDescription
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 } & SendParamsThe parameters for the app update transaction

Promise<{ compiledApproval?: CompiledTeal ; compiledClear?: CompiledTeal ; confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

src/types/algorand-client-transaction-sender.ts:857


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,
});

▸ (params): Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

NameTypeDescription
paramsCommonTransactionParams & { assetId: bigint ; clawback?: string | Address ; freeze?: string | Address ; manager: undefined | string | Address ; reserve?: string | Address } & SendParamsThe parameters for the asset config transaction

Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

src/types/algorand-client-transaction-sender.ts:304


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,
});

▸ (params): Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

NameTypeDescription
paramsCommonTransactionParams & { assetId: bigint } & SendParamsThe parameters for the asset destroy transaction

Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

src/types/algorand-client-transaction-sender.ts:384


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,
});

▸ (params): Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

NameTypeDescription
paramsCommonTransactionParams & { account: string | Address ; assetId: bigint ; frozen: boolean } & SendParamsThe parameters for the asset freeze transaction

Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

src/types/algorand-client-transaction-sender.ts:343


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,
});

▸ (params): Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

NameTypeDescription
paramsCommonTransactionParams & { assetId: bigint } & SendParamsThe parameters for the asset opt-in transaction

Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

src/types/algorand-client-transaction-sender.ts:464


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,
})

▸ (params): Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

NameTypeDescription
paramsCommonTransactionParams & { amount: bigint ; assetId: bigint ; clawbackTarget?: string | Address ; closeAssetTo?: string | Address ; receiver: string | Address } & SendParamsThe parameters for the asset transfer transaction

Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

src/types/algorand-client-transaction-sender.ts:426


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(),
});

▸ (params): Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

NameTypeDescription
paramsCommonTransactionParams & { preventAccountFromEverParticipatingAgain?: boolean } & SendParamsThe parameters for the key registration transaction

Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

src/types/algorand-client-transaction-sender.ts:1050


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(),
});

▸ (params): Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

NameTypeDescription
paramsCommonTransactionParams & { selectionKey: Uint8Array ; stateProofKey?: Uint8Array ; voteFirst: bigint ; voteKey: Uint8Array ; voteKeyDilution: bigint ; voteLast: bigint } & SendParamsThe parameters for the key registration transaction

Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

src/types/algorand-client-transaction-sender.ts:1017


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,
});

▸ (params): Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

NameTypeDescription
paramsCommonTransactionParams & { amount: AlgoAmount ; closeRemainderTo?: string | Address ; receiver: string | Address } & SendParamsThe parameters for the payment transaction

Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

src/types/algorand-client-transaction-sender.ts:204

_send<T>(c, log?): (params: T & SendParams) => Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

Name
T
NameType
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

fn

▸ (params): Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

NameType
paramsT & SendParams

Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

src/types/algorand-client-transaction-sender.ts:68


_sendAppCall<T>(c, log?): (params: T & SendParams) => Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

NameType
Textends { 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
NameType
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

fn

▸ (params): Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

NameType
paramsT & SendParams

Promise<{ confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

src/types/algorand-client-transaction-sender.ts:103


_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[] }>

NameType
Textends { 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
NameType
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

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[] }>

NameType
paramsT & 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[] }>

src/types/algorand-client-transaction-sender.ts:146


_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[] }>

NameType
Textends { 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
NameType
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

fn

▸ (params): Promise<{ compiledApproval?: CompiledTeal ; compiledClear?: CompiledTeal ; confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

NameType
paramsT & SendParams

Promise<{ compiledApproval?: CompiledTeal ; compiledClear?: CompiledTeal ; confirmation: PendingTransactionResponse ; confirmations: PendingTransactionResponse[] ; groupId: string ; return?: ABIReturn ; returns?: ABIReturn[] ; transaction: Transaction ; transactions: Transaction[] ; txIds: string[] }>

src/types/algorand-client-transaction-sender.ts:127


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.

NameTypeDescription
paramsCommonTransactionParams & { 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 } & SendParamsThe parameters for the asset creation transaction

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,
});

src/types/algorand-client-transaction-sender.ts:255


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

NameTypeDescription
paramsOmit<AssetOptOutParams, "creator"> & { creator?: string | Address ; ensureZeroBalance: boolean } & SendParamsThe parameters for the asset opt-out transaction

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,
});

src/types/algorand-client-transaction-sender.ts:511


newGroup(): TransactionComposer

Start a new TransactionComposer transaction group

TransactionComposer

A new instance of TransactionComposer.

Example

const composer = AlgorandClient.mainNet().send.newGroup();
const result = await composer.addTransaction(payment).send();

src/types/algorand-client-transaction-sender.ts:64