Skip to content

AlgorandClientTransactionSender

Defined in: src/algorand-client-transaction-sender.ts:38

Orchestrates sending transactions for AlgorandClient.

new AlgorandClientTransactionSender(newGroup, assetManager, appManager): AlgorandClientTransactionSender

Defined in: src/algorand-client-transaction-sender.ts:53

Creates a new AlgorandClientSender

(config?) => TransactionComposer

A lambda that starts a new TransactionComposer transaction group

AssetManager

An AssetManager instance

AppManager

An AppManager instance

AlgorandClientTransactionSender

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

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

Defined in: src/algorand-client-transaction-sender.ts:736

Call a smart contract.

Note: you may prefer to use algorand.client to get an app client for more advanced functionality.

CommonTransactionParams & object & object & SendParams

The parameters for the app call transaction

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

The result of the app call transaction and the transaction that was sent

await algorand.send.appCall({ sender: 'CREATORADDRESS' })
await algorand.send.appCall({
sender: 'CREATORADDRESS',
onComplete: OnApplicationComplete.OptIn,
args: [new Uint8Array(1, 2, 3, 4)]
accountReferences: ["ACCOUNT_1"]
appReferences: [123n, 1234n]
assetReferences: [12345n]
boxReferences: ["box1", {appId: 1234n, name: "box2"}]
accessReferences: [{ appId: 1234n }]
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(),
rejectVersion: 1,
// 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,
})

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

Defined in: src/algorand-client-transaction-sender.ts:984

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.

object & SendParams

The parameters for the app call transaction

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

The result of the application ABI method call transaction and the transaction that was sent

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"] })
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: OnApplicationComplete.OptIn,
args: [new Uint8Array(1, 2, 3, 4)]
accountReferences: ["ACCOUNT_1"]
appReferences: [123n, 1234n]
assetReferences: [12345n]
boxReferences: ["box1", {appId: 1234n, name: "box2"}]
accessReferences: [{ appId: 1234n }]
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(),
rejectVersion: 1,
// 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,
})

appCreate: (params) => Promise<{ appAddress: Address; appId: bigint; compiledApproval?: CompiledTeal; compiledClear?: CompiledTeal; confirmation: PendingTransactionResponse; confirmations: PendingTransactionResponse[]; groupId: string | undefined; return?: ABIReturn; returns?: ABIReturn[]; transaction: Transaction; transactions: Transaction[]; txIds: string[]; }>

Defined in: src/algorand-client-transaction-sender.ts:593

Create a smart contract.

Note: you may prefer to use algorand.client to get an app client for more advanced functionality.

object & SendParams

The parameters for the app creation transaction

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

The result of the app create transaction and the transaction that was sent

const result = await algorand.send.appCreate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })
const createdAppId = result.appId
await algorand.send.appCreate({
sender: 'CREATORADDRESS',
approvalProgram: "TEALCODE",
clearStateProgram: "TEALCODE",
schema: {
globalInts: 1,
globalByteSlices: 2,
localInts: 3,
localByteSlices: 4
},
extraProgramPages: 1,
onComplete: OnApplicationComplete.OptIn,
args: [new Uint8Array(1, 2, 3, 4)]
accountReferences: ["ACCOUNT_1"]
appReferences: [123n, 1234n]
assetReferences: [12345n]
boxReferences: ["box1", {appId: 1234n, name: "box2"}]
accessReferences: [{ appId: 1234n }]
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(),
rejectVersion: 1,
// 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,
})

appCreateMethodCall: (params) => Promise<{ appAddress: Address; appId: bigint; compiledApproval?: CompiledTeal; compiledClear?: CompiledTeal; confirmation: PendingTransactionResponse; confirmations: PendingTransactionResponse[]; groupId: string | undefined; return?: ABIReturn; returns?: ABIReturn[]; transaction: Transaction; transactions: Transaction[]; txIds: string[]; }>

Defined in: src/algorand-client-transaction-sender.ts:805

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.

object & SendParams

The parameters for the app creation transaction

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

The result of the application ABI method create transaction and the transaction that was sent

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
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: OnApplicationComplete.OptIn,
args: [new Uint8Array(1, 2, 3, 4)]
accountReferences: ["ACCOUNT_1"]
appReferences: [123n, 1234n]
assetReferences: [12345n]
boxReferences: ["box1", {appId: 1234n, name: "box2"}]
accessReferences: [{ appId: 1234n }]
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(),
rejectVersion: 1,
// 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,
})

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

Defined in: src/algorand-client-transaction-sender.ts:689

Delete a smart contract.

Note: you may prefer to use algorand.client to get an app client for more advanced functionality.

CommonTransactionParams & object & object & SendParams

The parameters for the app deletion transaction

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

The result of the app delete transaction and the transaction that was sent

await algorand.send.appDelete({ sender: 'CREATORADDRESS' })
await algorand.send.appDelete({
sender: 'CREATORADDRESS',
onComplete: OnApplicationComplete.DeleteApplication,
args: [new Uint8Array(1, 2, 3, 4)]
accountReferences: ["ACCOUNT_1"]
appReferences: [123n, 1234n]
assetReferences: [12345n]
boxReferences: ["box1", {appId: 1234n, name: "box2"}]
accessReferences: [{ appId: 1234n }]
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(),
rejectVersion: 1,
// 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,
})

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

Defined in: src/algorand-client-transaction-sender.ts:925

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.

object & SendParams

The parameters for the app deletion transaction

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

