@frak-labs/nexus-sdk 0.0.21 → 0.0.23

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.
Files changed (34) hide show
  1. package/dist/{FrakContext-p0Jtv9gl.d.ts → FrakContext-CDVlUN75.d.ts} +1 -0
  2. package/dist/{FrakContext-BsezWx2F.d.cts → FrakContext-DBdWC7ls.d.cts} +1 -0
  3. package/dist/bundle/bundle.js +4 -4
  4. package/dist/{chunk-A3XYA7S7.cjs → chunk-4OJ2NPAS.cjs} +15 -15
  5. package/dist/{chunk-MDGMJ6EQ.js → chunk-4Q2OHGWX.js} +134 -25
  6. package/dist/{chunk-BSCR57ZI.cjs → chunk-BHZDDGW6.cjs} +148 -39
  7. package/dist/chunk-F3F4BCGV.cjs +860 -0
  8. package/dist/chunk-H3T2GAEC.js +79 -0
  9. package/dist/{chunk-TIKEZMSD.js → chunk-P4QEVLVV.js} +1 -1
  10. package/dist/chunk-QSXZKZJA.cjs +79 -0
  11. package/dist/{chunk-WXNW7ZMU.cjs → chunk-QYOOKB34.cjs} +20 -18
  12. package/dist/{chunk-ZZ7LUFNV.js → chunk-VVF4NKYR.js} +3 -1
  13. package/dist/chunk-ZQSA2VQ4.js +860 -0
  14. package/dist/core/actions/index.cjs +7 -5
  15. package/dist/core/actions/index.d.cts +45 -6
  16. package/dist/core/actions/index.d.ts +45 -6
  17. package/dist/core/actions/index.js +8 -6
  18. package/dist/core/index.cjs +4 -4
  19. package/dist/core/index.d.cts +5 -3
  20. package/dist/core/index.d.ts +5 -3
  21. package/dist/core/index.js +3 -3
  22. package/dist/core/interactions/index.cjs +3 -3
  23. package/dist/core/interactions/index.js +2 -2
  24. package/dist/{processReferral-YbCg90hu.d.cts → processReferral-BWSIamn2.d.cts} +1 -1
  25. package/dist/{processReferral-t3gUNwJu.d.ts → processReferral-CFyGAENf.d.ts} +1 -1
  26. package/dist/react/index.cjs +30 -30
  27. package/dist/react/index.d.cts +5 -2
  28. package/dist/react/index.d.ts +5 -2
  29. package/dist/react/index.js +11 -11
  30. package/package.json +2 -11
  31. package/dist/chunk-E527CMMJ.cjs +0 -294
  32. package/dist/chunk-HY6YATLS.js +0 -53
  33. package/dist/chunk-UFJ7W6CQ.cjs +0 -53
  34. package/dist/chunk-ZRPCX25Q.js +0 -294
@@ -8,11 +8,11 @@
8
8
 
9
9
 
10
10
 
11
- var _chunkBSCR57ZIcjs = require('../../chunk-BSCR57ZI.cjs');
12
- require('../../chunk-E527CMMJ.cjs');
13
- require('../../chunk-A3XYA7S7.cjs');
14
- require('../../chunk-UFJ7W6CQ.cjs');
15
11
 
12
+ var _chunkBHZDDGW6cjs = require('../../chunk-BHZDDGW6.cjs');
13
+ require('../../chunk-F3F4BCGV.cjs');
14
+ require('../../chunk-4OJ2NPAS.cjs');
15
+ require('../../chunk-QSXZKZJA.cjs');
16
16
 
17
17
 
18
18
 
@@ -22,4 +22,6 @@ require('../../chunk-UFJ7W6CQ.cjs');
22
22
 
23
23
 
24
24
 
