@dropfi/xrpl-react 0.1.7 → 0.1.9
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.cjs +13 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +13 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -3
package/dist/index.cjs
CHANGED
|
@@ -20,24 +20,25 @@ function useXrplReact() {
|
|
|
20
20
|
const [error, setError] = react.useState(null);
|
|
21
21
|
const [isConnecting, setIsConnecting] = react.useState(false);
|
|
22
22
|
react.useEffect(() => {
|
|
23
|
-
if (typeof window === 'undefined'
|
|
23
|
+
if (typeof window === 'undefined')
|
|
24
24
|
return;
|
|
25
|
-
window.xrpl
|
|
26
|
-
|
|
27
|
-
}, []);
|
|
28
|
-
react.useEffect(() => {
|
|
29
|
-
if (typeof window === 'undefined' || !window.xrpl)
|
|
25
|
+
const xrpl = window.xrpl;
|
|
26
|
+
if (!xrpl)
|
|
30
27
|
return;
|
|
31
28
|
const handleSelectedNetwork = (val) => setNetwork(val);
|
|
32
29
|
const handleSelectedAddress = (val) => setAddress(val);
|
|
33
30
|
const handleConnectedAccounts = (val) => setConnectedAccounts(val);
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
// 1) attach listeners
|
|
32
|
+
xrpl.on?.('xrpl_selectedNetwork', handleSelectedNetwork);
|
|
33
|
+
xrpl.on?.('xrpl_selectedAddress', handleSelectedAddress);
|
|
34
|
+
xrpl.on?.('xrpl_connectedAccounts', handleConnectedAccounts);
|
|
35
|
+
// 2) then initialize
|
|
36
|
+
xrpl.initialize?.();
|
|
37
|
+
setInitialized(true);
|
|
37
38
|
return () => {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
xrpl.off?.('xrpl_selectedNetwork', handleSelectedNetwork);
|
|
40
|
+
xrpl.off?.('xrpl_selectedAddress', handleSelectedAddress);
|
|
41
|
+
xrpl.off?.('xrpl_connectedAccounts', handleConnectedAccounts);
|
|
41
42
|
};
|
|
42
43
|
}, []);
|
|
43
44
|
const connect = async () => {
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../src/provider.tsx","../src/useXrplReact.tsx"],"sourcesContent":["import { createContext } from 'react';\n\nexport interface XrplProviderConfig {\n // Add any future config options here\n}\n\ninterface XrplContextValue {\n config?: XrplProviderConfig;\n}\n\nexport const XrplContext = createContext<XrplContextValue | null>(null);\n\nexport interface XrplProviderProps {\n config?: XrplProviderConfig;\n children: React.ReactNode;\n}\n\nexport const XrplProvider: React.FC<XrplProviderProps> = ({ config, children }) => {\n return <XrplContext.Provider value={{ config }}>{children}</XrplContext.Provider>;\n};\n","import { useContext, useEffect, useMemo, useState } from 'react';\nimport { XrplContext } from './provider';\n\nexport function useXrplReact() {\n
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/provider.tsx","../src/useXrplReact.tsx"],"sourcesContent":["import { createContext } from 'react';\n\nexport interface XrplProviderConfig {\n // Add any future config options here\n}\n\ninterface XrplContextValue {\n config?: XrplProviderConfig;\n}\n\nexport const XrplContext = createContext<XrplContextValue | null>(null);\n\nexport interface XrplProviderProps {\n config?: XrplProviderConfig;\n children: React.ReactNode;\n}\n\nexport const XrplProvider: React.FC<XrplProviderProps> = ({ config, children }) => {\n return <XrplContext.Provider value={{ config }}>{children}</XrplContext.Provider>;\n};\n","import { useContext, useEffect, useMemo, useState } from 'react';\nimport { XrplContext } from './provider';\n\nexport function useXrplReact() {\n const context = useContext(XrplContext);\n if (!context) {\n throw new Error('useXrplReact must be used within a XrplProvider');\n }\n\n const [address, setAddress] = useState<string | undefined>();\n const [connectedAccounts, setConnectedAccounts] = useState<string[]>([]);\n const [network, setNetwork] = useState<string>('mainnet');\n const [initialized, setInitialized] = useState(false);\n const [error, setError] = useState<string | null>(null);\n const [isConnecting, setIsConnecting] = useState(false);\n\n useEffect(() => {\n if (typeof window === 'undefined') return;\n const xrpl = window.xrpl;\n if (!xrpl) return;\n\n const handleSelectedNetwork = (val: string) => setNetwork(val);\n const handleSelectedAddress = (val: string) => setAddress(val);\n const handleConnectedAccounts = (val: string[]) => setConnectedAccounts(val);\n\n // 1) attach listeners\n xrpl.on?.('xrpl_selectedNetwork', handleSelectedNetwork);\n xrpl.on?.('xrpl_selectedAddress', handleSelectedAddress);\n xrpl.on?.('xrpl_connectedAccounts', handleConnectedAccounts);\n\n // 2) then initialize\n xrpl.initialize?.();\n setInitialized(true);\n\n return () => {\n xrpl.off?.('xrpl_selectedNetwork', handleSelectedNetwork);\n xrpl.off?.('xrpl_selectedAddress', handleSelectedAddress);\n xrpl.off?.('xrpl_connectedAccounts', handleConnectedAccounts);\n };\n }, []);\n\n const connect = async () => {\n setIsConnecting(true);\n try {\n if (!window.xrpl) throw new Error('No window.xrpl found');\n const response = await window.xrpl.connect();\n setAddress(response);\n return response;\n } catch (err: any) {\n setError(err.message);\n throw err;\n } finally {\n setIsConnecting(false);\n }\n };\n\n const disconnect = async () => {\n if (!window.xrpl) throw new Error('No window.xrpl found');\n await window.xrpl.disconnect(address);\n setAddress(undefined);\n };\n\n const sendTransaction = async (tx: any) => {\n if (!window.xrpl) throw new Error('No window.xrpl found');\n return await window.xrpl.sendTransaction(tx);\n };\n\n const changeNetwork = async (network: string) => {\n if (!window.xrpl) throw new Error('No window.xrpl found');\n return await window.xrpl.changeNetwork(network);\n };\n\n const signMessage = async (message: string) => {\n if (!window.xrpl) throw new Error('No window.xrpl found');\n const res = await window.xrpl.signMessage(message);\n if (res.error) throw new Error(res.error);\n return res;\n };\n\n return useMemo(\n () => ({\n address,\n wallet: address,\n isConnected: connectedAccounts.includes(address || ''),\n connect,\n disconnect,\n sendTransaction,\n changeNetwork,\n connectedAccounts,\n network,\n error,\n isConnecting,\n signMessage,\n initialized,\n }),\n [address, connectedAccounts, network, error, isConnecting, initialized],\n );\n}\n"],"names":["createContext","_jsx","useContext","useState","useEff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MAAM,CAAC,IAAI;AAAE,YAAA,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC;QACzD,OAAO,MAAM,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC;AAC9C,KAAC;AAED,IAAA,MAAM,aAAa,GAAG,OAAO,OAAe,KAAI;QAC9C,IAAI,CAAC,MAAM,CAAC,IAAI;AAAE,YAAA,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC;QACzD,OAAO,MAAM,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC;AACjD,KAAC;AAED,IAAA,MAAM,WAAW,GAAG,OAAO,OAAe,KAAI;QAC5C,IAAI,CAAC,MAAM,CAAC,IAAI;AAAE,YAAA,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC;QACzD,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;QAClD,IAAI,GAAG,CAAC,KAAK;AAAE,YAAA,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC;AACzC,QAAA,OAAO,GAAG;AACZ,KAAC;AAED,IAAA,OAAOC,aAAO,CACZ,OAAO;QACL,OAAO;AACP,QAAA,MAAM,EAAE,OAAO;QACf,WAAW,EAAE,iBAAiB,CAAC,QAAQ,CAAC,OAAO,IAAI,EAAE,CAAC;QACtD,OAAO;QACP,UAAU;QACV,eAAe;QACf,aAAa;QACb,iBAAiB;QACjB,OAAO;QACP,KAAK;QACL,YAAY;QACZ,WAAW;QACX,WAAW;AACZ,KAAA,CAAC,EACF,CAAC,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,CAAC,CACxE;AACH;;;;;"}
|
package/dist/index.mjs
CHANGED
|
@@ -18,24 +18,25 @@ function useXrplReact() {
|
|
|
18
18
|
const [error, setError] = useState(null);
|
|
19
19
|
const [isConnecting, setIsConnecting] = useState(false);
|
|
20
20
|
useEffect(() => {
|
|
21
|
-
if (typeof window === 'undefined'
|
|
21
|
+
if (typeof window === 'undefined')
|
|
22
22
|
return;
|
|
23
|
-
window.xrpl
|
|
24
|
-
|
|
25
|
-
}, []);
|
|
26
|
-
useEffect(() => {
|
|
27
|
-
if (typeof window === 'undefined' || !window.xrpl)
|
|
23
|
+
const xrpl = window.xrpl;
|
|
24
|
+
if (!xrpl)
|
|
28
25
|
return;
|
|
29
26
|
const handleSelectedNetwork = (val) => setNetwork(val);
|
|
30
27
|
const handleSelectedAddress = (val) => setAddress(val);
|
|
31
28
|
const handleConnectedAccounts = (val) => setConnectedAccounts(val);
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
// 1) attach listeners
|
|
30
|
+
xrpl.on?.('xrpl_selectedNetwork', handleSelectedNetwork);
|
|
31
|
+
xrpl.on?.('xrpl_selectedAddress', handleSelectedAddress);
|
|
32
|
+
xrpl.on?.('xrpl_connectedAccounts', handleConnectedAccounts);
|
|
33
|
+
// 2) then initialize
|
|
34
|
+
xrpl.initialize?.();
|
|
35
|
+
setInitialized(true);
|
|
35
36
|
return () => {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
xrpl.off?.('xrpl_selectedNetwork', handleSelectedNetwork);
|
|
38
|
+
xrpl.off?.('xrpl_selectedAddress', handleSelectedAddress);
|
|
39
|
+
xrpl.off?.('xrpl_connectedAccounts', handleConnectedAccounts);
|
|
39
40
|
};
|
|
40
41
|
}, []);
|
|
41
42
|
const connect = async () => {
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../src/provider.tsx","../src/useXrplReact.tsx"],"sourcesContent":["import { createContext } from 'react';\n\nexport interface XrplProviderConfig {\n // Add any future config options here\n}\n\ninterface XrplContextValue {\n config?: XrplProviderConfig;\n}\n\nexport const XrplContext = createContext<XrplContextValue | null>(null);\n\nexport interface XrplProviderProps {\n config?: XrplProviderConfig;\n children: React.ReactNode;\n}\n\nexport const XrplProvider: React.FC<XrplProviderProps> = ({ config, children }) => {\n return <XrplContext.Provider value={{ config }}>{children}</XrplContext.Provider>;\n};\n","import { useContext, useEffect, useMemo, useState } from 'react';\nimport { XrplContext } from './provider';\n\nexport function useXrplReact() {\n
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../src/provider.tsx","../src/useXrplReact.tsx"],"sourcesContent":["import { createContext } from 'react';\n\nexport interface XrplProviderConfig {\n // Add any future config options here\n}\n\ninterface XrplContextValue {\n config?: XrplProviderConfig;\n}\n\nexport const XrplContext = createContext<XrplContextValue | null>(null);\n\nexport interface XrplProviderProps {\n config?: XrplProviderConfig;\n children: React.ReactNode;\n}\n\nexport const XrplProvider: React.FC<XrplProviderProps> = ({ config, children }) => {\n return <XrplContext.Provider value={{ config }}>{children}</XrplContext.Provider>;\n};\n","import { useContext, useEffect, useMemo, useState } from 'react';\nimport { XrplContext } from './provider';\n\nexport function useXrplReact() {\n const context = useContext(XrplContext);\n if (!context) {\n throw new Error('useXrplReact must be used within a XrplProvider');\n }\n\n const [address, setAddress] = useState<string | undefined>();\n const [connectedAccounts, setConnectedAccounts] = useState<string[]>([]);\n const [network, setNetwork] = useState<string>('mainnet');\n const [initialized, setInitialized] = useState(false);\n const [error, setError] = useState<string | null>(null);\n const [isConnecting, setIsConnecting] = useState(false);\n\n useEffect(() => {\n if (typeof window === 'undefined') return;\n const xrpl = window.xrpl;\n if (!xrpl) return;\n\n const handleSelectedNetwork = (val: string) => setNetwork(val);\n const handleSelectedAddress = (val: string) => setAddress(val);\n const handleConnectedAccounts = (val: string[]) => setConnectedAccounts(val);\n\n // 1) attach listeners\n xrpl.on?.('xrpl_selectedNetwork', handleSelectedNetwork);\n xrpl.on?.('xrpl_selectedAddress', handleSelectedAddress);\n xrpl.on?.('xrpl_connectedAccounts', handleConnectedAccounts);\n\n // 2) then initialize\n xrpl.initialize?.();\n setInitialized(true);\n\n return () => {\n xrpl.off?.('xrpl_selectedNetwork', handleSelectedNetwork);\n xrpl.off?.('xrpl_selectedAddress', handleSelectedAddress);\n xrpl.off?.('xrpl_connectedAccounts', handleConnectedAccounts);\n };\n }, []);\n\n const connect = async () => {\n setIsConnecting(true);\n try {\n if (!window.xrpl) throw new Error('No window.xrpl found');\n const response = await window.xrpl.connect();\n setAddress(response);\n return response;\n } catch (err: any) {\n setError(err.message);\n throw err;\n } finally {\n setIsConnecting(false);\n }\n };\n\n const disconnect = async () => {\n if (!window.xrpl) throw new Error('No window.xrpl found');\n await window.xrpl.disconnect(address);\n setAddress(undefined);\n };\n\n const sendTransaction = async (tx: any) => {\n if (!window.xrpl) throw new Error('No window.xrpl found');\n return await window.xrpl.sendTransaction(tx);\n };\n\n const changeNetwork = async (network: string) => {\n if (!window.xrpl) throw new Error('No window.xrpl found');\n return await window.xrpl.changeNetwork(network);\n };\n\n const signMessage = async (message: string) => {\n if (!window.xrpl) throw new Error('No window.xrpl found');\n const res = await window.xrpl.signMessage(message);\n if (res.error) throw new Error(res.error);\n return res;\n };\n\n return useMemo(\n () => ({\n address,\n wallet: address,\n isConnected: connectedAccounts.includes(address || ''),\n connect,\n disconnect,\n sendTransaction,\n changeNetwork,\n connectedAccounts,\n network,\n error,\n isConnecting,\n signMessage,\n initialized,\n }),\n [address, connectedAccounts, network, error, isConnecting, initialized],\n );\n}\n"],"names":["_jsx"],"mappings":";;;AAUO,MAAM,WAAW,GAAG,aAAa,CAA0B,IAAI,CAAC;AAOhE,MAAM,YAAY,GAAgC,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAI;AAC9E,IAAA,OAAOA,GAAA,CAAC,WAAW,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,EAAE,MAAM,EAAE,EAAA,QAAA,EAAG,QAAQ,GAAwB;AACrF;;SChBgB,YAAY,GAAA;AAC1B,IAAA,MAAM,OAAO,GAAG,UAAU,CAAC,WAAW,CAAC;IACvC,IAAI,CAAC,OAAO,EAAE;AACZ,QAAA,MAAM,IAAI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IAAI,CAAC,MAAM,CAAC,IAAI;AAAE,YAAA,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC;QACzD,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;QAClD,IAAI,GAAG,CAAC,KAAK;AAAE,YAAA,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC;AACzC,QAAA,OAAO,GAAG;AACZ,KAAC;AAED,IAAA,OAAO,OAAO,CACZ,OAAO;QACL,OAAO;AACP,QAAA,MAAM,EAAE,OAAO;QACf,WAAW,EAAE,iBAAiB,CAAC,QAAQ,CAAC,OAAO,IAAI,EAAE,CAAC;QACtD,OAAO;QACP,UAAU;QACV,eAAe;QACf,aAAa;QACb,iBAAiB;QACjB,OAAO;QACP,KAAK;QACL,YAAY;QACZ,WAAW;QACX,WAAW;AACZ,KAAA,CAAC,EACF,CAAC,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,CAAC,CACxE;AACH;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dropfi/xrpl-react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "React provider and hook for XRPL dApps using DropFi wallet",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -22,8 +22,13 @@
|
|
|
22
22
|
"prepublishOnly": "pnpm run clean && pnpm run build"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"react": "^18.0.0",
|
|
26
|
-
"react-dom": "^18.0.0"
|
|
25
|
+
"react": "^18.2.0 || ^19.0.0",
|
|
26
|
+
"react-dom": "^18.2.0 || ^19.0.0"
|
|
27
|
+
},
|
|
28
|
+
"peerDependenciesMeta": {
|
|
29
|
+
"react-dom": {
|
|
30
|
+
"optional": true
|
|
31
|
+
}
|
|
27
32
|
},
|
|
28
33
|
"devDependencies": {
|
|
29
34
|
"@rollup/plugin-commonjs": "^25.0.0",
|