AlgorandClientTransactionSender
Defined in: src/algorand-client-transaction-sender.ts:38
Orchestrates sending transactions for AlgorandClient.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AlgorandClientTransactionSender(
newGroup,assetManager,appManager):AlgorandClientTransactionSender
Defined in: src/algorand-client-transaction-sender.ts:53
Creates a new AlgorandClientSender
Parameters
Section titled “Parameters”newGroup
Section titled “newGroup”(config?) => TransactionComposer
A lambda that starts a new TransactionComposer transaction group
assetManager
Section titled “assetManager”An AssetManager instance
appManager
Section titled “appManager”An AppManager instance
Returns
Section titled “Returns”AlgorandClientTransactionSender
Example
Section titled “Example”const transactionSender = new AlgorandClientTransactionSender(() => new TransactionComposer(), assetManager, appManager)Properties
Section titled “Properties”appCall()
Section titled “appCall()”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.
Parameters
Section titled “Parameters”params
Section titled “params”CommonTransactionParams & object & object & SendParams
The parameters for the app call transaction
Returns
Section titled “Returns”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
Examples
Section titled “Examples”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()
Section titled “appCallMethodCall()”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.
Parameters
Section titled “Parameters”params
Section titled “params”object & SendParams
The parameters for the app call transaction
Returns
Section titled “Returns”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
Examples
Section titled “Examples”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()
Section titled “appCreate()”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.
Parameters
Section titled “Parameters”params
Section titled “params”object & SendParams
The parameters for the app creation transaction
Returns
Section titled “Returns”Promise<{ appAddress: Address; appId: bigint; compiledApproval?: CompiledTeal; compiledClear?: CompiledTeal; confirmation: PendingTransactionResponse; confirmations: PendingTransactionResponse[]; groupId: string | undefined; return?: ABIReturn; returns?: ABIReturn[]; transaction: Transaction; transactions: Transaction[]; txIds: string[]; }>
The result of the app create transaction and the transaction that was sent
Examples
Section titled “Examples”const result = await algorand.send.appCreate({ sender: 'CREATORADDRESS', approvalProgram: 'TEALCODE', clearStateProgram: 'TEALCODE' })const createdAppId = result.appIdawait 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()
Section titled “appCreateMethodCall()”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.
Parameters
Section titled “Parameters”params
Section titled “params”object & SendParams
The parameters for the app creation transaction
Returns
Section titled “Returns”Promise<{ appAddress: Address; appId: bigint; compiledApproval?: CompiledTeal; compiledClear?: CompiledTeal; confirmation: PendingTransactionResponse; confirmations: PendingTransactionResponse[]; groupId: string | 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
Examples
Section titled “Examples”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.appIdconst 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()
Section titled “appDelete()”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.
Parameters
Section titled “Parameters”params
Section titled “params”CommonTransactionParams & object & object & SendParams
The parameters for the app deletion transaction
Returns
Section titled “Returns”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
Examples
Section titled “Examples”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()
Section titled “appDeleteMethodCall()”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.
Parameters
Section titled “Parameters”params
Section titled “params”object & SendParams
The parameters for the app deletion transaction
Returns
Section titled “Returns”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
Examples
Section titled “Examples”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()
Section titled “appUpdate()”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.
Parameters
Section titled “Parameters”params
Section titled “params”object & SendParams
The parameters for the app update transaction
Returns
Section titled “Returns”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
Examples
Section titled “Examples”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()
Section titled “appUpdateMethodCall()”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.
Parameters
Section titled “Parameters”params
Section titled “params”object & SendParams
The parameters for the app update transaction
Returns
Section titled “Returns”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
Examples
Section titled “Examples”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()
Section titled “assetConfig()”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.
Parameters
Section titled “Parameters”params
Section titled “params”CommonTransactionParams & object & SendParams
The parameters for the asset config transaction
Returns
Section titled “Returns”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
Examples
Section titled “Examples”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()
Section titled “assetDestroy()”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.
Parameters
Section titled “Parameters”params
Section titled “params”CommonTransactionParams & object & SendParams
The parameters for the asset destroy transaction
Returns
Section titled “Returns”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
Examples
Section titled “Examples”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()
Section titled “assetFreeze()”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.
Parameters
Section titled “Parameters”params
Section titled “params”CommonTransactionParams & object & SendParams
The parameters for the asset freeze transaction
Returns
Section titled “Returns”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
Examples
Section titled “Examples”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()
Section titled “assetOptIn()”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.
Parameters
Section titled “Parameters”params
Section titled “params”CommonTransactionParams & object & SendParams
The parameters for the asset opt-in transaction
Returns
Section titled “Returns”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
Examples
Section titled “Examples”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()
Section titled “assetTransfer()”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.
Parameters
Section titled “Parameters”params
Section titled “params”CommonTransactionParams & object & SendParams
The parameters for the asset transfer transaction
Returns
Section titled “Returns”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
Examples
Section titled “Examples”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()
Section titled “offlineKeyRegistration()”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.
Parameters
Section titled “Parameters”params
Section titled “params”CommonTransactionParams & object & SendParams
The parameters for the key registration transaction
Returns
Section titled “Returns”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
Examples
Section titled “Examples”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()
Section titled “onlineKeyRegistration()”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.
Parameters
Section titled “Parameters”params
Section titled “params”CommonTransactionParams & object & SendParams
The parameters for the key registration transaction
Returns
Section titled “Returns”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
Examples
Section titled “Examples”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()
Section titled “payment()”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.
Parameters
Section titled “Parameters”params
Section titled “params”CommonTransactionParams & object & SendParams
The parameters for the payment transaction
Returns
Section titled “Returns”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
Examples
Section titled “Examples”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,})Methods
Section titled “Methods”assetCreate()
Section titled “assetCreate()”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.
Parameters
Section titled “Parameters”params
Section titled “params”CommonTransactionParams & object & SendParams
The parameters for the asset creation transaction
Returns
Section titled “Returns”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
Examples
Section titled “Examples”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,})assetOptOut()
Section titled “assetOptOut()”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).
Parameters
Section titled “Parameters”params
Section titled “params”Omit<AssetOptOutParams, "creator"> & object & SendParams
The parameters for the asset opt-out transaction
Returns
Section titled “Returns”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
Examples
Section titled “Examples”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()
Section titled “newGroup()”newGroup():
TransactionComposer
Defined in: src/algorand-client-transaction-sender.ts:66
Start a new TransactionComposer transaction group
Returns
Section titled “Returns”A new instance of TransactionComposer.
Example
Section titled “Example”const composer = AlgorandClient.mainNet().send.newGroup();const result = await composer.addTransaction(payment).send()