Skip to content

Commit

Permalink
feat: deprecated app-deploy functions in favour of AlgorandClient fun…
Browse files Browse the repository at this point in the history
…ctionality
  • Loading branch information
robdmoore committed Sep 2, 2024
1 parent 5ac5b3a commit b59c336
Show file tree
Hide file tree
Showing 38 changed files with 2,205 additions and 878 deletions.
4 changes: 2 additions & 2 deletions docs/capabilities/algorand-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ The `AlgorandClient` has a number of manager class instances that help you quick

### Creating single transactions

You can compose a single transaction via `algorand.transactions...`. Intellisense will guide you on the different options.
You can compose a single transaction via `algorand.transactions...`, which gives you an instance of the [`AlgorandClientTransactionCreator`](../code/classes/types_algorand_client_transaction_creator.AlgorandClientTransactionCreator.md) class. Intellisense will guide you on the different options.

The signature for the calls to send a single transaction usually look like:

Expand All @@ -67,7 +67,7 @@ The signature for the calls to send a single transaction usually look like:

### Sending a single transaction

You can compose a single transaction via `algorand.send...`. Intellisense will guide you on the different options.
You can compose a single transaction via `algorand.send...`, which gives you an instance of the [`AlgorandClientTransactionSender`](../code/classes/types_algorand_client_transaction_sender.AlgorandClientTransactionSender.md) class. Intellisense will guide you on the different options.

Further documentation is present in the related capabilities:

Expand Down
227 changes: 169 additions & 58 deletions docs/capabilities/app-deploy.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/capabilities/app.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ App management is a higher-order use case capability provided by AlgoKit Utils t

The [`AppManager`](../code/classes/types_app_manager.AppManager.md) is a class that is used to manage app information.

To get an instance of `AppManager` you can use either [`AlgorandClient`](./algorand-client.md) via `algorand.app` or instantiate it directly (passing in a [`ClientManager`](./client.md)):
To get an instance of `AppManager` you can use either [`AlgorandClient`](./algorand-client.md) via `algorand.app` or instantiate it directly (passing in an algod client instance):

```typescript
import { AssetManager } from '@algorandfoundation/algokit-utils/types/asset-manager'
import { AppManager } from '@algorandfoundation/algokit-utils/types/app-manager'

const assetManager = new AssetManager(clientManager)
const appManager = new AppManager(algod)
```

## Calling apps
Expand All @@ -29,7 +29,7 @@ When calling an app there are two types of transactions:

