@algorandfoundation/algokit-utils 7.0.0-beta.3 → 7.0.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/amount.d.ts +14 -4
- package/amount.d.ts.map +1 -1
- package/amount.js +6 -0
- package/amount.js.map +1 -1
- package/amount.mjs +6 -0
- package/amount.mjs.map +1 -1
- package/app-client.d.ts +15 -0
- package/app-client.d.ts.map +1 -1
- package/app-client.js +15 -0
- package/app-client.js.map +1 -1
- package/app-client.mjs +15 -0
- package/app-client.mjs.map +1 -1
- package/app-deploy.d.ts.map +1 -1
- package/app-deploy.js +4 -6
- package/app-deploy.js.map +1 -1
- package/app-deploy.mjs +5 -7
- package/app-deploy.mjs.map +1 -1
- package/app.d.ts +2 -2
- package/app.d.ts.map +1 -1
- package/app.js +7 -3
- package/app.js.map +1 -1
- package/app.mjs +7 -3
- package/app.mjs.map +1 -1
- package/asset.d.ts.map +1 -1
- package/asset.js +0 -3
- package/asset.js.map +1 -1
- package/asset.mjs +0 -3
- package/asset.mjs.map +1 -1
- package/debugging/debugging.d.ts +1 -1
- package/debugging/debugging.d.ts.map +1 -1
- package/debugging/debugging.js +4 -5
- package/debugging/debugging.js.map +1 -1
- package/debugging/debugging.mjs +4 -5
- package/debugging/debugging.mjs.map +1 -1
- package/index.d.ts +4 -4
- package/index.d.ts.map +1 -1
- package/index.js +37 -37
- package/index.mjs +5 -5
- package/package.json +1 -1
- package/testing/test-logger.d.ts.map +1 -1
- package/testing/test-logger.js +1 -3
- package/testing/test-logger.js.map +1 -1
- package/testing/test-logger.mjs +1 -3
- package/testing/test-logger.mjs.map +1 -1
- package/transaction/legacy-bridge.d.ts +3 -3
- package/transaction/legacy-bridge.d.ts.map +1 -1
- package/transaction/legacy-bridge.js +1 -1
- package/transaction/legacy-bridge.js.map +1 -1
- package/transaction/legacy-bridge.mjs +2 -2
- package/transaction/legacy-bridge.mjs.map +1 -1
- package/transaction/transaction.d.ts +34 -3
- package/transaction/transaction.d.ts.map +1 -1
- package/transaction/transaction.js +42 -11
- package/transaction/transaction.js.map +1 -1
- package/transaction/transaction.mjs +42 -11
- package/transaction/transaction.mjs.map +1 -1
- package/transfer/transfer.js +2 -2
- package/transfer/transfer.js.map +1 -1
- package/transfer/transfer.mjs +2 -2
- package/transfer/transfer.mjs.map +1 -1
- package/types/account-manager.d.ts +2 -2
- package/types/account-manager.d.ts.map +1 -1
- package/types/account-manager.js +1 -1
- package/types/account-manager.js.map +1 -1
- package/types/account-manager.mjs +1 -1
- package/types/account-manager.mjs.map +1 -1
- package/types/algorand-client-interface.d.ts +29 -0
- package/types/algorand-client-interface.d.ts.map +1 -0
- package/types/algorand-client-interface.js +3 -0
- package/types/algorand-client-interface.js.map +1 -0
- package/types/algorand-client-interface.mjs +2 -0
- package/types/algorand-client-interface.mjs.map +1 -0
- package/types/algorand-client-transaction-sender.d.ts +12 -12
- package/types/algorand-client-transaction-sender.d.ts.map +1 -1
- package/types/algorand-client-transaction-sender.js +22 -6
- package/types/algorand-client-transaction-sender.js.map +1 -1
- package/types/algorand-client-transaction-sender.mjs +22 -6
- package/types/algorand-client-transaction-sender.mjs.map +1 -1
- package/types/algorand-client.d.ts +2 -1
- package/types/algorand-client.d.ts.map +1 -1
- package/types/algorand-client.js +1 -1
- package/types/algorand-client.js.map +1 -1
- package/types/algorand-client.mjs +1 -1
- package/types/algorand-client.mjs.map +1 -1
- package/types/amount.d.ts +10 -10
- package/types/amount.d.ts.map +1 -1
- package/types/amount.js +7 -7
- package/types/amount.js.map +1 -1
- package/types/amount.mjs +7 -7
- package/types/amount.mjs.map +1 -1
- package/types/app-arc56.d.ts +326 -0
- package/types/app-arc56.d.ts.map +1 -0
- package/types/app-arc56.js +163 -0
- package/types/app-arc56.js.map +1 -0
- package/types/app-arc56.mjs +154 -0
- package/types/app-arc56.mjs.map +1 -0
- package/types/app-client.d.ts +1479 -7
- package/types/app-client.d.ts.map +1 -1
- package/types/app-client.js +814 -8
- package/types/app-client.js.map +1 -1
- package/types/app-client.mjs +814 -9
- package/types/app-client.mjs.map +1 -1
- package/types/app-deployer.d.ts +19 -13
- package/types/app-deployer.d.ts.map +1 -1
- package/types/app-deployer.js +2 -2
- package/types/app-deployer.js.map +1 -1
- package/types/app-deployer.mjs +2 -2
- package/types/app-deployer.mjs.map +1 -1
- package/types/app-factory.d.ts +967 -0
- package/types/app-factory.d.ts.map +1 -0
- package/types/app-factory.js +322 -0
- package/types/app-factory.js.map +1 -0
- package/types/app-factory.mjs +320 -0
- package/types/app-factory.mjs.map +1 -0
- package/types/app-manager.d.ts +12 -2
- package/types/app-manager.d.ts.map +1 -1
- package/types/app-manager.js +10 -1
- package/types/app-manager.js.map +1 -1
- package/types/app-manager.mjs +10 -1
- package/types/app-manager.mjs.map +1 -1
- package/types/app-spec.d.ts +2 -0
- package/types/app-spec.d.ts.map +1 -1
- package/types/app-spec.js +115 -0
- package/types/app-spec.js.map +1 -1
- package/types/app-spec.mjs +114 -0
- package/types/app-spec.mjs.map +1 -1
- package/types/app.d.ts +6 -2
- package/types/app.d.ts.map +1 -1
- package/types/asset-manager.d.ts +2 -1
- package/types/asset-manager.d.ts.map +1 -1
- package/types/asset-manager.js +0 -1
- package/types/asset-manager.js.map +1 -1
- package/types/asset-manager.mjs +0 -1
- package/types/asset-manager.mjs.map +1 -1
- package/types/client-manager.d.ts +109 -50
- package/types/client-manager.d.ts.map +1 -1
- package/types/client-manager.js +137 -23
- package/types/client-manager.js.map +1 -1
- package/types/client-manager.mjs +138 -24
- package/types/client-manager.mjs.map +1 -1
- package/types/composer.d.ts +31 -14
- package/types/composer.d.ts.map +1 -1
- package/types/composer.js +65 -10
- package/types/composer.js.map +1 -1
- package/types/composer.mjs +66 -11
- package/types/composer.mjs.map +1 -1
- package/types/debugging.d.ts +3 -2
- package/types/debugging.d.ts.map +1 -1
- package/types/debugging.js.map +1 -1
- package/types/debugging.mjs.map +1 -1
- package/types/dispenser-client.d.ts +1 -1
- package/types/dispenser-client.d.ts.map +1 -1
- package/types/dispenser-client.js +1 -1
- package/types/dispenser-client.js.map +1 -1
- package/types/dispenser-client.mjs +1 -1
- package/types/dispenser-client.mjs.map +1 -1
- package/types/network-client.d.ts +13 -0
- package/types/network-client.d.ts.map +1 -1
- package/types/network-client.js.map +1 -1
- package/types/network-client.mjs.map +1 -1
- package/types/testing.d.ts +3 -3
- package/types/testing.d.ts.map +1 -1
- package/types/transaction.d.ts +14 -1
- package/types/transaction.d.ts.map +1 -1
- package/util.d.ts +2 -1
- package/util.d.ts.map +1 -1
- package/util.js +11 -1
- package/util.js.map +1 -1
- package/util.mjs +11 -2
- package/util.mjs.map +1 -1
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import algosdk from 'algosdk';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { AlgorandClientInterface } from './algorand-client-interface';
|
|
3
|
+
import { AppClient, AppClientParams, ResolveAppClientByCreatorAndName } from './app-client';
|
|
4
|
+
import { AppFactory, AppFactoryParams } from './app-factory';
|
|
4
5
|
import { TestNetDispenserApiClient, TestNetDispenserApiClientParams } from './dispenser-client';
|
|
5
|
-
import {
|
|
6
|
+
import { Expand } from './expand';
|
|
7
|
+
import { AlgoClientConfig, AlgoConfig, NetworkDetails } from './network-client';
|
|
6
8
|
import Kmd = algosdk.Kmd;
|
|
7
9
|
import Indexer = algosdk.Indexer;
|
|
8
10
|
import Algodv2 = algosdk.Algodv2;
|
|
@@ -16,24 +18,12 @@ export interface AlgoSdkClients {
|
|
|
16
18
|
/** Optional KMD client, see https://developer.algorand.org/docs/rest-apis/kmd/ */
|
|
17
19
|
kmd?: algosdk.Kmd;
|
|
18
20
|
}
|
|
19
|
-
/** Details of the current network. */
|
|
20
|
-
export interface NetworkDetails {
|
|
21
|
-
/** Whether or not the network is TestNet. */
|
|
22
|
-
isTestNet: boolean;
|
|
23
|
-
/** Whether or not the network is MainNet. */
|
|
24
|
-
isMainNet: boolean;
|
|
25
|
-
/** Whether or not the network is LocalNet. */
|
|
26
|
-
isLocalNet: boolean;
|
|
27
|
-
/** The genesis ID of the current network. */
|
|
28
|
-
genesisId: string;
|
|
29
|
-
/** The base64 genesis hash of the current network. */
|
|
30
|
-
genesisHash: string;
|
|
31
|
-
}
|
|
32
21
|
/** Exposes access to various API clients. */
|
|
33
22
|
export declare class ClientManager {
|
|
34
23
|
private _algod;
|
|
35
24
|
private _indexer?;
|
|
36
25
|
private _kmd?;
|
|
26
|
+
private _algorand?;
|
|
37
27
|
/**
|
|
38
28
|
* algosdk clients or config for interacting with the official Algorand APIs.
|
|
39
29
|
* @param clientsOrConfig The clients or config to use
|
|
@@ -54,7 +44,7 @@ export declare class ClientManager {
|
|
|
54
44
|
* const clientManager = new ClientManager({ algodConfig, indexerConfig, kmdConfig })
|
|
55
45
|
* ```
|
|
56
46
|
*/
|
|
57
|
-
constructor(clientsOrConfig: AlgoConfig | AlgoSdkClients);
|
|
47
|
+
constructor(clientsOrConfig: AlgoConfig | AlgoSdkClients, algorandClient?: AlgorandClientInterface);
|
|
58
48
|
/** Returns an algosdk Algod API client. */
|
|
59
49
|
get algod(): algosdk.Algodv2;
|
|
60
50
|
/** Returns an algosdk Indexer API client or throws an error if it's not been provided. */
|
|
@@ -129,28 +119,76 @@ export declare class ClientManager {
|
|
|
129
119
|
*/
|
|
130
120
|
getTestNetDispenserFromEnvironment(params?: Omit<TestNetDispenserApiClientParams, 'authToken'>): TestNetDispenserApiClient;
|
|
131
121
|
/**
|
|
132
|
-
* Returns a new `
|
|
133
|
-
* @
|
|
134
|
-
*
|
|
135
|
-
*
|
|
122
|
+
* Returns a new `AppFactory` client
|
|
123
|
+
* @example Basic example
|
|
124
|
+
* ```typescript
|
|
125
|
+
* const factory = algorand.client.getAppFactory({
|
|
126
|
+
* appSpec: '{/* ARC-56 or ARC-32 compatible JSON *\/}',
|
|
127
|
+
* })
|
|
128
|
+
* ```
|
|
129
|
+
* @example Advanced example
|
|
130
|
+
* ```typescript
|
|
131
|
+
* const factory = algorand.client.getAppFactory({
|
|
132
|
+
* appSpec: parsedAppSpec_AppSpec_or_Arc56Contract,
|
|
133
|
+
* defaultSender: "SENDERADDRESS",
|
|
134
|
+
* appName: "OverriddenAppName",
|
|
135
|
+
* version: "2.0.0",
|
|
136
|
+
* updatable: true,
|
|
137
|
+
* deletable: false,
|
|
138
|
+
* deployTimeParams: { ONE: 1, TWO: 'value' }
|
|
139
|
+
* })
|
|
140
|
+
* ```
|
|
141
|
+
*/
|
|
142
|
+
getAppFactory(params: Expand<Omit<AppFactoryParams, 'algorand'>>): AppFactory;
|
|
143
|
+
/**
|
|
144
|
+
* Returns a new `AppClient` client for managing calls and state for an ARC-32/ARC-56 app.
|
|
145
|
+
* This method resolves the app ID by looking up the creator address and name
|
|
146
|
+
* using AlgoKit app deployment semantics (i.e. looking for the app creation transaction note).
|
|
147
|
+
* @param params The parameters to create the app client
|
|
148
|
+
* @example Basic
|
|
149
|
+
* const appClient = algorand.client.getAppClientByCreatorAndName({
|
|
150
|
+
* appSpec: '{/* ARC-56 or ARC-32 compatible JSON *\}',
|
|
151
|
+
* // appId resolved by looking for app ID of named app by this creator
|
|
152
|
+
* creatorAddress: 'CREATORADDRESS',
|
|
153
|
+
* })
|
|
154
|
+
* @returns The `AppClient`
|
|
155
|
+
*/
|
|
156
|
+
getAppClientByCreatorAndName(params: Expand<Omit<ResolveAppClientByCreatorAndName, 'algorand'>>): Promise<AppClient>;
|
|
157
|
+
/**
|
|
158
|
+
* Returns a new `AppClient` client for managing calls and state for an ARC-32/ARC-56 app.
|
|
159
|
+
* @param params The parameters to create the app client
|
|
160
|
+
* @example Basic
|
|
161
|
+
* const appClient = algorand.client.getAppClientById({
|
|
162
|
+
* appSpec: '{/* ARC-56 or ARC-32 compatible JSON *\}',
|
|
163
|
+
* appId: 12345n,
|
|
164
|
+
* })
|
|
165
|
+
* @returns The `AppClient`
|
|
136
166
|
*/
|
|
137
|
-
|
|
167
|
+
getAppClientById(params: Expand<Omit<AppClientParams, 'algorand'>>): AppClient;
|
|
138
168
|
/**
|
|
139
|
-
* Returns a new `
|
|
140
|
-
*
|
|
141
|
-
*
|
|
169
|
+
* Returns a new `AppClient` client for managing calls and state for an ARC-56 app.
|
|
170
|
+
* This method resolves the app ID for the current network based on
|
|
171
|
+
* pre-determined network-specific app IDs specified in the ARC-56 app spec.
|
|
172
|
+
*
|
|
173
|
+
* If no IDs are in the app spec or the network isn't recognised, an error is thrown.
|
|
174
|
+
* @param params The parameters to create the app client
|
|
175
|
+
* @example Basic
|
|
176
|
+
* const appClient = algorand.client.getAppClientByNetwork({
|
|
177
|
+
* appSpec: '{/* ARC-56 or ARC-32 compatible JSON *\}',
|
|
178
|
+
* // appId resolved by using ARC-56 spec to find app ID for current network
|
|
179
|
+
* })
|
|
180
|
+
* @returns The `AppClient`
|
|
142
181
|
*/
|
|
143
|
-
|
|
182
|
+
getAppClientByNetwork(params: Expand<Omit<AppClientParams, 'algorand' | 'appId'>>): Promise<AppClient>;
|
|
144
183
|
/**
|
|
145
184
|
* Returns a new typed client, resolving the app by creator address and name.
|
|
146
185
|
* @param typedClient The typed client type to use
|
|
147
|
-
* @param
|
|
148
|
-
* @
|
|
149
|
-
* @example Use name in ARC-32 app spec
|
|
186
|
+
* @param params The params to resolve the app by creator address and name
|
|
187
|
+
* @example Use name in ARC-32 / ARC-56 app spec
|
|
150
188
|
* ```typescript
|
|
151
189
|
* const appClient = algorand.client.getTypedAppClientByCreatorAndName(MyContractClient, {
|
|
152
190
|
* creatorAddress: "CREATORADDRESS",
|
|
153
|
-
*
|
|
191
|
+
* defaultSender: alice,
|
|
154
192
|
* })
|
|
155
193
|
* ```
|
|
156
194
|
* @example Specify name
|
|
@@ -158,26 +196,55 @@ export declare class ClientManager {
|
|
|
158
196
|
* const appClient = algorand.client.getTypedAppClientByCreatorAndName(MyContractClient, {
|
|
159
197
|
* creatorAddress: "CREATORADDRESS",
|
|
160
198
|
* name: "contract-name",
|
|
161
|
-
*
|
|
199
|
+
* defaultSender: alice,
|
|
162
200
|
* })
|
|
163
201
|
* ```
|
|
164
202
|
* @returns The typed client instance
|
|
165
203
|
*/
|
|
166
|
-
getTypedAppClientByCreatorAndName<TClient
|
|
204
|
+
getTypedAppClientByCreatorAndName<TClient extends TypedAppClient<InstanceType<TClient>>>(typedClient: TClient, params: Expand<Omit<ResolveAppClientByCreatorAndName, 'algorand' | 'appSpec'>>): Promise<InstanceType<TClient>>;
|
|
167
205
|
/**
|
|
168
206
|
* Returns a new typed client, resolving the app by app ID.
|
|
169
207
|
* @param typedClient The typed client type to use
|
|
170
|
-
* @param
|
|
208
|
+
* @param params The params to resolve the app by ID
|
|
171
209
|
* @example
|
|
172
210
|
* ```typescript
|
|
173
211
|
* const appClient = algorand.client.getTypedAppClientById(MyContractClient, {
|
|
174
|
-
*
|
|
212
|
+
* appId: 12345n,
|
|
213
|
+
* defaultSender: alice,
|
|
214
|
+
* })
|
|
215
|
+
* ```
|
|
216
|
+
* @returns The typed client instance
|
|
217
|
+
*/
|
|
218
|
+
getTypedAppClientById<TClient extends TypedAppClient<InstanceType<TClient>>>(typedClient: TClient, params: Expand<Omit<AppClientParams, 'algorand' | 'appSpec'>>): InstanceType<TClient>;
|
|
219
|
+
/**
|
|
220
|
+
* Returns a new typed client, resolves the app ID for the current network based on
|
|
221
|
+
* pre-determined network-specific app IDs specified in the ARC-56 app spec.
|
|
222
|
+
*
|
|
223
|
+
* If no IDs are in the app spec or the network isn't recognised, an error is thrown.
|
|
224
|
+
* @param typedClient The typed client type to use
|
|
225
|
+
* @param params The params to resolve the app by network
|
|
226
|
+
* @example
|
|
227
|
+
* ```typescript
|
|
228
|
+
* const appClient = algorand.client.getTypedAppClientByNetwork(MyContractClient, {
|
|
229
|
+
* defaultSender: alice,
|
|
230
|
+
* })
|
|
231
|
+
* ```
|
|
232
|
+
* @returns The typed client instance
|
|
233
|
+
*/
|
|
234
|
+
getTypedAppClientByNetwork<TClient extends TypedAppClient<InstanceType<TClient>>>(typedClient: TClient, params?: Expand<Omit<AppClientParams, 'algorand' | 'appSpec' | 'appId'>>): Promise<InstanceType<TClient>>;
|
|
235
|
+
/**
|
|
236
|
+
* Returns a new typed app factory.
|
|
237
|
+
* @param typedFactory The typed factory type to use
|
|
238
|
+
* @param params The params to resolve the factory by
|
|
239
|
+
* @example
|
|
240
|
+
* ```typescript
|
|
241
|
+
* const appFactory = algorand.client.getTypedAppFactory(MyContractClient, {
|
|
175
242
|
* sender: alice,
|
|
176
243
|
* })
|
|
177
244
|
* ```
|
|
178
245
|
* @returns The typed client instance
|
|
179
246
|
*/
|
|
180
|
-
|
|
247
|
+
getTypedAppFactory<TClient>(typedFactory: TypedAppFactory<TClient>, params?: Expand<Omit<AppFactoryParams, 'algorand' | 'appSpec'>>): TClient;
|
|
181
248
|
/**
|
|
182
249
|
* Retrieve client configurations from environment variables when defined or get defaults (expects to be called from a Node.js environment)
|
|
183
250
|
*
|
|
@@ -316,22 +383,14 @@ export declare class ClientManager {
|
|
|
316
383
|
* Interface to identify a typed client that can be used to interact with an application.
|
|
317
384
|
*/
|
|
318
385
|
export interface TypedAppClient<TClient> {
|
|
319
|
-
new (
|
|
386
|
+
new (params: Omit<AppClientParams, 'appSpec'>): TClient;
|
|
387
|
+
fromNetwork(params: Omit<AppClientParams, 'appId' | 'appSpec'>): Promise<TClient>;
|
|
388
|
+
fromCreatorAndName(params: Omit<ResolveAppClientByCreatorAndName, 'appSpec'>): Promise<TClient>;
|
|
320
389
|
}
|
|
321
390
|
/**
|
|
322
|
-
*
|
|
323
|
-
*/
|
|
324
|
-
export type AppClientByCreatorAndNameDetails = AppSpecAppDetailsBase & AppDetailsBase & Omit<ResolveAppByCreatorAndNameBase, 'findExistingUsing'>;
|
|
325
|
-
/**
|
|
326
|
-
* Details to resolve a typed app creator address and name.
|
|
391
|
+
* Interface to identify a typed factory that can be used to create and deploy an application.
|
|
327
392
|
*/
|
|
328
|
-
export
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
*/
|
|
332
|
-
export type AppClientByIdDetails = AppSpecAppDetailsBase & AppDetailsBase & ResolveAppByIdBase;
|
|
333
|
-
/**
|
|
334
|
-
* Details to resolve a typed app by app ID.
|
|
335
|
-
*/
|
|
336
|
-
export type TypedAppClientByIdDetails = AppDetailsBase & ResolveAppByIdBase;
|
|
393
|
+
export interface TypedAppFactory<TClient> {
|
|
394
|
+
new (params: Omit<AppFactoryParams, 'appSpec'>): TClient;
|
|
395
|
+
}
|
|
337
396
|
//# sourceMappingURL=client-manager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-manager.d.ts","sourceRoot":"","sources":["../../src/types/client-manager.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;AAG7B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"client-manager.d.ts","sourceRoot":"","sources":["../../src/types/client-manager.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;AAG7B,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AACrE,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,gCAAgC,EAAE,MAAM,cAAc,CAAA;AAC3F,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAC5D,OAAO,EAAE,yBAAyB,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAA;AAC/F,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,cAAc,EAAuB,MAAM,kBAAkB,CAAA;AACpG,OAAO,GAAG,GAAG,OAAO,CAAC,GAAG,CAAA;AACxB,OAAO,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;AAChC,OAAO,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;AAChC,OAAO,WAAW,GAAG,OAAO,CAAC,WAAW,CAAA;AAExC,yEAAyE;AACzE,MAAM,WAAW,cAAc;IAC7B,6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AAM,EAAE,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,GAAG,OAAO,CAAA;CACzD"}
|
package/types/client-manager.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var algosdk = require('algosdk');
|
|
4
4
|
var types_algoHttpClientWithRetry = require('./algo-http-client-with-retry.js');
|
|
5
5
|
var types_appClient = require('./app-client.js');
|
|
6
|
+
var types_appFactory = require('./app-factory.js');
|
|
6
7
|
var types_dispenserClient = require('./dispenser-client.js');
|
|
7
8
|
var types_networkClient = require('./network-client.js');
|
|
8
9
|
|
|
@@ -31,7 +32,7 @@ class ClientManager {
|
|
|
31
32
|
* const clientManager = new ClientManager({ algodConfig, indexerConfig, kmdConfig })
|
|
32
33
|
* ```
|
|
33
34
|
*/
|
|
34
|
-
constructor(clientsOrConfig) {
|
|
35
|
+
constructor(clientsOrConfig, algorandClient) {
|
|
35
36
|
const _clients = 'algod' in clientsOrConfig
|
|
36
37
|
? clientsOrConfig
|
|
37
38
|
: {
|
|
@@ -42,6 +43,7 @@ class ClientManager {
|
|
|
42
43
|
this._algod = _clients.algod;
|
|
43
44
|
this._indexer = _clients.indexer;
|
|
44
45
|
this._kmd = _clients.kmd;
|
|
46
|
+
this._algorand = algorandClient;
|
|
45
47
|
}
|
|
46
48
|
/** Returns an algosdk Algod API client. */
|
|
47
49
|
get algod() {
|
|
@@ -152,32 +154,99 @@ class ClientManager {
|
|
|
152
154
|
return new types_dispenserClient.TestNetDispenserApiClient(params ? { ...params, authToken: '' } : undefined);
|
|
153
155
|
}
|
|
154
156
|
/**
|
|
155
|
-
* Returns a new `
|
|
156
|
-
* @
|
|
157
|
-
*
|
|
158
|
-
*
|
|
157
|
+
* Returns a new `AppFactory` client
|
|
158
|
+
* @example Basic example
|
|
159
|
+
* ```typescript
|
|
160
|
+
* const factory = algorand.client.getAppFactory({
|
|
161
|
+
* appSpec: '{/* ARC-56 or ARC-32 compatible JSON *\/}',
|
|
162
|
+
* })
|
|
163
|
+
* ```
|
|
164
|
+
* @example Advanced example
|
|
165
|
+
* ```typescript
|
|
166
|
+
* const factory = algorand.client.getAppFactory({
|
|
167
|
+
* appSpec: parsedAppSpec_AppSpec_or_Arc56Contract,
|
|
168
|
+
* defaultSender: "SENDERADDRESS",
|
|
169
|
+
* appName: "OverriddenAppName",
|
|
170
|
+
* version: "2.0.0",
|
|
171
|
+
* updatable: true,
|
|
172
|
+
* deletable: false,
|
|
173
|
+
* deployTimeParams: { ONE: 1, TWO: 'value' }
|
|
174
|
+
* })
|
|
175
|
+
* ```
|
|
176
|
+
*/
|
|
177
|
+
getAppFactory(params) {
|
|
178
|
+
if (!this._algorand) {
|
|
179
|
+
throw new Error('Attempt to get app factory from a ClientManager without an Algorand client');
|
|
180
|
+
}
|
|
181
|
+
return new types_appFactory.AppFactory({ ...params, algorand: this._algorand });
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Returns a new `AppClient` client for managing calls and state for an ARC-32/ARC-56 app.
|
|
185
|
+
* This method resolves the app ID by looking up the creator address and name
|
|
186
|
+
* using AlgoKit app deployment semantics (i.e. looking for the app creation transaction note).
|
|
187
|
+
* @param params The parameters to create the app client
|
|
188
|
+
* @example Basic
|
|
189
|
+
* const appClient = algorand.client.getAppClientByCreatorAndName({
|
|
190
|
+
* appSpec: '{/* ARC-56 or ARC-32 compatible JSON *\}',
|
|
191
|
+
* // appId resolved by looking for app ID of named app by this creator
|
|
192
|
+
* creatorAddress: 'CREATORADDRESS',
|
|
193
|
+
* })
|
|
194
|
+
* @returns The `AppClient`
|
|
159
195
|
*/
|
|
160
|
-
getAppClientByCreatorAndName(
|
|
161
|
-
|
|
196
|
+
getAppClientByCreatorAndName(params) {
|
|
197
|
+
if (!this._algorand) {
|
|
198
|
+
throw new Error('Attempt to get app client from a ClientManager without an Algorand client');
|
|
199
|
+
}
|
|
200
|
+
return types_appClient.AppClient.fromCreatorAndName({
|
|
201
|
+
...params,
|
|
202
|
+
algorand: this._algorand,
|
|
203
|
+
});
|
|
162
204
|
}
|
|
163
205
|
/**
|
|
164
|
-
* Returns a new `
|
|
165
|
-
* @param
|
|
166
|
-
* @
|
|
206
|
+
* Returns a new `AppClient` client for managing calls and state for an ARC-32/ARC-56 app.
|
|
207
|
+
* @param params The parameters to create the app client
|
|
208
|
+
* @example Basic
|
|
209
|
+
* const appClient = algorand.client.getAppClientById({
|
|
210
|
+
* appSpec: '{/* ARC-56 or ARC-32 compatible JSON *\}',
|
|
211
|
+
* appId: 12345n,
|
|
212
|
+
* })
|
|
213
|
+
* @returns The `AppClient`
|
|
167
214
|
*/
|
|
168
|
-
getAppClientById(
|
|
169
|
-
|
|
215
|
+
getAppClientById(params) {
|
|
216
|
+
if (!this._algorand) {
|
|
217
|
+
throw new Error('Attempt to get app client from a ClientManager without an Algorand client');
|
|
218
|
+
}
|
|
219
|
+
return new types_appClient.AppClient({ ...params, algorand: this._algorand });
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Returns a new `AppClient` client for managing calls and state for an ARC-56 app.
|
|
223
|
+
* This method resolves the app ID for the current network based on
|
|
224
|
+
* pre-determined network-specific app IDs specified in the ARC-56 app spec.
|
|
225
|
+
*
|
|
226
|
+
* If no IDs are in the app spec or the network isn't recognised, an error is thrown.
|
|
227
|
+
* @param params The parameters to create the app client
|
|
228
|
+
* @example Basic
|
|
229
|
+
* const appClient = algorand.client.getAppClientByNetwork({
|
|
230
|
+
* appSpec: '{/* ARC-56 or ARC-32 compatible JSON *\}',
|
|
231
|
+
* // appId resolved by using ARC-56 spec to find app ID for current network
|
|
232
|
+
* })
|
|
233
|
+
* @returns The `AppClient`
|
|
234
|
+
*/
|
|
235
|
+
async getAppClientByNetwork(params) {
|
|
236
|
+
if (!this._algorand) {
|
|
237
|
+
throw new Error('Attempt to get app client from a ClientManager without an Algorand client');
|
|
238
|
+
}
|
|
239
|
+
return types_appClient.AppClient.fromNetwork({ ...params, algorand: this._algorand });
|
|
170
240
|
}
|
|
171
241
|
/**
|
|
172
242
|
* Returns a new typed client, resolving the app by creator address and name.
|
|
173
243
|
* @param typedClient The typed client type to use
|
|
174
|
-
* @param
|
|
175
|
-
* @
|
|
176
|
-
* @example Use name in ARC-32 app spec
|
|
244
|
+
* @param params The params to resolve the app by creator address and name
|
|
245
|
+
* @example Use name in ARC-32 / ARC-56 app spec
|
|
177
246
|
* ```typescript
|
|
178
247
|
* const appClient = algorand.client.getTypedAppClientByCreatorAndName(MyContractClient, {
|
|
179
248
|
* creatorAddress: "CREATORADDRESS",
|
|
180
|
-
*
|
|
249
|
+
* defaultSender: alice,
|
|
181
250
|
* })
|
|
182
251
|
* ```
|
|
183
252
|
* @example Specify name
|
|
@@ -185,29 +254,74 @@ class ClientManager {
|
|
|
185
254
|
* const appClient = algorand.client.getTypedAppClientByCreatorAndName(MyContractClient, {
|
|
186
255
|
* creatorAddress: "CREATORADDRESS",
|
|
187
256
|
* name: "contract-name",
|
|
188
|
-
*
|
|
257
|
+
* defaultSender: alice,
|
|
189
258
|
* })
|
|
190
259
|
* ```
|
|
191
260
|
* @returns The typed client instance
|
|
192
261
|
*/
|
|
193
|
-
getTypedAppClientByCreatorAndName(typedClient,
|
|
194
|
-
|
|
262
|
+
async getTypedAppClientByCreatorAndName(typedClient, params) {
|
|
263
|
+
if (!this._algorand) {
|
|
264
|
+
throw new Error('Attempt to get app client from a ClientManager without an Algorand client');
|
|
265
|
+
}
|
|
266
|
+
return typedClient.fromCreatorAndName({ ...params, algorand: this._algorand });
|
|
195
267
|
}
|
|
196
268
|
/**
|
|
197
269
|
* Returns a new typed client, resolving the app by app ID.
|
|
198
270
|
* @param typedClient The typed client type to use
|
|
199
|
-
* @param
|
|
271
|
+
* @param params The params to resolve the app by ID
|
|
200
272
|
* @example
|
|
201
273
|
* ```typescript
|
|
202
274
|
* const appClient = algorand.client.getTypedAppClientById(MyContractClient, {
|
|
203
|
-
*
|
|
275
|
+
* appId: 12345n,
|
|
276
|
+
* defaultSender: alice,
|
|
277
|
+
* })
|
|
278
|
+
* ```
|
|
279
|
+
* @returns The typed client instance
|
|
280
|
+
*/
|
|
281
|
+
getTypedAppClientById(typedClient, params) {
|
|
282
|
+
if (!this._algorand) {
|
|
283
|
+
throw new Error('Attempt to get app client from a ClientManager without an Algorand client');
|
|
284
|
+
}
|
|
285
|
+
return new typedClient({ ...params, algorand: this._algorand });
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Returns a new typed client, resolves the app ID for the current network based on
|
|
289
|
+
* pre-determined network-specific app IDs specified in the ARC-56 app spec.
|
|
290
|
+
*
|
|
291
|
+
* If no IDs are in the app spec or the network isn't recognised, an error is thrown.
|
|
292
|
+
* @param typedClient The typed client type to use
|
|
293
|
+
* @param params The params to resolve the app by network
|
|
294
|
+
* @example
|
|
295
|
+
* ```typescript
|
|
296
|
+
* const appClient = algorand.client.getTypedAppClientByNetwork(MyContractClient, {
|
|
297
|
+
* defaultSender: alice,
|
|
298
|
+
* })
|
|
299
|
+
* ```
|
|
300
|
+
* @returns The typed client instance
|
|
301
|
+
*/
|
|
302
|
+
getTypedAppClientByNetwork(typedClient, params) {
|
|
303
|
+
if (!this._algorand) {
|
|
304
|
+
throw new Error('Attempt to get app client from a ClientManager without an Algorand client');
|
|
305
|
+
}
|
|
306
|
+
return typedClient.fromNetwork({ ...params, algorand: this._algorand });
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Returns a new typed app factory.
|
|
310
|
+
* @param typedFactory The typed factory type to use
|
|
311
|
+
* @param params The params to resolve the factory by
|
|
312
|
+
* @example
|
|
313
|
+
* ```typescript
|
|
314
|
+
* const appFactory = algorand.client.getTypedAppFactory(MyContractClient, {
|
|
204
315
|
* sender: alice,
|
|
205
316
|
* })
|
|
206
317
|
* ```
|
|
207
318
|
* @returns The typed client instance
|
|
208
319
|
*/
|
|
209
|
-
|
|
210
|
-
|
|
320
|
+
getTypedAppFactory(typedFactory, params) {
|
|
321
|
+
if (!this._algorand) {
|
|
322
|
+
throw new Error('Attempt to get app factory from a ClientManager without an Algorand client');
|
|
323
|
+
}
|
|
324
|
+
return new typedFactory({ ...params, algorand: this._algorand });
|
|
211
325
|
}
|
|
212
326
|
/**
|
|
213
327
|
* Retrieve client configurations from environment variables when defined or get defaults (expects to be called from a Node.js environment)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-manager.js","sources":["../../src/types/client-manager.ts"],"sourcesContent":[null],"names":["genesisIdIsLocalNet","TestNetDispenserApiClient","
|
|
1
|
+
{"version":3,"file":"client-manager.js","sources":["../../src/types/client-manager.ts"],"sourcesContent":[null],"names":["genesisIdIsLocalNet","TestNetDispenserApiClient","AppFactory","AppClient","AlgoHttpClientWithRetry"],"mappings":";;;;;;;;;AASA,IAAO,GAAG,GAAG,OAAO,CAAC,GAAG,CAAA;AACxB,IAAO,OAAO,GAAG,OAAO,CAAC,OAAO,CAAA;AAEhC,IAAO,WAAW,GAAG,OAAO,CAAC,WAAW,CAAA;AAYxC;MACa,aAAa,CAAA;AAMxB;;;;;;;;;;;;;;;;;;;AAmBG;IACH,WAAY,CAAA,eAA4C,EAAE,cAAwC,EAAA;AAChG,QAAA,MAAM,QAAQ,GACZ,OAAO,IAAI,eAAe;AACxB,cAAE,eAAe;AACjB,cAAE;gBACE,KAAK,EAAE,aAAa,CAAC,cAAc,CAAC,eAAe,CAAC,WAAW,CAAC;AAChE,gBAAA,OAAO,EAAE,eAAe,CAAC,aAAa,GAAG,aAAa,CAAC,gBAAgB,CAAC,eAAe,CAAC,aAAa,CAAC,GAAG,SAAS;AAClH,gBAAA,GAAG,EAAE,eAAe,CAAC,SAAS,GAAG,aAAa,CAAC,YAAY,CAAC,eAAe,CAAC,SAAS,CAAC,GAAG,SAAS;aACnG,CAAA;AACP,QAAA,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAA;AAC5B,QAAA,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAA;AAChC,QAAA,IAAI,CAAC,IA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