25
- exports.displayModal = _chunkBSCR57ZIcjs.displayModal; exports.openSso = _chunkBSCR57ZIcjs.openSso; exports.processReferral = _chunkBSCR57ZIcjs.processReferral; exports.referralInteraction = _chunkBSCR57ZIcjs.referralInteraction; exports.sendInteraction = _chunkBSCR57ZIcjs.sendInteraction; exports.sendTransaction = _chunkBSCR57ZIcjs.sendTransaction; exports.siweAuthenticate = _chunkBSCR57ZIcjs.siweAuthenticate; exports.walletStatus = _chunkBSCR57ZIcjs.walletStatus; exports.watchWalletStatus = _chunkBSCR57ZIcjs.watchWalletStatus;
25
+
26
+
27
+ exports.displayModal = _chunkBHZDDGW6cjs.displayModal; exports.modalBuilder = _chunkBHZDDGW6cjs.modalBuilder; exports.openSso = _chunkBHZDDGW6cjs.openSso; exports.processReferral = _chunkBHZDDGW6cjs.processReferral; exports.referralInteraction = _chunkBHZDDGW6cjs.referralInteraction; exports.sendInteraction = _chunkBHZDDGW6cjs.sendInteraction; exports.sendTransaction = _chunkBHZDDGW6cjs.sendTransaction; exports.siweAuthenticate = _chunkBHZDDGW6cjs.siweAuthenticate; exports.trackPurchaseStatus = _chunkBHZDDGW6cjs.trackPurchaseStatus; exports.watchWalletStatus = _chunkBHZDDGW6cjs.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-BsezWx2F.cjs';
1
+ import { a as NexusClient, W as WalletStatusReturnType, M as ModalStepTypes, D as DisplayModalParamsType, d as ModalRpcStepsResultType, O as OpenSsoParamsType, j as SendTransactionModalStepType, n as FinalModalStepType, o as FinalActionType, L as LoginModalStepType, m as OpenInteractionSessionModalStepType, b as ModalRpcMetadata } from '../../FrakContext-DBdWC7ls.cjs';
2
2
  import { S as SendInteractionParamsType, a as SendInteractionReturnType } from '../../interaction-BngPoHA0.cjs';
3
- import { P as ProcessReferralOptions } from '../../processReferral-YbCg90hu.cjs';
4
- export { S as SendTransactionParams, a as SiweAuthenticateModalParams, p as processReferral, b as sendTransaction, s as siweAuthenticate } from '../../processReferral-YbCg90hu.cjs';
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';
@@ -11,7 +11,7 @@ import 'viem/siwe';
11
11
  * @param client
12
12
  * @param callback
13
13
  */
14
- declare function watchWalletStatus(client: NexusClient, callback: (status: WalletStatusReturnType) => void): Promise<void>;
14
+ declare function watchWalletStatus(client: NexusClient, callback?: (status: WalletStatusReturnType) => void): Promise<WalletStatusReturnType>;
15
15
 
16
16
  /**
17
17
  * Function used to send an interaction
@@ -36,7 +36,46 @@ declare function displayModal<T extends ModalStepTypes[] = ModalStepTypes[]>(cli
36
36
  */
37
37
  declare function openSso(client: NexusClient, args: OpenSsoParamsType): Promise<void>;
38
38
 
39
- declare function walletStatus(client: NexusClient, callback?: (status: WalletStatusReturnType) => void): Promise<WalletStatusReturnType>;
39
+ /**
40
+ * Function used to track the status of a purchase
41
+ */
42
+ declare function trackPurchaseStatus(args: {
43
+ customerId: string | number;
44
+ orderId: string | number;
45
+ token: string;
46
+ }): Promise<void>;
47
+
48
+ /**
49
+ * Represent the type of the modal step builder
50
+ */
51
+ type ModalStepBuilder<Steps extends ModalStepTypes[] = ModalStepTypes[]> = {
52
+ params: DisplayModalParamsType<Steps>;
53
+ sendTx: (options: SendTransactionModalStepType["params"]) => ModalStepBuilder<[...Steps, SendTransactionModalStepType]>;
54
+ reward: (options?: Omit<FinalModalStepType["params"], "action">) => ModalStepBuilder<[...Steps, FinalModalStepType]>;
55
+ sharing: (sharingOptions?: Extract<FinalActionType, {
56
+ key: "sharing";
57
+ }>["options"], options?: Omit<FinalModalStepType["params"], "action">) => ModalStepBuilder<[...Steps, FinalModalStepType]>;
58
+ display: () => Promise<ModalRpcStepsResultType<Steps>>;
59
+ };
60
+ /**
61
+ * Represent the output type of the modal builder
62
+ */
63
+ type ModalBuilder = ModalStepBuilder<[
64
+ LoginModalStepType,
65
+ OpenInteractionSessionModalStepType
66
+ ]>;
67
+ /**
68
+ * Simple modal builder params builder
69
+ * @param client
70
+ * @param metadata
71
+ * @param login
72
+ * @param openSession
73
+ */
74
+ declare function modalBuilder(client: NexusClient, { metadata, login, openSession, }: {
75
+ metadata: ModalRpcMetadata;
76
+ login?: LoginModalStepType["params"];
77
+ openSession?: OpenInteractionSessionModalStepType["params"];
78
+ }): ModalBuilder;
40
79
 
