applesauce-wallet-connect 0.0.0-next-20250923113611 → 0.0.0-next-20250930093922

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.
@@ -82,7 +82,7 @@ export declare class WalletService {
82
82
  /** The service's public key */
83
83
  pubkey: string | null;
84
84
  /** The client's secret key */
85
- protected secret: Uint8Array;
85
+ protected secret?: Uint8Array;
86
86
  /** The client's public key */
87
87
  client: string;
88
88
  /** Shared observable for all wallet request events */
@@ -49,10 +49,16 @@ export class WalletService {
49
49
  this.handlers = options.handlers;
50
50
  // Set the client's secret and public key
51
51
  if (options.secret) {
52
+ // Service was created with a custom secret
52
53
  this.secret = options.secret;
53
54
  this.client = getPublicKey(this.secret);
54
55
  }
56
+ else if (options.client) {
57
+ // Service was restored with only the clients pubkey
58
+ this.client = options.client;
59
+ }
55
60
  else {
61
+ // Generate secret and client pubkey
56
62
  this.secret = generateSecretKey();
57
63
  this.client = getPublicKey(this.secret);
58
64
  }
@@ -131,6 +137,8 @@ export class WalletService {
131
137
  }
132
138
  /** Get the connection URI for the service */
133
139
  getConnectURI() {
140
+ if (!this.secret)
141
+ throw new Error("Service was not created with a secret");
134
142
  if (!this.pubkey)
135
143
  throw new Error("Service is not running");
136
144
  if (!this.relays.length)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "applesauce-wallet-connect",
3
- "version": "0.0.0-next-20250923113611",
3
+ "version": "0.0.0-next-20250930093922",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -59,8 +59,8 @@
59
59
  },
60
60
  "dependencies": {
61
61
  "@noble/hashes": "^1.7.1",
62
- "applesauce-core": "0.0.0-next-20250923113611",
63
- "applesauce-factory": "0.0.0-next-20250923113611",
62
+ "applesauce-core": "0.0.0-next-20250930093922",
63
+ "applesauce-factory": "0.0.0-next-20250930093922",
64
64
  "nostr-tools": "~2.17",
65
65
  "rxjs": "^7.8.1"
66
66
  },