The result of the application ABI method delete transaction and the transaction that was sent

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"] })
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: OnApplicationComplete.DeleteApplication,
args: [new Uint8Array(1, 2, 3, 4)]
accountReferences: ["ACCOUNT_1"]
appReferences: [123n, 1234n]
assetReferences: [12345n]
boxReferences: ["box1", {appId: 1234n, name: "box2"}]
accessReferences: [{ appId: 1234n }]
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(),
rejectVersion: 1,
// 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,
})

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

Defined in: src/algorand-client-transaction-sender.ts:642

Update a smart contract.

Note: you may prefer to use algorand.client to get an app client for more advanced functionality.

object & SendParams

The parameters for the app update transaction

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

The result of the app update transaction and the transaction that was sent

await algorand.send.appUpdate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })
await algorand.send.appUpdate({
sender: 'CREATORADDRESS',
approvalProgram: "TEALCODE",
clearStateProgram: "TEALCODE",
onComplete: OnApplicationComplete.UpdateApplication,
args: [new Uint8Array(1, 2, 3, 4)]
accountReferences: ["ACCOUNT_1"]
appReferences: [123n, 1234n]
assetReferences: [12345n]
boxReferences: ["box1", {appId: 1234n, name: "box2"}]
accessReferences: [{ appId: 1234n }]
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(),
rejectVersion: 1,
// 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,
})

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

Defined in: src/algorand-client-transaction-sender.ts:866

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.

object & SendParams

The parameters for the app update transaction

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

The result of the application ABI method update transaction and the transaction that was sent

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"] })
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: OnApplicationComplete.UpdateApplication,
args: [new Uint8Array(1, 2, 3, 4)]
accountReferences: ["ACCOUNT_1"]
appReferences: [123n, 1234n]
assetReferences: [12345n]
boxReferences: ["box1", {appId: 1234n, name: "box2"}]
accessReferences: [{ appId: 1234n }]
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(),
rejectVersion: 1,
// 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,
})

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

Defined in: src/algorand-client-transaction-sender.ts:300

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.

CommonTransactionParams & object & SendParams

The parameters for the asset config transaction

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

The result of the asset config transaction and the transaction that was sent

await algorand.send.assetConfig({ sender: "MANAGERADDRESS", assetId: 123456n, manager: "MANAGERADDRESS" })
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,
})

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

Defined in: src/algorand-client-transaction-sender.ts:380

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.

CommonTransactionParams & object & SendParams

The parameters for the asset destroy transaction

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

The result of the asset destroy transaction and the transaction that was sent

await algorand.send.assetDestroy({ sender: "MANAGERADDRESS", assetId: 123456n })
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,
})

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

Defined in: src/algorand-client-transaction-sender.ts:339

Freeze or unfreeze an Algorand Standard Asset for an account.

CommonTransactionParams & object & SendParams

The parameters for the asset freeze transaction

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

The result of the asset freeze transaction and the transaction that was sent

await algorand.send.assetFreeze({ sender: "MANAGERADDRESS", assetId: 123456n, account: "ACCOUNTADDRESS", frozen: true })
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,
})

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

Defined in: src/algorand-client-transaction-sender.ts:460

Opt an account into an Algorand Standard Asset.

CommonTransactionParams & object & SendParams

The parameters for the asset opt-in transaction

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

The result of the asset opt-in transaction and the transaction that was sent

await algorand.send.assetOptIn({ sender: "SENDERADDRESS", assetId: 123456n })
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,
})

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

Defined in: src/algorand-client-transaction-sender.ts:422

Transfer an Algorand Standard Asset.

CommonTransactionParams & object & SendParams

The parameters for the asset transfer transaction

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

The result of the asset transfer transaction and the transaction that was sent

await algorand.send.assetTransfer({ sender: "HOLDERADDRESS", assetId: 123456n, amount: 1n, receiver: "RECEIVERADDRESS" })
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,
})

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

Defined in: src/algorand-client-transaction-sender.ts:1063

Register an offline key.

CommonTransactionParams & object & SendParams

The parameters for the key registration transaction

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

The result of the offline key registration transaction and the transaction that was sent

const result = await algorand.send.offlineKeyRegistration({
sender: 'SENDERADDRESS',
})
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(),
})

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

Defined in: src/algorand-client-transaction-sender.ts:1030

Register an online key.

CommonTransactionParams & object & SendParams

The parameters for the key registration transaction

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

The result of the online key registration transaction and the transaction that was sent

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

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

Defined in: src/algorand-client-transaction-sender.ts:201

Send a payment transaction to transfer Algo between accounts.

CommonTransactionParams & object & SendParams

The parameters for the payment transaction

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

The result of the payment transaction and the transaction that was sent

Basic example
{@includeCode ./algorand-client.spec.ts#example-send-payment}
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,
})

Full working example

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

Defined in: src/algorand-client-transaction-sender.ts:251

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.

CommonTransactionParams & object & SendParams

The parameters for the asset creation transaction

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

The result of the asset create transaction and the transaction that was sent

Basic example
{@includeCode ./algorand-client.spec.ts#example-send-asset-create}
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,
})

Full working example


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

Defined in: src/algorand-client-transaction-sender.ts:508

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

Omit<AssetOptOutParams, "creator"> & object & SendParams

The parameters for the asset opt-out transaction

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

The result of the asset opt-out transaction and the transaction that was sent

await algorand.send.assetOptOut({ sender: "SENDERADDRESS", assetId: 123456n, ensureZeroBalance: true })
await algorand.send.assetOptOut({ sender: "SENDERADDRESS", creator: "CREATORADDRESS", assetId: 123456n, ensureZeroBalance: true })
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,
})

newGroup(): TransactionComposer

Defined in: src/algorand-client-transaction-sender.ts:66

Start a new TransactionComposer transaction group

TransactionComposer

A new instance of TransactionComposer.

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