@dubsdotapp/expo 0.1.3 → 0.2.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.
@@ -62,6 +62,14 @@ export class MwaWalletAdapter implements WalletAdapter {
62
62
  return this._connected;
63
63
  }
64
64
 
65
+ get authToken(): string | null {
66
+ return this._authToken;
67
+ }
68
+
69
+ setAuthToken(token: string | null): void {
70
+ this._authToken = token;
71
+ }
72
+
65
73
  /**
66
74
  * Connect to a mobile wallet. Call this before any signing.
67
75
  */
@@ -143,12 +151,7 @@ export class MwaWalletAdapter implements WalletAdapter {
143
151
 
144
152
  // MWA returns Uint8Array signature — convert to base58 string
145
153
  if (signature instanceof Uint8Array) {
146
- const bs58 = await import('@solana/web3.js').then(() => {
147
- return new PublicKey(signature).toBase58();
148
- }).catch(() => {
149
- return Buffer.from(signature).toString('base64');
150
- });
151
- return bs58;
154
+ return new PublicKey(signature).toBase58();
152
155
  }
153
156
 
154
157
  return String(signature);
@@ -27,4 +27,10 @@ export interface WalletAdapter {
27
27
  * Returns the signature as a Uint8Array.
28
28
  */
29
29
  signMessage?(message: Uint8Array): Promise<Uint8Array>;
30
+
31
+ /** Optional: Connect the wallet */
32
+ connect?(): Promise<void>;
33
+
34
+ /** Optional: Disconnect the wallet */
35
+ disconnect?(): void | Promise<void>;
30
36
  }