41
80
  declare function referralInteraction(client: NexusClient, { productId, modalConfig, options, }?: {
42
81
  productId?: Hex;
@@ -44,4 +83,4 @@ declare function referralInteraction(client: NexusClient, { productId, modalConf
44
83
  options?: ProcessReferralOptions;
45
84
  }): Promise<unknown>;
46
85
 
47
- export { displayModal, openSso, referralInteraction, sendInteraction, walletStatus, watchWalletStatus };
86
+ export { type ModalBuilder, type ModalStepBuilder, displayModal, modalBuilder, openSso, referralInteraction, sendInteraction, trackPurchaseStatus, 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-p0Jtv9gl.js';
1
+ import { a as NexusClient, W as WalletStatusReturnType, M as ModalStepTypes, D as DisplayModalParamsType, d as ModalRpcStepsResultType, O as OpenSsoParamsType, j as SendTransactionModalStepType, n as FinalModalStepType, o as FinalActionType, L as LoginModalStepType, m as OpenInteractionSessionModalStepType, b as ModalRpcMetadata } from '../../FrakContext-CDVlUN75.js';
2
2
  import { S as SendInteractionParamsType, a as SendInteractionReturnType } from '../../interaction-BngPoHA0.js';
3
- import { P as ProcessReferralOptions } from '../../processReferral-t3gUNwJu.js';
4
- export { S as SendTransactionParams, a as SiweAuthenticateModalParams, p as processReferral, b as sendTransaction, s as siweAuthenticate } from '../../processReferral-t3gUNwJu.js';
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';
@@ -11,7 +11,7 @@ import 'viem/siwe';
11
11
  * @param client
12
12
  * @param callback
13
13
  */
14
- declare function watchWalletStatus(client: NexusClient, callback: (status: WalletStatusReturnType) => void): Promise<void>;
14
+ declare function watchWalletStatus(client: NexusClient, callback?: (status: WalletStatusReturnType) => void): Promise<WalletStatusReturnType>;
15
15
 
16
16
  /**
17
17
  * Function used to send an interaction
@@ -36,7 +36,46 @@ declare function displayModal<T extends ModalStepTypes[] = ModalStepTypes[]>(cli
36
36
  */
37
37
  declare function openSso(client: NexusClient, args: OpenSsoParamsType): Promise<void>;
38
38
 
39
- declare function walletStatus(client: NexusClient, callback?: (status: WalletStatusReturnType) => void): Promise<WalletStatusReturnType>;
39
+ /**
40
+ * Function used to track the status of a purchase
41
+ */
42
+ declare function trackPurchaseStatus(args: {
43
+ customerId: string | number;
44
+ orderId: string | number;
45
+ token: string;
46
+ }): Promise<void>;
47
+
48
+ /**
49
+ * Represent the type of the modal step builder
50
+ */
51
+ type ModalStepBuilder<Steps extends ModalStepTypes[] = ModalStepTypes[]> = {
52
+ params: DisplayModalParamsType<Steps>;
53
+ sendTx: (options: SendTransactionModalStepType["params"]) => ModalStepBuilder<[...Steps, SendTransactionModalStepType]>;
54
+ reward: (options?: Omit<FinalModalStepType["params"], "action">) => ModalStepBuilder<[...Steps, FinalModalStepType]>;
55
+ sharing: (sharingOptions?: Extract<FinalActionType, {
56
+ key: "sharing";
57
+ }>["options"], options?: Omit<FinalModalStepType["params"], "action">) => ModalStepBuilder<[...Steps, FinalModalStepType]>;
58
+ display: () => Promise<ModalRpcStepsResultType<Steps>>;
59
+ };
60
+ /**
61
+ * Represent the output type of the modal builder
62
+ */
63
+ type ModalBuilder = ModalStepBuilder<[
64
+ LoginModalStepType,
65
+ OpenInteractionSessionModalStepType
66
+ ]>;
67
+ /**
68
+ * Simple modal builder params builder
69
+ * @param client
70
+ * @param metadata
71
+ * @param login
72
+ * @param openSession
73
+ */
74
+ declare function modalBuilder(client: NexusClient, { metadata, login, openSession, }: {
75
+ metadata: ModalRpcMetadata;
76
+ login?: LoginModalStepType["params"];
77
+ openSession?: OpenInteractionSessionModalStepType["params"];
78
+ }): ModalBuilder;
40
79
 
41
80
  declare function referralInteraction(client: NexusClient, { productId, modalConfig, options, }?: {
42
81
  productId?: Hex;
@@ -44,4 +83,4 @@ declare function referralInteraction(client: NexusClient, { productId, modalConf
44
83
  options?: ProcessReferralOptions;
45
84
  }): Promise<unknown>;
46
85
 
47
- export { displayModal, openSso, referralInteraction, sendInteraction, walletStatus, watchWalletStatus };
86
+ export { type ModalBuilder, type ModalStepBuilder, displayModal, modalBuilder, openSso, referralInteraction, sendInteraction, trackPurchaseStatus, watchWalletStatus };
@@ -1,25 +1,27 @@
1
1
  import {
2
2
  displayModal,
3
+ modalBuilder,
3
4
  openSso,
4
5
  processReferral,
5
6
  referralInteraction,
6
7
  sendInteraction,
7
8
  sendTransaction,
8
9
  siweAuthenticate,
9
- walletStatus,
10
+ trackPurchaseStatus,
10
11
  watchWalletStatus
11
- } from "../../chunk-MDGMJ6EQ.js";
12
- import "../../chunk-ZRPCX25Q.js";
13
- import "../../chunk-TIKEZMSD.js";
14
- import "../../chunk-HY6YATLS.js";
12
+ } from "../../chunk-4Q2OHGWX.js";
13
+ import "../../chunk-ZQSA2VQ4.js";
14
+ import "../../chunk-P4QEVLVV.js";
15
+ import "../../chunk-H3T2GAEC.js";
15
16
  export {
16
17
  displayModal,
18
+ modalBuilder,
17
19
  openSso,
18
20
  processReferral,
19
21
  referralInteraction,
20
22
  sendInteraction,
21
23
  sendTransaction,
22
24
  siweAuthenticate,
23
- walletStatus,
25
+ trackPurchaseStatus,
24
26
  watchWalletStatus
25
27
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkWXNW7ZMUcjs = require('../chunk-WXNW7ZMU.cjs');
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 _chunkE527CMMJcjs = require('../chunk-E527CMMJ.cjs');
14
+ var _chunkF3F4BCGVcjs = require('../chunk-F3F4BCGV.cjs');
15
15
 
16
16
 
17
17
 
18
18
 
19
- var _chunkUFJ7W6CQcjs = require('../chunk-UFJ7W6CQ.cjs');
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 = _chunkE527CMMJcjs.Deferred; exports.FrakContextManager = _chunkE527CMMJcjs.FrakContextManager; exports.FrakRpcError = _chunkE527CMMJcjs.FrakRpcError; exports.RpcErrorCodes = _chunkE527CMMJcjs.RpcErrorCodes; exports.compressJson = _chunkE527CMMJcjs.compressJson; exports.createIFrameNexusClient = _chunkWXNW7ZMUcjs.createIFrameNexusClient; exports.createIframe = _chunkE527CMMJcjs.createIframe; exports.decompressDataAndCheckHash = _chunkE527CMMJcjs.decompressDataAndCheckHash; exports.decompressJson = _chunkE527CMMJcjs.decompressJson; exports.hashAndCompressData = _chunkE527CMMJcjs.hashAndCompressData; exports.interactionTypes = _chunkUFJ7W6CQcjs.interactionTypes; exports.productTypes = _chunkUFJ7W6CQcjs.productTypes; exports.productTypesMask = _chunkUFJ7W6CQcjs.productTypesMask;
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;
@@ -1,5 +1,5 @@
1
- import { N as NexusWalletSdkConfig, a as NexusClient, F as FrakContext } from '../FrakContext-BsezWx2F.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-BsezWx2F.cjs';
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
  /**
@@ -1,5 +1,5 @@
1
- import { N as NexusWalletSdkConfig, a as NexusClient, F as FrakContext } from '../FrakContext-p0Jtv9gl.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-p0Jtv9gl.js';
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
  /**
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createIFrameNexusClient
3
- } from "../chunk-ZZ7LUFNV.js";
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-ZRPCX25Q.js";
14
+ } from "../chunk-ZQSA2VQ4.js";
15
15
  import {
16
16
  interactionTypes,
17
17
  productTypes,
18
18
  productTypesMask
19
- } from "../chunk-HY6YATLS.js";
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 _chunkA3XYA7S7cjs = require('../../chunk-A3XYA7S7.cjs');
7
- require('../../chunk-UFJ7W6CQ.cjs');
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 = _chunkA3XYA7S7cjs.PressInteractionEncoder; exports.PurchaseInteractionEncoder = _chunkA3XYA7S7cjs.PurchaseInteractionEncoder; exports.ReferralInteractionEncoder = _chunkA3XYA7S7cjs.ReferralInteractionEncoder; exports.WebShopInteractionEncoder = _chunkA3XYA7S7cjs.WebShopInteractionEncoder;
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-TIKEZMSD.js";
7
- import "../../chunk-HY6YATLS.js";
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-BsezWx2F.cjs';
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-p0Jtv9gl.js';
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
  /**
@@ -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 _chunkWXNW7ZMUcjs = require('../chunk-WXNW7ZMU.cjs');
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 _chunkBSCR57ZIcjs = require('../chunk-BSCR57ZI.cjs');
12
+ var _chunkBHZDDGW6cjs = require('../chunk-BHZDDGW6.cjs');
13
13
 
14
14
 
15
15
 
16
16
 
17
17
 
18
18
 
19
- var _chunkE527CMMJcjs = require('../chunk-E527CMMJ.cjs');
20
- require('../chunk-A3XYA7S7.cjs');
21
- require('../chunk-UFJ7W6CQ.cjs');
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, _chunkE527CMMJcjs.FrakRpcError)(
54
- _chunkE527CMMJcjs.RpcErrorCodes.configError,
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, _chunkE527CMMJcjs.ClientNotFound)();
88
+ throw new (0, _chunkF3F4BCGVcjs.ClientNotFound)();
89
89
  }
90
- return _chunkBSCR57ZIcjs.walletStatus.call(void 0, client, newStatusUpdated);
90
+ return _chunkBHZDDGW6cjs.watchWalletStatus.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, _chunkE527CMMJcjs.ClientNotFound)();
107
+ throw new (0, _chunkF3F4BCGVcjs.ClientNotFound)();
108
108
  }
109
- return _chunkBSCR57ZIcjs.sendTransaction.call(void 0, client, params);
109
+ return _chunkBHZDDGW6cjs.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, _chunkE527CMMJcjs.ClientNotFound)();
129
+ throw new (0, _chunkF3F4BCGVcjs.ClientNotFound)();
130
130
  }
131
- return _chunkBSCR57ZIcjs.siweAuthenticate.call(void 0, client, params);
131
+ return _chunkBHZDDGW6cjs.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 _chunkE527CMMJcjs.FrakContextManager.parse({ url: location.href });
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
- _chunkE527CMMJcjs.FrakContextManager.replaceUrl({
189
+ _chunkF3F4BCGVcjs.FrakContextManager.replaceUrl({
190
190
  url: _optionalChain([location, 'optionalAccess', _9 => _9.href]),
191
191
  context: newContext
192
192
  });
@@ -207,7 +207,7 @@ function useReferralInteraction({
207
207
  } = {}) {
208
208
  const client = useNexusClient();
209
209
  const { frakContext } = useFrakContext();
210
- const { data: walletStatus2 } = useWalletStatus();
210
+ const { data: walletStatus } = useWalletStatus();
211
211
  const {
212
212
  data: referralState,
213
213
  error,
@@ -219,22 +219,22 @@ function useReferralInteraction({
219
219
  "nexus-sdk",
220
220
  "auto-referral-interaction",
221
221
  _nullishCoalesce(_optionalChain([frakContext, 'optionalAccess', _11 => _11.r]), () => ( "no-referrer")),
222
- _nullishCoalesce(_optionalChain([walletStatus2, 'optionalAccess', _12 => _12.key]), () => ( "no-wallet-status")),
222
+ _nullishCoalesce(_optionalChain([walletStatus, 'optionalAccess', _12 => _12.key]), () => ( "no-wallet-status")),
223
223
  _nullishCoalesce(productId, () => ( "no-product-id"))
224
224
  ],
225
225
  queryFn: () => {
226
226
  if (!client) {
227
- throw new (0, _chunkE527CMMJcjs.ClientNotFound)();
227
+ throw new (0, _chunkF3F4BCGVcjs.ClientNotFound)();
228
228
  }
229
- return _chunkBSCR57ZIcjs.processReferral.call(void 0, client, {
230
- walletStatus: walletStatus2,
229
+ return _chunkBHZDDGW6cjs.processReferral.call(void 0, client, {
230
+ walletStatus,
231
231
  frakContext,
232
232
  modalConfig,
233
233
  productId,
234
234
  options
235
235
  });
236
236
  },
237
- enabled: !!walletStatus2
237
+ enabled: !!walletStatus
238
238
  });
239
239
  return _react.useMemo.call(void 0, () => {
240
240
  if (status === "pending") return "processing";
@@ -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, _chunkE527CMMJcjs.ClientNotFound)();
257
+ throw new (0, _chunkF3F4BCGVcjs.ClientNotFound)();
258
258
  }
259
- return _chunkBSCR57ZIcjs.sendInteraction.call(void 0, client, params);
259
+ return _chunkBHZDDGW6cjs.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, _chunkE527CMMJcjs.ClientNotFound)();
275
+ throw new (0, _chunkF3F4BCGVcjs.ClientNotFound)();
276
276
  }
277
- return _chunkBSCR57ZIcjs.displayModal.call(void 0, client, args);
277
+ return _chunkBHZDDGW6cjs.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, _chunkE527CMMJcjs.ClientNotFound)();
291
+ throw new (0, _chunkF3F4BCGVcjs.ClientNotFound)();
292
292
  }
293
- return _chunkBSCR57ZIcjs.openSso.call(void 0, client, params);
293
+ return _chunkBHZDDGW6cjs.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
- ..._chunkE527CMMJcjs.baseIframeProps,
309
+ ..._chunkF3F4BCGVcjs.baseIframeProps,
310
310
  src: `${config.walletUrl}/listener`,
311
- style: _nullishCoalesce(style, () => ( _chunkE527CMMJcjs.baseIframeProps.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
- _chunkWXNW7ZMUcjs.createIFrameNexusClient.call(void 0, {
317
+ _chunkQYOOKB34cjs.createIFrameNexusClient.call(void 0, {
318
318
  iframe,
319
319
  config
320
320
  })
@@ -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-BsezWx2F.cjs';
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-YbCg90hu.cjs';
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
  }>;
@@ -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-p0Jtv9gl.js';
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-t3gUNwJu.js';
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
  }>;