Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: change AlgoKitComposer name to TransactionComposer #132

Merged
merged 2 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ factory.send.create.namedCreate({
})
```

If you want to get a built transaction without sending it you can use `factory.createTransaction.create...` rather than `factory.send.create...`. If you want to receive transaction parameters ready to pass in as an ABI argument or to an `AlgoKitComposer` call then you can use `factory.params.create...`.
If you want to get a built transaction without sending it you can use `factory.createTransaction.create...` rather than `factory.send.create...`. If you want to receive transaction parameters ready to pass in as an ABI argument or to an `TransactionComposer` call then you can use `factory.params.create...`.

### Update and Delete calls

Expand Down Expand Up @@ -257,7 +257,7 @@ client.send.delete.bare()
client.send.delete.namedDelete()
```

If you want to get a built transaction without sending it you can use `client.createTransaction.update...` / `client.createTransaction.delete...` rather than `client.send.update...` / `client.send.delete...`. If you want to receive transaction parameters ready to pass in as an ABI argument or to an `AlgoKitComposer` call then you can use `client.params.update...` / `client.params.delete...`.
If you want to get a built transaction without sending it you can use `client.createTransaction.update...` / `client.createTransaction.delete...` rather than `client.send.update...` / `client.send.delete...`. If you want to receive transaction parameters ready to pass in as an ABI argument or to an `TransactionComposer` call then you can use `client.params.update...` / `client.params.delete...`.

### Deploy call

