@algorandfoundation/algokit-utils 8.0.0 → 8.0.1
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 +4 -4
- package/indexer-lookup.js +0 -1
- package/indexer-lookup.js.map +1 -1
- package/indexer-lookup.mjs +0 -1
- package/indexer-lookup.mjs.map +1 -1
- package/package.json +1 -1
- package/transaction/transaction.js +0 -3
- package/transaction/transaction.js.map +1 -1
- package/transaction/transaction.mjs +0 -3
- package/transaction/transaction.mjs.map +1 -1
- package/types/account.js +0 -1
- package/types/account.js.map +1 -1
- package/types/account.mjs +0 -1
- package/types/account.mjs.map +1 -1
- package/types/algo-http-client-with-retry.js +0 -1
- package/types/algo-http-client-with-retry.js.map +1 -1
- package/types/algo-http-client-with-retry.mjs +0 -1
- package/types/algo-http-client-with-retry.mjs.map +1 -1
- package/types/app-client.d.ts +1 -1
- package/types/app-client.js +4 -13
- package/types/app-client.js.map +1 -1
- package/types/app-client.mjs +4 -13
- package/types/app-client.mjs.map +1 -1
- package/types/app-deployer.js +3 -9
- package/types/app-deployer.js.map +1 -1
- package/types/app-deployer.mjs +3 -9
- package/types/app-deployer.mjs.map +1 -1
- package/types/app-factory.d.ts +29 -18
- package/types/app-factory.js +10 -3
- package/types/app-factory.js.map +1 -1
- package/types/app-factory.mjs +10 -3
- package/types/app-factory.mjs.map +1 -1
- package/types/app-manager.js +0 -1
- package/types/app-manager.js.map +1 -1
- package/types/app-manager.mjs +0 -1
- package/types/app-manager.mjs.map +1 -1
- package/types/composer.d.ts +20 -6
- package/types/composer.js +6 -9
- package/types/composer.js.map +1 -1
- package/types/composer.mjs +6 -9
- package/types/composer.mjs.map +1 -1
- package/types/config.d.ts +0 -4
- package/types/config.js.map +1 -1
- package/types/config.mjs.map +1 -1
- package/types/kmd-account-manager.js +0 -2
- package/types/kmd-account-manager.js.map +1 -1
- package/types/kmd-account-manager.mjs +0 -2
- package/types/kmd-account-manager.mjs.map +1 -1
- package/types/logging.js +0 -5
- package/types/logging.js.map +1 -1
- package/types/logging.mjs +0 -5
- package/types/logging.mjs.map +1 -1
- package/types/transaction.d.ts +1 -1
package/types/app-client.mjs
CHANGED
|
@@ -469,9 +469,7 @@ class AppClient {
|
|
|
469
469
|
}
|
|
470
470
|
e = new LogicError(errorDetails, Buffer.from(isClearStateProgram ? appSpec.source.clear : appSpec.source.approval, 'base64')
|
|
471
471
|
.toString()
|
|
472
|
-
.split('\n'),
|
|
473
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
474
|
-
getLineForPc);
|
|
472
|
+
.split('\n'), getLineForPc);
|
|
475
473
|
}
|
|
476
474
|
if (errorMessage) {
|
|
477
475
|
const appId = JSON.stringify(e).match(/(?<=app=)\d+/)?.[0] || '';
|
|
@@ -822,10 +820,10 @@ class AppClient {
|
|
|
822
820
|
return typeof sender === 'string' ? Address.fromString(sender) : (sender ?? this._defaultSender);
|
|
823
821
|
}
|
|
824
822
|
/** Returns the signer for a call, using the provided signer or the `defaultSigner`
|
|
825
|
-
* if no signer was provided and the call will use default
|
|
823
|
+
* if no signer was provided and the sender resolves to the default sender, the call will use default signer
|
|
826
824
|
* or `undefined` otherwise (so the signer is resolved from `AlgorandClient`) */
|
|
827
825
|
getSigner(sender, signer) {
|
|
828
|
-
return signer ?? (!sender ? this._defaultSigner : undefined);
|
|
826
|
+
return signer ?? (!sender || sender === this._defaultSender ? this._defaultSigner : undefined);
|
|
829
827
|
}
|
|
830
828
|
getBareParams(params, onComplete) {
|
|
831
829
|
return {
|
|
@@ -1112,7 +1110,6 @@ class ApplicationClient {
|
|
|
1112
1110
|
if (!sender) {
|
|
1113
1111
|
throw new Error('No sender provided, unable to deploy app');
|
|
1114
1112
|
}
|
|
1115
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1116
1113
|
const from = sender ?? this.sender;
|
|
1117
1114
|
if (!this._creator) {
|
|
1118
1115
|
throw new Error("Attempt to `deploy` a contract without specifying `resolveBy: 'creatorAndName'` in the constructor");
|
|
@@ -1213,7 +1210,6 @@ class ApplicationClient {
|
|
|
1213
1210
|
...(sendParams ?? {}),
|
|
1214
1211
|
}, this.algod);
|
|
1215
1212
|
if (result.confirmation) {
|
|
1216
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1217
1213
|
this._appId = result.confirmation.applicationIndex;
|
|
1218
1214
|
this._appAddress = getApplicationAddress(this._appId).toString();
|
|
1219
1215
|
}
|
|
@@ -1273,7 +1269,6 @@ class ApplicationClient {
|
|
|
1273
1269
|
// There isn't an ATC passed in
|
|
1274
1270
|
!call.sendParams?.atc &&
|
|
1275
1271
|
// The method is readonly
|
|
1276
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1277
1272
|
this.appSpec.hints[this.getABIMethodSignature(this.getABIMethod(call.method))].read_only) {
|
|
1278
1273
|
const atc = new AtomicTransactionComposer();
|
|
1279
1274
|
await this.callOfType({ ...call, sendParams: { ...call.sendParams, atc } }, 'no_op');
|
|
@@ -1354,7 +1349,6 @@ class ApplicationClient {
|
|
|
1354
1349
|
return await callApp({
|
|
1355
1350
|
appId: appMetadata.appId,
|
|
1356
1351
|
callType: callType,
|
|
1357
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1358
1352
|
from: sender,
|
|
1359
1353
|
args: await this.getCallArgs(args, sender),
|
|
1360
1354
|
note: note,
|
|
@@ -1572,7 +1566,6 @@ class ApplicationClient {
|
|
|
1572
1566
|
*/
|
|
1573
1567
|
async getAppReference() {
|
|
1574
1568
|
if (!this.existingDeployments && this._creator) {
|
|
1575
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1576
1569
|
this.existingDeployments = await getCreatorAppsByName(this._creator, this.indexer);
|
|
1577
1570
|
}
|
|
1578
1571
|
if (this.existingDeployments && this._appId === 0) {
|
|
@@ -1605,9 +1598,7 @@ class ApplicationClient {
|
|
|
1605
1598
|
if (errorDetails !== undefined)
|
|
1606
1599
|
return new LogicError(errorDetails, Buffer.from(isClear ? this.appSpec.source.clear : this.appSpec.source.approval, 'base64')
|
|
1607
1600
|
.toString()
|
|
1608
|
-
.split('\n'),
|
|
1609
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1610
|
-
(pc) => (isClear ? this._clearSourceMap : this._approvalSourceMap)?.getLocationForPc(pc)?.line);
|
|
1601
|
+
.split('\n'), (pc) => (isClear ? this._clearSourceMap : this._approvalSourceMap)?.getLocationForPc(pc)?.line);
|
|
1611
1602
|
else
|
|
1612
1603
|
return e;
|
|
1613
1604
|
}
|