@frak-labs/nexus-sdk 0.0.21 → 0.0.22
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-p0Jtv9gl.d.ts → FrakContext-CDVlUN75.d.ts} +1 -0
- package/dist/{FrakContext-BsezWx2F.d.cts → FrakContext-DBdWC7ls.d.cts} +1 -0
- package/dist/bundle/bundle.js +3 -3
- package/dist/{chunk-BSCR57ZI.cjs → chunk-4CWA7EWX.cjs} +10 -10
- package/dist/{chunk-A3XYA7S7.cjs → chunk-4OJ2NPAS.cjs} +15 -15
- package/dist/chunk-F3F4BCGV.cjs +860 -0
- package/dist/chunk-H3T2GAEC.js +79 -0
- package/dist/{chunk-TIKEZMSD.js → chunk-P4QEVLVV.js} +1 -1
- package/dist/{chunk-MDGMJ6EQ.js → chunk-Q3SIIAX2.js} +2 -2
- package/dist/chunk-QSXZKZJA.cjs +79 -0
- package/dist/{chunk-WXNW7ZMU.cjs → chunk-QYOOKB34.cjs} +20 -18
- package/dist/{chunk-ZZ7LUFNV.js → chunk-VVF4NKYR.js} +3 -1
- package/dist/chunk-ZQSA2VQ4.js +860 -0
- package/dist/core/actions/index.cjs +5 -5
- package/dist/core/actions/index.d.cts +3 -3
- package/dist/core/actions/index.d.ts +3 -3
- package/dist/core/actions/index.js +4 -4
- package/dist/core/index.cjs +4 -4
- package/dist/core/index.d.cts +5 -3
- package/dist/core/index.d.ts +5 -3
- 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-YbCg90hu.d.cts → processReferral-BWSIamn2.d.cts} +1 -1
- package/dist/{processReferral-t3gUNwJu.d.ts → processReferral-CFyGAENf.d.ts} +1 -1
- package/dist/react/index.cjs +26 -26
- package/dist/react/index.d.cts +5 -2
- package/dist/react/index.d.ts +5 -2
- package/dist/react/index.js +5 -5
- package/package.json +2 -11
- package/dist/chunk-E527CMMJ.cjs +0 -294
- package/dist/chunk-HY6YATLS.js +0 -53
- package/dist/chunk-UFJ7W6CQ.cjs +0 -53
- package/dist/chunk-ZRPCX25Q.js +0 -294
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
12
|
-
require('../../chunk-
|
|
13
|
-
require('../../chunk-
|
|
14
|
-
require('../../chunk-
|
|
11
|
+
var _chunk4CWA7EWXcjs = require('../../chunk-4CWA7EWX.cjs');
|
|
12
|
+
require('../../chunk-F3F4BCGV.cjs');
|
|
13
|
+
require('../../chunk-4OJ2NPAS.cjs');
|
|
14
|
+
require('../../chunk-QSXZKZJA.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -22,4 +22,4 @@ require('../../chunk-UFJ7W6CQ.cjs');
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
exports.displayModal =
|
|
25
|
+
exports.displayModal = _chunk4CWA7EWXcjs.displayModal; exports.openSso = _chunk4CWA7EWXcjs.openSso; exports.processReferral = _chunk4CWA7EWXcjs.processReferral; exports.referralInteraction = _chunk4CWA7EWXcjs.referralInteraction; exports.sendInteraction = _chunk4CWA7EWXcjs.sendInteraction; exports.sendTransaction = _chunk4CWA7EWXcjs.sendTransaction; exports.siweAuthenticate = _chunk4CWA7EWXcjs.siweAuthenticate; exports.walletStatus = _chunk4CWA7EWXcjs.walletStatus; exports.watchWalletStatus = _chunk4CWA7EWXcjs.watchWalletStatus;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as NexusClient, W as WalletStatusReturnType, M as ModalStepTypes, D as DisplayModalParamsType, d as ModalRpcStepsResultType, O as OpenSsoParamsType } from '../../FrakContext-
|
|
1
|
+
import { a as NexusClient, W as WalletStatusReturnType, M as ModalStepTypes, D as DisplayModalParamsType, d as ModalRpcStepsResultType, O as OpenSsoParamsType } from '../../FrakContext-DBdWC7ls.cjs';
|
|
2
2
|
import { S as SendInteractionParamsType, a as SendInteractionReturnType } from '../../interaction-BngPoHA0.cjs';
|
|
3
|
-
import { P as ProcessReferralOptions } from '../../processReferral-
|
|
4
|
-
export { S as SendTransactionParams, a as SiweAuthenticateModalParams, p as processReferral, b as sendTransaction, s as siweAuthenticate } from '../../processReferral-
|
|
3
|
+
import { P as ProcessReferralOptions } from '../../processReferral-BWSIamn2.cjs';
|
|
4
|
+
export { S as SendTransactionParams, a as SiweAuthenticateModalParams, p as processReferral, b as sendTransaction, s as siweAuthenticate } from '../../processReferral-BWSIamn2.cjs';
|
|
5
5
|
import { Hex } from 'viem';
|
|
6
6
|
import 'viem/chains';
|
|
7
7
|
import 'viem/siwe';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as NexusClient, W as WalletStatusReturnType, M as ModalStepTypes, D as DisplayModalParamsType, d as ModalRpcStepsResultType, O as OpenSsoParamsType } from '../../FrakContext-
|
|
1
|
+
import { a as NexusClient, W as WalletStatusReturnType, M as ModalStepTypes, D as DisplayModalParamsType, d as ModalRpcStepsResultType, O as OpenSsoParamsType } from '../../FrakContext-CDVlUN75.js';
|
|
2
2
|
import { S as SendInteractionParamsType, a as SendInteractionReturnType } from '../../interaction-BngPoHA0.js';
|
|
3
|
-
import { P as ProcessReferralOptions } from '../../processReferral-
|
|
4
|
-
export { S as SendTransactionParams, a as SiweAuthenticateModalParams, p as processReferral, b as sendTransaction, s as siweAuthenticate } from '../../processReferral-
|
|
3
|
+
import { P as ProcessReferralOptions } from '../../processReferral-CFyGAENf.js';
|
|
4
|
+
export { S as SendTransactionParams, a as SiweAuthenticateModalParams, p as processReferral, b as sendTransaction, s as siweAuthenticate } from '../../processReferral-CFyGAENf.js';
|
|
5
5
|
import { Hex } from 'viem';
|
|
6
6
|
import 'viem/chains';
|
|
7
7
|
import 'viem/siwe';
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
siweAuthenticate,
|
|
9
9
|
walletStatus,
|
|
10
10
|
watchWalletStatus
|
|
11
|
-
} from "../../chunk-
|
|
12
|
-
import "../../chunk-
|
|
13
|
-
import "../../chunk-
|
|
14
|
-
import "../../chunk-
|
|
11
|
+
} from "../../chunk-Q3SIIAX2.js";
|
|
12
|
+
import "../../chunk-ZQSA2VQ4.js";
|
|
13
|
+
import "../../chunk-P4QEVLVV.js";
|
|
14
|
+
import "../../chunk-H3T2GAEC.js";
|
|
15
15
|
export {
|
|
16
16
|
displayModal,
|
|
17
17
|
openSso,
|
package/dist/core/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkQYOOKB34cjs = require('../chunk-QYOOKB34.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -11,12 +11,12 @@ var _chunkWXNW7ZMUcjs = require('../chunk-WXNW7ZMU.cjs');
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkF3F4BCGVcjs = require('../chunk-F3F4BCGV.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var _chunkQSXZKZJAcjs = require('../chunk-QSXZKZJA.cjs');
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
@@ -31,4 +31,4 @@ var _chunkUFJ7W6CQcjs = require('../chunk-UFJ7W6CQ.cjs');
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
exports.Deferred =
|
|
34
|
+
exports.Deferred = _chunkF3F4BCGVcjs.Deferred; exports.FrakContextManager = _chunkF3F4BCGVcjs.FrakContextManager; exports.FrakRpcError = _chunkF3F4BCGVcjs.FrakRpcError; exports.RpcErrorCodes = _chunkF3F4BCGVcjs.RpcErrorCodes; exports.compressJson = _chunkF3F4BCGVcjs.compressJson; exports.createIFrameNexusClient = _chunkQYOOKB34cjs.createIFrameNexusClient; exports.createIframe = _chunkF3F4BCGVcjs.createIframe; exports.decompressDataAndCheckHash = _chunkF3F4BCGVcjs.decompressDataAndCheckHash; exports.decompressJson = _chunkF3F4BCGVcjs.decompressJson; exports.hashAndCompressData = _chunkF3F4BCGVcjs.hashAndCompressData; exports.interactionTypes = _chunkQSXZKZJAcjs.interactionTypes; exports.productTypes = _chunkQSXZKZJAcjs.productTypes; exports.productTypesMask = _chunkQSXZKZJAcjs.productTypesMask;
|
package/dist/core/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as NexusWalletSdkConfig, a as NexusClient, F as FrakContext } from '../FrakContext-
|
|
2
|
-
export { C as ClientLifecycleEvent, D as DisplayModalParamsType, E as ExtractedParametersFromRpc, t as ExtractedReturnTypeFromRpc, o as FinalActionType, n as FinalModalStepType, r as IFrameEvent, s as IFrameLifecycleEvent, q as IFrameRpcEvent, I as IFrameRpcSchema, p as IFrameTransport, L as LoginModalStepType, b as ModalRpcMetadata, c as ModalRpcStepsInput, d as ModalRpcStepsResultType, e as ModalStepMetadata, M as ModalStepTypes, m as OpenInteractionSessionModalStepType, l as OpenInteractionSessionReturnType, O as OpenSsoParamsType, R as RpcResponse, j as SendTransactionModalStepType, k as SendTransactionReturnType, i as SendTransactionTxType, f as SiweAuthenticateModalStepType, h as SiweAuthenticateReturnType, g as SiweAuthenticationParams, S as SsoMetadata, W as WalletStatusReturnType } from '../FrakContext-
|
|
1
|
+
import { N as NexusWalletSdkConfig, a as NexusClient, F as FrakContext } from '../FrakContext-DBdWC7ls.cjs';
|
|
2
|
+
export { C as ClientLifecycleEvent, D as DisplayModalParamsType, E as ExtractedParametersFromRpc, t as ExtractedReturnTypeFromRpc, o as FinalActionType, n as FinalModalStepType, r as IFrameEvent, s as IFrameLifecycleEvent, q as IFrameRpcEvent, I as IFrameRpcSchema, p as IFrameTransport, L as LoginModalStepType, b as ModalRpcMetadata, c as ModalRpcStepsInput, d as ModalRpcStepsResultType, e as ModalStepMetadata, M as ModalStepTypes, m as OpenInteractionSessionModalStepType, l as OpenInteractionSessionReturnType, O as OpenSsoParamsType, R as RpcResponse, j as SendTransactionModalStepType, k as SendTransactionReturnType, i as SendTransactionTxType, f as SiweAuthenticateModalStepType, h as SiweAuthenticateReturnType, g as SiweAuthenticationParams, S as SsoMetadata, W as WalletStatusReturnType } from '../FrakContext-DBdWC7ls.cjs';
|
|
3
3
|
import { Address } from 'viem';
|
|
4
4
|
export { P as PreparedInteraction, S as SendInteractionParamsType, a as SendInteractionReturnType } from '../interaction-BngPoHA0.cjs';
|
|
5
5
|
export { F as FrakRpcError, R as RpcErrorCodes } from '../error-Dflr3G5x.cjs';
|
|
@@ -36,9 +36,11 @@ declare function createIFrameNexusClient({ config, iframe, }: {
|
|
|
36
36
|
/**
|
|
37
37
|
* Create the given iframe
|
|
38
38
|
* @param walletBaseUrl
|
|
39
|
+
* @param config
|
|
39
40
|
*/
|
|
40
|
-
declare function createIframe({ walletBaseUrl, }: {
|
|
41
|
+
declare function createIframe({ walletBaseUrl, config, }: {
|
|
41
42
|
walletBaseUrl: string;
|
|
43
|
+
config?: NexusWalletSdkConfig;
|
|
42
44
|
}): Promise<HTMLIFrameElement | undefined>;
|
|
43
45
|
|
|
44
46
|
/**
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { N as NexusWalletSdkConfig, a as NexusClient, F as FrakContext } from '../FrakContext-
|
|
2
|
-
export { C as ClientLifecycleEvent, D as DisplayModalParamsType, E as ExtractedParametersFromRpc, t as ExtractedReturnTypeFromRpc, o as FinalActionType, n as FinalModalStepType, r as IFrameEvent, s as IFrameLifecycleEvent, q as IFrameRpcEvent, I as IFrameRpcSchema, p as IFrameTransport, L as LoginModalStepType, b as ModalRpcMetadata, c as ModalRpcStepsInput, d as ModalRpcStepsResultType, e as ModalStepMetadata, M as ModalStepTypes, m as OpenInteractionSessionModalStepType, l as OpenInteractionSessionReturnType, O as OpenSsoParamsType, R as RpcResponse, j as SendTransactionModalStepType, k as SendTransactionReturnType, i as SendTransactionTxType, f as SiweAuthenticateModalStepType, h as SiweAuthenticateReturnType, g as SiweAuthenticationParams, S as SsoMetadata, W as WalletStatusReturnType } from '../FrakContext-
|
|
1
|
+
import { N as NexusWalletSdkConfig, a as NexusClient, F as FrakContext } from '../FrakContext-CDVlUN75.js';
|
|
2
|
+
export { C as ClientLifecycleEvent, D as DisplayModalParamsType, E as ExtractedParametersFromRpc, t as ExtractedReturnTypeFromRpc, o as FinalActionType, n as FinalModalStepType, r as IFrameEvent, s as IFrameLifecycleEvent, q as IFrameRpcEvent, I as IFrameRpcSchema, p as IFrameTransport, L as LoginModalStepType, b as ModalRpcMetadata, c as ModalRpcStepsInput, d as ModalRpcStepsResultType, e as ModalStepMetadata, M as ModalStepTypes, m as OpenInteractionSessionModalStepType, l as OpenInteractionSessionReturnType, O as OpenSsoParamsType, R as RpcResponse, j as SendTransactionModalStepType, k as SendTransactionReturnType, i as SendTransactionTxType, f as SiweAuthenticateModalStepType, h as SiweAuthenticateReturnType, g as SiweAuthenticationParams, S as SsoMetadata, W as WalletStatusReturnType } from '../FrakContext-CDVlUN75.js';
|
|
3
3
|
import { Address } from 'viem';
|
|
4
4
|
export { P as PreparedInteraction, S as SendInteractionParamsType, a as SendInteractionReturnType } from '../interaction-BngPoHA0.js';
|
|
5
5
|
export { F as FrakRpcError, R as RpcErrorCodes } from '../error-Dflr3G5x.js';
|
|
@@ -36,9 +36,11 @@ declare function createIFrameNexusClient({ config, iframe, }: {
|
|
|
36
36
|
/**
|
|
37
37
|
* Create the given iframe
|
|
38
38
|
* @param walletBaseUrl
|
|
39
|
+
* @param config
|
|
39
40
|
*/
|
|
40
|
-
declare function createIframe({ walletBaseUrl, }: {
|
|
41
|
+
declare function createIframe({ walletBaseUrl, config, }: {
|
|
41
42
|
walletBaseUrl: string;
|
|
43
|
+
config?: NexusWalletSdkConfig;
|
|
42
44
|
}): Promise<HTMLIFrameElement | undefined>;
|
|
43
45
|
|
|
44
46
|
/**
|
package/dist/core/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createIFrameNexusClient
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-VVF4NKYR.js";
|
|
4
4
|
import {
|
|
5
5
|
Deferred,
|
|
6
6
|
FrakContextManager,
|
|
@@ -11,12 +11,12 @@ import {
|
|
|
11
11
|
decompressDataAndCheckHash,
|
|
12
12
|
decompressJson,
|
|
13
13
|
hashAndCompressData
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-ZQSA2VQ4.js";
|
|
15
15
|
import {
|
|
16
16
|
interactionTypes,
|
|
17
17
|
productTypes,
|
|
18
18
|
productTypesMask
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-H3T2GAEC.js";
|
|
20
20
|
export {
|
|
21
21
|
Deferred,
|
|
22
22
|
FrakContextManager,
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
7
|
-
require('../../chunk-
|
|
6
|
+
var _chunk4OJ2NPAScjs = require('../../chunk-4OJ2NPAS.cjs');
|
|
7
|
+
require('../../chunk-QSXZKZJA.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
exports.PressInteractionEncoder =
|
|
13
|
+
exports.PressInteractionEncoder = _chunk4OJ2NPAScjs.PressInteractionEncoder; exports.PurchaseInteractionEncoder = _chunk4OJ2NPAScjs.PurchaseInteractionEncoder; exports.ReferralInteractionEncoder = _chunk4OJ2NPAScjs.ReferralInteractionEncoder; exports.WebShopInteractionEncoder = _chunk4OJ2NPAScjs.WebShopInteractionEncoder;
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
PurchaseInteractionEncoder,
|
|
4
4
|
ReferralInteractionEncoder,
|
|
5
5
|
WebShopInteractionEncoder
|
|
6
|
-
} from "../../chunk-
|
|
7
|
-
import "../../chunk-
|
|
6
|
+
} from "../../chunk-P4QEVLVV.js";
|
|
7
|
+
import "../../chunk-H3T2GAEC.js";
|
|
8
8
|
export {
|
|
9
9
|
PressInteractionEncoder,
|
|
10
10
|
PurchaseInteractionEncoder,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as SiweAuthenticationParams, b as ModalRpcMetadata, a as NexusClient, h as SiweAuthenticateReturnType, j as SendTransactionModalStepType, k as SendTransactionReturnType, W as WalletStatusReturnType, F as FrakContext, D as DisplayModalParamsType, M as ModalStepTypes } from './FrakContext-
|
|
1
|
+
import { g as SiweAuthenticationParams, b as ModalRpcMetadata, a as NexusClient, h as SiweAuthenticateReturnType, j as SendTransactionModalStepType, k as SendTransactionReturnType, W as WalletStatusReturnType, F as FrakContext, D as DisplayModalParamsType, M as ModalStepTypes } from './FrakContext-DBdWC7ls.cjs';
|
|
2
2
|
import { Hex } from 'viem';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as SiweAuthenticationParams, b as ModalRpcMetadata, a as NexusClient, h as SiweAuthenticateReturnType, j as SendTransactionModalStepType, k as SendTransactionReturnType, W as WalletStatusReturnType, F as FrakContext, D as DisplayModalParamsType, M as ModalStepTypes } from './FrakContext-
|
|
1
|
+
import { g as SiweAuthenticationParams, b as ModalRpcMetadata, a as NexusClient, h as SiweAuthenticateReturnType, j as SendTransactionModalStepType, k as SendTransactionReturnType, W as WalletStatusReturnType, F as FrakContext, D as DisplayModalParamsType, M as ModalStepTypes } from './FrakContext-CDVlUN75.js';
|
|
2
2
|
import { Hex } from 'viem';
|
|
3
3
|
|
|
4
4
|
/**
|
package/dist/react/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkQYOOKB34cjs = require('../chunk-QYOOKB34.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -9,16 +9,16 @@ var _chunkWXNW7ZMUcjs = require('../chunk-WXNW7ZMU.cjs');
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunk4CWA7EWXcjs = require('../chunk-4CWA7EWX.cjs');
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
20
|
-
require('../chunk-
|
|
21
|
-
require('../chunk-
|
|
19
|
+
var _chunkF3F4BCGVcjs = require('../chunk-F3F4BCGV.cjs');
|
|
20
|
+
require('../chunk-4OJ2NPAS.cjs');
|
|
21
|
+
require('../chunk-QSXZKZJA.cjs');
|
|
22
22
|
|
|
23
23
|
// src/react/provider/NexusConfigProvider.ts
|
|
24
24
|
var _react = require('react');
|
|
@@ -50,8 +50,8 @@ function NexusConfigProvider(parameters) {
|
|
|
50
50
|
function useNexusConfig() {
|
|
51
51
|
const config = _react.useContext.call(void 0, NexusConfigContext);
|
|
52
52
|
if (!config) {
|
|
53
|
-
throw new (0,
|
|
54
|
-
|
|
53
|
+
throw new (0, _chunkF3F4BCGVcjs.FrakRpcError)(
|
|
54
|
+
_chunkF3F4BCGVcjs.RpcErrorCodes.configError,
|
|
55
55
|
"Nexus config not found"
|
|
56
56
|
);
|
|
57
57
|
}
|
|
@@ -85,9 +85,9 @@ function useWalletStatus() {
|
|
|
85
85
|
queryKey: ["nexus-sdk", "wallet-status-listener"],
|
|
86
86
|
queryFn: async () => {
|
|
87
87
|
if (!client) {
|
|
88
|
-
throw new (0,
|
|
88
|
+
throw new (0, _chunkF3F4BCGVcjs.ClientNotFound)();
|
|
89
89
|
}
|
|
90
|
-
return
|
|
90
|
+
return _chunk4CWA7EWXcjs.walletStatus.call(void 0, client, newStatusUpdated);
|
|
91
91
|
},
|
|
92
92
|
enabled: !!client
|
|
93
93
|
});
|
|
@@ -104,9 +104,9 @@ function useSendTransactionAction({
|
|
|
104
104
|
mutationKey: ["nexus-sdk", "send-transaction"],
|
|
105
105
|
mutationFn: async (params) => {
|
|
106
106
|
if (!client) {
|
|
107
|
-
throw new (0,
|
|
107
|
+
throw new (0, _chunkF3F4BCGVcjs.ClientNotFound)();
|
|
108
108
|
}
|
|
109
|
-
return
|
|
109
|
+
return _chunk4CWA7EWXcjs.sendTransaction.call(void 0, client, params);
|
|
110
110
|
}
|
|
111
111
|
});
|
|
112
112
|
}
|
|
@@ -126,9 +126,9 @@ function useSiweAuthenticate({
|
|
|
126
126
|
],
|
|
127
127
|
mutationFn: async (params) => {
|
|
128
128
|
if (!client) {
|
|
129
|
-
throw new (0,
|
|
129
|
+
throw new (0, _chunkF3F4BCGVcjs.ClientNotFound)();
|
|
130
130
|
}
|
|
131
|
-
return
|
|
131
|
+
return _chunk4CWA7EWXcjs.siweAuthenticate.call(void 0, client, params);
|
|
132
132
|
}
|
|
133
133
|
});
|
|
134
134
|
}
|
|
@@ -181,12 +181,12 @@ function useFrakContext() {
|
|
|
181
181
|
const { location } = useWindowLocation();
|
|
182
182
|
const frakContext = _react.useMemo.call(void 0, () => {
|
|
183
183
|
if (!_optionalChain([location, 'optionalAccess', _7 => _7.href])) return null;
|
|
184
|
-
return
|
|
184
|
+
return _chunkF3F4BCGVcjs.FrakContextManager.parse({ url: location.href });
|
|
185
185
|
}, [_optionalChain([location, 'optionalAccess', _8 => _8.href])]);
|
|
186
186
|
const updateContext = _react.useCallback.call(void 0,
|
|
187
187
|
(newContext) => {
|
|
188
188
|
console.log("Updating context", { newContext });
|
|
189
|
-
|
|
189
|
+
_chunkF3F4BCGVcjs.FrakContextManager.replaceUrl({
|
|
190
190
|
url: _optionalChain([location, 'optionalAccess', _9 => _9.href]),
|
|
191
191
|
context: newContext
|
|
192
192
|
});
|
|
@@ -224,9 +224,9 @@ function useReferralInteraction({
|
|
|
224
224
|
],
|
|
225
225
|
queryFn: () => {
|
|
226
226
|
if (!client) {
|
|
227
|
-
throw new (0,
|
|
227
|
+
throw new (0, _chunkF3F4BCGVcjs.ClientNotFound)();
|
|
228
228
|
}
|
|
229
|
-
return
|
|
229
|
+
return _chunk4CWA7EWXcjs.processReferral.call(void 0, client, {
|
|
230
230
|
walletStatus: walletStatus2,
|
|
231
231
|
frakContext,
|
|
232
232
|
modalConfig,
|
|
@@ -254,9 +254,9 @@ function useSendInteraction({
|
|
|
254
254
|
mutationKey: ["nexus-sdk", "send-interaction"],
|
|
255
255
|
mutationFn: async (params) => {
|
|
256
256
|
if (!client) {
|
|
257
|
-
throw new (0,
|
|
257
|
+
throw new (0, _chunkF3F4BCGVcjs.ClientNotFound)();
|
|
258
258
|
}
|
|
259
|
-
return
|
|
259
|
+
return _chunk4CWA7EWXcjs.sendInteraction.call(void 0, client, params);
|
|
260
260
|
}
|
|
261
261
|
});
|
|
262
262
|
}
|
|
@@ -272,9 +272,9 @@ function useDisplayModal({
|
|
|
272
272
|
mutationKey: ["nexus-sdk", "display-modal"],
|
|
273
273
|
mutationFn: async (args) => {
|
|
274
274
|
if (!client) {
|
|
275
|
-
throw new (0,
|
|
275
|
+
throw new (0, _chunkF3F4BCGVcjs.ClientNotFound)();
|
|
276
276
|
}
|
|
277
|
-
return
|
|
277
|
+
return _chunk4CWA7EWXcjs.displayModal.call(void 0, client, args);
|
|
278
278
|
}
|
|
279
279
|
});
|
|
280
280
|
}
|
|
@@ -288,9 +288,9 @@ function useOpenSso({ mutations } = {}) {
|
|
|
288
288
|
mutationKey: ["nexus-sdk", "open-sso"],
|
|
289
289
|
mutationFn: async (params) => {
|
|
290
290
|
if (!client) {
|
|
291
|
-
throw new (0,
|
|
291
|
+
throw new (0, _chunkF3F4BCGVcjs.ClientNotFound)();
|
|
292
292
|
}
|
|
293
|
-
return
|
|
293
|
+
return _chunk4CWA7EWXcjs.openSso.call(void 0, client, params);
|
|
294
294
|
}
|
|
295
295
|
});
|
|
296
296
|
}
|
|
@@ -306,15 +306,15 @@ function NexusIFrameClientProvider({
|
|
|
306
306
|
const config = useNexusConfig();
|
|
307
307
|
const [client, setClient] = _react.useState.call(void 0, void 0);
|
|
308
308
|
const iFrame = _react.createElement.call(void 0, "iframe", {
|
|
309
|
-
...
|
|
309
|
+
..._chunkF3F4BCGVcjs.baseIframeProps,
|
|
310
310
|
src: `${config.walletUrl}/listener`,
|
|
311
|
-
style: _nullishCoalesce(style, () => (
|
|
311
|
+
style: _nullishCoalesce(style, () => ( _chunkF3F4BCGVcjs.baseIframeProps.style)),
|
|
312
312
|
ref: (iframe) => {
|
|
313
313
|
if (!iframe || client) {
|
|
314
314
|
return;
|
|
315
315
|
}
|
|
316
316
|
setClient(
|
|
317
|
-
|
|
317
|
+
_chunkQYOOKB34cjs.createIFrameNexusClient.call(void 0, {
|
|
318
318
|
iframe,
|
|
319
319
|
config
|
|
320
320
|
})
|
package/dist/react/index.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { PropsWithChildren, CSSProperties, ReactNode } from 'react';
|
|
3
|
-
import { N as NexusWalletSdkConfig, a as NexusClient, W as WalletStatusReturnType, k as SendTransactionReturnType, h as SiweAuthenticateReturnType, D as DisplayModalParamsType, M as ModalStepTypes, d as ModalRpcStepsResultType, O as OpenSsoParamsType } from '../FrakContext-
|
|
3
|
+
import { N as NexusWalletSdkConfig, a as NexusClient, W as WalletStatusReturnType, k as SendTransactionReturnType, h as SiweAuthenticateReturnType, D as DisplayModalParamsType, M as ModalStepTypes, d as ModalRpcStepsResultType, O as OpenSsoParamsType } from '../FrakContext-DBdWC7ls.cjs';
|
|
4
4
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
5
5
|
import { UseMutationOptions } from '@tanstack/react-query';
|
|
6
6
|
import * as viem from 'viem';
|
|
7
7
|
import { Hex } from 'viem';
|
|
8
8
|
import { F as FrakRpcError } from '../error-Dflr3G5x.cjs';
|
|
9
|
-
import { S as SendTransactionParams, a as SiweAuthenticateModalParams, P as ProcessReferralOptions } from '../processReferral-
|
|
9
|
+
import { S as SendTransactionParams, a as SiweAuthenticateModalParams, P as ProcessReferralOptions } from '../processReferral-BWSIamn2.cjs';
|
|
10
10
|
import { S as SendInteractionParamsType, a as SendInteractionReturnType } from '../interaction-BngPoHA0.cjs';
|
|
11
11
|
import 'viem/chains';
|
|
12
12
|
import 'viem/siwe';
|
|
@@ -19,6 +19,7 @@ declare const NexusConfigContext: react.Context<Readonly<{
|
|
|
19
19
|
metadata: {
|
|
20
20
|
name: string;
|
|
21
21
|
css?: string;
|
|
22
|
+
buttonShare?: string;
|
|
22
23
|
};
|
|
23
24
|
domain: string;
|
|
24
25
|
}> | undefined>;
|
|
@@ -40,6 +41,7 @@ declare function NexusConfigProvider(parameters: PropsWithChildren<NexusConfigPr
|
|
|
40
41
|
metadata: {
|
|
41
42
|
name: string;
|
|
42
43
|
css?: string;
|
|
44
|
+
buttonShare?: string;
|
|
43
45
|
};
|
|
44
46
|
domain: string;
|
|
45
47
|
}> | undefined>>;
|
|
@@ -75,6 +77,7 @@ declare function useNexusConfig(): Readonly<{
|
|
|
75
77
|
metadata: {
|
|
76
78
|
name: string;
|
|
77
79
|
css?: string;
|
|
80
|
+
buttonShare?: string;
|
|
78
81
|
};
|
|
79
82
|
domain: string;
|
|
80
83
|
}>;
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { PropsWithChildren, CSSProperties, ReactNode } from 'react';
|
|
3
|
-
import { N as NexusWalletSdkConfig, a as NexusClient, W as WalletStatusReturnType, k as SendTransactionReturnType, h as SiweAuthenticateReturnType, D as DisplayModalParamsType, M as ModalStepTypes, d as ModalRpcStepsResultType, O as OpenSsoParamsType } from '../FrakContext-
|
|
3
|
+
import { N as NexusWalletSdkConfig, a as NexusClient, W as WalletStatusReturnType, k as SendTransactionReturnType, h as SiweAuthenticateReturnType, D as DisplayModalParamsType, M as ModalStepTypes, d as ModalRpcStepsResultType, O as OpenSsoParamsType } from '../FrakContext-CDVlUN75.js';
|
|
4
4
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
5
5
|
import { UseMutationOptions } from '@tanstack/react-query';
|
|
6
6
|
import * as viem from 'viem';
|
|
7
7
|
import { Hex } from 'viem';
|
|
8
8
|
import { F as FrakRpcError } from '../error-Dflr3G5x.js';
|
|
9
|
-
import { S as SendTransactionParams, a as SiweAuthenticateModalParams, P as ProcessReferralOptions } from '../processReferral-
|
|
9
|
+
import { S as SendTransactionParams, a as SiweAuthenticateModalParams, P as ProcessReferralOptions } from '../processReferral-CFyGAENf.js';
|
|
10
10
|
import { S as SendInteractionParamsType, a as SendInteractionReturnType } from '../interaction-BngPoHA0.js';
|
|
11
11
|
import 'viem/chains';
|
|
12
12
|
import 'viem/siwe';
|
|
@@ -19,6 +19,7 @@ declare const NexusConfigContext: react.Context<Readonly<{
|
|
|
19
19
|
metadata: {
|
|
20
20
|
name: string;
|
|
21
21
|
css?: string;
|
|
22
|
+
buttonShare?: string;
|
|
22
23
|
};
|
|
23
24
|
domain: string;
|
|
24
25
|
}> | undefined>;
|
|
@@ -40,6 +41,7 @@ declare function NexusConfigProvider(parameters: PropsWithChildren<NexusConfigPr
|
|
|
40
41
|
metadata: {
|
|
41
42
|
name: string;
|
|
42
43
|
css?: string;
|
|
44
|
+
buttonShare?: string;
|
|
43
45
|
};
|
|
44
46
|
domain: string;
|
|
45
47
|
}> | undefined>>;
|
|
@@ -75,6 +77,7 @@ declare function useNexusConfig(): Readonly<{
|
|
|
75
77
|
metadata: {
|
|
76
78
|
name: string;
|
|
77
79
|
css?: string;
|
|
80
|
+
buttonShare?: string;
|
|
78
81
|
};
|
|
79
82
|
domain: string;
|
|
80
83
|
}>;
|
package/dist/react/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createIFrameNexusClient
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-VVF4NKYR.js";
|
|
4
4
|
import {
|
|
5
5
|
displayModal,
|
|
6
6
|
openSso,
|
|
@@ -9,16 +9,16 @@ import {
|
|
|
9
9
|
sendTransaction,
|
|
10
10
|
siweAuthenticate,
|
|
11
11
|
walletStatus
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-Q3SIIAX2.js";
|
|
13
13
|
import {
|
|
14
14
|
ClientNotFound,
|
|
15
15
|
FrakContextManager,
|
|
16
16
|
FrakRpcError,
|
|
17
17
|
RpcErrorCodes,
|
|
18
18
|
baseIframeProps
|
|
19
|
-
} from "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
19
|
+
} from "../chunk-ZQSA2VQ4.js";
|
|
20
|
+
import "../chunk-P4QEVLVV.js";
|
|
21
|
+
import "../chunk-H3T2GAEC.js";
|
|
22
22
|
|
|
23
23
|
// src/react/provider/NexusConfigProvider.ts
|
|
24
24
|
import { createContext, createElement } from "react";
|
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.22",
|
|
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",
|
|
@@ -28,20 +28,11 @@
|
|
|
28
28
|
"license": "GNU GPL 3.0",
|
|
29
29
|
"sideEffects": false,
|
|
30
30
|
"private": false,
|
|
31
|
-
"main": "dist/index.cjs",
|
|
32
|
-
"module": "dist/index.js",
|
|
33
|
-
"types": "dist/index.d.ts",
|
|
34
|
-
"typings": "dist/index.d.ts",
|
|
35
31
|
"type": "module",
|
|
36
32
|
"files": [
|
|
37
33
|
"/dist"
|
|
38
34
|
],
|
|
39
35
|
"exports": {
|
|
40
|
-
".": {
|
|
41
|
-
"types": "./dist/index.d.ts",
|
|
42
|
-
"import": "./dist/index.js",
|
|
43
|
-
"default": "./dist/index.cjs"
|
|
44
|
-
},
|
|
45
36
|
"./core": {
|
|
46
37
|
"types": "./dist/core/index.d.ts",
|
|
47
38
|
"import": "./dist/core/index.js",
|
|
@@ -83,7 +74,7 @@
|
|
|
83
74
|
"devDependencies": {
|
|
84
75
|
"@tanstack/react-query": ">=5.59.15",
|
|
85
76
|
"@types/node": "^22",
|
|
86
|
-
"tsup": "^8.3.
|
|
77
|
+
"tsup": "^8.3.4",
|
|
87
78
|
"typescript": "^5"
|
|
88
79
|
}
|
|
89
80
|
}
|