Expand Down Expand Up @@ -400,9 +400,9 @@ const resultOfMethodOne = result.returns[0]
const resultOfMethodTwo = result.returns[1]
```

### Manually with the AlgoKitComposer
### Manually with the TransactionComposer

Multiple transactions can also be composed using the `AlgoKitComposer` class.
Multiple transactions can also be composed using the `TransactionComposer` class.

```ts
const result = algorand
Expand Down
4 changes: 2 additions & 2 deletions examples/arc56_test/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
CloneAppClientParams,
} from '@algorandfoundation/algokit-utils/types/app-client'
import { AppFactory, AppFactoryAppClientParams, AppFactoryResolveAppClientByCreatorAndNameParams, AppFactoryDeployParams, AppFactoryParams, CreateSchema } from '@algorandfoundation/algokit-utils/types/app-factory'
import AlgoKitComposer, { AppCallMethodCall, AppMethodCallTransactionArgument, SimulateOptions } from '@algorandfoundation/algokit-utils/types/composer'
import { TransactionComposer, AppCallMethodCall, AppMethodCallTransactionArgument, SimulateOptions } from '@algorandfoundation/algokit-utils/types/composer'
import { SendParams, SendSingleTransactionResult, SendAtomicTransactionComposerResults } from '@algorandfoundation/algokit-utils/types/transaction'
import { modelsv2, OnApplicationComplete, Transaction, TransactionSigner } from 'algosdk'
import SimulateResponse = modelsv2.SimulateResponse
Expand Down Expand Up @@ -895,7 +895,7 @@ export type Arc56TestComposer<TReturns extends [...any[]] = []> = {
/**
* Returns the underlying AtomicTransactionComposer instance
*/
composer(): AlgoKitComposer
composer(): TransactionComposer
/**
* Simulates the transaction group and returns the result
*/
Expand Down
4 changes: 2 additions & 2 deletions examples/duplicate_structs/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
CloneAppClientParams,
} from '@algorandfoundation/algokit-utils/types/app-client'
import { AppFactory, AppFactoryAppClientParams, AppFactoryResolveAppClientByCreatorAndNameParams, AppFactoryDeployParams, AppFactoryParams, CreateSchema } from '@algorandfoundation/algokit-utils/types/app-factory'
import AlgoKitComposer, { AppCallMethodCall, AppMethodCallTransactionArgument, SimulateOptions } from '@algorandfoundation/algokit-utils/types/composer'
import { TransactionComposer, AppCallMethodCall, AppMethodCallTransactionArgument, SimulateOptions } from '@algorandfoundation/algokit-utils/types/composer'
import { SendParams, SendSingleTransactionResult, SendAtomicTransactionComposerResults } from '@algorandfoundation/algokit-utils/types/transaction'
import { modelsv2, OnApplicationComplete, Transaction, TransactionSigner } from 'algosdk'
import SimulateResponse = modelsv2.SimulateResponse
Expand Down Expand Up @@ -645,7 +645,7 @@ export type DuplicateStructsContractComposer<TReturns extends [...any[]] = []> =
/**
* Returns the underlying AtomicTransactionComposer instance
*/
composer(): AlgoKitComposer
composer(): TransactionComposer
/**
* Simulates the transaction group and returns the result
*/
Expand Down
4 changes: 2 additions & 2 deletions examples/helloworld/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
CloneAppClientParams,
} from '@algorandfoundation/algokit-utils/types/app-client'
import { AppFactory, AppFactoryAppClientParams, AppFactoryResolveAppClientByCreatorAndNameParams, AppFactoryDeployParams, AppFactoryParams, CreateSchema } from '@algorandfoundation/algokit-utils/types/app-factory'
import AlgoKitComposer, { AppCallMethodCall, AppMethodCallTransactionArgument, SimulateOptions } from '@algorandfoundation/algokit-utils/types/composer'
import { TransactionComposer, AppCallMethodCall, AppMethodCallTransactionArgument, SimulateOptions } from '@algorandfoundation/algokit-utils/types/composer'
import { SendParams, SendSingleTransactionResult, SendAtomicTransactionComposerResults } from '@algorandfoundation/algokit-utils/types/transaction'
import { modelsv2, OnApplicationComplete, Transaction, TransactionSigner } from 'algosdk'
import SimulateResponse = modelsv2.SimulateResponse
Expand Down Expand Up @@ -821,7 +821,7 @@ export type HelloWorldAppComposer<TReturns extends [...any[]] = []> = {
/**
* Returns the underlying AtomicTransactionComposer instance
*/
composer(): AlgoKitComposer
composer(): TransactionComposer
/**
* Simulates the transaction group and returns the result
*/
Expand Down
4 changes: 2 additions & 2 deletions examples/lifecycle/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
CloneAppClientParams,
} from '@algorandfoundation/algokit-utils/types/app-client'
import { AppFactory, AppFactoryAppClientParams, AppFactoryResolveAppClientByCreatorAndNameParams, AppFactoryDeployParams, AppFactoryParams, CreateSchema } from '@algorandfoundation/algokit-utils/types/app-factory'
import AlgoKitComposer, { AppCallMethodCall, AppMethodCallTransactionArgument, SimulateOptions } from '@algorandfoundation/algokit-utils/types/composer'
import { TransactionComposer, AppCallMethodCall, AppMethodCallTransactionArgument, SimulateOptions } from '@algorandfoundation/algokit-utils/types/composer'
import { SendParams, SendSingleTransactionResult, SendAtomicTransactionComposerResults } from '@algorandfoundation/algokit-utils/types/transaction'
import { modelsv2, OnApplicationComplete, Transaction, TransactionSigner } from 'algosdk'
import SimulateResponse = modelsv2.SimulateResponse
Expand Down Expand Up @@ -890,7 +890,7 @@ export type LifeCycleAppComposer<TReturns extends [...any[]] = []> = {
/**
* Returns the underlying AtomicTransactionComposer instance
*/
composer(): AlgoKitComposer
composer(): TransactionComposer
/**
* Simulates the transaction group and returns the result
*/
Expand Down
4 changes: 2 additions & 2 deletions examples/minimal/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
CloneAppClientParams,
} from '@algorandfoundation/algokit-utils/types/app-client'
import { AppFactory, AppFactoryAppClientParams, AppFactoryResolveAppClientByCreatorAndNameParams, AppFactoryDeployParams, AppFactoryParams, CreateSchema } from '@algorandfoundation/algokit-utils/types/app-factory'
import AlgoKitComposer, { AppCallMethodCall, AppMethodCallTransactionArgument, SimulateOptions } from '@algorandfoundation/algokit-utils/types/composer'
import { TransactionComposer, AppCallMethodCall, AppMethodCallTransactionArgument, SimulateOptions } from '@algorandfoundation/algokit-utils/types/composer'
import { SendParams, SendSingleTransactionResult, SendAtomicTransactionComposerResults } from '@algorandfoundation/algokit-utils/types/transaction'
import { modelsv2, OnApplicationComplete, Transaction, TransactionSigner } from 'algosdk'
import SimulateResponse = modelsv2.SimulateResponse
Expand Down Expand Up @@ -659,7 +659,7 @@ export type MinimalAppComposer<TReturns extends [...any[]] = []> = {
/**
* Returns the underlying AtomicTransactionComposer instance
*/
composer(): AlgoKitComposer
composer(): TransactionComposer
/**
* Simulates the transaction group and returns the result
*/
Expand Down
4 changes: 2 additions & 2 deletions examples/nested/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
CloneAppClientParams,
} from '@algorandfoundation/algokit-utils/types/app-client'
import { AppFactory, AppFactoryAppClientParams, AppFactoryResolveAppClientByCreatorAndNameParams, AppFactoryDeployParams, AppFactoryParams, CreateSchema } from '@algorandfoundation/algokit-utils/types/app-factory'
import AlgoKitComposer, { AppCallMethodCall, AppMethodCallTransactionArgument, SimulateOptions } from '@algorandfoundation/algokit-utils/types/composer'
import { TransactionComposer, AppCallMethodCall, AppMethodCallTransactionArgument, SimulateOptions } from '@algorandfoundation/algokit-utils/types/composer'
import { SendParams, SendSingleTransactionResult, SendAtomicTransactionComposerResults } from '@algorandfoundation/algokit-utils/types/transaction'
import { modelsv2, OnApplicationComplete, Transaction, TransactionSigner } from 'algosdk'
import SimulateResponse = modelsv2.SimulateResponse
Expand Down Expand Up @@ -708,7 +708,7 @@ export type NestedContractComposer<TReturns extends [...any[]] = []> = {
/**
* Returns the underlying AtomicTransactionComposer instance
*/
composer(): AlgoKitComposer
composer(): TransactionComposer
/**
* Simulates the transaction group and returns the result
*/
Expand Down
4 changes: 2 additions & 2 deletions examples/reti/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
CloneAppClientParams,
} from '@algorandfoundation/algokit-utils/types/app-client'
import { AppFactory, AppFactoryAppClientParams, AppFactoryResolveAppClientByCreatorAndNameParams, AppFactoryDeployParams, AppFactoryParams, CreateSchema } from '@algorandfoundation/algokit-utils/types/app-factory'
import AlgoKitComposer, { AppCallMethodCall, AppMethodCallTransactionArgument, SimulateOptions } from '@algorandfoundation/algokit-utils/types/composer'
import { TransactionComposer, AppCallMethodCall, AppMethodCallTransactionArgument, SimulateOptions } from '@algorandfoundation/algokit-utils/types/composer'
import { SendParams, SendSingleTransactionResult, SendAtomicTransactionComposerResults } from '@algorandfoundation/algokit-utils/types/transaction'
import { modelsv2, OnApplicationComplete, Transaction, TransactionSigner } from 'algosdk'
import SimulateResponse = modelsv2.SimulateResponse
Expand Down Expand Up @@ -4236,7 +4236,7 @@ export type ValidatorRegistryComposer<TReturns extends [...any[]] = []> = {
/**
* Returns the underlying AtomicTransactionComposer instance
*/
composer(): AlgoKitComposer
composer(): TransactionComposer
/**
* Simulates the transaction group and returns the result
*/
Expand Down
4 changes: 2 additions & 2 deletions examples/state/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
CloneAppClientParams,
} from '@algorandfoundation/algokit-utils/types/app-client'
import { AppFactory, AppFactoryAppClientParams, AppFactoryResolveAppClientByCreatorAndNameParams, AppFactoryDeployParams, AppFactoryParams, CreateSchema } from '@algorandfoundation/algokit-utils/types/app-factory'
import AlgoKitComposer, { AppCallMethodCall, AppMethodCallTransactionArgument, SimulateOptions } from '@algorandfoundation/algokit-utils/types/composer'
import { TransactionComposer, AppCallMethodCall, AppMethodCallTransactionArgument, SimulateOptions } from '@algorandfoundation/algokit-utils/types/composer'
import { SendParams, SendSingleTransactionResult, SendAtomicTransactionComposerResults } from '@algorandfoundation/algokit-utils/types/transaction'
import { modelsv2, OnApplicationComplete, Transaction, TransactionSigner } from 'algosdk'
import SimulateResponse = modelsv2.SimulateResponse
Expand Down Expand Up @@ -2452,7 +2452,7 @@ export type StateAppComposer<TReturns extends [...any[]] = []> = {
/**
* Returns the underlying AtomicTransactionComposer instance
*/
composer(): AlgoKitComposer
composer(): TransactionComposer
/**
* Simulates the transaction group and returns the result
*/
Expand Down
2 changes: 1 addition & 1 deletion examples/voting/client.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ describe('voting typed client', () => {
expect(preconditionsResultAfter.return?.hasAlreadyVoted).toBe(1n)
})

test('it works with manual use of the AlgoKitComposer', async () => {
test('it works with manual use of the TransactionComposer', async () => {
const { algorand, signature, testAccount, totalQuestionOptions, randomAnswerIds, client } = await createRandomVotingRoundApp()

const result = await algorand
Expand Down
4 changes: 2 additions & 2 deletions examples/voting/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
CloneAppClientParams,
} from '@algorandfoundation/algokit-utils/types/app-client'
import { AppFactory, AppFactoryAppClientParams, AppFactoryResolveAppClientByCreatorAndNameParams, AppFactoryDeployParams, AppFactoryParams, CreateSchema } from '@algorandfoundation/algokit-utils/types/app-factory'
import AlgoKitComposer, { AppCallMethodCall, AppMethodCallTransactionArgument, SimulateOptions } from '@algorandfoundation/algokit-utils/types/composer'
import { TransactionComposer, AppCallMethodCall, AppMethodCallTransactionArgument, SimulateOptions } from '@algorandfoundation/algokit-utils/types/composer'
import { SendParams, SendSingleTransactionResult, SendAtomicTransactionComposerResults } from '@algorandfoundation/algokit-utils/types/transaction'
import { modelsv2, OnApplicationComplete, Transaction, TransactionSigner } from 'algosdk'
import SimulateResponse = modelsv2.SimulateResponse
Expand Down Expand Up @@ -1113,7 +1113,7 @@ export type VotingRoundAppComposer<TReturns extends [...any[]] = []> = {
/**
* Returns the underlying AtomicTransactionComposer instance
*/
composer(): AlgoKitComposer
composer(): TransactionComposer
/**
* Simulates the transaction group and returns the result
*/
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"rollup": "^4.22.5"
},
"dependencies": {
"@algorandfoundation/algokit-utils": "^7.0.0-beta.21",
"@algorandfoundation/algokit-utils": "^7.0.0-beta.23",
"algosdk": "^2.7.0",
"chalk": "^4.1.2",
"change-case": "^5.4.4",
Expand Down
Empty file removed schema.json
Empty file.
2 changes: 1 addition & 1 deletion src/client/call-composer-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function* callComposerType(ctx: GeneratorContext): DocumentParts {
yield* jsDoc({
description: 'Returns the underlying AtomicTransactionComposer instance',
})
yield `composer(): AlgoKitComposer`
yield `composer(): TransactionComposer`

yield* jsDoc({
description: 'Simulates the transaction group and returns the result',
Expand Down
2 changes: 1 addition & 1 deletion src/client/imports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function* imports(): DocumentParts {
CloneAppClientParams,
} from '@algorandfoundation/algokit-utils/types/app-client'
import { AppFactory, AppFactoryAppClientParams, AppFactoryResolveAppClientByCreatorAndNameParams, AppFactoryDeployParams, AppFactoryParams, CreateSchema } from '@algorandfoundation/algokit-utils/types/app-factory'
import AlgoKitComposer, { AppCallMethodCall, AppMethodCallTransactionArgument, SimulateOptions } from '@algorandfoundation/algokit-utils/types/composer'
import { TransactionComposer, AppCallMethodCall, AppMethodCallTransactionArgument, SimulateOptions } from '@algorandfoundation/algokit-utils/types/composer'
import { SendParams, SendSingleTransactionResult, SendAtomicTransactionComposerResults } from '@algorandfoundation/algokit-utils/types/transaction'
import { modelsv2, OnApplicationComplete, Transaction, TransactionSigner } from 'algosdk'
import SimulateResponse = modelsv2.SimulateResponse
Expand Down
Loading