@algorandfoundation/algokit-utils 6.0.0-beta.3 → 6.0.0-beta.4

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.
Files changed (52) hide show
  1. package/account/account.d.ts +33 -1
  2. package/account/account.d.ts.map +1 -1
  3. package/account/account.js +63 -0
  4. package/account/account.js.map +1 -1
  5. package/account/account.mjs +62 -1
  6. package/account/account.mjs.map +1 -1
  7. package/index.d.ts +1 -0
  8. package/index.d.ts.map +1 -1
  9. package/index.js +4 -0
  10. package/index.js.map +1 -1
  11. package/index.mjs +2 -1
  12. package/index.mjs.map +1 -1
  13. package/package.json +1 -1
  14. package/testing/fixtures/algorand-fixture.d.ts.map +1 -1
  15. package/testing/fixtures/algorand-fixture.js +15 -2
  16. package/testing/fixtures/algorand-fixture.js.map +1 -1
  17. package/testing/fixtures/algorand-fixture.mjs +15 -2
  18. package/testing/fixtures/algorand-fixture.mjs.map +1 -1
  19. package/types/account-manager.d.ts +211 -0
  20. package/types/account-manager.d.ts.map +1 -0
  21. package/types/account-manager.js +265 -0
  22. package/types/account-manager.js.map +1 -0
  23. package/types/account-manager.mjs +263 -0
  24. package/types/account-manager.mjs.map +1 -0
  25. package/types/account.d.ts +19 -0
  26. package/types/account.d.ts.map +1 -1
  27. package/types/account.js.map +1 -1
  28. package/types/account.mjs.map +1 -1
  29. package/types/algorand-client.d.ts +183 -0
  30. package/types/algorand-client.d.ts.map +1 -0
  31. package/types/algorand-client.js +296 -0
  32. package/types/algorand-client.js.map +1 -0
  33. package/types/algorand-client.mjs +291 -0
  34. package/types/algorand-client.mjs.map +1 -0
  35. package/types/client-manager.d.ts +99 -0
  36. package/types/client-manager.d.ts.map +1 -0
  37. package/types/client-manager.js +99 -0
  38. package/types/client-manager.js.map +1 -0
  39. package/types/client-manager.mjs +97 -0
  40. package/types/client-manager.mjs.map +1 -0
  41. package/types/composer.d.ts +331 -0
  42. package/types/composer.d.ts.map +1 -0
  43. package/types/composer.js +446 -0
  44. package/types/composer.js.map +1 -0
  45. package/types/composer.mjs +444 -0
  46. package/types/composer.mjs.map +1 -0
  47. package/types/network-client.d.ts +2 -2
  48. package/types/network-client.d.ts.map +1 -1
  49. package/types/testing.d.ts +8 -2
  50. package/types/testing.d.ts.map +1 -1
  51. package/types/transaction.d.ts +4 -0
  52. package/types/transaction.d.ts.map +1 -1
