@pooflabs/web 0.0.12 → 0.0.13
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/auth/providers/phantom-wallet-provider.d.ts +23 -1
- package/dist/auth/providers/phantom-wallet-provider.disabled.d.ts +17 -0
- package/dist/index.esm.js +28137 -28992
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +28140 -28995
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
|
@@ -1,17 +1,39 @@
|
|
|
1
1
|
import type { EVMTransaction, SolTransaction, TransactionResult, User, AuthProvider, SetOptions } from '@pooflabs/core';
|
|
2
|
+
import { Transaction, VersionedTransaction } from '@solana/web3.js';
|
|
2
3
|
export interface PhantomWalletConfig {
|
|
3
4
|
appId?: string;
|
|
4
5
|
autoConnect?: boolean;
|
|
5
6
|
providerType?: 'injected' | 'embedded';
|
|
6
7
|
}
|
|
7
8
|
export declare class PhantomWalletProvider implements AuthProvider {
|
|
9
|
+
private connection;
|
|
10
|
+
private initialized;
|
|
11
|
+
private networkUrl;
|
|
12
|
+
private sdk;
|
|
13
|
+
private config;
|
|
8
14
|
constructor(networkUrl?: string, config?: PhantomWalletConfig);
|
|
15
|
+
private init;
|
|
16
|
+
private getSDK;
|
|
17
|
+
/**
|
|
18
|
+
* Get the injected Phantom provider for direct wallet operations
|
|
19
|
+
*/
|
|
20
|
+
private getInjectedProvider;
|
|
21
|
+
/**
|
|
22
|
+
* Ensures the wallet is connected and returns the SDK
|
|
23
|
+
* This method will attempt to connect if not already connected
|
|
24
|
+
*/
|
|
25
|
+
private ensureConnected;
|
|
9
26
|
login(): Promise<User | null>;
|
|
10
27
|
restoreSession(): Promise<User | null>;
|
|
11
28
|
address(): Promise<string | null>;
|
|
12
29
|
runTransaction(evmTransactionData?: EVMTransaction, solTransactionData?: SolTransaction, options?: SetOptions): Promise<TransactionResult>;
|
|
30
|
+
signTransaction(transaction: Transaction | VersionedTransaction): Promise<Transaction | VersionedTransaction>;
|
|
13
31
|
signMessage(message: string): Promise<string>;
|
|
14
|
-
signTransaction(transaction: any): Promise<any>;
|
|
15
32
|
logout(): Promise<void>;
|
|
16
33
|
getNativeMethods(): Promise<any>;
|
|
17
34
|
}
|
|
35
|
+
declare global {
|
|
36
|
+
interface Window {
|
|
37
|
+
CUSTOM_TAROBASE_APP_ID_HEADER?: string;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { EVMTransaction, SolTransaction, TransactionResult, User, AuthProvider, SetOptions } from '@pooflabs/core';
|
|
2
|
+
export interface PhantomWalletConfig {
|
|
3
|
+
appId?: string;
|
|
4
|
+
autoConnect?: boolean;
|
|
5
|
+
providerType?: 'injected' | 'embedded';
|
|
6
|
+
}
|
|
7
|
+
export declare class PhantomWalletProvider implements AuthProvider {
|
|
8
|
+
constructor(networkUrl?: string, config?: PhantomWalletConfig);
|
|
9
|
+
login(): Promise<User | null>;
|
|
10
|
+
restoreSession(): Promise<User | null>;
|
|
11
|
+
address(): Promise<string | null>;
|
|
12
|
+
runTransaction(evmTransactionData?: EVMTransaction, solTransactionData?: SolTransaction, options?: SetOptions): Promise<TransactionResult>;
|
|
13
|
+
signMessage(message: string): Promise<string>;
|
|
14
|
+
signTransaction(transaction: any): Promise<any>;
|
|
15
|
+
logout(): Promise<void>;
|
|
16
|
+
getNativeMethods(): Promise<any>;
|
|
17
|
+
}
|