diff --git a/docs/code/README.md b/docs/code/README.md index 6d97e94c..f07fa41d 100644 --- a/docs/code/README.md +++ b/docs/code/README.md @@ -13,8 +13,8 @@ - [types/account-manager.spec](modules/types_account_manager_spec.md) - [types/algo-http-client-with-retry](modules/types_algo_http_client_with_retry.md) - [types/algorand-client](modules/types_algorand_client.md) -- [types/algorand-client-sender](modules/types_algorand_client_sender.md) - [types/algorand-client-transaction-creator](modules/types_algorand_client_transaction_creator.md) +- [types/algorand-client-transaction-sender](modules/types_algorand_client_transaction_sender.md) - [types/algorand-client.asset.spec](modules/types_algorand_client_asset_spec.md) - [types/algorand-client.spec](modules/types_algorand_client_spec.md) - [types/algorand-client.transfer.spec](modules/types_algorand_client_transfer_spec.md) diff --git a/docs/code/classes/types_account_manager.AccountManager.md b/docs/code/classes/types_account_manager.AccountManager.md index a3e09a0c..25ac4e9b 100644 --- a/docs/code/classes/types_account_manager.AccountManager.md +++ b/docs/code/classes/types_account_manager.AccountManager.md @@ -671,7 +671,7 @@ ___ ### rekeyAccount -▸ **rekeyAccount**(`account`, `rekeyTo`, `options?`): `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +▸ **rekeyAccount**(`account`, `rekeyTo`, `options?`): `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> Rekey an account to a new address. @@ -687,7 +687,7 @@ Rekey an account to a new address. #### Returns -`Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +`Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> The result of the transaction and the transaction that was sent diff --git a/docs/code/classes/types_algorand_client.AlgorandClient.md b/docs/code/classes/types_algorand_client.AlgorandClient.md index 9bbd9719..3a9df0a9 100644 --- a/docs/code/classes/types_algorand_client.AlgorandClient.md +++ b/docs/code/classes/types_algorand_client.AlgorandClient.md @@ -21,8 +21,8 @@ A client that brokers easy access to Algorand functionality. - [\_cachedSuggestedParamsTimeout](types_algorand_client.AlgorandClient.md#_cachedsuggestedparamstimeout) - [\_clientManager](types_algorand_client.AlgorandClient.md#_clientmanager) - [\_defaultValidityWindow](types_algorand_client.AlgorandClient.md#_defaultvaliditywindow) -- [\_sender](types_algorand_client.AlgorandClient.md#_sender) - [\_transactionCreator](types_algorand_client.AlgorandClient.md#_transactioncreator) +- [\_transactionSender](types_algorand_client.AlgorandClient.md#_transactionsender) ### Accessors @@ -141,23 +141,23 @@ ___ ___ -### \_sender +### \_transactionCreator -• `Private` **\_sender**: [`AlgorandClientSender`](types_algorand_client_sender.AlgorandClientSender.md) +• `Private` **\_transactionCreator**: [`AlgorandClientTransactionCreator`](types_algorand_client_transaction_creator.AlgorandClientTransactionCreator.md) #### Defined in -[src/types/algorand-client.ts:20](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L20) +[src/types/algorand-client.ts:21](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L21) ___ -### \_transactionCreator +### \_transactionSender -• `Private` **\_transactionCreator**: [`AlgorandClientTransactionCreator`](types_algorand_client_transaction_creator.AlgorandClientTransactionCreator.md) +• `Private` **\_transactionSender**: [`AlgorandClientTransactionSender`](types_algorand_client_transaction_sender.AlgorandClientTransactionSender.md) #### Defined in -[src/types/algorand-client.ts:21](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L21) +[src/types/algorand-client.ts:20](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L20) ## Accessors @@ -211,13 +211,13 @@ ___ ### send -• `get` **send**(): [`AlgorandClientSender`](types_algorand_client_sender.AlgorandClientSender.md) +• `get` **send**(): [`AlgorandClientTransactionSender`](types_algorand_client_transaction_sender.AlgorandClientTransactionSender.md) Methods for sending a single transaction. #### Returns -[`AlgorandClientSender`](types_algorand_client_sender.AlgorandClientSender.md) +[`AlgorandClientTransactionSender`](types_algorand_client_transaction_sender.AlgorandClientTransactionSender.md) #### Defined in diff --git a/docs/code/classes/types_algorand_client_sender.AlgorandClientSender.md b/docs/code/classes/types_algorand_client_transaction_sender.AlgorandClientTransactionSender.md similarity index 78% rename from docs/code/classes/types_algorand_client_sender.AlgorandClientSender.md rename to docs/code/classes/types_algorand_client_transaction_sender.AlgorandClientTransactionSender.md index 6b4a23d9..e1689471 100644 --- a/docs/code/classes/types_algorand_client_sender.AlgorandClientSender.md +++ b/docs/code/classes/types_algorand_client_transaction_sender.AlgorandClientTransactionSender.md @@ -1,8 +1,8 @@ -[@algorandfoundation/algokit-utils](../README.md) / [types/algorand-client-sender](../modules/types_algorand_client_sender.md) / AlgorandClientSender +[@algorandfoundation/algokit-utils](../README.md) / [types/algorand-client-transaction-sender](../modules/types_algorand_client_transaction_sender.md) / AlgorandClientTransactionSender -# Class: AlgorandClientSender +# Class: AlgorandClientTransactionSender -[types/algorand-client-sender](../modules/types_algorand_client_sender.md).AlgorandClientSender +[types/algorand-client-transaction-sender](../modules/types_algorand_client_transaction_sender.md).AlgorandClientTransactionSender Orchestrates sending transactions for `AlgorandClient`. @@ -10,33 +10,33 @@ Orchestrates sending transactions for `AlgorandClient`. ### Constructors -- [constructor](types_algorand_client_sender.AlgorandClientSender.md#constructor) +- [constructor](types_algorand_client_transaction_sender.AlgorandClientTransactionSender.md#constructor) ### Properties -- [\_assetManager](types_algorand_client_sender.AlgorandClientSender.md#_assetmanager) -- [\_newGroup](types_algorand_client_sender.AlgorandClientSender.md#_newgroup) -- [appCall](types_algorand_client_sender.AlgorandClientSender.md#appcall) -- [assetConfig](types_algorand_client_sender.AlgorandClientSender.md#assetconfig) -- [assetDestroy](types_algorand_client_sender.AlgorandClientSender.md#assetdestroy) -- [assetFreeze](types_algorand_client_sender.AlgorandClientSender.md#assetfreeze) -- [assetOptIn](types_algorand_client_sender.AlgorandClientSender.md#assetoptin) -- [assetTransfer](types_algorand_client_sender.AlgorandClientSender.md#assettransfer) -- [methodCall](types_algorand_client_sender.AlgorandClientSender.md#methodcall) -- [onlineKeyRegistration](types_algorand_client_sender.AlgorandClientSender.md#onlinekeyregistration) -- [payment](types_algorand_client_sender.AlgorandClientSender.md#payment) +- [\_assetManager](types_algorand_client_transaction_sender.AlgorandClientTransactionSender.md#_assetmanager) +- [\_newGroup](types_algorand_client_transaction_sender.AlgorandClientTransactionSender.md#_newgroup) +- [appCall](types_algorand_client_transaction_sender.AlgorandClientTransactionSender.md#appcall) +- [assetConfig](types_algorand_client_transaction_sender.AlgorandClientTransactionSender.md#assetconfig) +- [assetDestroy](types_algorand_client_transaction_sender.AlgorandClientTransactionSender.md#assetdestroy) +- [assetFreeze](types_algorand_client_transaction_sender.AlgorandClientTransactionSender.md#assetfreeze) +- [assetOptIn](types_algorand_client_transaction_sender.AlgorandClientTransactionSender.md#assetoptin) +- [assetTransfer](types_algorand_client_transaction_sender.AlgorandClientTransactionSender.md#assettransfer) +- [methodCall](types_algorand_client_transaction_sender.AlgorandClientTransactionSender.md#methodcall) +- [onlineKeyRegistration](types_algorand_client_transaction_sender.AlgorandClientTransactionSender.md#onlinekeyregistration) +- [payment](types_algorand_client_transaction_sender.AlgorandClientTransactionSender.md#payment) ### Methods -- [\_send](types_algorand_client_sender.AlgorandClientSender.md#_send) -- [assetCreate](types_algorand_client_sender.AlgorandClientSender.md#assetcreate) -- [assetOptOut](types_algorand_client_sender.AlgorandClientSender.md#assetoptout) +- [\_send](types_algorand_client_transaction_sender.AlgorandClientTransactionSender.md#_send) +- [assetCreate](types_algorand_client_transaction_sender.AlgorandClientTransactionSender.md#assetcreate) +- [assetOptOut](types_algorand_client_transaction_sender.AlgorandClientTransactionSender.md#assetoptout) ## Constructors ### constructor -• **new AlgorandClientSender**(`newGroup`, `assetManager`): [`AlgorandClientSender`](types_algorand_client_sender.AlgorandClientSender.md) +• **new AlgorandClientTransactionSender**(`newGroup`, `assetManager`): [`AlgorandClientTransactionSender`](types_algorand_client_transaction_sender.AlgorandClientTransactionSender.md) Creates a new `AlgorandClientSender` @@ -49,11 +49,11 @@ Creates a new `AlgorandClientSender` #### Returns -[`AlgorandClientSender`](types_algorand_client_sender.AlgorandClientSender.md) +[`AlgorandClientTransactionSender`](types_algorand_client_transaction_sender.AlgorandClientTransactionSender.md) #### Defined in -[src/types/algorand-client-sender.ts:22](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-sender.ts#L22) +src/types/algorand-client-transaction-sender.ts:22 ## Properties @@ -63,7 +63,7 @@ Creates a new `AlgorandClientSender` #### Defined in -[src/types/algorand-client-sender.ts:15](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-sender.ts#L15) +src/types/algorand-client-transaction-sender.ts:15 ___ @@ -81,13 +81,13 @@ ___ #### Defined in -[src/types/algorand-client-sender.ts:14](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-sender.ts#L14) +src/types/algorand-client-transaction-sender.ts:14 ___ ### appCall -• **appCall**: (`params`: [`CommonTransactionParams`](../modules/types_composer.md#commontransactionparams) & \{ `accountReferences?`: `string`[] ; `appId?`: `bigint` ; `appReferences?`: `bigint`[] ; `approvalProgram?`: `Uint8Array` ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: `BoxReference`[] ; `clearProgram?`: `Uint8Array` ; `extraPages?`: `number` ; `onComplete?`: `OnApplicationComplete` ; `schema?`: \{ `globalByteSlices`: `number` ; `globalUints`: `number` ; `localByteSlices`: `number` ; `localUints`: `number` } } & [`ExecuteParams`](../interfaces/types_composer.ExecuteParams.md)) => `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +• **appCall**: (`params`: [`CommonTransactionParams`](../modules/types_composer.md#commontransactionparams) & \{ `accountReferences?`: `string`[] ; `appId?`: `bigint` ; `appReferences?`: `bigint`[] ; `approvalProgram?`: `Uint8Array` ; `args?`: `Uint8Array`[] ; `assetReferences?`: `bigint`[] ; `boxReferences?`: `BoxReference`[] ; `clearProgram?`: `Uint8Array` ; `extraPages?`: `number` ; `onComplete?`: `OnApplicationComplete` ; `schema?`: \{ `globalByteSlices`: `number` ; `globalUints`: `number` ; `localByteSlices`: `number` ; `localUints`: `number` } } & [`ExecuteParams`](../interfaces/types_composer.ExecuteParams.md)) => `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> Call a smart contract. @@ -95,7 +95,7 @@ Note: you may prefer to use `algorandClient.client` to get an app client for mor #### Type declaration -▸ (`params`): `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +▸ (`params`): `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> ##### Parameters @@ -105,17 +105,17 @@ Note: you may prefer to use `algorandClient.client` to get an app client for mor ##### Returns -`Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +`Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> #### Defined in -[src/types/algorand-client-sender.ts:448](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-sender.ts#L448) +src/types/algorand-client-transaction-sender.ts:448 ___ ### assetConfig -• **assetConfig**: (`params`: [`CommonTransactionParams`](../modules/types_composer.md#commontransactionparams) & \{ `assetId`: `bigint` ; `clawback?`: `string` ; `freeze?`: `string` ; `manager`: `undefined` \| `string` ; `reserve?`: `string` } & [`ExecuteParams`](../interfaces/types_composer.ExecuteParams.md)) => `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +• **assetConfig**: (`params`: [`CommonTransactionParams`](../modules/types_composer.md#commontransactionparams) & \{ `assetId`: `bigint` ; `clawback?`: `string` ; `freeze?`: `string` ; `manager`: `undefined` \| `string` ; `reserve?`: `string` } & [`ExecuteParams`](../interfaces/types_composer.ExecuteParams.md)) => `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> Configure an existing Algorand Standard Asset. @@ -160,7 +160,7 @@ await algorand.send.assetConfig({ #### Type declaration -▸ (`params`): `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +▸ (`params`): `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> ##### Parameters @@ -170,17 +170,17 @@ await algorand.send.assetConfig({ ##### Returns -`Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +`Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> #### Defined in -[src/types/algorand-client-sender.ts:203](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-sender.ts#L203) +src/types/algorand-client-transaction-sender.ts:203 ___ ### assetDestroy -• **assetDestroy**: (`params`: [`CommonTransactionParams`](../modules/types_composer.md#commontransactionparams) & \{ `assetId`: `bigint` } & [`ExecuteParams`](../interfaces/types_composer.ExecuteParams.md)) => `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +• **assetDestroy**: (`params`: [`CommonTransactionParams`](../modules/types_composer.md#commontransactionparams) & \{ `assetId`: `bigint` } & [`ExecuteParams`](../interfaces/types_composer.ExecuteParams.md)) => `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> Destroys an Algorand Standard Asset. @@ -221,7 +221,7 @@ await algorand.send.assetDestroy({ #### Type declaration -▸ (`params`): `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +▸ (`params`): `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> ##### Parameters @@ -231,17 +231,17 @@ await algorand.send.assetDestroy({ ##### Returns -`Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +`Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> #### Defined in -[src/types/algorand-client-sender.ts:283](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-sender.ts#L283) +src/types/algorand-client-transaction-sender.ts:283 ___ ### assetFreeze -• **assetFreeze**: (`params`: [`CommonTransactionParams`](../modules/types_composer.md#commontransactionparams) & \{ `account`: `string` ; `assetId`: `bigint` ; `frozen`: `boolean` } & [`ExecuteParams`](../interfaces/types_composer.ExecuteParams.md)) => `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +• **assetFreeze**: (`params`: [`CommonTransactionParams`](../modules/types_composer.md#commontransactionparams) & \{ `account`: `string` ; `assetId`: `bigint` ; `frozen`: `boolean` } & [`ExecuteParams`](../interfaces/types_composer.ExecuteParams.md)) => `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> Freeze or unfreeze an Algorand Standard Asset for an account. @@ -280,7 +280,7 @@ await algorand.send.assetFreeze({ #### Type declaration -▸ (`params`): `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +▸ (`params`): `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> ##### Parameters @@ -290,17 +290,17 @@ await algorand.send.assetFreeze({ ##### Returns -`Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +`Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> #### Defined in -[src/types/algorand-client-sender.ts:242](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-sender.ts#L242) +src/types/algorand-client-transaction-sender.ts:242 ___ ### assetOptIn -• **assetOptIn**: (`params`: [`CommonTransactionParams`](../modules/types_composer.md#commontransactionparams) & \{ `assetId`: `bigint` } & [`ExecuteParams`](../interfaces/types_composer.ExecuteParams.md)) => `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +• **assetOptIn**: (`params`: [`CommonTransactionParams`](../modules/types_composer.md#commontransactionparams) & \{ `assetId`: `bigint` } & [`ExecuteParams`](../interfaces/types_composer.ExecuteParams.md)) => `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> Opt an account into an Algorand Standard Asset. @@ -337,7 +337,7 @@ await algorand.send.assetOptIn({ #### Type declaration -▸ (`params`): `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +▸ (`params`): `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> ##### Parameters @@ -347,17 +347,17 @@ await algorand.send.assetOptIn({ ##### Returns -`Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +`Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> #### Defined in -[src/types/algorand-client-sender.ts:363](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-sender.ts#L363) +src/types/algorand-client-transaction-sender.ts:363 ___ ### assetTransfer -• **assetTransfer**: (`params`: [`CommonTransactionParams`](../modules/types_composer.md#commontransactionparams) & \{ `amount`: `bigint` ; `assetId`: `bigint` ; `clawbackTarget?`: `string` ; `closeAssetTo?`: `string` ; `receiver`: `string` } & [`ExecuteParams`](../interfaces/types_composer.ExecuteParams.md)) => `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +• **assetTransfer**: (`params`: [`CommonTransactionParams`](../modules/types_composer.md#commontransactionparams) & \{ `amount`: `bigint` ; `assetId`: `bigint` ; `clawbackTarget?`: `string` ; `closeAssetTo?`: `string` ; `receiver`: `string` } & [`ExecuteParams`](../interfaces/types_composer.ExecuteParams.md)) => `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> Transfer an Algorand Standard Asset. @@ -399,7 +399,7 @@ await algorand.send.assetTransfer({ #### Type declaration -▸ (`params`): `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +▸ (`params`): `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> ##### Parameters @@ -409,17 +409,17 @@ await algorand.send.assetTransfer({ ##### Returns -`Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +`Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> #### Defined in -[src/types/algorand-client-sender.ts:325](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-sender.ts#L325) +src/types/algorand-client-transaction-sender.ts:325 ___ ### methodCall -• **methodCall**: (`params`: [`CommonTransactionParams`](../modules/types_composer.md#commontransactionparams) & `Omit`\<[`AppCallParams`](../modules/types_composer.md#appcallparams), ``"args"``\> & \{ `appId`: `bigint` ; `args?`: (`TransactionWithSigner` \| `Transaction` \| `ABIValue` \| `Promise`\<`Transaction`\> \| [`MethodCallParams`](../modules/types_composer.md#methodcallparams))[] ; `method`: `ABIMethod` } & [`ExecuteParams`](../interfaces/types_composer.ExecuteParams.md)) => `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +• **methodCall**: (`params`: [`CommonTransactionParams`](../modules/types_composer.md#commontransactionparams) & `Omit`\<[`AppCallParams`](../modules/types_composer.md#appcallparams), ``"args"``\> & \{ `appId`: `bigint` ; `args?`: (`TransactionWithSigner` \| `Transaction` \| `ABIValue` \| `Promise`\<`Transaction`\> \| [`MethodCallParams`](../modules/types_composer.md#methodcallparams))[] ; `method`: `ABIMethod` } & [`ExecuteParams`](../interfaces/types_composer.ExecuteParams.md)) => `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> Call a smart contract ABI method. @@ -427,7 +427,7 @@ Note: you may prefer to use `algorandClient.client` to get an app client for mor #### Type declaration -▸ (`params`): `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +▸ (`params`): `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> ##### Parameters @@ -437,23 +437,23 @@ Note: you may prefer to use `algorandClient.client` to get an app client for mor ##### Returns -`Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +`Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> #### Defined in -[src/types/algorand-client-sender.ts:454](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-sender.ts#L454) +src/types/algorand-client-transaction-sender.ts:454 ___ ### onlineKeyRegistration -• **onlineKeyRegistration**: (`params`: [`CommonTransactionParams`](../modules/types_composer.md#commontransactionparams) & \{ `selectionKey`: `Uint8Array` ; `stateProofKey?`: `Uint8Array` ; `voteFirst`: `bigint` ; `voteKey`: `Uint8Array` ; `voteKeyDilution`: `bigint` ; `voteLast`: `bigint` } & [`ExecuteParams`](../interfaces/types_composer.ExecuteParams.md)) => `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +• **onlineKeyRegistration**: (`params`: [`CommonTransactionParams`](../modules/types_composer.md#commontransactionparams) & \{ `selectionKey`: `Uint8Array` ; `stateProofKey?`: `Uint8Array` ; `voteFirst`: `bigint` ; `voteKey`: `Uint8Array` ; `voteKeyDilution`: `bigint` ; `voteLast`: `bigint` } & [`ExecuteParams`](../interfaces/types_composer.ExecuteParams.md)) => `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> Register an online key. #### Type declaration -▸ (`params`): `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +▸ (`params`): `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> ##### Parameters @@ -463,17 +463,17 @@ Register an online key. ##### Returns -`Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +`Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> #### Defined in -[src/types/algorand-client-sender.ts:456](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-sender.ts#L456) +src/types/algorand-client-transaction-sender.ts:456 ___ ### payment -• **payment**: (`params`: [`CommonTransactionParams`](../modules/types_composer.md#commontransactionparams) & \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` ; `receiver`: `string` } & [`ExecuteParams`](../interfaces/types_composer.ExecuteParams.md)) => `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +• **payment**: (`params`: [`CommonTransactionParams`](../modules/types_composer.md#commontransactionparams) & \{ `amount`: [`AlgoAmount`](types_amount.AlgoAmount.md) ; `closeRemainderTo?`: `string` ; `receiver`: `string` } & [`ExecuteParams`](../interfaces/types_composer.ExecuteParams.md)) => `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> Send a payment transaction to transfer Algo between accounts. @@ -518,7 +518,7 @@ const result = await algorandClient.send.payment({ #### Type declaration -▸ (`params`): `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +▸ (`params`): `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> ##### Parameters @@ -528,17 +528,17 @@ const result = await algorandClient.send.payment({ ##### Returns -`Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +`Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> #### Defined in -[src/types/algorand-client-sender.ts:103](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-sender.ts#L103) +src/types/algorand-client-transaction-sender.ts:103 ## Methods ### \_send -▸ **_send**\<`T`\>(`c`, `log?`): (`params`: `T` & [`ExecuteParams`](../interfaces/types_composer.ExecuteParams.md)) => `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +▸ **_send**\<`T`\>(`c`, `log?`): (`params`: `T` & [`ExecuteParams`](../interfaces/types_composer.ExecuteParams.md)) => `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> #### Type parameters @@ -552,14 +552,14 @@ const result = await algorandClient.send.payment({ | :------ | :------ | | `c` | (`c`: [`default`](types_composer.default.md)) => (`params`: `T`) => [`default`](types_composer.default.md) | | `log?` | `Object` | -| `log.postLog?` | (`params`: `T`, `result`: [`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)) => `string` | +| `log.postLog?` | (`params`: `T`, `result`: [`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)) => `string` | | `log.preLog?` | (`params`: `T`, `transaction`: `Transaction`) => `string` | #### Returns `fn` -▸ (`params`): `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +▸ (`params`): `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> ##### Parameters @@ -569,11 +569,11 @@ const result = await algorandClient.send.payment({ ##### Returns -`Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +`Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> #### Defined in -[src/types/algorand-client-sender.ts:27](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-sender.ts#L27) +src/types/algorand-client-transaction-sender.ts:27 ___ @@ -641,13 +641,13 @@ await algorand.send.assetCreate({ #### Defined in -[src/types/algorand-client-sender.ts:154](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-sender.ts#L154) +src/types/algorand-client-transaction-sender.ts:154 ___ ### assetOptOut -▸ **assetOptOut**(`params`): `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +▸ **assetOptOut**(`params`): `Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> Opt an account out of an Algorand Standard Asset. @@ -663,7 +663,7 @@ is set to `false` (but then the account will lose the assets). #### Returns -`Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_sender.md#sendsingletransactionresult)\> +`Promise`\<[`SendSingleTransactionResult`](../modules/types_algorand_client_transaction_sender.md#sendsingletransactionresult)\> The result of the transaction and the transaction that was sent @@ -708,4 +708,4 @@ await algorand.send.assetOptOut({ #### Defined in -[src/types/algorand-client-sender.ts:410](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-sender.ts#L410) +src/types/algorand-client-transaction-sender.ts:410 diff --git a/docs/code/modules/types_algorand_client_sender.md b/docs/code/modules/types_algorand_client_transaction_sender.md similarity index 55% rename from docs/code/modules/types_algorand_client_sender.md rename to docs/code/modules/types_algorand_client_transaction_sender.md index d179c2af..d0e2ee69 100644 --- a/docs/code/modules/types_algorand_client_sender.md +++ b/docs/code/modules/types_algorand_client_transaction_sender.md @@ -1,16 +1,16 @@ -[@algorandfoundation/algokit-utils](../README.md) / types/algorand-client-sender +[@algorandfoundation/algokit-utils](../README.md) / types/algorand-client-transaction-sender -# Module: types/algorand-client-sender +# Module: types/algorand-client-transaction-sender ## Table of contents ### Classes -- [AlgorandClientSender](../classes/types_algorand_client_sender.AlgorandClientSender.md) +- [AlgorandClientTransactionSender](../classes/types_algorand_client_transaction_sender.AlgorandClientTransactionSender.md) ### Type Aliases -- [SendSingleTransactionResult](types_algorand_client_sender.md#sendsingletransactionresult) +- [SendSingleTransactionResult](types_algorand_client_transaction_sender.md#sendsingletransactionresult) ## Type Aliases @@ -22,4 +22,4 @@ Result from sending a single transaction. #### Defined in -[src/types/algorand-client-sender.ts:10](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client-sender.ts#L10) +src/types/algorand-client-transaction-sender.ts:10 diff --git a/src/transaction/legacy-bridge.ts b/src/transaction/legacy-bridge.ts index cb36bd54..fe707b79 100644 --- a/src/transaction/legacy-bridge.ts +++ b/src/transaction/legacy-bridge.ts @@ -1,6 +1,6 @@ import algosdk from 'algosdk' -import { AlgorandClientSender, SendSingleTransactionResult } from '../types/algorand-client-sender' import { AlgorandClientTransactionCreator } from '../types/algorand-client-transaction-creator' +import { AlgorandClientTransactionSender, SendSingleTransactionResult } from '../types/algorand-client-transaction-sender' import { AssetManager } from '../types/asset-manager' import AlgoKitComposer, { CommonTransactionParams, ExecuteParams } from '../types/composer' import { SendTransactionFrom, SendTransactionParams, SendTransactionResult } from '../types/transaction' @@ -15,7 +15,7 @@ export async function legacySendTransactionBridge (params: T) => Promise, - send: (c: AlgorandClientSender) => (params: T & ExecuteParams) => Promise, + send: (c: AlgorandClientTransactionSender) => (params: T & ExecuteParams) => Promise, suggestedParams?: algosdk.SuggestedParams, ): Promise { const newGroup = () => @@ -24,7 +24,7 @@ export async function legacySendTransactionBridge getSenderTransactionSigner(from), getSuggestedParams: async () => await getTransactionParams(suggestedParams, algod), }) - const sender = new AlgorandClientSender(newGroup, new AssetManager(algod, newGroup)) + const transactionSender = new AlgorandClientTransactionSender(newGroup, new AssetManager(algod, newGroup)) const transactionCreator = new AlgorandClientTransactionCreator(newGroup) if (sendParams.fee) { @@ -42,5 +42,5 @@ export async function legacySendTransactionBridge AlgoKitComposer private _assetManager: AssetManager diff --git a/src/types/algorand-client.ts b/src/types/algorand-client.ts index 02204e0e..2ed09795 100644 --- a/src/types/algorand-client.ts +++ b/src/types/algorand-client.ts @@ -1,8 +1,8 @@ import algosdk from 'algosdk' import { MultisigAccount, SigningAccount, TransactionSignerAccount } from './account' import { AccountManager } from './account-manager' -import { AlgorandClientSender } from './algorand-client-sender' import { AlgorandClientTransactionCreator } from './algorand-client-transaction-creator' +import { AlgorandClientTransactionSender } from './algorand-client-transaction-sender' import { AssetManager } from './asset-manager' import { AlgoSdkClients, ClientManager } from './client-manager' import AlgoKitComposer from './composer' @@ -17,7 +17,7 @@ export class AlgorandClient { private _clientManager: ClientManager private _accountManager: AccountManager private _assetManager: AssetManager - private _sender: AlgorandClientSender + private _transactionSender: AlgorandClientTransactionSender private _transactionCreator: AlgorandClientTransactionCreator private _cachedSuggestedParams?: algosdk.SuggestedParams @@ -30,7 +30,7 @@ export class AlgorandClient { this._clientManager = new ClientManager(config) this._accountManager = new AccountManager(this._clientManager) this._assetManager = new AssetManager(this._clientManager.algod, () => this.newGroup()) - this._sender = new AlgorandClientSender(() => this.newGroup(), this._assetManager) + this._transactionSender = new AlgorandClientTransactionSender(() => this.newGroup(), this._assetManager) this._transactionCreator = new AlgorandClientTransactionCreator(() => this.newGroup()) } @@ -154,7 +154,7 @@ export class AlgorandClient { * Methods for sending a single transaction. */ public get send() { - return this._sender + return this._transactionSender } /**