@pooflabs/web 0.0.89-rc5 → 0.0.89-ux.2
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 +0 -4
- package/dist/index-BLbguAbm.js +8 -0
- package/dist/index-BLbguAbm.js.map +1 -0
- package/dist/{index-BmRFzihw.esm.js → index-BhMsVVRC.esm.js} +13 -363
- package/dist/index-BhMsVVRC.esm.js.map +1 -0
- package/dist/{index-CNeBXwNA.js → index-BsAk0dF_.js} +3238 -3615
- package/dist/index-BsAk0dF_.js.map +1 -0
- package/dist/{index-BFPYOUPB.esm.js → index-CEr58d1y.esm.js} +14 -363
- package/dist/index-CEr58d1y.esm.js.map +1 -0
- package/dist/{index-t6c_8F1Y.js → index-DV-v3Udi.js} +25 -374
- package/dist/index-DV-v3Udi.js.map +1 -0
- package/dist/{index-Bk0jNQeJ.esm.js → index-D_H81ZZs.esm.js} +3239 -3615
- package/dist/index-D_H81ZZs.esm.js.map +1 -0
- package/dist/{index-Aw2d-l7b.js → index-DsyaaxjP.js} +13 -363
- package/dist/index-DsyaaxjP.js.map +1 -0
- package/dist/index-udwtZBLu.esm.js +6 -0
- package/dist/index-udwtZBLu.esm.js.map +1 -0
- package/dist/{index.browser-DIbh5a17.js → index.browser-AsD3ML3C.js} +2 -2
- package/dist/{index.browser-DIbh5a17.js.map → index.browser-AsD3ML3C.js.map} +1 -1
- package/dist/{index.browser-DA5oVpde.esm.js → index.browser-Cdrgfw30.esm.js} +2 -2
- package/dist/{index.browser-DA5oVpde.esm.js.map → index.browser-Cdrgfw30.esm.js.map} +1 -1
- package/dist/{index.browser-DwpTtoZf.js → index.browser-CmvrvtVk.js} +2 -2
- package/dist/{index.browser-DwpTtoZf.js.map → index.browser-CmvrvtVk.js.map} +1 -1
- package/dist/{index.browser-CPNUnyFN.esm.js → index.browser-Ctdjdn7K.esm.js} +2 -2
- package/dist/{index.browser-CPNUnyFN.esm.js.map → index.browser-Ctdjdn7K.esm.js.map} +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/{index.native-BOKZJ7oQ.esm.js → index.native-CujLdGqC.esm.js} +3011 -3348
- package/dist/index.native-CujLdGqC.esm.js.map +1 -0
- package/dist/{index.native-CJnVdXZz.js → index.native-TmE1_ksX.js} +3011 -3349
- package/dist/index.native-TmE1_ksX.js.map +1 -0
- package/dist/index.native.d.ts +0 -2
- package/dist/index.native.esm.js +1 -1
- package/dist/index.native.js +1 -2
- package/dist/index.native.js.map +1 -1
- package/dist/{phantom-wallet-provider-CCu-ugIc.js → phantom-wallet-provider-Drxxai7b.js} +15 -55
- package/dist/phantom-wallet-provider-Drxxai7b.js.map +1 -0
- package/dist/{phantom-wallet-provider-BnoICydP.esm.js → phantom-wallet-provider-DsB9i0xD.esm.js} +11 -51
- package/dist/phantom-wallet-provider-DsB9i0xD.esm.js.map +1 -0
- package/dist/{privy-wallet-provider-CZv8FH7R.esm.js → privy-wallet-provider-Bh5qilM2.esm.js} +3 -3
- package/dist/privy-wallet-provider-Bh5qilM2.esm.js.map +1 -0
- package/dist/{privy-wallet-provider-07Uph-RM.js → privy-wallet-provider-_PkLjOQV.js} +3 -3
- package/dist/privy-wallet-provider-_PkLjOQV.js.map +1 -0
- package/dist/{solana-mobile-wallet-provider-n8aM2vet.js → solana-mobile-wallet-provider-wzJ_5N_z.js} +10 -9
- package/dist/{solana-mobile-wallet-provider-n8aM2vet.js.map → solana-mobile-wallet-provider-wzJ_5N_z.js.map} +1 -1
- package/dist/{solana-mobile-wallet-provider-7R9pkiw0.esm.js → solana-mobile-wallet-provider-xzJFY_GQ.esm.js} +4 -3
- package/dist/{solana-mobile-wallet-provider-7R9pkiw0.esm.js.map → solana-mobile-wallet-provider-xzJFY_GQ.esm.js.map} +1 -1
- package/package.json +2 -3
- package/dist/auth/hooks/usePoofnetWallet.d.ts +0 -28
- package/dist/auth/providers/mock-poofnet-provider.d.ts +0 -43
- package/dist/index-Aw2d-l7b.js.map +0 -1
- package/dist/index-BFPYOUPB.esm.js.map +0 -1
- package/dist/index-Bk0jNQeJ.esm.js.map +0 -1
- package/dist/index-BmRFzihw.esm.js.map +0 -1
- package/dist/index-CNeBXwNA.js.map +0 -1
- package/dist/index-t6c_8F1Y.js.map +0 -1
- package/dist/index.native-BOKZJ7oQ.esm.js.map +0 -1
- package/dist/index.native-CJnVdXZz.js.map +0 -1
- package/dist/phantom-wallet-provider-BnoICydP.esm.js.map +0 -1
- package/dist/phantom-wallet-provider-CCu-ugIc.js.map +0 -1
- package/dist/privy-wallet-provider-07Uph-RM.js.map +0 -1
- package/dist/privy-wallet-provider-CZv8FH7R.esm.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pooflabs/web",
|
|
3
|
-
"version": "0.0.89-
|
|
3
|
+
"version": "0.0.89-ux.2",
|
|
4
4
|
"description": "JavaScript SDK for Tarobase API",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"react-native": "./dist/index.native.js",
|
|
@@ -80,8 +80,7 @@
|
|
|
80
80
|
"@solana/spl-token": "0.4.14",
|
|
81
81
|
"@solana/web3.js": "1.98.4",
|
|
82
82
|
"bs58": "6.0.0",
|
|
83
|
-
"buffer": "6.0.3"
|
|
84
|
-
"tweetnacl": "1.0.3"
|
|
83
|
+
"buffer": "6.0.3"
|
|
85
84
|
},
|
|
86
85
|
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
|
87
86
|
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export interface PoofnetWallet {
|
|
2
|
-
index: number;
|
|
3
|
-
label: string;
|
|
4
|
-
address: string;
|
|
5
|
-
}
|
|
6
|
-
export interface UsePoofnetWalletResult {
|
|
7
|
-
/** True when the active session is a simulated Poofnet (mock) wallet. */
|
|
8
|
-
isMock: boolean;
|
|
9
|
-
/** All mock wallets for this app/device (derived, no secrets stored). */
|
|
10
|
-
wallets: PoofnetWallet[];
|
|
11
|
-
/** Index of the currently-connected mock wallet. */
|
|
12
|
-
activeIndex: number;
|
|
13
|
-
/** Connect as an existing mock wallet by index (re-logins as it). */
|
|
14
|
-
switchWallet: (index: number) => Promise<void>;
|
|
15
|
-
/** Generate a brand-new mock wallet and connect as it. */
|
|
16
|
-
generateWallet: () => Promise<void>;
|
|
17
|
-
/** Re-read the wallet list (rarely needed — auth changes refresh automatically). */
|
|
18
|
-
refresh: () => Promise<void>;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Exposes the simulated Poofnet wallet to the app's own wallet UI (e.g. the
|
|
22
|
-
* template WalletButton). `isMock` is false on mainnet / real-wallet sessions,
|
|
23
|
-
* so callers can conditionally render the switch/generate controls.
|
|
24
|
-
*
|
|
25
|
-
* Reactive: re-reads whenever auth state changes (login / logout / wallet
|
|
26
|
-
* switch all flow through setCurrentUser → onAuthStateChanged).
|
|
27
|
-
*/
|
|
28
|
-
export declare function usePoofnetWallet(): UsePoofnetWalletResult;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { Transaction, VersionedTransaction } from '@solana/web3.js';
|
|
2
|
-
import type { AuthProvider, User, TransactionResult, SolTransaction, EVMTransaction, SetOptions } from '@pooflabs/core';
|
|
3
|
-
export declare function getActiveMockPoofnetProvider(): MockPoofnetProvider | null;
|
|
4
|
-
export declare class MockPoofnetProvider implements AuthProvider {
|
|
5
|
-
/** The keypair for the currently-connected mock wallet (re-derived on login/switch/restore). */
|
|
6
|
-
private activeKeypair;
|
|
7
|
-
private getDeviceId;
|
|
8
|
-
private getAppId;
|
|
9
|
-
private getWalletMeta;
|
|
10
|
-
private setWalletMeta;
|
|
11
|
-
private deriveKeypair;
|
|
12
|
-
private labelFor;
|
|
13
|
-
/**
|
|
14
|
-
* Sign the canonical nonce message with `keypair` and exchange it for a real
|
|
15
|
-
* Cognito session via the existing /session endpoint. Byte-for-byte the same
|
|
16
|
-
* flow a real Phantom login uses (see phantom-wallet-provider.ts) — only the
|
|
17
|
-
* signer differs.
|
|
18
|
-
*/
|
|
19
|
-
private mintSession;
|
|
20
|
-
/** Instant connect as the last-used wallet (or the first one, created on the spot). */
|
|
21
|
-
login(): Promise<User | null>;
|
|
22
|
-
restoreSession(): Promise<User | null>;
|
|
23
|
-
logout(): Promise<void>;
|
|
24
|
-
/** Switch to (and connect as) an existing mock wallet by index. */
|
|
25
|
-
switchWallet(index: number): Promise<User | null>;
|
|
26
|
-
/** Generate a brand-new mock wallet (next index) and connect as it. */
|
|
27
|
-
generateWallet(): Promise<User | null>;
|
|
28
|
-
/** Wallet list + active index for the wallet UI (usePoofnetWallet hook). */
|
|
29
|
-
getWalletState(): Promise<{
|
|
30
|
-
wallets: {
|
|
31
|
-
index: number;
|
|
32
|
-
label: string;
|
|
33
|
-
address: string;
|
|
34
|
-
}[];
|
|
35
|
-
activeIndex: number;
|
|
36
|
-
}>;
|
|
37
|
-
signMessage(message: string): Promise<string>;
|
|
38
|
-
signMessageMock(message: string): Promise<string>;
|
|
39
|
-
runTransaction(_evmTransactionData?: EVMTransaction, _solTransactionData?: SolTransaction, _options?: SetOptions): Promise<TransactionResult>;
|
|
40
|
-
signTransaction(transaction: Transaction | VersionedTransaction): Promise<Transaction | VersionedTransaction>;
|
|
41
|
-
signAndSubmitTransaction(_transaction: Transaction | VersionedTransaction, _feePayer?: any): Promise<string>;
|
|
42
|
-
getNativeMethods(): Promise<any>;
|
|
43
|
-
}
|