Calling an app involves providing some [common parameters](#common-app-parameters) and some parameters that will depend on the type of app call (create vs update vs other) per below sections.

When [sending transactions directly via AlgorandClient](./algorand-client.md#sending-a-single-transaction) the `SingleSendTransactionResult` is expanded with extra fields depending on the type of app call:
When [sending transactions directly via AlgorandClient](./algorand-client.md#sending-a-single-transaction) the `SingleSendTransactionResult` return value is expanded with extra fields depending on the type of app call:

- All app calls extend [`SendAppTransactionResult`](../code/modules/types_transaction.md#sendapptransactionresult), which has:
- `return?: ABIReturn` - Which will contain an ABI return value if a non-void ABI method was called:
Expand Down
1 change: 1 addition & 0 deletions docs/code/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
- [types/app](modules/types_app.md)
- [types/app-client](modules/types_app_client.md)
- [types/app-client.spec](modules/types_app_client_spec.md)
- [types/app-deployer](modules/types_app_deployer.md)
- [types/app-manager](modules/types_app_manager.md)
- [types/app-spec](modules/types_app_spec.md)
- [types/asset](modules/types_asset.md)
Expand Down
90 changes: 59 additions & 31 deletions docs/code/classes/types_algorand_client.AlgorandClient.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ A client that brokers easy access to Algorand functionality.
### Properties

- [\_accountManager](types_algorand_client.AlgorandClient.md#_accountmanager)
- [\_appDeployer](types_algorand_client.AlgorandClient.md#_appdeployer)
- [\_appManager](types_algorand_client.AlgorandClient.md#_appmanager)
- [\_assetManager](types_algorand_client.AlgorandClient.md#_assetmanager)
- [\_cachedSuggestedParams](types_algorand_client.AlgorandClient.md#_cachedsuggestedparams)
Expand All @@ -29,6 +30,7 @@ A client that brokers easy access to Algorand functionality.

- [account](types_algorand_client.AlgorandClient.md#account)
- [app](types_algorand_client.AlgorandClient.md#app)
- [appDeployer](types_algorand_client.AlgorandClient.md#appdeployer)
- [asset](types_algorand_client.AlgorandClient.md#asset)
- [client](types_algorand_client.AlgorandClient.md#client)
- [send](types_algorand_client.AlgorandClient.md#send)
Expand Down Expand Up @@ -69,7 +71,7 @@ A client that brokers easy access to Algorand functionality.

#### Defined in

[src/types/algorand-client.ts:31](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L31)
[src/types/algorand-client.ts:33](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L33)

## Properties

Expand All @@ -79,7 +81,17 @@ A client that brokers easy access to Algorand functionality.

#### Defined in

[src/types/algorand-client.ts:19](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L19)
[src/types/algorand-client.ts:20](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L20)

___

### \_appDeployer

`Private` **\_appDeployer**: [`AppDeployer`](types_app_deployer.AppDeployer.md)

#### Defined in

[src/types/algorand-client.ts:22](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L22)

___

Expand All @@ -89,7 +101,7 @@ ___

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

___

Expand All @@ -99,7 +111,7 @@ ___

#### 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:23](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L23)

___

Expand All @@ -109,7 +121,7 @@ ___

#### Defined in

[src/types/algorand-client.ts:25](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L25)
[src/types/algorand-client.ts:27](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L27)

___

Expand All @@ -119,7 +131,7 @@ ___

#### Defined in

[src/types/algorand-client.ts:26](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L26)
[src/types/algorand-client.ts:28](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L28)

___

Expand All @@ -129,7 +141,7 @@ ___

#### Defined in

[src/types/algorand-client.ts:27](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L27)
[src/types/algorand-client.ts:29](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L29)

___

Expand All @@ -139,7 +151,7 @@ ___

#### Defined in

[src/types/algorand-client.ts:18](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L18)
[src/types/algorand-client.ts:19](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L19)

___

Expand All @@ -149,7 +161,7 @@ ___

#### Defined in

[src/types/algorand-client.ts:29](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L29)
[src/types/algorand-client.ts:31](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L31)

___

Expand All @@ -159,7 +171,7 @@ ___

#### Defined in

[src/types/algorand-client.ts:23](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L23)
[src/types/algorand-client.ts:25](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L25)

___

Expand All @@ -169,7 +181,7 @@ ___

#### Defined in

[src/types/algorand-client.ts:22](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L22)
[src/types/algorand-client.ts:24](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L24)

## Accessors

Expand All @@ -185,7 +197,7 @@ Get or create accounts that can sign transactions.

#### Defined in

[src/types/algorand-client.ts:137](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L137)
[src/types/algorand-client.ts:140](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L140)

___

Expand All @@ -201,7 +213,23 @@ Methods for interacting with apps.

#### Defined in

[src/types/algorand-client.ts:147](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L147)
[src/types/algorand-client.ts:150](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L150)

___

### appDeployer

`get` **appDeployer**(): [`AppDeployer`](types_app_deployer.AppDeployer.md)

Methods for deploying apps and managing app deployment metadata.

#### Returns

[`AppDeployer`](types_app_deployer.AppDeployer.md)

#### Defined in

[src/types/algorand-client.ts:155](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L155)

___

Expand All @@ -217,7 +245,7 @@ Methods for interacting with assets.

#### Defined in

[src/types/algorand-client.ts:142](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L142)
[src/types/algorand-client.ts:145](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L145)

___

Expand All @@ -233,7 +261,7 @@ Get clients, including algosdk clients and app clients.

#### Defined in

[src/types/algorand-client.ts:132](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L132)
[src/types/algorand-client.ts:135](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L135)

___

Expand All @@ -249,7 +277,7 @@ Methods for sending a single transaction.

#### Defined in

[src/types/algorand-client.ts:165](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L165)
[src/types/algorand-client.ts:173](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L173)

___

Expand All @@ -265,7 +293,7 @@ Methods for building transactions

#### Defined in

[src/types/algorand-client.ts:172](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L172)
[src/types/algorand-client.ts:180](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L180)

## Methods

Expand All @@ -281,7 +309,7 @@ Get suggested params for a transaction (either cached or from algod if the cache

#### Defined in

[src/types/algorand-client.ts:116](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L116)
[src/types/algorand-client.ts:119](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L119)

___

Expand All @@ -297,7 +325,7 @@ Start a new `AlgoKitComposer` transaction group

#### Defined in

[src/types/algorand-client.ts:152](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L152)
[src/types/algorand-client.ts:160](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L160)

___

Expand All @@ -321,7 +349,7 @@ The `AlgorandClient` so method calls can be chained

#### Defined in

[src/types/algorand-client.ts:55](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L55)
[src/types/algorand-client.ts:58](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L58)

___

Expand All @@ -345,7 +373,7 @@ The `AlgorandClient` so method calls can be chained

#### Defined in

[src/types/algorand-client.ts:45](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L45)
[src/types/algorand-client.ts:48](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L48)

___

Expand All @@ -370,7 +398,7 @@ The `AlgorandClient` so method calls can be chained

#### Defined in

[src/types/algorand-client.ts:88](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L88)
[src/types/algorand-client.ts:91](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L91)

___

Expand Down Expand Up @@ -405,7 +433,7 @@ const accountManager = AlgorandClient.mainnet()

#### Defined in

[src/types/algorand-client.ts:75](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L75)
[src/types/algorand-client.ts:78](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L78)

___

Expand All @@ -430,7 +458,7 @@ The `AlgorandClient` so method calls can be chained

#### Defined in

[src/types/algorand-client.ts:99](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L99)
[src/types/algorand-client.ts:102](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L102)

___

Expand All @@ -454,7 +482,7 @@ The `AlgorandClient` so method calls can be chained

#### Defined in

[src/types/algorand-client.ts:110](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L110)
[src/types/algorand-client.ts:113](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L113)

___

Expand All @@ -472,7 +500,7 @@ The `AlgorandClient`

#### Defined in

[src/types/algorand-client.ts:182](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L182)
[src/types/algorand-client.ts:190](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L190)

___

Expand All @@ -496,7 +524,7 @@ The `AlgorandClient`

#### Defined in

[src/types/algorand-client.ts:219](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L219)
[src/types/algorand-client.ts:227](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L227)

___

Expand All @@ -520,7 +548,7 @@ The `AlgorandClient`

#### Defined in

[src/types/algorand-client.ts:249](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L249)
[src/types/algorand-client.ts:257](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L257)

___

Expand Down Expand Up @@ -551,7 +579,7 @@ The `AlgorandClient`

#### Defined in

[src/types/algorand-client.ts:240](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L240)
[src/types/algorand-client.ts:248](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L248)

___

Expand All @@ -569,7 +597,7 @@ The `AlgorandClient`

#### Defined in

[src/types/algorand-client.ts:206](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L206)
[src/types/algorand-client.ts:214](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L214)

___

Expand All @@ -587,4 +615,4 @@ The `AlgorandClient`

#### Defined in

[src/types/algorand-client.ts:194](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L194)
[src/types/algorand-client.ts:202](https://github.com/algorandfoundation/algokit-utils-ts/blob/main/src/types/algorand-client.ts#L202)
Loading

0 comments on commit b59c336

Please sign in to comment.