@txnlab/use-wallet-solid 4.4.0 → 4.6.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 TxnLab, Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/dev.cjs CHANGED
@@ -8,7 +8,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
8
8
 
9
9
  var algosdk__default = /*#__PURE__*/_interopDefault(algosdk);
10
10
 
11
- // ../../node_modules/.pnpm/solid-js@1.9.9/node_modules/solid-js/dist/solid.js
11
+ // ../../node_modules/.pnpm/solid-js@1.9.11/node_modules/solid-js/dist/solid.js
12
12
  var sharedConfig = {
13
13
  context: void 0,
14
14
  registry: void 0,
@@ -145,7 +145,7 @@ function startTransition(fn) {
145
145
  }
146
146
  var [transPending, setTransPending] = /* @__PURE__ */ createSignal(false);
147
147
  function createContext(defaultValue, options) {
148
- const id = Symbol("context");
148
+ const id = /* @__PURE__ */ Symbol("context");
149
149
  return {
150
150
  id,
151
151
  Provider: createProvider(id),
@@ -590,7 +590,7 @@ function createComponent(Comp, props) {
590
590
  return untrack(() => Comp(props || {}));
591
591
  }
592
592
 
593
- // ../../node_modules/.pnpm/solid-js@1.9.9/node_modules/solid-js/web/dist/web.js
593
+ // ../../node_modules/.pnpm/solid-js@1.9.11/node_modules/solid-js/web/dist/web.js
594
594
  var booleans = [
595
595
  "allowfullscreen",
596
596
  "async",
@@ -802,6 +802,13 @@ exports.useWallet = () => {
802
802
  }
803
803
  return wallet.signData(data, metadata);
804
804
  };
805
+ const withPrivateKey = (callback) => {
806
+ const wallet = activeWallet();
807
+ if (!wallet) {
808
+ throw new Error("No active wallet");
809
+ }
810
+ return wallet.withPrivateKey(callback);
811
+ };
805
812
  return {
806
813
  wallets: manager().wallets,
807
814
  isReady,
@@ -816,6 +823,7 @@ exports.useWallet = () => {
816
823
  isWalletActive,
817
824
  isWalletConnected,
818
825
  signData,
826
+ withPrivateKey,
819
827
  signTransactions,
820
828
  transactionSigner,
821
829
  walletStore
package/dist/dev.js CHANGED
@@ -2,7 +2,7 @@ import { useStore } from '@tanstack/solid-store';
2
2
  import algosdk from 'algosdk';
3
3
  export * from '@txnlab/use-wallet';
4
4
 
5
- // ../../node_modules/.pnpm/solid-js@1.9.9/node_modules/solid-js/dist/solid.js
5
+ // ../../node_modules/.pnpm/solid-js@1.9.11/node_modules/solid-js/dist/solid.js
6
6
  var sharedConfig = {
7
7
  context: void 0,
8
8
  registry: void 0,
@@ -139,7 +139,7 @@ function startTransition(fn) {
139
139
  }
140
140
  var [transPending, setTransPending] = /* @__PURE__ */ createSignal(false);
141
141
  function createContext(defaultValue, options) {
142
- const id = Symbol("context");
142
+ const id = /* @__PURE__ */ Symbol("context");
143
143
  return {
144
144
  id,
145
145
  Provider: createProvider(id),
@@ -584,7 +584,7 @@ function createComponent(Comp, props) {
584
584
  return untrack(() => Comp(props || {}));
585
585
  }
586
586
 
587
- // ../../node_modules/.pnpm/solid-js@1.9.9/node_modules/solid-js/web/dist/web.js
587
+ // ../../node_modules/.pnpm/solid-js@1.9.11/node_modules/solid-js/web/dist/web.js
588
588
  var booleans = [
589
589
  "allowfullscreen",
590
590
  "async",
@@ -796,6 +796,13 @@ var useWallet = () => {
796
796
  }
797
797
  return wallet.signData(data, metadata);
798
798
  };
799
+ const withPrivateKey = (callback) => {
800
+ const wallet = activeWallet();
801
+ if (!wallet) {
802
+ throw new Error("No active wallet");
803
+ }
804
+ return wallet.withPrivateKey(callback);
805
+ };
799
806
  return {
800
807
  wallets: manager().wallets,
801
808
  isReady,
@@ -810,6 +817,7 @@ var useWallet = () => {
810
817
  isWalletActive,
811
818
  isWalletConnected,
812
819
  signData,
820
+ withPrivateKey,
813
821
  signTransactions,
814
822
  transactionSigner,
815
823
  walletStore
package/dist/dev.jsx CHANGED
@@ -2,7 +2,7 @@
2
2
  import { useStore } from "@tanstack/solid-store";
3
3
  import algosdk from "algosdk";
4
4
 
5
- // ../../node_modules/.pnpm/solid-js@1.9.9/node_modules/solid-js/dist/solid.js
5
+ // ../../node_modules/.pnpm/solid-js@1.9.11/node_modules/solid-js/dist/solid.js
6
6
  var sharedConfig = {
7
7
  context: void 0,
8
8
  registry: void 0,
@@ -24,9 +24,6 @@ function setHydrateContext(context) {
24
24
  }
25
25
  var IS_DEV = false;
26
26
  var equalFn = (a, b) => a === b;
27
- var $PROXY = Symbol("solid-proxy");
28
- var $TRACK = Symbol("solid-track");
29
- var $DEVCOMP = Symbol("solid-dev-component");
30
27
  var signalOptions = {
31
28
  equals: equalFn
32
29
  };
@@ -139,7 +136,7 @@ function startTransition(fn) {
139
136
  }
140
137
  var [transPending, setTransPending] = /* @__PURE__ */ createSignal(false);
141
138
  function createContext(defaultValue, options) {
142
- const id = Symbol("context");
139
+ const id = /* @__PURE__ */ Symbol("context");
143
140
  return {
144
141
  id,
145
142
  Provider: createProvider(id),
@@ -570,7 +567,6 @@ function createProvider(id, options) {
570
567
  return res;
571
568
  };
572
569
  }
573
- var FALLBACK = Symbol("fallback");
574
570
 
575
571
  // src/index.tsx
576
572
  export * from "@txnlab/use-wallet";
@@ -691,6 +687,13 @@ var useWallet = () => {
691
687
  }
692
688
  return wallet.signData(data, metadata);
693
689
  };
690
+ const withPrivateKey = (callback) => {
691
+ const wallet = activeWallet();
692
+ if (!wallet) {
693
+ throw new Error("No active wallet");
694
+ }
695
+ return wallet.withPrivateKey(callback);
696
+ };
694
697
  return {
695
698
  wallets: manager().wallets,
696
699
  isReady,
@@ -705,6 +708,7 @@ var useWallet = () => {
705
708
  isWalletActive,
706
709
  isWalletConnected,
707
710
  signData,
711
+ withPrivateKey,
708
712
  signTransactions,
709
713
  transactionSigner,
710
714
  walletStore
package/dist/index.cjs CHANGED
@@ -8,7 +8,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
8
8
 
9
9
  var algosdk__default = /*#__PURE__*/_interopDefault(algosdk);
10
10
 
11
- // ../../node_modules/.pnpm/solid-js@1.9.9/node_modules/solid-js/dist/solid.js
11
+ // ../../node_modules/.pnpm/solid-js@1.9.11/node_modules/solid-js/dist/solid.js
12
12
  var sharedConfig = {
13
13
  context: void 0,
14
14
  registry: void 0,
@@ -145,7 +145,7 @@ function startTransition(fn) {
145
145
  }
146
146
  var [transPending, setTransPending] = /* @__PURE__ */ createSignal(false);
147
147
  function createContext(defaultValue, options) {
148
- const id = Symbol("context");
148
+ const id = /* @__PURE__ */ Symbol("context");
149
149
  return {
150
150
  id,
151
151
  Provider: createProvider(id),
@@ -590,7 +590,7 @@ function createComponent(Comp, props) {
590
590
  return untrack(() => Comp(props || {}));
591
591
  }
592
592
 
593
- // ../../node_modules/.pnpm/solid-js@1.9.9/node_modules/solid-js/web/dist/web.js
593
+ // ../../node_modules/.pnpm/solid-js@1.9.11/node_modules/solid-js/web/dist/web.js
594
594
  var booleans = [
595
595
  "allowfullscreen",
596
596
  "async",
@@ -797,6 +797,13 @@ exports.useWallet = () => {
797
797
  }
798
798
  return wallet.signData(data, metadata);
799
799
  };
800
+ const withPrivateKey = (callback) => {
801
+ const wallet = activeWallet();
802
+ if (!wallet) {
803
+ throw new Error("No active wallet");
804
+ }
805
+ return wallet.withPrivateKey(callback);
806
+ };
800
807
  return {
801
808
  wallets: manager().wallets,
802
809
  isReady,
@@ -811,6 +818,7 @@ exports.useWallet = () => {
811
818
  isWalletActive,
812
819
  isWalletConnected,
813
820
  signData,
821
+ withPrivateKey,
814
822
  signTransactions,
815
823
  transactionSigner,
816
824
  walletStore
package/dist/index.d.cts CHANGED
@@ -33,6 +33,7 @@ declare const useWallet: () => {
33
33
  isWalletActive: (walletKey: WalletKey) => boolean;
34
34
  isWalletConnected: (walletKey: WalletKey) => boolean;
35
35
  signData: (data: string, metadata: SignMetadata) => Promise<SignDataResponse>;
36
+ withPrivateKey: <T>(callback: (secretKey: Uint8Array) => Promise<T>) => Promise<T>;
36
37
  signTransactions: <T extends algosdk.Transaction[] | Uint8Array[]>(txnGroup: T | T[], indexesToSign?: number[]) => Promise<(Uint8Array | null)[]>;
37
38
  transactionSigner: (txnGroup: algosdk.Transaction[], indexesToSign: number[]) => Promise<Uint8Array[]>;
38
39
  walletStore: solid_js.Accessor<Partial<Record<WalletKey, WalletState>>>;
package/dist/index.d.ts CHANGED
@@ -33,6 +33,7 @@ declare const useWallet: () => {
33
33
  isWalletActive: (walletKey: WalletKey) => boolean;
34
34
  isWalletConnected: (walletKey: WalletKey) => boolean;
35
35
  signData: (data: string, metadata: SignMetadata) => Promise<SignDataResponse>;
36
+ withPrivateKey: <T>(callback: (secretKey: Uint8Array) => Promise<T>) => Promise<T>;
36
37
  signTransactions: <T extends algosdk.Transaction[] | Uint8Array[]>(txnGroup: T | T[], indexesToSign?: number[]) => Promise<(Uint8Array | null)[]>;
37
38
  transactionSigner: (txnGroup: algosdk.Transaction[], indexesToSign: number[]) => Promise<Uint8Array[]>;
38
39
  walletStore: solid_js.Accessor<Partial<Record<WalletKey, WalletState>>>;
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import { useStore } from '@tanstack/solid-store';
2
2
  import algosdk from 'algosdk';
3
3
  export * from '@txnlab/use-wallet';
4
4
 
5
- // ../../node_modules/.pnpm/solid-js@1.9.9/node_modules/solid-js/dist/solid.js
5
+ // ../../node_modules/.pnpm/solid-js@1.9.11/node_modules/solid-js/dist/solid.js
6
6
  var sharedConfig = {
7
7
  context: void 0,
8
8
  registry: void 0,
@@ -139,7 +139,7 @@ function startTransition(fn) {
139
139
  }
140
140
  var [transPending, setTransPending] = /* @__PURE__ */ createSignal(false);
141
141
  function createContext(defaultValue, options) {
142
- const id = Symbol("context");
142
+ const id = /* @__PURE__ */ Symbol("context");
143
143
  return {
144
144
  id,
145
145
  Provider: createProvider(id),
@@ -584,7 +584,7 @@ function createComponent(Comp, props) {
584
584
  return untrack(() => Comp(props || {}));
585
585
  }
586
586
 
587
- // ../../node_modules/.pnpm/solid-js@1.9.9/node_modules/solid-js/web/dist/web.js
587
+ // ../../node_modules/.pnpm/solid-js@1.9.11/node_modules/solid-js/web/dist/web.js
588
588
  var booleans = [
589
589
  "allowfullscreen",
590
590
  "async",
@@ -791,6 +791,13 @@ var useWallet = () => {
791
791
  }
792
792
  return wallet.signData(data, metadata);
793
793
  };
794
+ const withPrivateKey = (callback) => {
795
+ const wallet = activeWallet();
796
+ if (!wallet) {
797
+ throw new Error("No active wallet");
798
+ }
799
+ return wallet.withPrivateKey(callback);
800
+ };
794
801
  return {
795
802
  wallets: manager().wallets,
796
803
  isReady,
@@ -805,6 +812,7 @@ var useWallet = () => {
805
812
  isWalletActive,
806
813
  isWalletConnected,
807
814
  signData,
815
+ withPrivateKey,
808
816
  signTransactions,
809
817
  transactionSigner,
810
818
  walletStore
package/dist/index.jsx CHANGED
@@ -2,7 +2,7 @@
2
2
  import { useStore } from "@tanstack/solid-store";
3
3
  import algosdk from "algosdk";
4
4
 
5
- // ../../node_modules/.pnpm/solid-js@1.9.9/node_modules/solid-js/dist/solid.js
5
+ // ../../node_modules/.pnpm/solid-js@1.9.11/node_modules/solid-js/dist/solid.js
6
6
  var sharedConfig = {
7
7
  context: void 0,
8
8
  registry: void 0,
@@ -24,9 +24,6 @@ function setHydrateContext(context) {
24
24
  }
25
25
  var IS_DEV = false;
26
26
  var equalFn = (a, b) => a === b;
27
- var $PROXY = Symbol("solid-proxy");
28
- var $TRACK = Symbol("solid-track");
29
- var $DEVCOMP = Symbol("solid-dev-component");
30
27
  var signalOptions = {
31
28
  equals: equalFn
32
29
  };
@@ -139,7 +136,7 @@ function startTransition(fn) {
139
136
  }
140
137
  var [transPending, setTransPending] = /* @__PURE__ */ createSignal(false);
141
138
  function createContext(defaultValue, options) {
142
- const id = Symbol("context");
139
+ const id = /* @__PURE__ */ Symbol("context");
143
140
  return {
144
141
  id,
145
142
  Provider: createProvider(id),
@@ -570,7 +567,6 @@ function createProvider(id, options) {
570
567
  return res;
571
568
  };
572
569
  }
573
- var FALLBACK = Symbol("fallback");
574
570
 
575
571
  // src/index.tsx
576
572
  export * from "@txnlab/use-wallet";
@@ -686,6 +682,13 @@ var useWallet = () => {
686
682
  }
687
683
  return wallet.signData(data, metadata);
688
684
  };
685
+ const withPrivateKey = (callback) => {
686
+ const wallet = activeWallet();
687
+ if (!wallet) {
688
+ throw new Error("No active wallet");
689
+ }
690
+ return wallet.withPrivateKey(callback);
691
+ };
689
692
  return {
690
693
  wallets: manager().wallets,
691
694
  isReady,
@@ -700,6 +703,7 @@ var useWallet = () => {
700
703
  isWalletActive,
701
704
  isWalletConnected,
702
705
  signData,
706
+ withPrivateKey,
703
707
  signTransactions,
704
708
  transactionSigner,
705
709
  walletStore
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@txnlab/use-wallet-solid",
3
- "version": "4.4.0",
3
+ "version": "4.6.0",
4
4
  "description": "Solid.js library for integrating Algorand wallets into decentralized applications",
5
5
  "author": "Doug Richar <drichar@gmail.com>",
6
6
  "license": "MIT",
@@ -54,12 +54,12 @@
54
54
  ],
55
55
  "dependencies": {
56
56
  "@tanstack/solid-store": "0.8.0",
57
- "@txnlab/use-wallet": "4.4.0"
57
+ "@txnlab/use-wallet": "4.6.0"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@solidjs/testing-library": "0.8.10",
61
61
  "algosdk": "3.5.2",
62
- "solid-js": "1.9.10",
62
+ "solid-js": "1.9.11",
63
63
  "tsup": "8.5.1",
64
64
  "tsup-preset-solid": "2.2.0",
65
65
  "typescript": "5.9.3"
@@ -69,7 +69,7 @@
69
69
  "@magic-ext/algorand": "^24.4.2",
70
70
  "@perawallet/connect": "^1.4.1",
71
71
  "@walletconnect/modal": "^2.7.0",
72
- "@walletconnect/sign-client": "^2.23.1",
72
+ "@walletconnect/sign-client": "^2.23.4",
73
73
  "algosdk": "^3.0.0",
74
74
  "lute-connect": "^1.6.3",
75
75
  "magic-sdk": "^29.4.2"
package/LICENSE.md DELETED
@@ -1,20 +0,0 @@
1
- Copyright (c) 2024 TxnLab Inc.
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.