@algorandfoundation/algokit-utils 8.0.0 → 8.0.1-beta.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.js
CHANGED
|
@@ -471,9 +471,7 @@ class AppClient {
|
|
|
471
471
|
}
|
|
472
472
|
e = new types_logicError.LogicError(errorDetails, buffer.Buffer.from(isClearStateProgram ? appSpec.source.clear : appSpec.source.approval, 'base64')
|
|
473
473
|
.toString()
|
|
474
|
-
.split('\n'),
|
|
475
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
476
|
-
getLineForPc);
|
|
474
|
+
.split('\n'), getLineForPc);
|
|
477
475
|
}
|
|
478
476
|
if (errorMessage) {
|
|
479
477
|
const appId = JSON.stringify(e).match(/(?<=app=)\d+/)?.[0] || '';
|
|
@@ -824,10 +822,10 @@ class AppClient {
|
|
|
824
822
|
return typeof sender === 'string' ? algosdk.Address.fromString(sender) : (sender ?? this._defaultSender);
|
|
825
823
|
}
|
|
826
824
|
/** Returns the signer for a call, using the provided signer or the `defaultSigner`
|
|
827
|
-
* if no signer was provided and the call will use default
|
|
825
|
+
* if no signer was provided and the sender resolves to the default sender, the call will use default signer
|
|
828
826
|
* or `undefined` otherwise (so the signer is resolved from `AlgorandClient`) */
|
|
829
827
|
getSigner(sender, signer) {
|
|
830
|
-
return signer ?? (!sender ? this._defaultSigner : undefined);
|
|
828
|
+
return signer ?? (!sender || sender === this._defaultSender ? this._defaultSigner : undefined);
|
|
831
829
|
}
|
|
832
830
|
getBareParams(params, onComplete) {
|
|
833
831
|
return {
|
|
@@ -1114,7 +1112,6 @@ class ApplicationClient {
|
|
|
1114
1112
|
if (!sender) {
|
|
1115
1113
|
throw new Error('No sender provided, unable to deploy app');
|
|
1116
1114
|
}
|
|
1117
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1118
1115
|
const from = sender ?? this.sender;
|
|
1119
1116
|
if (!this._creator) {
|
|
1120
1117
|
throw new Error("Attempt to `deploy` a contract without specifying `resolveBy: 'creatorAndName'` in the constructor");
|
|
@@ -1215,7 +1212,6 @@ class ApplicationClient {
|
|
|
1215
1212
|
...(sendParams ?? {}),
|
|
1216
1213
|
}, this.algod);
|
|
1217
1214
|
if (result.confirmation) {
|
|
1218
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1219
1215
|
this._appId = result.confirmation.applicationIndex;
|
|
1220
1216
|
this._appAddress = getApplicationAddress(this._appId).toString();
|
|
1221
1217
|
}
|
|
@@ -1275,7 +1271,6 @@ class ApplicationClient {
|
|
|
1275
1271
|
// There isn't an ATC passed in
|
|
1276
1272
|
!call.sendParams?.atc &&
|
|
1277
1273
|
// The method is readonly
|
|
1278
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1279
1274
|
this.appSpec.hints[this.getABIMethodSignature(this.getABIMethod(call.method))].read_only) {
|
|
1280
1275
|
const atc = new AtomicTransactionComposer();
|
|
1281
1276
|
await this.callOfType({ ...call, sendParams: { ...call.sendParams, atc } }, 'no_op');
|
|
@@ -1356,7 +1351,6 @@ class ApplicationClient {
|
|
|
1356
1351
|
return await app.callApp({
|
|
1357
1352
|
appId: appMetadata.appId,
|
|
1358
1353
|
callType: callType,
|
|
1359
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1360
1354
|
from: sender,
|
|
1361
1355
|
args: await this.getCallArgs(args, sender),
|
|
1362
1356
|
note: note,
|
|
@@ -1574,7 +1568,6 @@ class ApplicationClient {
|
|
|
1574
1568
|
*/
|
|
1575
1569
|
async getAppReference() {
|
|
1576
1570
|
if (!this.existingDeployments && this._creator) {
|
|
1577
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1578
1571
|
this.existingDeployments = await appDeploy.getCreatorAppsByName(this._creator, this.indexer);
|
|
1579
1572
|
}
|
|
1580
1573
|
if (this.existingDeployments && this._appId === 0) {
|
|
@@ -1607,9 +1600,7 @@ class ApplicationClient {
|
|
|
1607
1600
|
if (errorDetails !== undefined)
|
|
1608
1601
|
return new types_logicError.LogicError(errorDetails, buffer.Buffer.from(isClear ? this.appSpec.source.clear : this.appSpec.source.approval, 'base64')
|
|
1609
1602
|
.toString()
|
|
1610
|
-
.split('\n'),
|
|
1611
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
1612
|
-
(pc) => (isClear ? this._clearSourceMap : this._approvalSourceMap)?.getLocationForPc(pc)?.line);
|
|
1603
|
+
.split('\n'), (pc) => (isClear ? this._clearSourceMap : this._approvalSourceMap)?.getLocationForPc(pc)?.line);
|
|
1613
1604
|
else
|
|
1614
1605
|
return e;
|
|
1615
1606
|
}
|