Skip to content

Commit

Permalink
Renamed AlgorandClientSender to AlgorandClientTransactionSender for c…
Browse files Browse the repository at this point in the history
…onsistency
  • Loading branch information
robdmoore committed Aug 28, 2024
1 parent fed61c9 commit 8bff754
Show file tree
Hide file tree
Showing 9 changed files with 95 additions and 95 deletions.
2 changes: 1 addition & 1 deletion docs/code/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions docs/code/classes/types_account_manager.AccountManager.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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

Expand Down
18 changes: 9 additions & 9 deletions docs/code/classes/types_algorand_client.AlgorandClient.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
8 changes: 4 additions & 4 deletions src/transaction/legacy-bridge.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -15,7 +15,7 @@ export async function legacySendTransactionBridge<T extends CommonTransactionPar
sendParams: SendTransactionParams,
params: T,
txn: (c: AlgorandClientTransactionCreator) => (params: T) => Promise<Transaction>,
send: (c: AlgorandClientSender) => (params: T & ExecuteParams) => Promise<SendSingleTransactionResult>,
send: (c: AlgorandClientTransactionSender) => (params: T & ExecuteParams) => Promise<SendSingleTransactionResult>,
suggestedParams?: algosdk.SuggestedParams,
): Promise<SendTransactionResult> {
const newGroup = () =>
Expand All @@ -24,7 +24,7 @@ export async function legacySendTransactionBridge<T extends CommonTransactionPar
getSigner: () => 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) {
Expand All @@ -42,5 +42,5 @@ export async function legacySendTransactionBridge<T extends CommonTransactionPar
return { transaction }
}

return await send(sender)({ ...sendParams, ...params })
return await send(transactionSender)({ ...sendParams, ...params })
}
2 changes: 1 addition & 1 deletion src/types/account-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import algosdk from 'algosdk'
import { Config } from '../config'
import { calculateFundAmount, memoize } from '../util'
import { AccountInformation, DISPENSER_ACCOUNT, MultisigAccount, SigningAccount, TransactionSignerAccount } from './account'
import { SendSingleTransactionResult } from './algorand-client-sender'
import { SendSingleTransactionResult } from './algorand-client-transaction-sender'
import { AlgoAmount } from './amount'
import { ClientManager } from './client-manager'
import AlgoKitComposer, { CommonTransactionParams, ExecuteParams } from './composer'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Transaction = algosdk.Transaction
export type SendSingleTransactionResult = SendAtomicTransactionComposerResults & ConfirmedTransactionResult

/** Orchestrates sending transactions for `AlgorandClient`. */
export class AlgorandClientSender {
export class AlgorandClientTransactionSender {
private _newGroup: () => AlgoKitComposer
private _assetManager: AssetManager

Expand Down
8 changes: 4 additions & 4 deletions src/types/algorand-client.ts
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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
Expand All @@ -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())
}

Expand Down Expand Up @@ -154,7 +154,7 @@ export class AlgorandClient {
* Methods for sending a single transaction.
*/
public get send() {
return this._sender
return this._transactionSender
}

/**
Expand Down

0 comments on commit 8bff754

Please sign in to comment.