@frak-labs/nexus-sdk 0.0.6 → 0.0.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/README.md +1 -1
- package/dist/react/index.cjs +7 -1
- package/dist/react/index.d.cts +1 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.js +7 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Checkout our documentation for more informations about the usage:
|
|
|
8
8
|
|
|
9
9
|
To have more info about how does it works under the hood, you can check [this](https://docs.frak.id/wallet-sdk/under-the-hood)
|
|
10
10
|
|
|
11
|
-
> :warning: **This is in active development**: Only supporting
|
|
11
|
+
> :warning: **This is in active development**: Only supporting testnets at the moment, **DO NOT USE IN PROD**
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
## Installation
|
package/dist/react/index.cjs
CHANGED
|
@@ -61,7 +61,8 @@ function useArticleUnlockOptions({ articleId }) {
|
|
|
61
61
|
}
|
|
62
62
|
return await _chunk3LF3FGI6cjs.getArticleUnlockOptions.call(void 0, client, { articleId });
|
|
63
63
|
},
|
|
64
|
-
enabled: !!articleId
|
|
64
|
+
enabled: !!articleId,
|
|
65
|
+
gcTime: 0
|
|
65
66
|
});
|
|
66
67
|
}
|
|
67
68
|
|
|
@@ -78,6 +79,7 @@ function useWalletStatus() {
|
|
|
78
79
|
[queryClient]
|
|
79
80
|
);
|
|
80
81
|
return _reactquery.useQuery.call(void 0, {
|
|
82
|
+
gcTime: 0,
|
|
81
83
|
queryKey: ["walletStatusListener"],
|
|
82
84
|
queryFn: async () => {
|
|
83
85
|
await _chunk3LF3FGI6cjs.watchWalletStatus.call(void 0, client, newStatusUpdated);
|
|
@@ -103,7 +105,11 @@ function useArticleUnlockStatus({ articleId }) {
|
|
|
103
105
|
);
|
|
104
106
|
return _reactquery.useQuery.call(void 0, {
|
|
105
107
|
queryKey: ["articleUnlockStatusListener", _nullishCoalesce(articleId, () => ( "no-article-id"))],
|
|
108
|
+
gcTime: 0,
|
|
106
109
|
queryFn: async () => {
|
|
110
|
+
if (!articleId) {
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
107
113
|
await _chunk3LF3FGI6cjs.watchUnlockStatus.call(void 0, client, { articleId }, newStatusUpdated);
|
|
108
114
|
return {
|
|
109
115
|
status: "waiting-response",
|
package/dist/react/index.d.cts
CHANGED
|
@@ -94,6 +94,6 @@ type ArticleUnlockStatusQueryReturnType = ArticleUnlockStatusReturnType | {
|
|
|
94
94
|
/**
|
|
95
95
|
* Hooks used to listen to the current article unlock status
|
|
96
96
|
*/
|
|
97
|
-
declare function useArticleUnlockStatus({ articleId }: WatchUnlockStatusParams): _tanstack_react_query.UseQueryResult<ArticleUnlockStatusQueryReturnType, Error>;
|
|
97
|
+
declare function useArticleUnlockStatus({ articleId }: WatchUnlockStatusParams): _tanstack_react_query.UseQueryResult<ArticleUnlockStatusQueryReturnType | null, Error>;
|
|
98
98
|
|
|
99
99
|
export { type ArticleUnlockStatusQueryReturnType, NexusConfigContext, NexusConfigProvider, type NexusConfigProviderProps, NexusIFrameClientContext, type NexusIFrameClientProps, NexusIFrameClientProvider, type WalletStatusQueryReturnType, useArticleUnlockOptions, useArticleUnlockStatus, useNexusClient, useNexusConfig, useWalletStatus };
|
package/dist/react/index.d.ts
CHANGED
|
@@ -94,6 +94,6 @@ type ArticleUnlockStatusQueryReturnType = ArticleUnlockStatusReturnType | {
|
|
|
94
94
|
/**
|
|
95
95
|
* Hooks used to listen to the current article unlock status
|
|
96
96
|
*/
|
|
97
|
-
declare function useArticleUnlockStatus({ articleId }: WatchUnlockStatusParams): _tanstack_react_query.UseQueryResult<ArticleUnlockStatusQueryReturnType, Error>;
|
|
97
|
+
declare function useArticleUnlockStatus({ articleId }: WatchUnlockStatusParams): _tanstack_react_query.UseQueryResult<ArticleUnlockStatusQueryReturnType | null, Error>;
|
|
98
98
|
|
|
99
99
|
export { type ArticleUnlockStatusQueryReturnType, NexusConfigContext, NexusConfigProvider, type NexusConfigProviderProps, NexusIFrameClientContext, type NexusIFrameClientProps, NexusIFrameClientProvider, type WalletStatusQueryReturnType, useArticleUnlockOptions, useArticleUnlockStatus, useNexusClient, useNexusConfig, useWalletStatus };
|
package/dist/react/index.js
CHANGED
|
@@ -61,7 +61,8 @@ function useArticleUnlockOptions({ articleId }) {
|
|
|
61
61
|
}
|
|
62
62
|
return await getArticleUnlockOptions(client, { articleId });
|
|
63
63
|
},
|
|
64
|
-
enabled: !!articleId
|
|
64
|
+
enabled: !!articleId,
|
|
65
|
+
gcTime: 0
|
|
65
66
|
});
|
|
66
67
|
}
|
|
67
68
|
|
|
@@ -78,6 +79,7 @@ function useWalletStatus() {
|
|
|
78
79
|
[queryClient]
|
|
79
80
|
);
|
|
80
81
|
return useQuery2({
|
|
82
|
+
gcTime: 0,
|
|
81
83
|
queryKey: ["walletStatusListener"],
|
|
82
84
|
queryFn: async () => {
|
|
83
85
|
await watchWalletStatus(client, newStatusUpdated);
|
|
@@ -103,7 +105,11 @@ function useArticleUnlockStatus({ articleId }) {
|
|
|
103
105
|
);
|
|
104
106
|
return useQuery3({
|
|
105
107
|
queryKey: ["articleUnlockStatusListener", articleId ?? "no-article-id"],
|
|
108
|
+
gcTime: 0,
|
|
106
109
|
queryFn: async () => {
|
|
110
|
+
if (!articleId) {
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
107
113
|
await watchUnlockStatus(client, { articleId }, newStatusUpdated);
|
|
108
114
|
return {
|
|
109
115
|
status: "waiting-response",
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"url": "https://twitter.com/QNivelais"
|
|
12
12
|
}
|
|
13
13
|
],
|
|
14
|
-
"version": "0.0.
|
|
14
|
+
"version": "0.0.7",
|
|
15
15
|
"description": "Nexus Wallet client SDK, helping any person to interact with the Frak wallet, and require the unlock of a premium article within the Frak ecosystem.",
|
|
16
16
|
"repository": "https://github.com/frak-id/wallet",
|
|
17
17
|
"homepage": "https://docs.frak.id/wallet-sdk",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"js-sha256": "^0.11.0"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
|
-
"@tanstack/react-query": ">=5.
|
|
75
|
+
"@tanstack/react-query": ">=5.29.2",
|
|
76
76
|
"@types/node": "^20",
|
|
77
77
|
"tsup": "^8.0.2",
|
|
78
78
|
"typescript": "^5"
|