@@ -0,0 +1,99 @@
1
+ import algosdk from 'algosdk';
2
+ import { AppLookup } from './app';
3
+ import { AppDetails, AppDetailsBase, AppSpecAppDetailsBase, ApplicationClient, ResolveAppByCreatorAndNameBase, ResolveAppByIdBase } from './app-client';
4
+ import { TestNetDispenserApiClientParams } from './dispenser-client';
5
+ import { AlgoConfig } from './network-client';
6
+ /** Clients from algosdk that interact with the official Algorand APIs */
7
+ export interface AlgoSdkClients {
8
+ /** Algod client, see https://developer.algorand.org/docs/rest-apis/algod/ */
9
+ algod: algosdk.Algodv2;
10
+ /** Optional indexer client, see https://developer.algorand.org/docs/rest-apis/indexer/ */
11
+ indexer?: algosdk.Indexer;
12
+ /** Optional KMD client, see https://developer.algorand.org/docs/rest-apis/kmd/ */
13
+ kmd?: algosdk.Kmd;
14
+ }
15
+ /** Exposes access to various API clients. */
16
+ export declare class ClientManager {
17
+ private _algod;
18
+ private _indexer?;
19
+ private _kmd?;
20
+ /**
21
+ * algosdk clients or config for interacting with the official Algorand APIs.
22
+ * @param clientsOrConfig The clients or config to use
23
+ */
24
+ constructor(clientsOrConfig: AlgoConfig | AlgoSdkClients);
25
+ /** Returns an algosdk Algod API client. */
26
+ get algod(): algosdk.Algodv2;
27
+ /** Returns an algosdk Indexer API client or throws an error if it's not been provided. */
28
+ get indexer(): algosdk.Indexer;
29
+ /** Returns an algosdk KMD API client or throws an error if it's not been provided. */
30
+ get kmd(): algosdk.Kmd;
31
+ /**
32
+ * Returns a TestNet Dispenser API client.
33
+ * Refer to [docs](https://github.com/algorandfoundation/algokit/blob/main/docs/testnet_api.md) on guidance to obtain an access token.
34
+ *
35
+ * @param params An object containing parameters for the TestNetDispenserApiClient class.
36
+ * Or null if you want the client to load the access token from the environment variable `ALGOKIT_DISPENSER_ACCESS_TOKEN`.
37
+ * @example
38
+ * const client = algokit.getTestNetDispenserApiClient(
39
+ * {
40
+ * authToken: 'your_auth_token',
41
+ * requestTimeout: 15,
42
+ * }
43
+ * )
44
+ *
45
+ * @returns An instance of the TestNetDispenserApiClient class.
46
+ */
47
+ getTestNetDispenser(params?: TestNetDispenserApiClientParams | null): import("./dispenser-client").TestNetDispenserApiClient;
48
+ /**
49
+ * Returns a new `ApplicationClient` client, resolving the app by creator address and name.
50
+ * @param details The details to resolve the app by creator address and name
51
+ * @param cachedAppLookup A cached app lookup that matches a name to on-chain details; either this is needed or indexer is required to be passed in to this manager on construction.
52
+ * @returns The `ApplicationClient`
53
+ */
54
+ getAppClientByCreatorAndName(details: AppClientByCreatorAndNameDetails, cachedAppLookup?: AppLookup): ApplicationClient;
55
+ /**
56
+ * Returns a new `ApplicationClient` client, resolving the app by app ID.
57
+ * @param details The details to resolve the app by ID
58
+ * @returns The `ApplicationClient`
59
+ */
60
+ getAppClientById(details: AppClientByIdDetails): ApplicationClient;
61
+ /**
62
+ * Returns a new typed client, resolving the app by creator address and name.
63
+ * @param typedClient The typed client type to use
64
+ * @param details The details to resolve the app by creator address and name
65
+ * @param cachedAppLookup A cached app lookup that matches a name to on-chain details; either this is needed or indexer is required to be passed in to this manager on construction.
66
+ * @returns The typed client instance
67
+ */
68
+ getTypedAppClientByCreatorAndName<TClient>(typedClient: TypedAppClient<TClient>, details: TypedAppClientByCreatorAndNameDetails, cachedAppLookup?: AppLookup): TClient;
69
+ /**
70
+ * Returns a new typed client, resolving the app by app ID.
71
+ * @param typedClient The typed client type to use
72
+ * @param details The details to resolve the app by ID
73
+ * @returns The typed client instance
74
+ */
75
+ getTypedAppClientById<TClient>(typedClient: TypedAppClient<TClient>, details: TypedAppClientByIdDetails): TClient;
76
+ }
77
+ /**
78
+ * Interface to identify a typed client that can be used to interact with an application.
79
+ */
80
+ export interface TypedAppClient<TClient> {
81
+ new (details: AppDetails, algod: algosdk.Algodv2): TClient;
82
+ }
83
+ /**
84
+ * Details to resolve an app client by creator address and name.
85
+ */
86
+ export type AppClientByCreatorAndNameDetails = AppSpecAppDetailsBase & AppDetailsBase & Omit<ResolveAppByCreatorAndNameBase, 'findExistingUsing'>;
87
+ /**
88
+ * Details to resolve a typed app creator address and name.
89
+ */
90
+ export type TypedAppClientByCreatorAndNameDetails = AppDetailsBase & Omit<ResolveAppByCreatorAndNameBase, 'findExistingUsing'>;
91
+ /**
92
+ * Details to resolve an app client by app ID.
93
+ */
94
+ export type AppClientByIdDetails = AppSpecAppDetailsBase & AppDetailsBase & ResolveAppByIdBase;
95
+ /**
96
+ * Details to resolve a typed app by app ID.
97
+ */
98
+ export type TypedAppClientByIdDetails = AppDetailsBase & ResolveAppByIdBase;
99
+ //# sourceMappingURL=client-manager.d.ts.map
@@ -0,0 +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,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EACL,UAAU,EACV,cAAc,EACd,qBAAqB,EACrB,iBAAiB,EACjB,8BAA8B,EAC9B,kBAAkB,EACnB,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAA;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE7C,yEAAyE;AACzE,MAAM,WAAW,cAAc;IAC7B,6EAA6E;IAC7E,KAAK,EAAE,OAAO,CAAC,OAAO,CAAA;IACtB,0FAA0F;IAC1F,OAAO,CAAC,EAAE,OAAO,CAAC,OAAO,CAAA;IACzB,kFAAkF;IAClF,GAAG,CAAC,EAAE,OAAO,CAAC,GAAG,CAAA;CAClB;AAED,6CA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AEG;AACH,MAAM,MAAM,oBAAoB,GAAG,qBAAqB,GAAG,cAAc,GAAG,kBAAkB,CAAA;AAE9F;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,cAAc,GAAG,kBAAkB,CAAA"}
@@ -0,0 +1,99 @@
1
+ 'use strict';
2
+
3
+ var dispenserClient = require('../dispenser-client.js');
4
+ var networkClient = require('../network-client.js');
5
+ var types_appClient = require('./app-client.js');
6
+
7
+ /** Exposes access to various API clients. */
8
+ class ClientManager {
9
+ /**
10
+ * algosdk clients or config for interacting with the official Algorand APIs.
11
+ * @param clientsOrConfig The clients or config to use
12
+ */
13
+ constructor(clientsOrConfig) {
14
+ const _clients = 'algod' in clientsOrConfig
15
+ ? clientsOrConfig
16
+ : {
17
+ algod: networkClient.getAlgoClient(clientsOrConfig.algodConfig),
18
+ indexer: clientsOrConfig.indexerConfig ? networkClient.getAlgoIndexerClient(clientsOrConfig.indexerConfig) : undefined,
19
+ kmd: clientsOrConfig.kmdConfig ? networkClient.getAlgoKmdClient(clientsOrConfig.kmdConfig) : undefined,
20
+ };
21
+ this._algod = _clients.algod;
22
+ this._indexer = _clients.indexer;
23
+ this._kmd = _clients.kmd;
24
+ }
25
+ /** Returns an algosdk Algod API client. */
26
+ get algod() {
27
+ return this._algod;
28
+ }
29
+ /** Returns an algosdk Indexer API client or throws an error if it's not been provided. */
30
+ get indexer() {
31
+ if (!this._indexer)
32
+ throw new Error('Attempt to use Indexer client in AlgoKit instance with no Indexer configured');
33
+ return this._indexer;
34
+ }
35
+ /** Returns an algosdk KMD API client or throws an error if it's not been provided. */
36
+ get kmd() {
37
+ if (!this._kmd)
38
+ throw new Error('Attempt to use Kmd client in AlgoKit instance with no Kmd configured');
39
+ return this._kmd;
40
+ }
41
+ /**
42
+ * Returns a TestNet Dispenser API client.
43
+ * Refer to [docs](https://github.com/algorandfoundation/algokit/blob/main/docs/testnet_api.md) on guidance to obtain an access token.
44
+ *
45
+ * @param params An object containing parameters for the TestNetDispenserApiClient class.
46
+ * Or null if you want the client to load the access token from the environment variable `ALGOKIT_DISPENSER_ACCESS_TOKEN`.
47
+ * @example
48
+ * const client = algokit.getTestNetDispenserApiClient(
49
+ * {
50
+ * authToken: 'your_auth_token',
51
+ * requestTimeout: 15,
52
+ * }
53
+ * )
54
+ *
55
+ * @returns An instance of the TestNetDispenserApiClient class.
56
+ */
57
+ getTestNetDispenser(params = null) {
58
+ return dispenserClient.getTestNetDispenserApiClient(params);
59
+ }
60
+ /**
61
+ * Returns a new `ApplicationClient` client, resolving the app by creator address and name.
62
+ * @param details The details to resolve the app by creator address and name
63
+ * @param cachedAppLookup A cached app lookup that matches a name to on-chain details; either this is needed or indexer is required to be passed in to this manager on construction.
64
+ * @returns The `ApplicationClient`
65
+ */
66
+ getAppClientByCreatorAndName(details, cachedAppLookup) {
67
+ return new types_appClient.ApplicationClient({ ...details, resolveBy: 'creatorAndName', findExistingUsing: cachedAppLookup ?? this.indexer }, this._algod);
68
+ }
69
+ /**
70
+ * Returns a new `ApplicationClient` client, resolving the app by app ID.
71
+ * @param details The details to resolve the app by ID
72
+ * @returns The `ApplicationClient`
73
+ */
74
+ getAppClientById(details) {
75
+ return new types_appClient.ApplicationClient({ ...details, resolveBy: 'id' }, this._algod);
76
+ }
77
+ /**
78
+ * Returns a new typed client, resolving the app by creator address and name.
79
+ * @param typedClient The typed client type to use
80
+ * @param details The details to resolve the app by creator address and name
81
+ * @param cachedAppLookup A cached app lookup that matches a name to on-chain details; either this is needed or indexer is required to be passed in to this manager on construction.
82
+ * @returns The typed client instance
83
+ */
84
+ getTypedAppClientByCreatorAndName(typedClient, details, cachedAppLookup) {
85
+ return new typedClient({ ...details, resolveBy: 'creatorAndName', findExistingUsing: cachedAppLookup ?? this.indexer }, this._algod);
86
+ }
87
+ /**
88
+ * Returns a new typed client, resolving the app by app ID.
89
+ * @param typedClient The typed client type to use
90
+ * @param details The details to resolve the app by ID
91
+ * @returns The typed client instance
92
+ */
93
+ getTypedAppClientById(typedClient, details) {
94
+ return new typedClient({ ...details, resolveBy: 'id' }, this._algod);
95
+ }
96
+ }
97
+
98
+ exports.ClientManager = ClientManager;
99
+ //# sourceMappingURL=client-manager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client-manager.js","sources":["../../src/types/client-manager.ts"],"sourcesContent":[null],"names":["getAlgoClient","getAlgoIndexerClient","getAlgoKmdClient","getTestNetDispenserApiClient","ApplicationClient"],"mappings":";;;;;;AAyBA;MACa,aAAa,CAAA;AAKxB;;;AAGG;AACH,IAAA,WAAA,CAAY,eAA4C,EAAA;AACtD,QAAA,MAAM,QAAQ,GACZ,OAAO,IAAI,eAAe;AACxB,cAAE,eAAe;AACjB,cAAE;AACE,gBAAA,KAAK,EAAEA,2BAAa,CAAC,eAAe,CAAC,WAAW,CAAC;AACjD,gBAAA,OAAO,EAAE,eAAe,CAAC,aAAa,GAAGC,kCAAoB,CAAC,eAAe,CAAC,aAAa,CAAC,GAAG,SAAS;AACxG,gBAAA,GAAG,EAAE,eAAe,CAAC,SAAS,GAAGC,8BAAgB,CAAC,eAAe,CAAC,SAAS,CAAC,GAAG,SAAS;aACzF,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,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAA;KACzB;;AAGD,IAAA,IAAW,KAAK,GAAA;QACd,OAAO,IAAI,CAAC,MAAM,CAAA;KACnB;;AAGD,IAAA,IAAW,OAAO,GAAA;QAChB,IAAI,CAAC,IAAI,CAAC,QAAQ;AAAE,YAAA,MAAM,IAAI,KAAK,CAAC,8EAA8E,CAAC,CAAA;QACnH,OAAO,IAAI,CAAC,QAAQ,CAAA;KACrB;;AAGD,IAAA,IAAW,GAAG,GAAA;QACZ,IAAI,CAAC,IAAI,CAAC,IAAI;AAAE,YAAA,MAAM,IAAI,KAAK,CAAC,sEAAsE,CAAC,CAAA;QACvG,OAAO,IAAI,CAAC,IAAI,CAAA;KACjB;AAED;;;;;;;;;;;;;;;AAeG;IACI,mBAAmB,CAAC,SAAiD,IAAI,EAAA;AAC9E,QAAA,OAAOC,4CAA4B,CAAC,MAAM,CAAC,CAAA;KAC5C;AAED;;;;;AAKG;IACI,4BAA4B,CAAC,OAAyC,EAAE,eAA2B,EAAA;QACxG,OAAO,IAAIC,iCAAiB,CAC1B,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,eAAe,IAAI,IAAI,CAAC,OAAO,EAAE,EAC/F,IAAI,CAAC,MAAM,CACZ,CAAA;KACF;AAED;;;;AAIG;AACI,IAAA,gBAAgB,CAAC,OAA6B,EAAA;AACnD,QAAA,OAAO,IAAIA,iCAAiB,CAAC,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;KAC3E;AAED;;;;;;AAMG;AACI,IAAA,iCAAiC,CACtC,WAAoC,EACpC,OAA8C,EAC9C,eAA2B,EAAA;QAE3B,OAAO,IAAI,WAAW,CAAC,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,eAAe,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;KACrI;AAED;;;;;AAKG;IACI,qBAAqB,CAAU,WAAoC,EAAE,OAAkC,EAAA;AAC5G,QAAA,OAAO,IAAI,WAAW,CAAC,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;KACrE;AACF;;;;"}
@@ -0,0 +1,97 @@
1
+ import { getTestNetDispenserApiClient } from '../dispenser-client.mjs';
2
+ import { getAlgoClient, getAlgoIndexerClient, getAlgoKmdClient } from '../network-client.mjs';
3
+ import { ApplicationClient } from './app-client.mjs';
4
+
5
+ /** Exposes access to various API clients. */
6
+ class ClientManager {
7
+ /**
8
+ * algosdk clients or config for interacting with the official Algorand APIs.
9
+ * @param clientsOrConfig The clients or config to use
10
+ */
11
+ constructor(clientsOrConfig) {
12
+ const _clients = 'algod' in clientsOrConfig
13
+ ? clientsOrConfig
14
+ : {
15
+ algod: getAlgoClient(clientsOrConfig.algodConfig),
16
+ indexer: clientsOrConfig.indexerConfig ? getAlgoIndexerClient(clientsOrConfig.indexerConfig) : undefined,
17
+ kmd: clientsOrConfig.kmdConfig ? getAlgoKmdClient(clientsOrConfig.kmdConfig) : undefined,
18
+ };
19
+ this._algod = _clients.algod;
20
+ this._indexer = _clients.indexer;
21
+ this._kmd = _clients.kmd;
22
+ }
23
+ /** Returns an algosdk Algod API client. */
24
+ get algod() {
25
+ return this._algod;
26
+ }
27
+ /** Returns an algosdk Indexer API client or throws an error if it's not been provided. */
28
+ get indexer() {
29
+ if (!this._indexer)
30
+ throw new Error('Attempt to use Indexer client in AlgoKit instance with no Indexer configured');
31
+ return this._indexer;
32
+ }
33
+ /** Returns an algosdk KMD API client or throws an error if it's not been provided. */
34
+ get kmd() {
35
+ if (!this._kmd)
36
+ throw new Error('Attempt to use Kmd client in AlgoKit instance with no Kmd configured');
37
+ return this._kmd;
38
+ }
39
+ /**
40
+ * Returns a TestNet Dispenser API client.
41
+ * Refer to [docs](https://github.com/algorandfoundation/algokit/blob/main/docs/testnet_api.md) on guidance to obtain an access token.
42
+ *
43
+ * @param params An object containing parameters for the TestNetDispenserApiClient class.
44
+ * Or null if you want the client to load the access token from the environment variable `ALGOKIT_DISPENSER_ACCESS_TOKEN`.
45
+ * @example
46
+ * const client = algokit.getTestNetDispenserApiClient(
47
+ * {
48
+ * authToken: 'your_auth_token',
49
+ * requestTimeout: 15,
50
+ * }
51
+ * )
52
+ *
53
+ * @returns An instance of the TestNetDispenserApiClient class.
54
+ */
55
+ getTestNetDispenser(params = null) {
56
+ return getTestNetDispenserApiClient(params);
57
+ }
58
+ /**
59
+ * Returns a new `ApplicationClient` client, resolving the app by creator address and name.
60
+ * @param details The details to resolve the app by creator address and name
61
+ * @param cachedAppLookup A cached app lookup that matches a name to on-chain details; either this is needed or indexer is required to be passed in to this manager on construction.
62
+ * @returns The `ApplicationClient`
63
+ */
64
+ getAppClientByCreatorAndName(details, cachedAppLookup) {
65
+ return new ApplicationClient({ ...details, resolveBy: 'creatorAndName', findExistingUsing: cachedAppLookup ?? this.indexer }, this._algod);
66
+ }
67
+ /**
68
+ * Returns a new `ApplicationClient` client, resolving the app by app ID.
69
+ * @param details The details to resolve the app by ID
70
+ * @returns The `ApplicationClient`
71
+ */
72
+ getAppClientById(details) {
73
+ return new ApplicationClient({ ...details, resolveBy: 'id' }, this._algod);
74
+ }
75
+ /**
76
+ * Returns a new typed client, resolving the app by creator address and name.
77
+ * @param typedClient The typed client type to use
78
+ * @param details The details to resolve the app by creator address and name
79
+ * @param cachedAppLookup A cached app lookup that matches a name to on-chain details; either this is needed or indexer is required to be passed in to this manager on construction.
80
+ * @returns The typed client instance
81
+ */
82
+ getTypedAppClientByCreatorAndName(typedClient, details, cachedAppLookup) {
83
+ return new typedClient({ ...details, resolveBy: 'creatorAndName', findExistingUsing: cachedAppLookup ?? this.indexer }, this._algod);
84
+ }
85
+ /**
86
+ * Returns a new typed client, resolving the app by app ID.
87
+ * @param typedClient The typed client type to use
88
+ * @param details The details to resolve the app by ID
89
+ * @returns The typed client instance
90
+ */
91
+ getTypedAppClientById(typedClient, details) {
92
+ return new typedClient({ ...details, resolveBy: 'id' }, this._algod);
93
+ }
94
+ }
95
+
96
+ export { ClientManager };
97
+ //# sourceMappingURL=client-manager.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client-manager.mjs","sources":["../../src/types/client-manager.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAyBA;MACa,aAAa,CAAA;AAKxB;;;AAGG;AACH,IAAA,WAAA,CAAY,eAA4C,EAAA;AACtD,QAAA,MAAM,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I,CAAC,OAAO,EAAE,EAC/F,IAAI,CAAC,MAAM,CACZ,CAAA;KACF;AAED;;;;AAIG;AACI,IAAA,gBAAgB,CAAC,OAA6B,EAAA;AACnD,QAAA,OAAO,IAAI,iBAAiB,CAAC,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;KAC3E;AAED;;;;;;AAMG;AACI,IAAA,iCAAiC,CACtC,WAAoC,EACpC,OAA8C,EAC9C,eAA2B,EAAA;QAE3B,OAAO,IAAI,WAAW,CAAC,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,eAAe,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;KACrI;AAED;;;;;AAKG;IACI,qBAAqB,CAAU,WAAoC,EAAE,OAAkC,EAAA;AAC5G,QAAA,OAAO,IAAI,WAAW,CAAC,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;KACrE;AACF;;;;"}
@@ -0,0 +1,331 @@
1
+ import algosdk from 'algosdk';
2
+ import { TransactionSignerAccount } from './account';
3
+ import { AlgoAmount } from './amount';
4
+ import { SendAtomicTransactionComposerResults } from './transaction';
5
+ import Transaction = algosdk.Transaction;
6
+ import TransactionWithSigner = algosdk.TransactionWithSigner;
7
+ /** Common parameters for defining a transaction. */
8
+ export type CommonTransactionParams = {
9
+ /** The address sending the transaction */
10
+ sender: string;
11
+ /** The function used to sign transactions */
12
+ signer?: algosdk.TransactionSigner | TransactionSignerAccount;
13
+ /** Change the signing key of the sender to the given address */
14
+ rekeyTo?: string;
15
+ /** Note to attach to the transaction*/
16
+ note?: Uint8Array | string;
17
+ /** Prevent multiple transactions with the same lease being included within the validity window */
18
+ lease?: Uint8Array | string;
19
+ /** The transaction fee. In most cases you want to use `extraFee` unless setting the fee to 0 to be covered by another transaction */
20
+ staticFee?: AlgoAmount;
21
+ /** The fee to pay IN ADDITION to the suggested fee. Useful for covering inner transaction fees */
22
+ extraFee?: AlgoAmount;
23
+ /** Throw an error if the fee for the transaction is more than this amount */
24
+ maxFee?: AlgoAmount;
25
+ /** How many rounds the transaction should be valid for */
26
+ validityWindow?: number;
27
+ /**
28
+ * Set the first round this transaction is valid.
29
+ * If left undefined, the value from algod will be used.
30
+ * Only set this when you intentionally want this to be some time in the future
31
+ */
32
+ firstValidRound?: bigint;
33
+ /** The last round this transaction is valid. It is recommended to use validityWindow instead */
34
+ lastValidRound?: bigint;
35
+ };
36
+ /** Parameters to define a payment transaction. */
37
+ export type PaymentParams = CommonTransactionParams & {
38
+ /** That account that will receive the ALGO */
39
+ receiver: string;
40
+ /** Amount to send */
41
+ amount: AlgoAmount;
42
+ /** If given, close the sender account and send the remaining balance to this address */
43
+ closeRemainderTo?: string;
44
+ };
45
+ /** Parameters to define an asset create transaction. */
46
+ export type AssetCreateParams = CommonTransactionParams & {
47
+ /** The total amount of the smallest divisible unit to create */
48
+ total: bigint;
49
+ /** The amount of decimal places the asset should have */
50
+ decimals?: number;
51
+ /** Whether the asset is frozen by default in the creator address */
52
+ defaultFrozen?: boolean;
53
+ /** The address that can change the manager, reserve, clawback, and freeze addresses. There will permanently be no manager if undefined or an empty string */
54
+ manager?: string;
55
+ /** The address that holds the uncirculated supply */
56
+ reserve?: string;
57
+ /** The address that can freeze the asset in any account. Freezing will be permanently disabled if undefined or an empty string. */
58
+ freeze?: string;
59
+ /** The address that can clawback the asset from any account. Clawback will be permanently disabled if undefined or an empty string. */
60
+ clawback?: string;
61
+ /** The short ticker name for the asset */
62
+ unitName?: string;
63
+ /** The full name of the asset */
64
+ assetName?: string;
65
+ /** The metadata URL for the asset */
66
+ url?: string;
67
+ /** Hash of the metadata contained in the metadata URL */
68
+ metadataHash?: Uint8Array;
69
+ };
70
+ /** Parameters to define an asset config transaction. */
71
+ export type AssetConfigParams = CommonTransactionParams & {
72
+ /** ID of the asset */
73
+ assetId: bigint;
74
+ /** The address that can change the manager, reserve, clawback, and freeze addresses. There will permanently be no manager if undefined or an empty string */
75
+ manager?: string;
76
+ /** The address that holds the uncirculated supply */
77
+ reserve?: string;
78
+ /** The address that can freeze the asset in any account. Freezing will be permanently disabled if undefined or an empty string. */
79
+ freeze?: string;
80
+ /** The address that can clawback the asset from any account. Clawback will be permanently disabled if undefined or an empty string. */
81
+ clawback?: string;
82
+ };
83
+ /** Parameters to define an asset freeze transaction. */
84
+ export type AssetFreezeParams = CommonTransactionParams & {
85
+ /** The ID of the asset */
86
+ assetId: bigint;
87
+ /** The account to freeze or unfreeze */
88
+ account: string;
89
+ /** Whether the assets in the account should be frozen */
90
+ frozen: boolean;
91
+ };
92
+ /** Parameters to define an asset destroy transaction. */
93
+ export type AssetDestroyParams = CommonTransactionParams & {
94
+ /** ID of the asset */
95
+ assetId: bigint;
96
+ };
97
+ /** Parameters to define an asset transfer transaction. */
98
+ export type AssetTransferParams = CommonTransactionParams & {
99
+ /** ID of the asset */
100
+ assetId: bigint;
101
+ /** Amount of the asset to transfer (smallest divisible unit) */
102
+ amount: bigint;
103
+ /** The account to send the asset to */
104
+ receiver: string;
105
+ /** The account to take the asset from */
106
+ clawbackTarget?: string;
107
+ /** The account to close the asset to */
108
+ closeAssetTo?: string;
109
+ };
110
+ /** Parameters to define an asset opt-in transaction. */
111
+ export type AssetOptInParams = CommonTransactionParams & {
112
+ /** ID of the asset */
113
+ assetId: bigint;
114
+ };
115
+ /** Parameters to define an online key registration transaction. */
116
+ export type OnlineKeyRegistrationParams = CommonTransactionParams & {
117
+ /** The root participation public key */
118
+ voteKey: Uint8Array;
119
+ /** The VRF public key */
120
+ selectionKey: Uint8Array;
121
+ /** The first round that the participation key is valid. Not to be confused with the `firstValid` round of the keyreg transaction */
122
+ voteFirst: bigint;
123
+ /** The last round that the participation key is valid. Not to be confused with the `lastValid` round of the keyreg transaction */
124
+ voteLast: bigint;
125
+ /** This is the dilution for the 2-level participation key. It determines the interval (number of rounds) for generating new ephemeral keys */
126
+ voteKeyDilution: bigint;
127
+ /** The 64 byte state proof public key commitment */
128
+ stateProofKey?: Uint8Array;
129
+ };
130
+ /** Parameters to define an application call transaction. */
131
+ export type AppCallParams = CommonTransactionParams & {
132
+ /** The [OnComplete](https://developer.algorand.org/docs/get-details/dapps/avm/teal/specification/#oncomplete) */
133
+ onComplete?: algosdk.OnApplicationComplete;
134
+ /** ID of the application */
135
+ appId?: bigint;
136
+ /** The program to execute for all OnCompletes other than ClearState */
137
+ approvalProgram?: Uint8Array;
138
+ /** The program to execute for ClearState OnComplete */
139
+ clearProgram?: Uint8Array;
140
+ /** The state schema for the app. This is immutable. */
141
+ schema?: {
142
+ /** The number of integers saved in global state */
143
+ globalUints: number;
144
+ /** The number of byte slices saved in global state */
145
+ globalByteSlices: number;
146
+ /** The number of integers saved in local state */
147
+ localUints: number;
148
+ /** The number of byte slices saved in local state */
149
+ localByteSlices: number;
150
+ };
151
+ /** Application arguments */
152
+ args?: Uint8Array[];
153
+ /** Account references */
154
+ accountReferences?: string[];
155
+ /** App references */
156
+ appReferences?: bigint[];
157
+ /** Asset references */
158
+ assetReferences?: bigint[];
159
+ /** Number of extra pages required for the programs */
160
+ extraPages?: number;
161
+ /** Box references */
162
+ boxReferences?: algosdk.BoxReference[];
163
+ };
164
+ /** Parameters to define an ABI method application call transaction. */
165
+ export type MethodCallParams = CommonTransactionParams & Omit<AppCallParams, 'args'> & {
166
+ /** ID of the application */
167
+ appId: bigint;
168
+ /** The ABI method to call */
169
+ method: algosdk.ABIMethod;
170
+ /** Arguments to the ABI method, either:
171
+ * * An ABI value
172
+ * * A transaction with explicit signer
173
+ * * A transaction (where the signer will be automatically assigned)
174
+ * * An unawaited transaction (e.g. from algorand.transactions.transactionType())
175
+ * * Another method call (via method call params object)
176
+ */
177
+ args?: (algosdk.ABIValue | TransactionWithSigner | Transaction | Promise<Transaction> | MethodCallParams)[];
178
+ };
179
+ /** Parameters to configure transaction execution. */
180
+ export interface ExecuteParams {
181
+ /** The number of rounds to wait for confirmation. By default until the latest lastValid has past. */
182
+ maxRoundsToWaitForConfirmation?: number;
183
+ /** Whether to suppress log messages from transaction send, default: do not suppress */
184
+ suppressLog?: boolean;
185
+ }
186
+ /** Parameters to create an `AlgokitComposer`. */
187
+ export type AlgokitComposerParams = {
188
+ /** The algod client to use to get suggestedParams and send the transaction group */
189
+ algod: algosdk.Algodv2;
190
+ /** The function used to get the TransactionSigner for a given address */
191
+ getSigner: (address: string) => algosdk.TransactionSigner;
192
+ /** The method used to get SuggestedParams for transactions in the group */
193
+ getSuggestedParams?: () => Promise<algosdk.SuggestedParams>;
194
+ /** How many rounds a transaction should be valid for by default */
195
+ defaultValidityWindow?: number;
196
+ };
197
+ /** AlgoKit Composer helps you compose and execute transactions as a transaction group.
198
+ *
199
+ * Note: this class is a new Beta feature and may be subject to change.
200
+ *
201
+ * @beta
202
+ */
203
+ export default class AlgokitComposer {
204
+ /** The ATC used to compose the group */
205
+ private atc;
206
+ /** Map of txid to ABI method */
207
+ private txnMethodMap;
208
+ /** Transactions that have not yet been composed */
209
+ private txns;
210
+ /** The algod client used by the composer. */
211
+ private algod;
212
+ /** An async function that will return suggestedParams. */
213
+ private getSuggestedParams;
214
+ /** A function that takes in an address and return a signer function for that address. */
215
+ private getSigner;
216
+ /** The default transaction validity window */
217
+ private defaultValidityWindow;
218
+ /**
219
+ * Create an `AlgoKitComposer`.
220
+ * @param params The configuration for this composer
221
+ */
222
+ constructor(params: AlgokitComposerParams);
223
+ /**
224
+ * Add a payment transaction to the transaction group.
225
+ * @param params The payment transaction parameters
226
+ * @returns The composer so you can chain method calls
227
+ */
228
+ addPayment(params: PaymentParams): AlgokitComposer;
229
+ /**
230
+ * Add an asset create transaction to the transaction group.
231
+ * @param params The asset create transaction parameters
232
+ * @returns The composer so you can chain method calls
233
+ */
234
+ addAssetCreate(params: AssetCreateParams): AlgokitComposer;
235
+ /**
236
+ * Add an asset config transaction to the transaction group.
237
+ * @param params The asset config transaction parameters
238
+ * @returns The composer so you can chain method calls
239
+ */
240
+ addAssetConfig(params: AssetConfigParams): AlgokitComposer;
241
+ /**
242
+ * Add an asset freeze transaction to the transaction group.
243
+ * @param params The asset freeze transaction parameters
244
+ * @returns The composer so you can chain method calls
245
+ */
246
+ addAssetFreeze(params: AssetFreezeParams): AlgokitComposer;
247
+ /**
248
+ * Add an asset destroy transaction to the transaction group.
249
+ * @param params The asset destroy transaction parameters
250
+ * @returns The composer so you can chain method calls
251
+ */
252
+ addAssetDestroy(params: AssetDestroyParams): AlgokitComposer;
253
+ /**
254
+ * Add an asset transfer transaction to the transaction group.
255
+ * @param params The asset transfer transaction parameters
256
+ * @returns The composer so you can chain method calls
257
+ */
258
+ addAssetTransfer(params: AssetTransferParams): AlgokitComposer;
259
+ /**
260
+ * Add an asset opt-in transaction to the transaction group.
261
+ * @param params The asset opt-in transaction parameters
262
+ * @returns The composer so you can chain method calls
263
+ */
264
+ addAssetOptIn(params: AssetOptInParams): AlgokitComposer;
265
+ /**
266
+ * Add an application call transaction to the transaction group.
267
+ *
268
+ * Note: we recommend using app clients to make it easier to make app calls.
269
+ * @param params The application call transaction parameters
270
+ * @returns The composer so you can chain method calls
271
+ */
272
+ addAppCall(params: AppCallParams): AlgokitComposer;
273
+ /**
274
+ * Add an ABI method application call transaction to the transaction group.
275
+ *
276
+ * Note: we recommend using app clients to make it easier to make app calls.
277
+ * @param params The ABI method application call transaction parameters
278
+ * @returns The composer so you can chain method calls
279
+ */
280
+ addMethodCall(params: MethodCallParams): this;
281
+ /**
282
+ * Add an online key registration transaction to the transaction group.
283
+ * @param params The online key registration transaction parameters
284
+ * @returns The composer so you can chain method calls
285
+ */
286
+ addOnlineKeyRegistration(params: OnlineKeyRegistrationParams): AlgokitComposer;
287
+ /**
288
+ * Add the transactions within an `AtomicTransactionComposer` to the transaction group.
289
+ * @param atc The `AtomicTransactionComposer` to build transactions from and add to the group
290
+ * @returns The composer so you can chain method calls
291
+ */
292
+ addAtc(atc: algosdk.AtomicTransactionComposer): AlgokitComposer;
293
+ private buildAtc;
294
+ private commonTxnBuildStep;
295
+ private buildMethodCall;
296
+ private buildPayment;
297
+ private buildAssetCreate;
298
+ private buildAssetConfig;
299
+ private buildAssetDestroy;
300
+ private buildAssetFreeze;
301
+ private buildAssetTransfer;
302
+ private buildAppCall;
303
+ private buildKeyReg;
304
+ private buildTxn;
305
+ /**
306
+ * Compose all of the transactions in a single atomic transaction group and an atomic transaction composer.
307
+ *
308
+ * You can then use the transactions standalone, or use the composer to execute or simulate the transactions.
309
+ * @returns The built atomic transaction composer and the transactions
310
+ */
311
+ build(): Promise<{
312
+ atc: algosdk.AtomicTransactionComposer;
313
+ transactions: algosdk.TransactionWithSigner[];
314
+ }>;
315
+ /**
316
+ * Rebuild the group, discarding any previously built transactions.
317
+ * This will potentially cause new signers and suggested params to be used if the callbacks return a new value compared to the first build.
318
+ * @returns The newly built atomic transaction composer and the transactions
319
+ */
320
+ rebuild(): Promise<{
321
+ atc: algosdk.AtomicTransactionComposer;
322
+ transactions: algosdk.TransactionWithSigner[];
323
+ }>;
324
+ /**
325
+ * Compose the atomic transaction group and send it to the network
326
+ * @param params The parameters to control execution with
327
+ * @returns The execution result
328
+ */
329
+ execute(params?: ExecuteParams): Promise<SendAtomicTransactionComposerResults>;
330
+ }
331
+ //# sourceMappingURL=composer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"composer.d.ts","sourceRoot":"","sources":["../../src/types/composer.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAA;AAE7B,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAA;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACrC,OAAO,EAAE,oCAAoC,EAAE,MAAM,eAAe,CAAA;AACpE,OAAO,WAAW,GAAG,OAAO,CAAC,WAAW,CAAA;AACxC,OAAO,qBAAqB,GAAG,OAAO,CAAC,qBAA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