@phantom/react-sdk 1.0.0-beta.5 → 1.0.0-beta.7
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/index.d.ts +5 -6
- package/dist/index.js +1 -7
- package/dist/index.mjs +1 -7
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -3,11 +3,10 @@ import { ReactNode } from 'react';
|
|
|
3
3
|
import { BrowserSDKConfig, DebugConfig, AuthOptions, BrowserSDK, WalletAddress, AutoConfirmEnableParams, AutoConfirmResult, AutoConfirmSupportedChainsResult } from '@phantom/browser-sdk';
|
|
4
4
|
export { AddressType, AutoConfirmEnableParams, AutoConfirmResult, AutoConfirmSupportedChainsResult, DebugLevel, DebugMessage, NetworkId, SignedTransaction, WalletAddress, debug } from '@phantom/browser-sdk';
|
|
5
5
|
import * as _phantom_embedded_provider_core from '@phantom/embedded-provider-core';
|
|
6
|
-
import * as
|
|
7
|
-
export { EthTransactionRequest, IEthereumChain, ISolanaChain } from '@phantom/
|
|
6
|
+
import * as _phantom_chain_interfaces from '@phantom/chain-interfaces';
|
|
7
|
+
export { EthTransactionRequest, IEthereumChain, ISolanaChain } from '@phantom/chain-interfaces';
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
}
|
|
9
|
+
type PhantomSDKConfig = BrowserSDKConfig;
|
|
11
10
|
interface PhantomDebugConfig extends DebugConfig {
|
|
12
11
|
}
|
|
13
12
|
interface ConnectOptions {
|
|
@@ -75,7 +74,7 @@ declare function useAutoConfirm(): UseAutoConfirmResult;
|
|
|
75
74
|
* @returns Solana chain interface with connection enforcement
|
|
76
75
|
*/
|
|
77
76
|
declare function useSolana(): {
|
|
78
|
-
solana:
|
|
77
|
+
solana: _phantom_chain_interfaces.ISolanaChain;
|
|
79
78
|
isAvailable: boolean;
|
|
80
79
|
};
|
|
81
80
|
|
|
@@ -85,7 +84,7 @@ declare function useSolana(): {
|
|
|
85
84
|
* @returns Ethereum chain interface with connection enforcement
|
|
86
85
|
*/
|
|
87
86
|
declare function useEthereum(): {
|
|
88
|
-
ethereum:
|
|
87
|
+
ethereum: _phantom_chain_interfaces.IEthereumChain;
|
|
89
88
|
isAvailable: boolean;
|
|
90
89
|
};
|
|
91
90
|
|
package/dist/index.js
CHANGED
|
@@ -52,13 +52,7 @@ var import_browser_sdk = require("@phantom/browser-sdk");
|
|
|
52
52
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
53
53
|
var PhantomContext = (0, import_react.createContext)(void 0);
|
|
54
54
|
function PhantomProvider({ children, config, debugConfig }) {
|
|
55
|
-
const memoizedConfig = (0, import_react.useMemo)(() =>
|
|
56
|
-
return {
|
|
57
|
-
...config,
|
|
58
|
-
// Use providerType if provided, default to embedded
|
|
59
|
-
providerType: config.providerType || "embedded"
|
|
60
|
-
};
|
|
61
|
-
}, [config]);
|
|
55
|
+
const memoizedConfig = (0, import_react.useMemo)(() => config, [config]);
|
|
62
56
|
const [isConnected, setIsConnected] = (0, import_react.useState)(false);
|
|
63
57
|
const [isConnecting, setIsConnecting] = (0, import_react.useState)(false);
|
|
64
58
|
const [connectError, setConnectError] = (0, import_react.useState)(null);
|
package/dist/index.mjs
CHANGED
|
@@ -4,13 +4,7 @@ import { BrowserSDK } from "@phantom/browser-sdk";
|
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
var PhantomContext = createContext(void 0);
|
|
6
6
|
function PhantomProvider({ children, config, debugConfig }) {
|
|
7
|
-
const memoizedConfig = useMemo(() =>
|
|
8
|
-
return {
|
|
9
|
-
...config,
|
|
10
|
-
// Use providerType if provided, default to embedded
|
|
11
|
-
providerType: config.providerType || "embedded"
|
|
12
|
-
};
|
|
13
|
-
}, [config]);
|
|
7
|
+
const memoizedConfig = useMemo(() => config, [config]);
|
|
14
8
|
const [isConnected, setIsConnected] = useState(false);
|
|
15
9
|
const [isConnecting, setIsConnecting] = useState(false);
|
|
16
10
|
const [connectError, setConnectError] = useState(null);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phantom/react-sdk",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.7",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"prettier": "prettier --write \"src/**/*.{ts,tsx}\""
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@phantom/browser-sdk": "^1.0.0-beta.
|
|
30
|
-
"@phantom/
|
|
31
|
-
"@phantom/constants": "^1.0.0-beta.
|
|
29
|
+
"@phantom/browser-sdk": "^1.0.0-beta.7",
|
|
30
|
+
"@phantom/chain-interfaces": "^1.0.0-beta.6",
|
|
31
|
+
"@phantom/constants": "^1.0.0-beta.6"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@testing-library/dom": "^10.4.0",
|