@frak-labs/nexus-sdk 0.0.23 → 0.0.24
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/{FrakContext-DBdWC7ls.d.cts → FrakContext-DKSVaeVb.d.cts} +62 -3
- package/dist/{FrakContext-CDVlUN75.d.ts → FrakContext-DjeuWC2U.d.ts} +62 -3
- package/dist/bundle/bundle.js +5 -5
- package/dist/{chunk-ZQSA2VQ4.js → chunk-2VNIEGOJ.js} +10 -6
- package/dist/{chunk-4Q2OHGWX.js → chunk-4MMSQL44.js} +15 -5
- package/dist/{chunk-4OJ2NPAS.cjs → chunk-4PVF24BB.cjs} +15 -15
- package/dist/{chunk-H3T2GAEC.js → chunk-BOGCLEPR.js} +2 -1
- package/dist/{chunk-BHZDDGW6.cjs → chunk-DE2KWQVP.cjs} +36 -26
- package/dist/{chunk-P4QEVLVV.js → chunk-FETGS7X7.js} +1 -1
- package/dist/{chunk-F3F4BCGV.cjs → chunk-H4BK3CNV.cjs} +20 -16
- package/dist/{chunk-QSXZKZJA.cjs → chunk-P3J2BIUT.cjs} +2 -1
- package/dist/{chunk-QYOOKB34.cjs → chunk-QLM5NFMZ.cjs} +22 -22
- package/dist/{chunk-VVF4NKYR.js → chunk-YPQA63LW.js} +2 -2
- package/dist/core/actions/index.cjs +7 -5
- package/dist/core/actions/index.d.cts +11 -5
- package/dist/core/actions/index.d.ts +11 -5
- package/dist/core/actions/index.js +6 -4
- package/dist/core/index.cjs +4 -4
- package/dist/core/index.d.cts +13 -25
- package/dist/core/index.d.ts +13 -25
- package/dist/core/index.js +3 -3
- package/dist/core/interactions/index.cjs +3 -3
- package/dist/core/interactions/index.js +2 -2
- package/dist/{processReferral-CFyGAENf.d.ts → processReferral-CJI_Rc4K.d.ts} +1 -1
- package/dist/{processReferral-BWSIamn2.d.cts → processReferral-DUP8imQV.d.cts} +1 -1
- package/dist/react/index.cjs +48 -27
- package/dist/react/index.d.cts +20 -13
- package/dist/react/index.d.ts +20 -13
- package/dist/react/index.js +26 -5
- package/package.json +42 -19
package/dist/react/index.js
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createIFrameNexusClient
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-YPQA63LW.js";
|
|
4
4
|
import {
|
|
5
5
|
displayModal,
|
|
6
|
+
getProductInformation,
|
|
6
7
|
openSso,
|
|
7
8
|
processReferral,
|
|
8
9
|
sendInteraction,
|
|
9
10
|
sendTransaction,
|
|
10
11
|
siweAuthenticate,
|
|
11
12
|
watchWalletStatus
|
|
12
|
-
} from "../chunk-
|
|
13
|
+
} from "../chunk-4MMSQL44.js";
|
|
13
14
|
import {
|
|
14
15
|
ClientNotFound,
|
|
15
16
|
FrakContextManager,
|
|
16
17
|
FrakRpcError,
|
|
17
18
|
RpcErrorCodes,
|
|
18
19
|
baseIframeProps
|
|
19
|
-
} from "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
20
|
+
} from "../chunk-2VNIEGOJ.js";
|
|
21
|
+
import "../chunk-FETGS7X7.js";
|
|
22
|
+
import "../chunk-BOGCLEPR.js";
|
|
22
23
|
|
|
23
24
|
// src/react/provider/NexusConfigProvider.ts
|
|
24
25
|
import { createContext, createElement } from "react";
|
|
@@ -30,6 +31,7 @@ function NexusConfigProvider(parameters) {
|
|
|
30
31
|
{
|
|
31
32
|
value: {
|
|
32
33
|
...config,
|
|
34
|
+
walletUrl: config.walletUrl ?? "https://wallet.frak.id",
|
|
33
35
|
domain: config.domain ?? (typeof window !== "undefined" ? window?.location?.host : void 0) ?? "not-found"
|
|
34
36
|
}
|
|
35
37
|
},
|
|
@@ -295,6 +297,24 @@ function useOpenSso({ mutations } = {}) {
|
|
|
295
297
|
});
|
|
296
298
|
}
|
|
297
299
|
|
|
300
|
+
// src/react/hook/useGetProductInformation.ts
|
|
301
|
+
import { useQuery as useQuery3 } from "@tanstack/react-query";
|
|
302
|
+
function useGetProductInformation({
|
|
303
|
+
query
|
|
304
|
+
} = {}) {
|
|
305
|
+
const client = useNexusClient();
|
|
306
|
+
return useQuery3({
|
|
307
|
+
...query,
|
|
308
|
+
queryKey: ["nexus-sdk", "get-product-information"],
|
|
309
|
+
queryFn: async () => {
|
|
310
|
+
if (!client) {
|
|
311
|
+
throw new ClientNotFound();
|
|
312
|
+
}
|
|
313
|
+
return getProductInformation(client);
|
|
314
|
+
}
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
|
|
298
318
|
// src/react/provider/NexusIFrameClientProvider.ts
|
|
299
319
|
var NexusIFrameClientContext = createContext2(
|
|
300
320
|
void 0
|
|
@@ -334,6 +354,7 @@ export {
|
|
|
334
354
|
NexusIFrameClientContext,
|
|
335
355
|
NexusIFrameClientProvider,
|
|
336
356
|
useDisplayModal,
|
|
357
|
+
useGetProductInformation,
|
|
337
358
|
useNexusClient,
|
|
338
359
|
useNexusConfig,
|
|
339
360
|
useOpenSso,
|
package/package.json
CHANGED
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
"url": "https://twitter.com/QNivelais"
|
|
12
12
|
}
|
|
13
13
|
],
|
|
14
|
-
"version": "0.0.
|
|
14
|
+
"version": "0.0.24",
|
|
15
15
|
"description": "Frak 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": {
|
|
17
17
|
"url": "https://github.com/frak-id/wallet",
|
|
18
18
|
"directory": "packages/sdk"
|
|
19
19
|
},
|
|
20
|
-
"homepage": "https://docs.frak.id/wallet-sdk",
|
|
20
|
+
"homepage": "https://docs.frak.id/wallet-sdk/overview",
|
|
21
21
|
"keywords": [
|
|
22
22
|
"frak-labs",
|
|
23
23
|
"nexus-wallet",
|
|
@@ -34,24 +34,44 @@
|
|
|
34
34
|
],
|
|
35
35
|
"exports": {
|
|
36
36
|
"./core": {
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
"import": {
|
|
38
|
+
"types": "./dist/core/index.d.ts",
|
|
39
|
+
"default": "./dist/core/index.js"
|
|
40
|
+
},
|
|
41
|
+
"require": {
|
|
42
|
+
"types": "./dist/core/index.d.cts",
|
|
43
|
+
"default": "./dist/core/index.cjs"
|
|
44
|
+
}
|
|
40
45
|
},
|
|
41
46
|
"./actions": {
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
|
|
47
|
+
"import": {
|
|
48
|
+
"types": "./dist/core/actions/index.d.ts",
|
|
49
|
+
"default": "./dist/core/actions/index.js"
|
|
50
|
+
},
|
|
51
|
+
"require": {
|
|
52
|
+
"types": "./dist/core/actions/index.d.cts",
|
|
53
|
+
"default": "./dist/core/actions/index.cjs"
|
|
54
|
+
}
|
|
45
55
|
},
|
|
46
56
|
"./interactions": {
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
|
|
57
|
+
"import": {
|
|
58
|
+
"types": "./dist/core/interactions/index.d.ts",
|
|
59
|
+
"default": "./dist/core/interactions/index.js"
|
|
60
|
+
},
|
|
61
|
+
"require": {
|
|
62
|
+
"types": "./dist/core/interactions/index.d.cts",
|
|
63
|
+
"default": "./dist/core/interactions/index.cjs"
|
|
64
|
+
}
|
|
50
65
|
},
|
|
51
66
|
"./react": {
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
67
|
+
"import": {
|
|
68
|
+
"types": "./dist/react/index.d.ts",
|
|
69
|
+
"default": "./dist/react/index.js"
|
|
70
|
+
},
|
|
71
|
+
"require": {
|
|
72
|
+
"types": "./dist/react/index.d.cts",
|
|
73
|
+
"default": "./dist/react/index.cjs"
|
|
74
|
+
}
|
|
55
75
|
}
|
|
56
76
|
},
|
|
57
77
|
"scripts": {
|
|
@@ -59,8 +79,9 @@
|
|
|
59
79
|
"format:check": "biome check .",
|
|
60
80
|
"format": "biome check --write .",
|
|
61
81
|
"clean": "rimraf dist",
|
|
62
|
-
"build": "tsup",
|
|
63
|
-
"build:watch": "tsup --watch"
|
|
82
|
+
"build": "tsup && bun run check-exports",
|
|
83
|
+
"build:watch": "tsup --watch",
|
|
84
|
+
"check-exports": "attw --pack --profile node16 ."
|
|
64
85
|
},
|
|
65
86
|
"peerDependencies": {
|
|
66
87
|
"viem": "^2.x",
|
|
@@ -72,9 +93,11 @@
|
|
|
72
93
|
"js-sha256": "^0.11.0"
|
|
73
94
|
},
|
|
74
95
|
"devDependencies": {
|
|
75
|
-
"@
|
|
96
|
+
"@arethetypeswrong/cli": "^0.17.1",
|
|
97
|
+
"@tanstack/react-query": ">=5.62.3",
|
|
76
98
|
"@types/node": "^22",
|
|
77
|
-
"
|
|
99
|
+
"@types/react": ">=18",
|
|
100
|
+
"tsup": "^8.3.5",
|
|
78
101
|
"typescript": "^5"
|
|
79
102
|
}
|
|
80
|
-
}
|
|
103
|
+
}
|