@txnlab/use-wallet 3.9.0 → 4.0.0-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/dist/index.cjs +80 -52
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -1
- package/dist/index.d.ts +21 -1
- package/dist/index.js +78 -51
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -3287,7 +3287,8 @@ __export(src_exports, {
|
|
|
3287
3287
|
WalletId: () => WalletId,
|
|
3288
3288
|
WalletManager: () => WalletManager,
|
|
3289
3289
|
defaultState: () => defaultState,
|
|
3290
|
-
isAVMWebProviderSDKError: () => isAVMWebProviderSDKError
|
|
3290
|
+
isAVMWebProviderSDKError: () => isAVMWebProviderSDKError,
|
|
3291
|
+
webpackFallback: () => webpackFallback
|
|
3291
3292
|
});
|
|
3292
3293
|
module.exports = __toCommonJS(src_exports);
|
|
3293
3294
|
|
|
@@ -3362,7 +3363,7 @@ var logger = Logger.getInstance();
|
|
|
3362
3363
|
|
|
3363
3364
|
// src/manager.ts
|
|
3364
3365
|
var import_store14 = require("@tanstack/store");
|
|
3365
|
-
var
|
|
3366
|
+
var import_algosdk13 = __toESM(require("algosdk"), 1);
|
|
3366
3367
|
|
|
3367
3368
|
// src/network.ts
|
|
3368
3369
|
var NetworkId = /* @__PURE__ */ ((NetworkId2) => {
|
|
@@ -3593,6 +3594,9 @@ function isValidState(state) {
|
|
|
3593
3594
|
return true;
|
|
3594
3595
|
}
|
|
3595
3596
|
|
|
3597
|
+
// src/utils.ts
|
|
3598
|
+
var import_algosdk12 = __toESM(require("algosdk"), 1);
|
|
3599
|
+
|
|
3596
3600
|
// src/wallets/walletconnect.ts
|
|
3597
3601
|
var import_algosdk2 = __toESM(require("algosdk"), 1);
|
|
3598
3602
|
|
|
@@ -4030,7 +4034,7 @@ var WalletConnect = class extends BaseWallet {
|
|
|
4030
4034
|
const txnsToSign = [];
|
|
4031
4035
|
txnGroup.forEach((txn, index) => {
|
|
4032
4036
|
const isIndexMatch = !indexesToSign || indexesToSign.includes(index);
|
|
4033
|
-
const signer =
|
|
4037
|
+
const signer = txn.sender.toString();
|
|
4034
4038
|
const canSignTxn = this.addresses.includes(signer);
|
|
4035
4039
|
const txnString = byteArrayToBase64(txn.toByte());
|
|
4036
4040
|
if (isIndexMatch && canSignTxn) {
|
|
@@ -4044,11 +4048,11 @@ var WalletConnect = class extends BaseWallet {
|
|
|
4044
4048
|
processEncodedTxns(txnGroup, indexesToSign) {
|
|
4045
4049
|
const txnsToSign = [];
|
|
4046
4050
|
txnGroup.forEach((txnBuffer, index) => {
|
|
4047
|
-
const
|
|
4048
|
-
const isSigned = isSignedTxn(
|
|
4051
|
+
const decodedObj = import_algosdk2.default.msgpackRawDecode(txnBuffer);
|
|
4052
|
+
const isSigned = isSignedTxn(decodedObj);
|
|
4049
4053
|
const txn = isSigned ? import_algosdk2.default.decodeSignedTransaction(txnBuffer).txn : import_algosdk2.default.decodeUnsignedTransaction(txnBuffer);
|
|
4050
4054
|
const isIndexMatch = !indexesToSign || indexesToSign.includes(index);
|
|
4051
|
-
const signer =
|
|
4055
|
+
const signer = txn.sender.toString();
|
|
4052
4056
|
const canSignTxn = !isSigned && this.addresses.includes(signer);
|
|
4053
4057
|
const txnString = byteArrayToBase64(txn.toByte());
|
|
4054
4058
|
if (isIndexMatch && canSignTxn) {
|
|
@@ -4378,7 +4382,7 @@ var DeflyWallet = class extends BaseWallet {
|
|
|
4378
4382
|
const txnsToSign = [];
|
|
4379
4383
|
txnGroup.forEach((txn, index) => {
|
|
4380
4384
|
const isIndexMatch = !indexesToSign || indexesToSign.includes(index);
|
|
4381
|
-
const signer =
|
|
4385
|
+
const signer = txn.sender.toString();
|
|
4382
4386
|
const canSignTxn = this.addresses.includes(signer);
|
|
4383
4387
|
if (isIndexMatch && canSignTxn) {
|
|
4384
4388
|
txnsToSign.push({ txn });
|
|
@@ -4391,11 +4395,11 @@ var DeflyWallet = class extends BaseWallet {
|
|
|
4391
4395
|
processEncodedTxns(txnGroup, indexesToSign) {
|
|
4392
4396
|
const txnsToSign = [];
|
|
4393
4397
|
txnGroup.forEach((txnBuffer, index) => {
|
|
4394
|
-
const
|
|
4395
|
-
const isSigned = isSignedTxn(
|
|
4398
|
+
const decodedObj = import_algosdk3.default.msgpackRawDecode(txnBuffer);
|
|
4399
|
+
const isSigned = isSignedTxn(decodedObj);
|
|
4396
4400
|
const txn = isSigned ? import_algosdk3.default.decodeSignedTransaction(txnBuffer).txn : import_algosdk3.default.decodeUnsignedTransaction(txnBuffer);
|
|
4397
4401
|
const isIndexMatch = !indexesToSign || indexesToSign.includes(index);
|
|
4398
|
-
const signer =
|
|
4402
|
+
const signer = txn.sender.toString();
|
|
4399
4403
|
const canSignTxn = !isSigned && this.addresses.includes(signer);
|
|
4400
4404
|
if (isIndexMatch && canSignTxn) {
|
|
4401
4405
|
txnsToSign.push({ txn });
|
|
@@ -4553,7 +4557,7 @@ var ExodusWallet = class extends BaseWallet {
|
|
|
4553
4557
|
const txnsToSign = [];
|
|
4554
4558
|
txnGroup.forEach((txn, index) => {
|
|
4555
4559
|
const isIndexMatch = !indexesToSign || indexesToSign.includes(index);
|
|
4556
|
-
const signer =
|
|
4560
|
+
const signer = txn.sender.toString();
|
|
4557
4561
|
const canSignTxn = this.addresses.includes(signer);
|
|
4558
4562
|
const txnString = byteArrayToBase64(txn.toByte());
|
|
4559
4563
|
if (isIndexMatch && canSignTxn) {
|
|
@@ -4567,11 +4571,11 @@ var ExodusWallet = class extends BaseWallet {
|
|
|
4567
4571
|
processEncodedTxns(txnGroup, indexesToSign) {
|
|
4568
4572
|
const txnsToSign = [];
|
|
4569
4573
|
txnGroup.forEach((txnBuffer, index) => {
|
|
4570
|
-
const
|
|
4571
|
-
const isSigned = isSignedTxn(
|
|
4574
|
+
const decodedObj = import_algosdk4.default.msgpackRawDecode(txnBuffer);
|
|
4575
|
+
const isSigned = isSignedTxn(decodedObj);
|
|
4572
4576
|
const txn = isSigned ? import_algosdk4.default.decodeSignedTransaction(txnBuffer).txn : import_algosdk4.default.decodeUnsignedTransaction(txnBuffer);
|
|
4573
4577
|
const isIndexMatch = !indexesToSign || indexesToSign.includes(index);
|
|
4574
|
-
const signer =
|
|
4578
|
+
const signer = txn.sender.toString();
|
|
4575
4579
|
const canSignTxn = !isSigned && this.addresses.includes(signer);
|
|
4576
4580
|
const txnString = byteArrayToBase64(txn.toByte());
|
|
4577
4581
|
if (isIndexMatch && canSignTxn) {
|
|
@@ -4756,7 +4760,7 @@ var KibisisWallet = class extends BaseWallet {
|
|
|
4756
4760
|
async _getGenesisHash() {
|
|
4757
4761
|
const algodClient = this.getAlgodClient();
|
|
4758
4762
|
const version = await algodClient.versionsCheck().do();
|
|
4759
|
-
return version.
|
|
4763
|
+
return import_algosdk5.default.bytesToBase64(version.genesisHashB64);
|
|
4760
4764
|
}
|
|
4761
4765
|
async _initializeAVMWebClient() {
|
|
4762
4766
|
const avmWebProviderSDK = this.avmWebProviderSDK || await this._initializeAVMWebProviderSDK();
|
|
@@ -4933,7 +4937,7 @@ var KibisisWallet = class extends BaseWallet {
|
|
|
4933
4937
|
const txnsToSign = [];
|
|
4934
4938
|
txnGroup.forEach((txn, index) => {
|
|
4935
4939
|
const isIndexMatch = !indexesToSign || indexesToSign.includes(index);
|
|
4936
|
-
const signer =
|
|
4940
|
+
const signer = txn.sender.toString();
|
|
4937
4941
|
const canSignTxn = this.addresses.includes(signer);
|
|
4938
4942
|
const txnString = byteArrayToBase64(txn.toByte());
|
|
4939
4943
|
if (isIndexMatch && canSignTxn) {
|
|
@@ -4947,11 +4951,11 @@ var KibisisWallet = class extends BaseWallet {
|
|
|
4947
4951
|
processEncodedTxns(txnGroup, indexesToSign) {
|
|
4948
4952
|
const txnsToSign = [];
|
|
4949
4953
|
txnGroup.forEach((txnBuffer, index) => {
|
|
4950
|
-
const
|
|
4951
|
-
const isSigned = isSignedTxn(
|
|
4954
|
+
const decodedObj = import_algosdk5.default.msgpackRawDecode(txnBuffer);
|
|
4955
|
+
const isSigned = isSignedTxn(decodedObj);
|
|
4952
4956
|
const txn = isSigned ? import_algosdk5.default.decodeSignedTransaction(txnBuffer).txn : import_algosdk5.default.decodeUnsignedTransaction(txnBuffer);
|
|
4953
4957
|
const isIndexMatch = !indexesToSign || indexesToSign.includes(index);
|
|
4954
|
-
const signer =
|
|
4958
|
+
const signer = txn.sender.toString();
|
|
4955
4959
|
const canSignTxn = !isSigned && this.addresses.includes(signer);
|
|
4956
4960
|
const txnString = byteArrayToBase64(txn.toByte());
|
|
4957
4961
|
if (isIndexMatch && canSignTxn) {
|
|
@@ -5102,7 +5106,7 @@ var KmdWallet = class extends BaseWallet {
|
|
|
5102
5106
|
const txnsToSign = [];
|
|
5103
5107
|
txnGroup.forEach((txn, index) => {
|
|
5104
5108
|
const isIndexMatch = !indexesToSign || indexesToSign.includes(index);
|
|
5105
|
-
const signer =
|
|
5109
|
+
const signer = txn.sender.toString();
|
|
5106
5110
|
const canSignTxn = this.addresses.includes(signer);
|
|
5107
5111
|
if (isIndexMatch && canSignTxn) {
|
|
5108
5112
|
txnsToSign.push(txn);
|
|
@@ -5113,11 +5117,11 @@ var KmdWallet = class extends BaseWallet {
|
|
|
5113
5117
|
processEncodedTxns(txnGroup, indexesToSign) {
|
|
5114
5118
|
const txnsToSign = [];
|
|
5115
5119
|
txnGroup.forEach((txnBuffer, index) => {
|
|
5116
|
-
const
|
|
5117
|
-
const isSigned = isSignedTxn(
|
|
5120
|
+
const decodedObj = import_algosdk6.default.msgpackRawDecode(txnBuffer);
|
|
5121
|
+
const isSigned = isSignedTxn(decodedObj);
|
|
5118
5122
|
const txn = isSigned ? import_algosdk6.default.decodeSignedTransaction(txnBuffer).txn : import_algosdk6.default.decodeUnsignedTransaction(txnBuffer);
|
|
5119
5123
|
const isIndexMatch = !indexesToSign || indexesToSign.includes(index);
|
|
5120
|
-
const signer =
|
|
5124
|
+
const signer = txn.sender.toString();
|
|
5121
5125
|
const canSignTxn = !isSigned && this.addresses.includes(signer);
|
|
5122
5126
|
if (isIndexMatch && canSignTxn) {
|
|
5123
5127
|
txnsToSign.push(txn);
|
|
@@ -5359,7 +5363,10 @@ var LuteWallet = class extends BaseWallet {
|
|
|
5359
5363
|
}
|
|
5360
5364
|
async getGenesisId() {
|
|
5361
5365
|
const algodClient = this.getAlgodClient();
|
|
5362
|
-
const
|
|
5366
|
+
const genesisStr = await algodClient.genesis().do();
|
|
5367
|
+
const genesis = import_algosdk7.default.parseJSON(genesisStr, {
|
|
5368
|
+
intDecoding: import_algosdk7.default.IntDecoding.MIXED
|
|
5369
|
+
});
|
|
5363
5370
|
const genesisId = `${genesis.network}-${genesis.id}`;
|
|
5364
5371
|
return genesisId;
|
|
5365
5372
|
}
|
|
@@ -5413,7 +5420,7 @@ var LuteWallet = class extends BaseWallet {
|
|
|
5413
5420
|
const txnsToSign = [];
|
|
5414
5421
|
txnGroup.forEach((txn, index) => {
|
|
5415
5422
|
const isIndexMatch = !indexesToSign || indexesToSign.includes(index);
|
|
5416
|
-
const signer =
|
|
5423
|
+
const signer = txn.sender.toString();
|
|
5417
5424
|
const canSignTxn = this.addresses.includes(signer);
|
|
5418
5425
|
const txnString = byteArrayToBase64(txn.toByte());
|
|
5419
5426
|
if (isIndexMatch && canSignTxn) {
|
|
@@ -5427,11 +5434,11 @@ var LuteWallet = class extends BaseWallet {
|
|
|
5427
5434
|
processEncodedTxns(txnGroup, indexesToSign) {
|
|
5428
5435
|
const txnsToSign = [];
|
|
5429
5436
|
txnGroup.forEach((txnBuffer, index) => {
|
|
5430
|
-
const
|
|
5431
|
-
const isSigned = isSignedTxn(
|
|
5437
|
+
const decodedObj = import_algosdk7.default.msgpackRawDecode(txnBuffer);
|
|
5438
|
+
const isSigned = isSignedTxn(decodedObj);
|
|
5432
5439
|
const txn = isSigned ? import_algosdk7.default.decodeSignedTransaction(txnBuffer).txn : import_algosdk7.default.decodeUnsignedTransaction(txnBuffer);
|
|
5433
5440
|
const isIndexMatch = !indexesToSign || indexesToSign.includes(index);
|
|
5434
|
-
const signer =
|
|
5441
|
+
const signer = txn.sender.toString();
|
|
5435
5442
|
const canSignTxn = !isSigned && this.addresses.includes(signer);
|
|
5436
5443
|
const txnString = byteArrayToBase64(txn.toByte());
|
|
5437
5444
|
if (isIndexMatch && canSignTxn) {
|
|
@@ -5617,7 +5624,7 @@ var MagicAuth = class extends BaseWallet {
|
|
|
5617
5624
|
const txnsToSign = [];
|
|
5618
5625
|
txnGroup.forEach((txn, index) => {
|
|
5619
5626
|
const isIndexMatch = !indexesToSign || indexesToSign.includes(index);
|
|
5620
|
-
const signer =
|
|
5627
|
+
const signer = txn.sender.toString();
|
|
5621
5628
|
const canSignTxn = this.addresses.includes(signer);
|
|
5622
5629
|
const txnString = byteArrayToBase64(txn.toByte());
|
|
5623
5630
|
if (isIndexMatch && canSignTxn) {
|
|
@@ -5631,11 +5638,11 @@ var MagicAuth = class extends BaseWallet {
|
|
|
5631
5638
|
processEncodedTxns(txnGroup, indexesToSign) {
|
|
5632
5639
|
const txnsToSign = [];
|
|
5633
5640
|
txnGroup.forEach((txnBuffer, index) => {
|
|
5634
|
-
const
|
|
5635
|
-
const isSigned = isSignedTxn(
|
|
5641
|
+
const decodedObj = import_algosdk8.default.msgpackRawDecode(txnBuffer);
|
|
5642
|
+
const isSigned = isSignedTxn(decodedObj);
|
|
5636
5643
|
const txn = isSigned ? import_algosdk8.default.decodeSignedTransaction(txnBuffer).txn : import_algosdk8.default.decodeUnsignedTransaction(txnBuffer);
|
|
5637
5644
|
const isIndexMatch = !indexesToSign || indexesToSign.includes(index);
|
|
5638
|
-
const signer =
|
|
5645
|
+
const signer = txn.sender.toString();
|
|
5639
5646
|
const canSignTxn = !isSigned && this.addresses.includes(signer);
|
|
5640
5647
|
const txnString = byteArrayToBase64(txn.toByte());
|
|
5641
5648
|
if (isIndexMatch && canSignTxn) {
|
|
@@ -5760,7 +5767,7 @@ var MnemonicWallet = class extends BaseWallet {
|
|
|
5760
5767
|
const account = this.initializeAccount();
|
|
5761
5768
|
const walletAccount = {
|
|
5762
5769
|
name: `${this.metadata.name} Account`,
|
|
5763
|
-
address: account.addr
|
|
5770
|
+
address: account.addr.toString()
|
|
5764
5771
|
};
|
|
5765
5772
|
const walletState = {
|
|
5766
5773
|
accounts: [walletAccount],
|
|
@@ -5807,8 +5814,8 @@ var MnemonicWallet = class extends BaseWallet {
|
|
|
5807
5814
|
const txnsToSign = [];
|
|
5808
5815
|
txnGroup.forEach((txn, index) => {
|
|
5809
5816
|
const isIndexMatch = !indexesToSign || indexesToSign.includes(index);
|
|
5810
|
-
const signer =
|
|
5811
|
-
const canSignTxn = signer === this.account.addr;
|
|
5817
|
+
const signer = txn.sender.toString();
|
|
5818
|
+
const canSignTxn = signer === this.account.addr.toString();
|
|
5812
5819
|
if (isIndexMatch && canSignTxn) {
|
|
5813
5820
|
txnsToSign.push(txn);
|
|
5814
5821
|
}
|
|
@@ -5818,12 +5825,12 @@ var MnemonicWallet = class extends BaseWallet {
|
|
|
5818
5825
|
processEncodedTxns(txnGroup, indexesToSign) {
|
|
5819
5826
|
const txnsToSign = [];
|
|
5820
5827
|
txnGroup.forEach((txnBuffer, index) => {
|
|
5821
|
-
const
|
|
5822
|
-
const isSigned = isSignedTxn(
|
|
5828
|
+
const decodedObj = import_algosdk9.default.msgpackRawDecode(txnBuffer);
|
|
5829
|
+
const isSigned = isSignedTxn(decodedObj);
|
|
5823
5830
|
const txn = isSigned ? import_algosdk9.default.decodeSignedTransaction(txnBuffer).txn : import_algosdk9.default.decodeUnsignedTransaction(txnBuffer);
|
|
5824
5831
|
const isIndexMatch = !indexesToSign || indexesToSign.includes(index);
|
|
5825
|
-
const signer =
|
|
5826
|
-
const canSignTxn = !isSigned && signer === this.account.addr;
|
|
5832
|
+
const signer = txn.sender.toString();
|
|
5833
|
+
const canSignTxn = !isSigned && signer === this.account.addr.toString();
|
|
5827
5834
|
if (isIndexMatch && canSignTxn) {
|
|
5828
5835
|
txnsToSign.push(txn);
|
|
5829
5836
|
}
|
|
@@ -5989,7 +5996,7 @@ var PeraWallet = class extends BaseWallet {
|
|
|
5989
5996
|
const txnsToSign = [];
|
|
5990
5997
|
txnGroup.forEach((txn, index) => {
|
|
5991
5998
|
const isIndexMatch = !indexesToSign || indexesToSign.includes(index);
|
|
5992
|
-
const signer =
|
|
5999
|
+
const signer = txn.sender.toString();
|
|
5993
6000
|
const canSignTxn = this.addresses.includes(signer);
|
|
5994
6001
|
if (isIndexMatch && canSignTxn) {
|
|
5995
6002
|
txnsToSign.push({ txn });
|
|
@@ -6002,11 +6009,11 @@ var PeraWallet = class extends BaseWallet {
|
|
|
6002
6009
|
processEncodedTxns(txnGroup, indexesToSign) {
|
|
6003
6010
|
const txnsToSign = [];
|
|
6004
6011
|
txnGroup.forEach((txnBuffer, index) => {
|
|
6005
|
-
const
|
|
6006
|
-
const isSigned = isSignedTxn(
|
|
6012
|
+
const decodedObj = import_algosdk10.default.msgpackRawDecode(txnBuffer);
|
|
6013
|
+
const isSigned = isSignedTxn(decodedObj);
|
|
6007
6014
|
const txn = isSigned ? import_algosdk10.default.decodeSignedTransaction(txnBuffer).txn : import_algosdk10.default.decodeUnsignedTransaction(txnBuffer);
|
|
6008
6015
|
const isIndexMatch = !indexesToSign || indexesToSign.includes(index);
|
|
6009
|
-
const signer =
|
|
6016
|
+
const signer = txn.sender.toString();
|
|
6010
6017
|
const canSignTxn = !isSigned && this.addresses.includes(signer);
|
|
6011
6018
|
if (isIndexMatch && canSignTxn) {
|
|
6012
6019
|
txnsToSign.push({ txn });
|
|
@@ -6170,7 +6177,7 @@ var PeraWallet2 = class extends BaseWallet {
|
|
|
6170
6177
|
const txnsToSign = [];
|
|
6171
6178
|
txnGroup.forEach((txn, index) => {
|
|
6172
6179
|
const isIndexMatch = !indexesToSign || indexesToSign.includes(index);
|
|
6173
|
-
const signer =
|
|
6180
|
+
const signer = txn.sender.toString();
|
|
6174
6181
|
const canSignTxn = this.addresses.includes(signer);
|
|
6175
6182
|
if (isIndexMatch && canSignTxn) {
|
|
6176
6183
|
txnsToSign.push({ txn });
|
|
@@ -6183,11 +6190,11 @@ var PeraWallet2 = class extends BaseWallet {
|
|
|
6183
6190
|
processEncodedTxns(txnGroup, indexesToSign) {
|
|
6184
6191
|
const txnsToSign = [];
|
|
6185
6192
|
txnGroup.forEach((txnBuffer, index) => {
|
|
6186
|
-
const
|
|
6187
|
-
const isSigned = isSignedTxn(
|
|
6193
|
+
const decodedObj = import_algosdk11.default.msgpackRawDecode(txnBuffer);
|
|
6194
|
+
const isSigned = isSignedTxn(decodedObj);
|
|
6188
6195
|
const txn = isSigned ? import_algosdk11.default.decodeSignedTransaction(txnBuffer).txn : import_algosdk11.default.decodeUnsignedTransaction(txnBuffer);
|
|
6189
6196
|
const isIndexMatch = !indexesToSign || indexesToSign.includes(index);
|
|
6190
|
-
const signer =
|
|
6197
|
+
const signer = txn.sender.toString();
|
|
6191
6198
|
const canSignTxn = !isSigned && this.addresses.includes(signer);
|
|
6192
6199
|
if (isIndexMatch && canSignTxn) {
|
|
6193
6200
|
txnsToSign.push({ txn });
|
|
@@ -6283,11 +6290,17 @@ function byteArrayToString(array) {
|
|
|
6283
6290
|
}
|
|
6284
6291
|
return result;
|
|
6285
6292
|
}
|
|
6286
|
-
function isSignedTxn(
|
|
6287
|
-
|
|
6293
|
+
function isSignedTxn(txnObj) {
|
|
6294
|
+
if (!txnObj || typeof txnObj !== "object") return false;
|
|
6295
|
+
if (!("sig" in txnObj && "txn" in txnObj)) return false;
|
|
6296
|
+
if (!(txnObj.sig instanceof Uint8Array)) return false;
|
|
6297
|
+
const txn = txnObj.txn;
|
|
6298
|
+
if (!txn || typeof txn !== "object") return false;
|
|
6299
|
+
const hasRequiredProps = "type" in txn && "snd" in txn;
|
|
6300
|
+
return hasRequiredProps;
|
|
6288
6301
|
}
|
|
6289
6302
|
function isTransaction(item) {
|
|
6290
|
-
return item && typeof item === "object" && "
|
|
6303
|
+
return item && typeof item === "object" && "sender" in item && (item.sender instanceof import_algosdk12.default.Address || typeof item.sender === "string");
|
|
6291
6304
|
}
|
|
6292
6305
|
function isTransactionArray(txnGroup) {
|
|
6293
6306
|
if (!Array.isArray(txnGroup) || txnGroup.length === 0) {
|
|
@@ -6503,7 +6516,7 @@ var WalletManager = class {
|
|
|
6503
6516
|
createAlgodClient(networkId) {
|
|
6504
6517
|
this.logger.info(`Creating Algodv2 client for ${networkId}...`);
|
|
6505
6518
|
const { token = "", baseServer, port = "", headers = {} } = this.networkConfig[networkId];
|
|
6506
|
-
return new
|
|
6519
|
+
return new import_algosdk13.default.Algodv2(token, baseServer, port, headers);
|
|
6507
6520
|
}
|
|
6508
6521
|
getAlgodClient = () => {
|
|
6509
6522
|
return this.algodClient;
|
|
@@ -6568,6 +6581,20 @@ var WalletManager = class {
|
|
|
6568
6581
|
return this.activeWallet.transactionSigner;
|
|
6569
6582
|
}
|
|
6570
6583
|
};
|
|
6584
|
+
|
|
6585
|
+
// src/webpack.ts
|
|
6586
|
+
var webpackFallback = {
|
|
6587
|
+
"@agoralabs-sh/avm-web-provider": false,
|
|
6588
|
+
"@algorandfoundation/liquid-auth-use-wallet-client": false,
|
|
6589
|
+
"@blockshake/defly-connect": false,
|
|
6590
|
+
"@magic-ext/algorand": false,
|
|
6591
|
+
"@perawallet/connect": false,
|
|
6592
|
+
"@perawallet/connect-beta": false,
|
|
6593
|
+
"@walletconnect/modal": false,
|
|
6594
|
+
"@walletconnect/sign-client": false,
|
|
6595
|
+
"lute-connect": false,
|
|
6596
|
+
"magic-sdk": false
|
|
6597
|
+
};
|
|
6571
6598
|
// Annotate the CommonJS export names for ESM import in node:
|
|
6572
6599
|
0 && (module.exports = {
|
|
6573
6600
|
BaseWallet,
|
|
@@ -6592,6 +6619,7 @@ var WalletManager = class {
|
|
|
6592
6619
|
WalletId,
|
|
6593
6620
|
WalletManager,
|
|
6594
6621
|
defaultState,
|
|
6595
|
-
isAVMWebProviderSDKError
|
|
6622
|
+
isAVMWebProviderSDKError,
|
|
6623
|
+
webpackFallback
|
|
6596
6624
|
});
|
|
6597
6625
|
//# sourceMappingURL=index.cjs.map
|