@algorandfoundation/algokit-utils 1.0.0-beta.39 → 1.0.0-beta.40
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/README.md +8 -1
- package/account.d.ts +10 -9
- package/account.d.ts.map +1 -1
- package/account.js +11 -10
- package/account.js.map +1 -1
- package/amount.d.ts +3 -3
- package/amount.js +3 -3
- package/app-client.d.ts +14 -0
- package/app-client.d.ts.map +1 -0
- package/app-client.js +19 -0
- package/app-client.js.map +1 -0
- package/{deploy-app.d.ts → app-deploy.d.ts} +8 -5
- package/{deploy-app.d.ts.map → app-deploy.d.ts.map} +1 -1
- package/{deploy-app.js → app-deploy.js} +12 -9
- package/app-deploy.js.map +1 -0
- package/app.d.ts +32 -9
- package/app.d.ts.map +1 -1
- package/app.js +37 -13
- package/app.js.map +1 -1
- package/index.d.ts +2 -2
- package/index.d.ts.map +1 -1
- package/index.js +2 -2
- package/index.js.map +1 -1
- package/indexer-lookup.d.ts +2 -2
- package/indexer-lookup.js +4 -4
- package/indexer-lookup.js.map +1 -1
- package/localnet.d.ts +5 -5
- package/localnet.js +5 -5
- package/package.json +1 -1
- package/testing/account.d.ts +2 -2
- package/testing/account.js +2 -2
- package/testing/fixtures/algorand-fixture.d.ts +6 -2
- package/testing/fixtures/algorand-fixture.d.ts.map +1 -1
- package/testing/fixtures/algorand-fixture.js +14 -5
- package/testing/fixtures/algorand-fixture.js.map +1 -1
- package/testing/test-logger.d.ts +3 -1
- package/testing/test-logger.d.ts.map +1 -1
- package/testing/test-logger.js +3 -1
- package/testing/test-logger.js.map +1 -1
- package/testing/transaction-logger.d.ts +4 -4
- package/testing/transaction-logger.d.ts.map +1 -1
- package/testing/transaction-logger.js +4 -4
- package/testing/transaction-logger.js.map +1 -1
- package/transaction.d.ts +17 -23
- package/transaction.d.ts.map +1 -1
- package/transaction.js +26 -16
- package/transaction.js.map +1 -1
- package/transfer.d.ts +4 -3
- package/transfer.d.ts.map +1 -1
- package/transfer.js +10 -8
- package/transfer.js.map +1 -1
- package/types/account.d.ts +1 -1
- package/types/account.d.ts.map +1 -1
- package/types/algod.d.ts +6 -6
- package/types/algod.d.ts.map +1 -1
- package/types/amount.d.ts +6 -2
- package/types/amount.d.ts.map +1 -1
- package/types/amount.js +6 -2
- package/types/amount.js.map +1 -1
- package/types/{application-client.d.ts → app-client.d.ts} +25 -20
- package/types/app-client.d.ts.map +1 -0
- package/types/{application-client.js → app-client.js} +17 -15
- package/types/app-client.js.map +1 -0
- package/types/{appspec.d.ts → app-spec.d.ts} +4 -4
- package/types/app-spec.d.ts.map +1 -0
- package/types/{appspec.js → app-spec.js} +2 -2
- package/types/app-spec.js.map +1 -0
- package/types/app.d.ts +15 -23
- package/types/app.d.ts.map +1 -1
- package/types/app.js.map +1 -1
- package/types/indexer.d.ts +41 -41
- package/types/indexer.d.ts.map +1 -1
- package/types/indexer.js +1 -1
- package/types/indexer.js.map +1 -1
- package/types/testing.d.ts +9 -9
- package/types/testing.d.ts.map +1 -1
- package/types/transaction.d.ts +37 -10
- package/types/transaction.d.ts.map +1 -1
- package/types/transfer.d.ts +7 -7
- package/types/transfer.d.ts.map +1 -1
- package/application-client.d.ts +0 -10
- package/application-client.d.ts.map +0 -1
- package/application-client.js +0 -15
- package/application-client.js.map +0 -1
- package/deploy-app.js.map +0 -1
- package/types/application-client.d.ts.map +0 -1
- package/types/application-client.js.map +0 -1
- package/types/appspec.d.ts.map +0 -1
- package/types/appspec.js.map +0 -1
package/README.md
CHANGED
|
@@ -24,8 +24,15 @@ This library follows the [Guiding Principles of AlgoKit](https://github.com/algo
|
|
|
24
24
|
|
|
25
25
|
This is an open source project managed by the Algorand Foundation. See the [AlgoKit contributing page](https://github.com/algorandfoundation/algokit-cli/blob/main/CONTRIBUTING.MD) to learn about making improvements.
|
|
26
26
|
|
|
27
|
-
To successfully run the tests in this repository you need to be running LocalNet via [AlgoKit](https://github.com/algorandfoundation/algokit-cli):
|
|
27
|
+
To successfully run the tests in this repository you need to be running LocalNet via [AlgoKit](https://github.com/algorandfoundation/algokit-cli) and also have package dependencies and `.env.template` copied to `.env` (both of which `algokit bootstrap all` can do for you):
|
|
28
28
|
|
|
29
29
|
```
|
|
30
|
+
algokit bootstrap all
|
|
30
31
|
algokit localnet start
|
|
31
32
|
```
|
|
33
|
+
|
|
34
|
+
To run tests you can use VS Code, or:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
npm run test
|
|
38
|
+
```
|
package/account.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import algosdk, { Account, Algodv2, Kmd, MultisigMetadata, TransactionSigner } from 'algosdk';
|
|
2
2
|
import { MultisigAccount, SigningAccount, TransactionSignerAccount } from './types/account';
|
|
3
3
|
import { AlgoAmount } from './types/amount';
|
|
4
|
+
import { SendTransactionFrom } from './types/transaction';
|
|
4
5
|
/**
|
|
5
6
|
* Returns an account wrapper that supports partial or full multisig signing.
|
|
6
7
|
* @param multisigParams The parameters that define the multisig account
|
|
@@ -10,16 +11,16 @@ import { AlgoAmount } from './types/amount';
|
|
|
10
11
|
export declare function multisigAccount(multisigParams: MultisigMetadata, signingAccounts: (Account | SigningAccount)[]): MultisigAccount;
|
|
11
12
|
/**
|
|
12
13
|
* Returns an account wrapper that supports a rekeyed account.
|
|
13
|
-
* @param
|
|
14
|
+
* @param signer The account, with private key loaded, that is signing
|
|
14
15
|
* @param sender The address of the rekeyed account that will act as a sender
|
|
15
|
-
* @returns The
|
|
16
|
+
* @returns The SigningAccount wrapper
|
|
16
17
|
*/
|
|
17
|
-
export declare function rekeyedAccount(
|
|
18
|
+
export declare function rekeyedAccount(signer: Account, sender: string): SigningAccount;
|
|
18
19
|
/**
|
|
19
20
|
* Returns an account wrapper that supports a transaction signer with associated sender address.
|
|
20
21
|
* @param signer The transaction signer
|
|
21
22
|
* @param sender The address of sender account
|
|
22
|
-
* @returns The
|
|
23
|
+
* @returns The SigningAccount wrapper
|
|
23
24
|
*/
|
|
24
25
|
export declare function transactionSignerAccount(signer: TransactionSigner, sender: string): TransactionSignerAccount;
|
|
25
26
|
/** Returns an Algorand account with secret key loaded (i.e. that can sign transactions) by taking the mnemonic secret.
|
|
@@ -60,9 +61,9 @@ export declare function randomAccount(): Account;
|
|
|
60
61
|
*
|
|
61
62
|
* @param account The details of the account to get, wither the name identifier (string) or an object with:
|
|
62
63
|
* * `name`: The name identifier of the account
|
|
63
|
-
* * `fundWith`: The amount to fund the account with it it gets created (when targeting LocalNet), if not specified then 1000 Algos will be funded from the dispenser account
|
|
64
|
+
* * `fundWith`: The amount to fund the account with it it gets created (when targeting LocalNet), if not specified then 1000 Algos will be funded from the dispenser account
|
|
64
65
|
* @param algod An algod client
|
|
65
|
-
* @param kmdClient An optional KMD client to use to create an account (when targeting LocalNet), if not specified then a default KMD client will be loaded from environment variables
|
|
66
|
+
* @param kmdClient An optional KMD client to use to create an account (when targeting LocalNet), if not specified then a default KMD client will be loaded from environment variables
|
|
66
67
|
* @returns The requested account with private key loaded from the environment variables or when targeting LocalNet from KMD (idempotently creating and funding the account)
|
|
67
68
|
*/
|
|
68
69
|
export declare function getAccount(account: {
|
|
@@ -73,7 +74,7 @@ export declare function getAccount(account: {
|
|
|
73
74
|
*
|
|
74
75
|
* @param account Either an account (with private key loaded) or the string address of an account
|
|
75
76
|
*/
|
|
76
|
-
export declare function getAccountAddressAsUint8Array(account:
|
|
77
|
+
export declare function getAccountAddressAsUint8Array(account: SendTransactionFrom | string): Uint8Array;
|
|
77
78
|
/** Returns the string address of an Algorand account from a base64 encoded version of the underlying byte array of the address public key
|
|
78
79
|
*
|
|
79
80
|
* @param addressEncodedInB64 The base64 encoded version of the underlying byte array of the address public key
|
|
@@ -82,10 +83,10 @@ export declare function getAccountAddressAsString(addressEncodedInB64: string):
|
|
|
82
83
|
/** Returns an account (with private key loaded) that can act as a dispenser
|
|
83
84
|
*
|
|
84
85
|
* If running on LocalNet then it will return the default dispenser account automatically,
|
|
85
|
-
* otherwise it will load the account mnemonic stored in process.env.DISPENSER_MNEMONIC
|
|
86
|
+
* otherwise it will load the account mnemonic stored in process.env.DISPENSER_MNEMONIC
|
|
86
87
|
*
|
|
87
88
|
* @param algod An algod client
|
|
88
|
-
* @param kmd A KMD client, if not specified then a default KMD client will be loaded from environment variables
|
|
89
|
+
* @param kmd A KMD client, if not specified then a default KMD client will be loaded from environment variables
|
|
89
90
|
*/
|
|
90
91
|
export declare function getDispenserAccount(algod: Algodv2, kmd?: Kmd): Promise<algosdk.Account | SigningAccount>;
|
|
91
92
|
//# sourceMappingURL=account.d.ts.map
|
package/account.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../src/account.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../src/account.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAK7F,OAAO,EAAqB,eAAe,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAA;AAC9G,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAEzD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,cAAc,EAAE,gBAAgB,EAAE,eAAe,EAAE,CAAC,OAAO,GAAG,cAAc,CAAC,EAAE,mBAE9G;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAE7D;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,GAAG,wBAAwB,CAE5G;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAG/D;AAED;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAGvC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAsB,UAAU,CAC9B,OAAO,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,UAAU,CAAA;CAAE,GAAG,MAAM,EACzD,KAAK,EAAE,OAAO,EACd,SAAS,CAAC,EAAE,GAAG,GACd,OAAO,CAAC,OAAO,GAAG,cAAc,CAAC,CAmCnC;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,mBAAmB,GAAG,MAAM,cAElF;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,mBAAmB,EAAE,MAAM,GAAG,MAAM,CAE7E;AAED;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,GAAG,6CAIlE"}
|
package/account.js
CHANGED
|
@@ -8,6 +8,7 @@ const algosdk_1 = __importDefault(require("algosdk"));
|
|
|
8
8
|
const _1 = require("./");
|
|
9
9
|
const localnet_1 = require("./localnet");
|
|
10
10
|
const network_client_1 = require("./network-client");
|
|
11
|
+
const transaction_1 = require("./transaction");
|
|
11
12
|
const account_1 = require("./types/account");
|
|
12
13
|
/**
|
|
13
14
|
* Returns an account wrapper that supports partial or full multisig signing.
|
|
@@ -21,19 +22,19 @@ function multisigAccount(multisigParams, signingAccounts) {
|
|
|
21
22
|
exports.multisigAccount = multisigAccount;
|
|
22
23
|
/**
|
|
23
24
|
* Returns an account wrapper that supports a rekeyed account.
|
|
24
|
-
* @param
|
|
25
|
+
* @param signer The account, with private key loaded, that is signing
|
|
25
26
|
* @param sender The address of the rekeyed account that will act as a sender
|
|
26
|
-
* @returns The
|
|
27
|
+
* @returns The SigningAccount wrapper
|
|
27
28
|
*/
|
|
28
|
-
function rekeyedAccount(
|
|
29
|
-
return new account_1.SigningAccount(
|
|
29
|
+
function rekeyedAccount(signer, sender) {
|
|
30
|
+
return new account_1.SigningAccount(signer, sender);
|
|
30
31
|
}
|
|
31
32
|
exports.rekeyedAccount = rekeyedAccount;
|
|
32
33
|
/**
|
|
33
34
|
* Returns an account wrapper that supports a transaction signer with associated sender address.
|
|
34
35
|
* @param signer The transaction signer
|
|
35
36
|
* @param sender The address of sender account
|
|
36
|
-
* @returns The
|
|
37
|
+
* @returns The SigningAccount wrapper
|
|
37
38
|
*/
|
|
38
39
|
function transactionSignerAccount(signer, sender) {
|
|
39
40
|
return { addr: sender, signer };
|
|
@@ -85,9 +86,9 @@ exports.randomAccount = randomAccount;
|
|
|
85
86
|
*
|
|
86
87
|
* @param account The details of the account to get, wither the name identifier (string) or an object with:
|
|
87
88
|
* * `name`: The name identifier of the account
|
|
88
|
-
* * `fundWith`: The amount to fund the account with it it gets created (when targeting LocalNet), if not specified then 1000 Algos will be funded from the dispenser account
|
|
89
|
+
* * `fundWith`: The amount to fund the account with it it gets created (when targeting LocalNet), if not specified then 1000 Algos will be funded from the dispenser account
|
|
89
90
|
* @param algod An algod client
|
|
90
|
-
* @param kmdClient An optional KMD client to use to create an account (when targeting LocalNet), if not specified then a default KMD client will be loaded from environment variables
|
|
91
|
+
* @param kmdClient An optional KMD client to use to create an account (when targeting LocalNet), if not specified then a default KMD client will be loaded from environment variables
|
|
91
92
|
* @returns The requested account with private key loaded from the environment variables or when targeting LocalNet from KMD (idempotently creating and funding the account)
|
|
92
93
|
*/
|
|
93
94
|
async function getAccount(account, algod, kmdClient) {
|
|
@@ -130,7 +131,7 @@ exports.getAccount = getAccount;
|
|
|
130
131
|
* @param account Either an account (with private key loaded) or the string address of an account
|
|
131
132
|
*/
|
|
132
133
|
function getAccountAddressAsUint8Array(account) {
|
|
133
|
-
return algosdk_1.default.decodeAddress(typeof account === 'string' ? account :
|
|
134
|
+
return algosdk_1.default.decodeAddress(typeof account === 'string' ? account : (0, transaction_1.getSenderAddress)(account)).publicKey;
|
|
134
135
|
}
|
|
135
136
|
exports.getAccountAddressAsUint8Array = getAccountAddressAsUint8Array;
|
|
136
137
|
/** Returns the string address of an Algorand account from a base64 encoded version of the underlying byte array of the address public key
|
|
@@ -144,10 +145,10 @@ exports.getAccountAddressAsString = getAccountAddressAsString;
|
|
|
144
145
|
/** Returns an account (with private key loaded) that can act as a dispenser
|
|
145
146
|
*
|
|
146
147
|
* If running on LocalNet then it will return the default dispenser account automatically,
|
|
147
|
-
* otherwise it will load the account mnemonic stored in process.env.DISPENSER_MNEMONIC
|
|
148
|
+
* otherwise it will load the account mnemonic stored in process.env.DISPENSER_MNEMONIC
|
|
148
149
|
*
|
|
149
150
|
* @param algod An algod client
|
|
150
|
-
* @param kmd A KMD client, if not specified then a default KMD client will be loaded from environment variables
|
|
151
|
+
* @param kmd A KMD client, if not specified then a default KMD client will be loaded from environment variables
|
|
151
152
|
*/
|
|
152
153
|
async function getDispenserAccount(algod, kmd) {
|
|
153
154
|
// If we are running against LocalNet we can use the default account within it, otherwise use an automation account specified via environment variables and ensure it's populated with ALGOs
|
package/account.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account.js","sourceRoot":"","sources":["../src/account.ts"],"names":[],"mappings":";;;;;;AAAA,sDAA6F;AAC7F,yBAA2B;AAC3B,yCAAqF;AACrF,qDAA6C;AAC7C,6CAA8G;
|
|
1
|
+
{"version":3,"file":"account.js","sourceRoot":"","sources":["../src/account.ts"],"names":[],"mappings":";;;;;;AAAA,sDAA6F;AAC7F,yBAA2B;AAC3B,yCAAqF;AACrF,qDAA6C;AAC7C,+CAAgD;AAChD,6CAA8G;AAI9G;;;;;GAKG;AACH,SAAgB,eAAe,CAAC,cAAgC,EAAE,eAA6C;IAC7G,OAAO,IAAI,yBAAe,CAAC,cA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C,CAAC,CAAA;AAC1E,CAAC;AAFD,8DAEC;AAED;;;;;;;GAOG;AACI,KAAK,UAAU,mBAAmB,CAAC,KAAc,EAAE,GAAS;IACjE,4LAA4L;IAC5L,MAAM,yBAAyB,GAAG,MAAM,IAAA,2BAAU,EAAC,KAAK,CAAC,CAAA;IACzD,OAAO,yBAAyB,CAAC,CAAC,CAAC,MAAM,IAAA,sCAA2B,EAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,UAAU,CAAC,2BAAiB,EAAE,KAAK,CAAC,CAAA;AAC/H,CAAC;AAJD,kDAIC"}
|
package/amount.d.ts
CHANGED
|
@@ -5,15 +5,15 @@ declare global {
|
|
|
5
5
|
algos(this: number): AlgoAmount;
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
|
-
/** Returns an amount of Algos using
|
|
8
|
+
/** Returns an amount of Algos using AlgoAmount
|
|
9
9
|
* @param algos The amount in Algos
|
|
10
10
|
*/
|
|
11
11
|
export declare const algos: (algos: number) => AlgoAmount;
|
|
12
|
-
/** Returns an amount of µAlgos using
|
|
12
|
+
/** Returns an amount of µAlgos using AlgoAmount
|
|
13
13
|
* @param microAlgos The amount in µAlgos
|
|
14
14
|
*/
|
|
15
15
|
export declare const microAlgos: (microAlgos: number) => AlgoAmount;
|
|
16
|
-
/** Returns an amount of µAlgos to cover standard fees for the given number of transactions using
|
|
16
|
+
/** Returns an amount of µAlgos to cover standard fees for the given number of transactions using AlgoAmount
|
|
17
17
|
* @param numberOfTransactions The of standard transaction fees to return the amount of ALGOs
|
|
18
18
|
*/
|
|
19
19
|
export declare const transactionFees: (numberOfTransactions: number) => AlgoAmount;
|
package/amount.js
CHANGED
|
@@ -12,21 +12,21 @@ Number.prototype.microAlgos = function () {
|
|
|
12
12
|
Number.prototype.algos = function () {
|
|
13
13
|
return amount_1.AlgoAmount.Algos(this);
|
|
14
14
|
};
|
|
15
|
-
/** Returns an amount of Algos using
|
|
15
|
+
/** Returns an amount of Algos using AlgoAmount
|
|
16
16
|
* @param algos The amount in Algos
|
|
17
17
|
*/
|
|
18
18
|
const algos = (algos) => {
|
|
19
19
|
return amount_1.AlgoAmount.Algos(algos);
|
|
20
20
|
};
|
|
21
21
|
exports.algos = algos;
|
|
22
|
-
/** Returns an amount of µAlgos using
|
|
22
|
+
/** Returns an amount of µAlgos using AlgoAmount
|
|
23
23
|
* @param microAlgos The amount in µAlgos
|
|
24
24
|
*/
|
|
25
25
|
const microAlgos = (microAlgos) => {
|
|
26
26
|
return amount_1.AlgoAmount.MicroAlgos(microAlgos);
|
|
27
27
|
};
|
|
28
28
|
exports.microAlgos = microAlgos;
|
|
29
|
-
/** Returns an amount of µAlgos to cover standard fees for the given number of transactions using
|
|
29
|
+
/** Returns an amount of µAlgos to cover standard fees for the given number of transactions using AlgoAmount
|
|
30
30
|
* @param numberOfTransactions The of standard transaction fees to return the amount of ALGOs
|
|
31
31
|
*/
|
|
32
32
|
const transactionFees = (numberOfTransactions) => {
|
package/app-client.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Algodv2 } from 'algosdk';
|
|
2
|
+
import { ApplicationClient, AppSpecAppDetails } from './types/app-client';
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated Use `algokit.getAppClient`
|
|
5
|
+
*/
|
|
6
|
+
export declare const getApplicationClient: typeof getAppClient;
|
|
7
|
+
/**
|
|
8
|
+
* Create a new ApplicationClient instance
|
|
9
|
+
* @param appDetails The details of the app
|
|
10
|
+
* @param algod An algod instance
|
|
11
|
+
* @returns The application client
|
|
12
|
+
*/
|
|
13
|
+
export declare function getAppClient(appDetails: AppSpecAppDetails, algod: Algodv2): ApplicationClient;
|
|
14
|
+
//# sourceMappingURL=app-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-client.d.ts","sourceRoot":"","sources":["../src/app-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAEzE;;GAEG;AACH,eAAO,MAAM,oBAAoB,qBAAe,CAAA;AAEhD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,iBAAiB,EAAE,KAAK,EAAE,OAAO,qBAEzE"}
|
package/app-client.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAppClient = exports.getApplicationClient = void 0;
|
|
4
|
+
const app_client_1 = require("./types/app-client");
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Use `algokit.getAppClient`
|
|
7
|
+
*/
|
|
8
|
+
exports.getApplicationClient = getAppClient;
|
|
9
|
+
/**
|
|
10
|
+
* Create a new ApplicationClient instance
|
|
11
|
+
* @param appDetails The details of the app
|
|
12
|
+
* @param algod An algod instance
|
|
13
|
+
* @returns The application client
|
|
14
|
+
*/
|
|
15
|
+
function getAppClient(appDetails, algod) {
|
|
16
|
+
return new app_client_1.ApplicationClient(appDetails, algod);
|
|
17
|
+
}
|
|
18
|
+
exports.getAppClient = getAppClient;
|
|
19
|
+
//# sourceMappingURL=app-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-client.js","sourceRoot":"","sources":["../src/app-client.ts"],"names":[],"mappings":";;;AACA,mDAAyE;AAEzE;;GAEG;AACU,QAAA,oBAAoB,GAAG,YAAY,CAAA;AAEhD;;;;;GAKG;AACH,SAAgB,YAAY,CAAC,UAA6B,EAAE,KAAc;IACxE,OAAO,IAAI,8BAAiB,CAAC,UAAU,EAAE,KAAK,CAAC,CAAA;AACjD,CAAC;AAFD,oCAEC"}
|
|
@@ -5,7 +5,7 @@ import { Arc2TransactionNote, ConfirmedTransactionResult, ConfirmedTransactionRe
|
|
|
5
5
|
/**
|
|
6
6
|
* Idempotently deploy (create, update/delete if changed) an app against the given name via the given creator account, including deploy-time template placeholder substitutions.
|
|
7
7
|
*
|
|
8
|
-
* To understand the architecture decisions behind this functionality please
|
|
8
|
+
* To understand the architecture decisions behind this functionality please see https://github.com/algorandfoundation/algokit-cli/blob/main/docs/architecture-decisions/2023-01-12_smart-contract-deployment.md
|
|
9
9
|
*
|
|
10
10
|
* **Note:** When using the return from this function be sure to check `operationPerformed` to get access to various return properties like `transaction`, `confirmation` and `deleteResult`.
|
|
11
11
|
*
|
|
@@ -38,7 +38,7 @@ export declare function deployApp(deployment: AppDeploymentParams, algod: Algodv
|
|
|
38
38
|
*/
|
|
39
39
|
export declare function isSchemaIsBroken(before: ApplicationStateSchema, after: ApplicationStateSchema): boolean;
|
|
40
40
|
/**
|
|
41
|
-
* Returns a lookup of name => app metadata (id, address, ...metadata) for all apps created by the given account that have an
|
|
41
|
+
* Returns a lookup of name => app metadata (id, address, ...metadata) for all apps created by the given account that have an `AppDeployNote` in the transaction note of the creation transaction.
|
|
42
42
|
*
|
|
43
43
|
* **Note:** It's recommended this is only called once and then stored since it's a somewhat expensive operation (multiple indexer calls).
|
|
44
44
|
*
|
|
@@ -56,8 +56,11 @@ export declare function getAppDeploymentTransactionNote(metadata: AppDeployMetad
|
|
|
56
56
|
/**
|
|
57
57
|
* Replaces deploy-time deployment control parameters within the given teal code.
|
|
58
58
|
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
59
|
+
* * `TMPL_UPDATABLE` for updatability / immutability control
|
|
60
|
+
* * `TMPL_DELETABLE` for deletability / permanence control
|
|
61
|
+
*
|
|
62
|
+
* Note: If these values are not undefined, but the corresponding `TMPL_*` value
|
|
63
|
+
* isn't in the teal code it will throw an exception.
|
|
61
64
|
*
|
|
62
65
|
* @param tealCode The TEAL code to substitute
|
|
63
66
|
* @param params The deploy-time deployment control parameter value to replace
|
|
@@ -89,4 +92,4 @@ export declare function performTemplateSubstitution(tealCode: string, templatePa
|
|
|
89
92
|
* @returns The information about the compiled code
|
|
90
93
|
*/
|
|
91
94
|
export declare function performTemplateSubstitutionAndCompile(tealCode: string, algod: Algodv2, templateParams?: TealTemplateParams, deploymentMetadata?: AppDeployMetadata): Promise<CompiledTeal>;
|
|
92
|
-
//# sourceMappingURL=deploy
|
|
95
|
+
//# sourceMappingURL=app-deploy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy
|
|
1
|
+
{"version":3,"file":"app-deploy.d.ts","sourceRoot":"","sources":["../src/app-deploy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAoD,OAAO,EAAmB,MAAM,SAAS,CAAA;AAK7G,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AACtD,OAAO,EACL,SAAS,EACT,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,SAAS,EACT,WAAW,EAEX,YAAY,EAIZ,kBAAkB,EAEnB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAEvI;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,SAAS,CAC7B,UAAU,EAAE,mBAAmB,EAC/B,KAAK,EAAE,OAAO,EACd,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CACR,OAAO,CAAC,oBAAoB,CAAC,GAC3B,CACI,CAAC,2BAA2B,GAAG,WAAW,GAAG;IAAE,MAAM,CAAC,EAAE,SAAS,CAAC;IAAC,kBAAkB,EAAE,QAAQ,GAAG,QAAQ,CAAA;CAAE,CAAC,GAC7G,CAAC,2BAA2B,GAC1B,WAAW,GAAG;IACZ,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,YAAY,CAAC,EAAE,SAAS,CAAA;IACxB,YAAY,EAAE,0BAA0B,CAAA;IACxC,kBAAkB,EAAE,SAAS,CAAA;CAC9B,CAAC,GACJ,CAAC,WAAW,GAAG;IAAE,kBAAkB,EAAE,SAAS,CAAA;CAAE,CAAC,CACpD,CACJ,CA2UA;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,sBAAsB,EAAE,KAAK,EAAE,sBAAsB,WAE7F;AAED;;;;;;;;GAQG;AACH,wBAAsB,oBAAoB,CAAC,cAAc,EAAE,mBAAmB,GAAG,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,SAAS,CAAC,CAoG7H;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAAC,QAAQ,EAAE,iBAAiB,GAAG,mBAAmB,CAMhG;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,8BAA8B,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE;IAAE,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAAE,UAoBpH;AAED;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,kBAAkB,UAiBhG;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,qCAAqC,CACzD,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,OAAO,EACd,cAAc,CAAC,EAAE,kBAAkB,EACnC,kBAAkB,CAAC,EAAE,iBAAiB,GACrC,OAAO,CAAC,YAAY,CAAC,CAQvB"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.performTemplateSubstitutionAndCompile = exports.performTemplateSubstitution = exports.replaceDeployTimeControlParams = exports.getAppDeploymentTransactionNote = exports.getCreatorAppsByName = exports.isSchemaIsBroken = exports.deployApp = void 0;
|
|
4
4
|
const algosdk_1 = require("algosdk");
|
|
5
|
-
const _1 = require("
|
|
5
|
+
const _1 = require(".");
|
|
6
6
|
const app_1 = require("./app");
|
|
7
7
|
const indexer_lookup_1 = require("./indexer-lookup");
|
|
8
8
|
const transaction_1 = require("./transaction");
|
|
@@ -10,7 +10,7 @@ const app_2 = require("./types/app");
|
|
|
10
10
|
/**
|
|
11
11
|
* Idempotently deploy (create, update/delete if changed) an app against the given name via the given creator account, including deploy-time template placeholder substitutions.
|
|
12
12
|
*
|
|
13
|
-
* To understand the architecture decisions behind this functionality please
|
|
13
|
+
* To understand the architecture decisions behind this functionality please see https://github.com/algorandfoundation/algokit-cli/blob/main/docs/architecture-decisions/2023-01-12_smart-contract-deployment.md
|
|
14
14
|
*
|
|
15
15
|
* **Note:** When using the return from this function be sure to check `operationPerformed` to get access to various return properties like `transaction`, `confirmation` and `deleteResult`.
|
|
16
16
|
*
|
|
@@ -75,7 +75,7 @@ async function deployApp(deployment, algod, indexer) {
|
|
|
75
75
|
return await create();
|
|
76
76
|
}
|
|
77
77
|
_1.Config.getLogger(appParams.suppressLog).info(`Existing app ${metadata.name} found by creator ${(0, transaction_1.getSenderAddress)(appParams.from)}, with app id ${existingApp.appId} and version ${existingApp.version}.`);
|
|
78
|
-
const existingAppRecord = await (0, app_1.
|
|
78
|
+
const existingAppRecord = await (0, app_1.getAppById)(existingApp.appId, algod);
|
|
79
79
|
const existingApproval = existingAppRecord.params['approval-program'];
|
|
80
80
|
const existingClear = existingAppRecord.params['clear-state-program'];
|
|
81
81
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -135,8 +135,8 @@ async function deployApp(deployment, algod, indexer) {
|
|
|
135
135
|
confirmation: createConfirmation,
|
|
136
136
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
137
137
|
confirmations: confirmations,
|
|
138
|
-
return: returns[0],
|
|
139
|
-
deleteReturn: returns[1],
|
|
138
|
+
return: returns?.[0],
|
|
139
|
+
deleteReturn: returns?.[1],
|
|
140
140
|
appId: newAppIndex,
|
|
141
141
|
appAddress: (0, algosdk_1.getApplicationAddress)(newAppIndex),
|
|
142
142
|
createdMetadata: metadata,
|
|
@@ -251,7 +251,7 @@ function isSchemaIsBroken(before, after) {
|
|
|
251
251
|
}
|
|
252
252
|
exports.isSchemaIsBroken = isSchemaIsBroken;
|
|
253
253
|
/**
|
|
254
|
-
* Returns a lookup of name => app metadata (id, address, ...metadata) for all apps created by the given account that have an
|
|
254
|
+
* Returns a lookup of name => app metadata (id, address, ...metadata) for all apps created by the given account that have an `AppDeployNote` in the transaction note of the creation transaction.
|
|
255
255
|
*
|
|
256
256
|
* **Note:** It's recommended this is only called once and then stored since it's a somewhat expensive operation (multiple indexer calls).
|
|
257
257
|
*
|
|
@@ -357,8 +357,11 @@ exports.getAppDeploymentTransactionNote = getAppDeploymentTransactionNote;
|
|
|
357
357
|
/**
|
|
358
358
|
* Replaces deploy-time deployment control parameters within the given teal code.
|
|
359
359
|
*
|
|
360
|
-
*
|
|
361
|
-
*
|
|
360
|
+
* * `TMPL_UPDATABLE` for updatability / immutability control
|
|
361
|
+
* * `TMPL_DELETABLE` for deletability / permanence control
|
|
362
|
+
*
|
|
363
|
+
* Note: If these values are not undefined, but the corresponding `TMPL_*` value
|
|
364
|
+
* isn't in the teal code it will throw an exception.
|
|
362
365
|
*
|
|
363
366
|
* @param tealCode The TEAL code to substitute
|
|
364
367
|
* @param params The deploy-time deployment control parameter value to replace
|
|
@@ -423,4 +426,4 @@ async function performTemplateSubstitutionAndCompile(tealCode, algod, templatePa
|
|
|
423
426
|
return await (0, app_1.compileTeal)(tealCode, algod);
|
|
424
427
|
}
|
|
425
428
|
exports.performTemplateSubstitutionAndCompile = performTemplateSubstitutionAndCompile;
|
|
426
|
-
//# sourceMappingURL=deploy
|
|
429
|
+
//# sourceMappingURL=app-deploy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-deploy.js","sourceRoot":"","sources":["../src/app-deploy.ts"],"names":[],"mappings":";;;AAAA,qCAA6G;AAC7G,wBAA0B;AAC1B,+BAA8E;AAC9E,qDAA+F;AAC/F,+CAA+E;AAE/E,qCAcoB;AAGpB;;;;;;;;;;;;;;GAcG;AACI,KAAK,UAAU,S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kBAAkB,EAAE;QACtB,QAAQ,GAAG,8BAA8B,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAA;KACxE;IAED,OAAO,MAAM,IAAA,iBAAW,EAAC,QAAQ,EAAE,KAAK,CAAC,CAAA;AAC3C,CAAC;AAbD,sFAaC"}
|
package/app.d.ts
CHANGED
|
@@ -23,6 +23,12 @@ export declare function updateApp(update: UpdateAppParams, algod: Algodv2): Prom
|
|
|
23
23
|
* @returns The result of the call
|
|
24
24
|
*/
|
|
25
25
|
export declare function callApp(call: AppCallParams, algod: Algodv2): Promise<AppCallTransactionResult>;
|
|
26
|
+
/**
|
|
27
|
+
* Returns any ABI return values for the given app call arguments and transaction confirmation.
|
|
28
|
+
* @param args The arguments that were used for the call
|
|
29
|
+
* @param confirmation The transaction confirmation from algod
|
|
30
|
+
* @returns The return value for the method call
|
|
31
|
+
*/
|
|
26
32
|
export declare function getABIReturn(args?: AppCallArgs, confirmation?: PendingTransactionResponse): ABIReturn | undefined;
|
|
27
33
|
/**
|
|
28
34
|
* Returns the current global state values for the given app ID
|
|
@@ -49,7 +55,7 @@ export declare function getAppBoxNames(appId: number, algod: Algodv2): Promise<B
|
|
|
49
55
|
/**
|
|
50
56
|
* Returns the value of the given box name for the given app.
|
|
51
57
|
* @param appId The ID of the app return box names for
|
|
52
|
-
* @param boxName The name of the box to return either as a string, binary array or
|
|
58
|
+
* @param boxName The name of the box to return either as a string, binary array or `BoxName`
|
|
53
59
|
* @param algod An algod client instance
|
|
54
60
|
* @returns The current box value as a byte array
|
|
55
61
|
*/
|
|
@@ -57,7 +63,7 @@ export declare function getAppBoxValue(appId: number, boxName: string | Uint8Arr
|
|
|
57
63
|
/**
|
|
58
64
|
* Returns the value of the given box names for the given app.
|
|
59
65
|
* @param appId The ID of the app return box names for
|
|
60
|
-
* @param boxNames The names of the boxes to return either as a string, binary array or
|
|
66
|
+
* @param boxNames The names of the boxes to return either as a string, binary array or `BoxName`
|
|
61
67
|
* @param algod An algod client instance
|
|
62
68
|
* @returns The current box values as a byte array in the same order as the passed in box names
|
|
63
69
|
*/
|
|
@@ -76,11 +82,21 @@ export declare function getAppBoxValueFromABIType(request: BoxValueRequestParams
|
|
|
76
82
|
* @returns The current box values as an ABI value in the same order as the passed in box names
|
|
77
83
|
*/
|
|
78
84
|
export declare function getAppBoxValuesFromABIType(request: BoxValuesRequestParams, algod: Algodv2): Promise<ABIValue[]>;
|
|
85
|
+
/**
|
|
86
|
+
* Converts an array of global/local state values from the algod api to a more friendly
|
|
87
|
+
* generic object keyed by the UTF-8 value of the key.
|
|
88
|
+
* @param state A `global-state`, `local-state`, `global-state-deltas` or `local-state-deltas`
|
|
89
|
+
* @returns An object keyeed by the UTF-8 representation of the key with various parsings of the values
|
|
90
|
+
*/
|
|
79
91
|
export declare function decodeAppState(state: {
|
|
80
92
|
key: string;
|
|
81
93
|
value: TealValue | EvalDelta;
|
|
82
94
|
}[]): AppState;
|
|
83
|
-
/**
|
|
95
|
+
/**
|
|
96
|
+
* Returns the app args ready to load onto an app `Transaction` object
|
|
97
|
+
* @param args The app call args
|
|
98
|
+
* @returns The args ready to load into a `Transaction`
|
|
99
|
+
*/
|
|
84
100
|
export declare function getAppArgsForTransaction(args?: RawAppCallArgs): {
|
|
85
101
|
accounts: string[] | undefined;
|
|
86
102
|
appArgs: Uint8Array[] | undefined;
|
|
@@ -89,7 +105,12 @@ export declare function getAppArgsForTransaction(args?: RawAppCallArgs): {
|
|
|
89
105
|
foreignAssets: number[] | undefined;
|
|
90
106
|
lease: Uint8Array | undefined;
|
|
91
107
|
} | undefined;
|
|
92
|
-
/**
|
|
108
|
+
/**
|
|
109
|
+
* Returns the app args ready to load onto an ABI method call in `AtomicTransactionComposer`
|
|
110
|
+
* @param args The ABI app call args
|
|
111
|
+
* @param from The transaction signer
|
|
112
|
+
* @returns The parameters ready to pass into `addMethodCall` within AtomicTransactionComposer
|
|
113
|
+
*/
|
|
93
114
|
export declare function getAppArgsForABICall(args: ABIAppCallArgs, from: SendTransactionFrom): Promise<{
|
|
94
115
|
method: algosdk.ABIMethod;
|
|
95
116
|
sender: string;
|
|
@@ -100,11 +121,11 @@ export declare function getAppArgsForABICall(args: ABIAppCallArgs, from: SendTra
|
|
|
100
121
|
rekeyTo: undefined;
|
|
101
122
|
}>;
|
|
102
123
|
/**
|
|
103
|
-
* Returns a
|
|
124
|
+
* Returns a `algosdk.BoxReference` given a `BoxIdentifier` or `BoxReference`.
|
|
104
125
|
* @param box The box to return a reference for
|
|
105
|
-
* @returns The box reference ready to pass into a
|
|
126
|
+
* @returns The box reference ready to pass into a `Transaction`
|
|
106
127
|
*/
|
|
107
|
-
export declare function getBoxReference(box: BoxIdentifier | BoxReference): algosdk.BoxReference;
|
|
128
|
+
export declare function getBoxReference(box: BoxIdentifier | BoxReference | algosdk.BoxReference): algosdk.BoxReference;
|
|
108
129
|
/**
|
|
109
130
|
* Gets the current data for the given app from algod.
|
|
110
131
|
*
|
|
@@ -112,9 +133,11 @@ export declare function getBoxReference(box: BoxIdentifier | BoxReference): algo
|
|
|
112
133
|
* @param algod An algod client
|
|
113
134
|
* @returns The data about the app
|
|
114
135
|
*/
|
|
115
|
-
export declare function
|
|
136
|
+
export declare function getAppById(appId: number, algod: Algodv2): Promise<ApplicationResponse>;
|
|
137
|
+
/** @deprecated Use `algokit.getAppById` instead. */
|
|
138
|
+
export declare const getAppByIndex: typeof getAppById;
|
|
116
139
|
/**
|
|
117
|
-
* Compiles the given TEAL using algod and returns the result.
|
|
140
|
+
* Compiles the given TEAL using algod and returns the result, including source map.
|
|
118
141
|
*
|
|
119
142
|
* @param algod An algod client
|
|
120
143
|
* @param tealCode The TEAL code
|
package/app.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,EAAE,EACd,SAAS,EACT,eAAe,EAEf,QAAQ,EACR,OAAO,EAKR,MAAM,SAAS,CAAA;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