@frak-labs/core-sdk 0.1.0-beta.afa252b0 → 0.1.0-beta.b0bd1f8a
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/cdn/bundle.iife.js +14 -0
- package/dist/actions-CEEObPYc.js +1 -0
- package/dist/actions-DbQhWYx8.cjs +1 -0
- package/dist/actions.cjs +1 -1
- package/dist/actions.d.cts +3 -1481
- package/dist/actions.d.ts +3 -1481
- package/dist/actions.js +1 -1
- package/dist/bundle.cjs +1 -13
- package/dist/bundle.d.cts +6 -2087
- package/dist/bundle.d.ts +6 -2087
- package/dist/bundle.js +1 -13
- package/dist/index-7OZ39x1U.d.ts +195 -0
- package/dist/index-C6FxkWPC.d.cts +511 -0
- package/dist/index-UFX7xCg3.d.ts +351 -0
- package/dist/index-d8xS4ryI.d.ts +511 -0
- package/dist/index-p4FqSp8z.d.cts +351 -0
- package/dist/index-zDq-VlKx.d.cts +195 -0
- package/dist/index.cjs +1 -13
- package/dist/index.d.cts +4 -1387
- package/dist/index.d.ts +4 -1387
- package/dist/index.js +1 -13
- package/dist/interaction-DMJ3ZfaF.d.cts +45 -0
- package/dist/interaction-KX1h9a7V.d.ts +45 -0
- package/dist/interactions-DnfM3oe0.js +1 -0
- package/dist/interactions-EIXhNLf6.cjs +1 -0
- package/dist/interactions.cjs +1 -1
- package/dist/interactions.d.cts +2 -182
- package/dist/interactions.d.ts +2 -182
- package/dist/interactions.js +1 -1
- package/dist/openSso-D--Airj6.d.cts +1018 -0
- package/dist/openSso-DsKJ4y0j.d.ts +1018 -0
- package/dist/productTypes-BUkXJKZ7.cjs +1 -0
- package/dist/productTypes-CGb1MmBF.js +1 -0
- package/dist/src-B_xO0AR6.cjs +13 -0
- package/dist/src-D2d52OZa.js +13 -0
- package/dist/trackEvent-CHnYa85W.js +1 -0
- package/dist/trackEvent-GuQm_1Nm.cjs +1 -0
- package/package.json +23 -18
- package/src/actions/displayEmbeddedWallet.test.ts +194 -0
- package/src/actions/displayEmbeddedWallet.ts +20 -0
- package/src/actions/displayModal.test.ts +387 -0
- package/src/actions/displayModal.ts +131 -0
- package/src/actions/getProductInformation.test.ts +133 -0
- package/src/actions/getProductInformation.ts +14 -0
- package/src/actions/index.ts +29 -0
- package/src/actions/openSso.test.ts +407 -0
- package/src/actions/openSso.ts +116 -0
- package/src/actions/prepareSso.test.ts +223 -0
- package/src/actions/prepareSso.ts +48 -0
- package/src/actions/referral/processReferral.ts +230 -0
- package/src/actions/referral/referralInteraction.ts +57 -0
- package/src/actions/sendInteraction.test.ts +219 -0
- package/src/actions/sendInteraction.ts +32 -0
- package/src/actions/trackPurchaseStatus.test.ts +287 -0
- package/src/actions/trackPurchaseStatus.ts +53 -0
- package/src/actions/watchWalletStatus.test.ts +372 -0
- package/src/actions/watchWalletStatus.ts +94 -0
- package/src/actions/wrapper/modalBuilder.ts +212 -0
- package/src/actions/wrapper/sendTransaction.ts +62 -0
- package/src/actions/wrapper/siweAuthenticate.ts +94 -0
- package/src/bundle.ts +3 -0
- package/src/clients/DebugInfo.ts +182 -0
- package/src/clients/createIFrameFrakClient.ts +287 -0
- package/src/clients/index.ts +3 -0
- package/src/clients/setupClient.test.ts +343 -0
- package/src/clients/setupClient.ts +73 -0
- package/src/clients/transports/iframeLifecycleManager.test.ts +399 -0
- package/src/clients/transports/iframeLifecycleManager.ts +90 -0
- package/src/constants/interactionTypes.ts +44 -0
- package/src/constants/locales.ts +14 -0
- package/src/constants/productTypes.ts +33 -0
- package/src/index.ts +101 -0
- package/src/interactions/index.ts +5 -0
- package/src/interactions/pressEncoder.test.ts +215 -0
- package/src/interactions/pressEncoder.ts +53 -0
- package/src/interactions/purchaseEncoder.test.ts +291 -0
- package/src/interactions/purchaseEncoder.ts +99 -0
- package/src/interactions/referralEncoder.test.ts +170 -0
- package/src/interactions/referralEncoder.ts +47 -0
- package/src/interactions/retailEncoder.test.ts +107 -0
- package/src/interactions/retailEncoder.ts +37 -0
- package/src/interactions/webshopEncoder.test.ts +56 -0
- package/src/interactions/webshopEncoder.ts +30 -0
- package/src/types/client.ts +14 -0
- package/src/types/compression.ts +22 -0
- package/src/types/config.ts +111 -0
- package/src/types/context.ts +13 -0
- package/src/types/index.ts +71 -0
- package/src/types/lifecycle/client.ts +46 -0
- package/src/types/lifecycle/iframe.ts +35 -0
- package/src/types/lifecycle/index.ts +2 -0
- package/src/types/rpc/displayModal.ts +84 -0
- package/src/types/rpc/embedded/index.ts +68 -0
- package/src/types/rpc/embedded/loggedIn.ts +55 -0
- package/src/types/rpc/embedded/loggedOut.ts +28 -0
- package/src/types/rpc/interaction.ts +43 -0
- package/src/types/rpc/modal/final.ts +46 -0
- package/src/types/rpc/modal/generic.ts +46 -0
- package/src/types/rpc/modal/index.ts +20 -0
- package/src/types/rpc/modal/login.ts +32 -0
- package/src/types/rpc/modal/openSession.ts +25 -0
- package/src/types/rpc/modal/siweAuthenticate.ts +37 -0
- package/src/types/rpc/modal/transaction.ts +33 -0
- package/src/types/rpc/productInformation.ts +59 -0
- package/src/types/rpc/sso.ts +80 -0
- package/src/types/rpc/walletStatus.ts +35 -0
- package/src/types/rpc.ts +158 -0
- package/src/types/transport.ts +34 -0
- package/src/utils/FrakContext.test.ts +407 -0
- package/src/utils/FrakContext.ts +158 -0
- package/src/utils/compression/b64.test.ts +181 -0
- package/src/utils/compression/b64.ts +29 -0
- package/src/utils/compression/compress.test.ts +123 -0
- package/src/utils/compression/compress.ts +11 -0
- package/src/utils/compression/decompress.test.ts +145 -0
- package/src/utils/compression/decompress.ts +11 -0
- package/src/utils/compression/index.ts +3 -0
- package/src/utils/computeProductId.test.ts +80 -0
- package/src/utils/computeProductId.ts +11 -0
- package/src/utils/constants.test.ts +23 -0
- package/src/utils/constants.ts +4 -0
- package/src/utils/formatAmount.test.ts +113 -0
- package/src/utils/formatAmount.ts +18 -0
- package/src/utils/getCurrencyAmountKey.test.ts +44 -0
- package/src/utils/getCurrencyAmountKey.ts +15 -0
- package/src/utils/getSupportedCurrency.test.ts +51 -0
- package/src/utils/getSupportedCurrency.ts +14 -0
- package/src/utils/getSupportedLocale.test.ts +64 -0
- package/src/utils/getSupportedLocale.ts +16 -0
- package/src/utils/iframeHelper.test.ts +450 -0
- package/src/utils/iframeHelper.ts +143 -0
- package/src/utils/index.ts +21 -0
- package/src/utils/sso.test.ts +361 -0
- package/src/utils/sso.ts +119 -0
- package/src/utils/ssoUrlListener.ts +60 -0
- package/src/utils/trackEvent.test.ts +162 -0
- package/src/utils/trackEvent.ts +26 -0
- package/cdn/bundle.js +0 -19
- package/cdn/bundle.js.LICENSE.txt +0 -10
package/dist/index.js
CHANGED
|
@@ -1,13 +1 @@
|
|
|
1
|
-
import{
|
|
2
|
-
Debug Information:
|
|
3
|
-
-----------------
|
|
4
|
-
Timestamp: ${t.timestamp}
|
|
5
|
-
URL: ${t.encodedUrl}
|
|
6
|
-
Config: ${t.encodedConfig}
|
|
7
|
-
Navigator Info: ${t.navigatorInfo}
|
|
8
|
-
IFrame Status: ${t.iframeStatus}
|
|
9
|
-
Last Request: ${t.lastRequest}
|
|
10
|
-
Last Response: ${t.lastResponse}
|
|
11
|
-
Client Status: ${t.clientStatus}
|
|
12
|
-
Error: ${t.error}
|
|
13
|
-
`.trim()}}let f={id:"frak-wallet",name:"frak-wallet",title:"Frak Wallet",allow:"publickey-credentials-get *; clipboard-write; web-share *",style:{width:"0",height:"0",border:"0",position:"absolute",zIndex:2000001,top:"-1000px",left:"-1000px",colorScheme:"auto"}};function p({walletBaseUrl:e,config:t}){let n=document.querySelector("#frak-wallet");n&&n.remove();let r=document.createElement("iframe");return r.id=f.id,r.name=f.name,r.allow=f.allow,r.style.zIndex=f.style.zIndex.toString(),m({iframe:r,isVisible:!1}),document.body.appendChild(r),new Promise(n=>{r?.addEventListener("load",()=>n(r)),r.src=`${t?.walletUrl??e??"https://wallet.frak.id"}/listener`})}function m({iframe:e,isVisible:t}){if(!t){e.style.width="0",e.style.height="0",e.style.border="0",e.style.position="fixed",e.style.top="-1000px",e.style.left="-1000px";return}e.style.position="fixed",e.style.top="0",e.style.left="0",e.style.width="100%",e.style.height="100%",e.style.pointerEvents="auto"}function g(e="/listener"){if(!window.opener)return null;let t=t=>{try{return t.location.origin===window.location.origin&&t.location.pathname===e}catch{return!1}};try{let e=window.opener.frames;for(let n=0;n<e.length;n++)if(t(e[n]))return e[n];return null}catch(t){return console.error(`[findIframeInOpener] Error finding iframe with pathname ${e}:`,t),null}}function h({config:r,iframe:o}){let c,l=r?.walletUrl??"https://wallet.frak.id",f=function({iframe:t}){let n=new e;return{handleEvent:async e=>{if(!("iframeLifecycle"in e))return;let{iframeLifecycle:r,data:a}=e;switch(r){case"connected":n.resolve(!0);break;case"do-backup":a.backup?localStorage.setItem(d,a.backup):localStorage.removeItem(d);break;case"remove-backup":localStorage.removeItem(d);break;case"show":case"hide":m({iframe:t,isVisible:"show"===r});break;case"handshake":t.contentWindow?.postMessage({clientLifecycle:"handshake-response",data:{token:a.token,currentUrl:window.location.href}},"*");break;case"redirect":{let e=new URL(a.baseRedirectUrl);e.searchParams.has("u")?(e.searchParams.delete("u"),e.searchParams.append("u",window.location.href),window.location.href=e.toString()):window.location.href=a.baseRedirectUrl}}},isConnected:n.promise}}({iframe:o}),p=new u(r,o);if(!o.contentWindow)throw new t(n.configError,"The iframe does not have a content window");let g=a({emittingTransport:o.contentWindow,listeningTransport:window,targetOrigin:l,middleware:[{async onRequest(e,r){if(!await f.isConnected)throw new t(n.clientNotConnected,"The iframe provider isn't connected yet");return r}},i(),{onRequest:(e,t)=>(p.setLastRequest(e),t),onResponse:(e,t)=>(p.setLastResponse(e,t),t)}],lifecycleHandlers:{iframeLifecycle:async(e,t)=>{await f.handleEvent(e)}}}),h=function(e,t){let n,r,a=()=>e.sendLifecycle({clientLifecycle:"heartbeat"});function o(){n&&clearInterval(n),r&&clearTimeout(r)}return async function(){a(),n=setInterval(a,1e3),r=setTimeout(()=>{o(),console.log("Heartbeat timeout: connection failed")},3e4),await t.isConnected,o()}(),o}(g,f),y=async()=>{h(),g.cleanup(),o.remove()};console.log("[Frak SDK] Initializing OpenPanel"),(c=new s({apiUrl:"https://op-api.gcp.frak.id",clientId:"6eacc8d7-49ac-4936-95e9-81ef29449570",trackScreenViews:!0,trackOutgoingLinks:!0,trackAttributes:!1,filter:({type:e,payload:t})=>!("track"===e&&t?.properties)||("sdkVersion"in t.properties||(t.properties={...t.properties,sdkVersion:"0.1.0"}),!0)})).setGlobalProperties({sdkVersion:"0.1.0"}),c.init();let b=w({config:r,rpcClient:g,lifecycleManager:f}).then(()=>p.updateSetupStatus(!0));return{config:r,debugInfo:p,waitForConnection:f.isConnected,waitForSetup:b,request:g.request,listenerRequest:g.listen,destroy:y,openPanel:c}}async function w({config:e,rpcClient:t,lifecycleManager:n}){async function r(){let n=e.customizations?.css;n&&t.sendLifecycle({clientLifecycle:"modal-css",data:{cssLink:n}})}async function a(){let n=e.customizations?.i18n;n&&t.sendLifecycle({clientLifecycle:"modal-i18n",data:{i18n:n}})}async function o(){if("undefined"==typeof window)return;let e=window.localStorage.getItem(d);e&&t.sendLifecycle({clientLifecycle:"restore-backup",data:{backup:e}})}await n.isConnected,function(e,t){if("undefined"==typeof window)return;let n=new URL(window.location.href),r=n.searchParams.get("sso");r&&(t.then(()=>{e.sendLifecycle({clientLifecycle:"sso-redirect-complete",data:{compressed:r}}),console.log("[SSO URL Listener] Forwarded compressed SSO data to iframe")}).catch(e=>{console.error("[SSO URL Listener] Failed to forward SSO data:",e)}),n.searchParams.delete("sso"),window.history.replaceState({},"",n.toString()),console.log("[SSO URL Listener] SSO parameter detected and URL cleaned"))}(t,n.isConnected),await Promise.allSettled([r(),a(),o()])}let y={eur:"fr-FR",usd:"en-US",gbp:"en-GB"};function b(e){return e&&e in y?e:"eur"}async function S({config:e}){let t=function(e){let t=b(e.metadata?.currency);return{...e,metadata:{...e.metadata,currency:t}}}(e),n=await p({config:t});if(!n)return void console.error("Failed to create iframe");let r=h({config:t,iframe:n});return(await r.waitForSetup,await r.waitForConnection)?r:void console.error("Failed to connect to client")}function k(e){return btoa(Array.from(e,e=>String.fromCharCode(e)).join("")).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function L(e){let t=e.length%4;return Uint8Array.from(atob(e.replace(/-/g,"+").replace(/_/g,"/").padEnd(e.length+(0===t?0:4-t),"=")),e=>e.charCodeAt(0))}function R(e){return k(r(e))}function v(e){return o(L(e))}let I="fCtx";function x(e){if(e?.r)try{let t=l(e.r);return k(t)}catch(t){console.error("Error compressing Frak context",{e:t,context:e})}}function U(e){if(e&&0!==e.length)try{let t=L(e);return{r:c(t,{size:20})}}catch(t){console.error("Error decompressing Frak context",{e:t,context:e})}}function F({url:e}){if(!e)return null;let t=new URL(e).searchParams.get(I);return t?U(t):null}function C({url:e,context:t}){if(!e)return null;let n=F({url:e}),r=n?{...n,...t}:t;if(!r.r)return null;let a=x(r);if(!a)return null;let o=new URL(e);return o.searchParams.set(I,a),o.toString()}function E(e){let t=new URL(e);return t.searchParams.delete(I),t.toString()}let P={compress:x,decompress:U,parse:F,update:C,remove:E,replaceUrl:function({url:e,context:t}){let n;if(!window.location?.href||"undefined"==typeof window)return void console.error("No window found, can't update context");let r=e??window.location.href;(n=null!==t?C({url:r,context:t}):E(r))&&window.history.replaceState(null,"",n.toString())}};function q(e){return e?y[e]??y.eur:y.eur}function D(e){return e?`${e}Amount`:"eurAmount"}function $(e,t){let n=q(t),r=b(t);return e.toLocaleString(n,{style:"currency",currency:r,minimumFractionDigits:0,maximumFractionDigits:2})}function O(e,t,n={}){if(!e)return void console.debug("[Frak] No client provided, skipping event tracking");try{e.openPanel?.track(t,n)}catch(e){console.debug("[Frak] Failed to track event:",t,e)}}function A(e,t,n,r,a){var o;let i=R({r:(o={redirectUrl:t.redirectUrl,directExit:t.directExit,lang:t.lang,productId:n,metadata:{name:r,css:a,logoUrl:t.metadata?.logoUrl,homepageLink:t.metadata?.homepageLink}}).redirectUrl,d:o.directExit,l:o.lang,p:o.productId,m:{n:o.metadata?.name,css:o.metadata?.css,l:o.metadata?.logoUrl,h:o.metadata?.homepageLink}}),s=new URL(e);return s.pathname="/sso",s.searchParams.set("p",i),s.toString()}let T={dapp:1,press:2,webshop:3,retail:4,referral:30,purchase:31},N=Object.entries(T).reduce((e,[t,n])=>(e[t]=BigInt(1)<<BigInt(n),e),{}),V={press:{openArticle:"0xc0a24ffb",readArticle:"0xd5bd0fbe"},dapp:{proofVerifiableStorageUpdate:"0x2ab2aeef",callableVerifiableStorageUpdate:"0xa07da986"},webshop:{open:"0xb311798f"},referral:{referred:"0x010cc3b9",createLink:"0xb2c0f17c"},purchase:{started:"0xd87e90c3",completed:"0x8403aeb4",unsafeCompleted:"0x4d5b14e0"},retail:{customerMeeting:"0x74489004"}},z="menubar=no,status=no,scrollbars=no,fullscreen=no,width=500, height=800",W="frak-sso";export{u as DebugInfoGatherer,P as FrakContextManager,L as base64urlDecode,k as base64urlEncode,f as baseIframeProps,R as compressJsonToB64,h as createIFrameFrakClient,p as createIframe,v as decompressJsonFromB64,g as findIframeInOpener,$ as formatAmount,A as generateSsoUrl,D as getCurrencyAmountKey,b as getSupportedCurrency,q as getSupportedLocale,V as interactionTypes,y as locales,T as productTypes,N as productTypesMask,S as setupClient,z as ssoPopupFeatures,W as ssoPopupName,O as trackEvent};
|
|
1
|
+
import{a as e,c as t,i as n,l as r,n as i,o as a,s as o,t as s}from"./trackEvent-CHnYa85W.js";import{a as c,c as l,d as u,f as d,i as f,l as p,n as m,o as h,r as g,s as _,t as v,u as y}from"./src-D2d52OZa.js";import{n as b,r as x,t as S}from"./productTypes-CGb1MmBF.js";export{d as DebugInfoGatherer,i as FrakContextManager,t as base64urlDecode,r as base64urlEncode,p as baseIframeProps,o as compressJsonToB64,l as createIFrameFrakClient,y as createIframe,_ as decompressJsonFromB64,u as findIframeInOpener,g as formatAmount,a as generateSsoUrl,m as getCurrencyAmountKey,c as getSupportedCurrency,f as getSupportedLocale,x as interactionTypes,h as locales,S as productTypes,b as productTypesMask,v as setupClient,n as ssoPopupFeatures,e as ssoPopupName,s as trackEvent};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Hex } from "viem";
|
|
2
|
+
|
|
3
|
+
//#region src/types/rpc/interaction.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Represent a prepared user interaction, ready to be sent on-chain via the wallet
|
|
7
|
+
*/
|
|
8
|
+
type PreparedInteraction = {
|
|
9
|
+
handlerTypeDenominator: Hex;
|
|
10
|
+
interactionData: Hex;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Parameters that will be used to send an interaction to the blockchain
|
|
14
|
+
* @inline
|
|
15
|
+
*/
|
|
16
|
+
type SendInteractionParamsType = {
|
|
17
|
+
/**
|
|
18
|
+
* The product id where this interaction has been made
|
|
19
|
+
* @defaultValue keccak256(toHex(window.location.host))
|
|
20
|
+
*/
|
|
21
|
+
productId?: Hex;
|
|
22
|
+
/**
|
|
23
|
+
* The prepared interaction, built from an Interaction Encoder
|
|
24
|
+
*/
|
|
25
|
+
interaction: PreparedInteraction;
|
|
26
|
+
/**
|
|
27
|
+
* A pre-computed interaction signature
|
|
28
|
+
* If none provided, the delegated interaction validator of your product will sign it (you can manage it in the business dashboard)
|
|
29
|
+
*
|
|
30
|
+
* @defaultValue undefined
|
|
31
|
+
*/
|
|
32
|
+
validation?: Hex;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Return type of the send interaction rpc request
|
|
36
|
+
* @group RPC Schema
|
|
37
|
+
*/
|
|
38
|
+
type SendInteractionReturnType = {
|
|
39
|
+
/**
|
|
40
|
+
* The id of the interaction in the interaction pool
|
|
41
|
+
*/
|
|
42
|
+
delegationId: string;
|
|
43
|
+
};
|
|
44
|
+
//#endregion
|
|
45
|
+
export { SendInteractionParamsType as n, SendInteractionReturnType as r, PreparedInteraction as t };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Hex } from "viem";
|
|
2
|
+
|
|
3
|
+
//#region src/types/rpc/interaction.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Represent a prepared user interaction, ready to be sent on-chain via the wallet
|
|
7
|
+
*/
|
|
8
|
+
type PreparedInteraction = {
|
|
9
|
+
handlerTypeDenominator: Hex;
|
|
10
|
+
interactionData: Hex;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Parameters that will be used to send an interaction to the blockchain
|
|
14
|
+
* @inline
|
|
15
|
+
*/
|
|
16
|
+
type SendInteractionParamsType = {
|
|
17
|
+
/**
|
|
18
|
+
* The product id where this interaction has been made
|
|
19
|
+
* @defaultValue keccak256(toHex(window.location.host))
|
|
20
|
+
*/
|
|
21
|
+
productId?: Hex;
|
|
22
|
+
/**
|
|
23
|
+
* The prepared interaction, built from an Interaction Encoder
|
|
24
|
+
*/
|
|
25
|
+
interaction: PreparedInteraction;
|
|
26
|
+
/**
|
|
27
|
+
* A pre-computed interaction signature
|
|
28
|
+
* If none provided, the delegated interaction validator of your product will sign it (you can manage it in the business dashboard)
|
|
29
|
+
*
|
|
30
|
+
* @defaultValue undefined
|
|
31
|
+
*/
|
|
32
|
+
validation?: Hex;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Return type of the send interaction rpc request
|
|
36
|
+
* @group RPC Schema
|
|
37
|
+
*/
|
|
38
|
+
type SendInteractionReturnType = {
|
|
39
|
+
/**
|
|
40
|
+
* The id of the interaction in the interaction pool
|
|
41
|
+
*/
|
|
42
|
+
delegationId: string;
|
|
43
|
+
};
|
|
44
|
+
//#endregion
|
|
45
|
+
export { SendInteractionParamsType as n, SendInteractionReturnType as r, PreparedInteraction as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,t}from"./productTypes-CGb1MmBF.js";import{concatHex as n,encodeAbiParameters as r,pad as i,toHex as a}from"viem";const o={openArticle({articleId:r}){let o=n([e.press.openArticle,i(r,{size:32})]);return{handlerTypeDenominator:a(t.press),interactionData:o}},readArticle({articleId:r}){let o=n([e.press.readArticle,i(r,{size:32})]);return{handlerTypeDenominator:a(t.press),interactionData:o}}},s={startPurchase({purchaseId:r}){let o=n([e.purchase.started,i(r,{size:32})]);return{handlerTypeDenominator:a(t.purchase),interactionData:o}},completedPurchase({purchaseId:i,proof:o}){let s=r([{type:`uint256`},{type:`bytes32[]`}],[BigInt(i),o]),c=n([e.purchase.completed,s]);return{handlerTypeDenominator:a(t.purchase),interactionData:c}},unsafeCompletedPurchase({purchaseId:r}){let o=n([e.purchase.unsafeCompleted,i(r,{size:32})]);return{handlerTypeDenominator:a(t.purchase),interactionData:o}}},c={createLink(){return{handlerTypeDenominator:a(t.referral),interactionData:e.referral.createLink}},referred({referrer:r}){let o=n([e.referral.referred,i(r,{size:32})]);return{handlerTypeDenominator:a(t.referral),interactionData:o}}},l={customerMeeting({agencyId:r}){let o=n([e.retail.customerMeeting,i(r,{size:32})]);return{handlerTypeDenominator:a(t.retail),interactionData:o}}},u={open(){return{handlerTypeDenominator:a(t.webshop),interactionData:e.webshop.open}}};export{o as a,s as i,l as n,c as r,u as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`./productTypes-BUkXJKZ7.cjs`);let t=require(`viem`);const n={openArticle({articleId:n}){let r=(0,t.concatHex)([e.r.press.openArticle,(0,t.pad)(n,{size:32})]);return{handlerTypeDenominator:(0,t.toHex)(e.t.press),interactionData:r}},readArticle({articleId:n}){let r=(0,t.concatHex)([e.r.press.readArticle,(0,t.pad)(n,{size:32})]);return{handlerTypeDenominator:(0,t.toHex)(e.t.press),interactionData:r}}},r={startPurchase({purchaseId:n}){let r=(0,t.concatHex)([e.r.purchase.started,(0,t.pad)(n,{size:32})]);return{handlerTypeDenominator:(0,t.toHex)(e.t.purchase),interactionData:r}},completedPurchase({purchaseId:n,proof:r}){let i=(0,t.encodeAbiParameters)([{type:`uint256`},{type:`bytes32[]`}],[BigInt(n),r]),a=(0,t.concatHex)([e.r.purchase.completed,i]);return{handlerTypeDenominator:(0,t.toHex)(e.t.purchase),interactionData:a}},unsafeCompletedPurchase({purchaseId:n}){let r=(0,t.concatHex)([e.r.purchase.unsafeCompleted,(0,t.pad)(n,{size:32})]);return{handlerTypeDenominator:(0,t.toHex)(e.t.purchase),interactionData:r}}},i={createLink(){return{handlerTypeDenominator:(0,t.toHex)(e.t.referral),interactionData:e.r.referral.createLink}},referred({referrer:n}){let r=(0,t.concatHex)([e.r.referral.referred,(0,t.pad)(n,{size:32})]);return{handlerTypeDenominator:(0,t.toHex)(e.t.referral),interactionData:r}}},a={customerMeeting({agencyId:n}){let r=(0,t.concatHex)([e.r.retail.customerMeeting,(0,t.pad)(n,{size:32})]);return{handlerTypeDenominator:(0,t.toHex)(e.t.retail),interactionData:r}}},o={open(){return{handlerTypeDenominator:(0,t.toHex)(e.t.webshop),interactionData:e.r.webshop.open}}};Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
|
package/dist/interactions.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const e=require(`./interactions-EIXhNLf6.cjs`);exports.PressInteractionEncoder=e.a,exports.PurchaseInteractionEncoder=e.i,exports.ReferralInteractionEncoder=e.r,exports.RetailInteractionEncoder=e.n,exports.WebShopInteractionEncoder=e.t;
|
package/dist/interactions.d.cts
CHANGED
|
@@ -1,182 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Represent a prepared user interaction, ready to be sent on-chain via the wallet
|
|
6
|
-
*/
|
|
7
|
-
declare type PreparedInteraction = {
|
|
8
|
-
handlerTypeDenominator: Hex;
|
|
9
|
-
interactionData: Hex;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Press interactions allow you to track user engagement with articles or other press content on your platform.
|
|
14
|
-
* After setting up these interactions, you can create acquisition campaign based on the user engagement with your press content.
|
|
15
|
-
*
|
|
16
|
-
* :::info
|
|
17
|
-
* To properly handle press interactions, ensure that the "Press" product type is enabled in your Business dashboard.
|
|
18
|
-
* :::
|
|
19
|
-
*
|
|
20
|
-
* @description Encode press related user interactions
|
|
21
|
-
*
|
|
22
|
-
* @group Interactions Encoder
|
|
23
|
-
*
|
|
24
|
-
* @see {@link PreparedInteraction} The prepared interaction object that can be sent
|
|
25
|
-
* @see {@link !actions.sendInteraction | `sendInteraction()`} Action used to send the prepared interaction to the Frak Wallet
|
|
26
|
-
*/
|
|
27
|
-
export declare const PressInteractionEncoder: {
|
|
28
|
-
/**
|
|
29
|
-
* Encode an open article interaction
|
|
30
|
-
* @param args
|
|
31
|
-
* @param args.articleId - The id of the article the user opened (32 bytes), could be a `keccak256` hash of the article slug, or your internal id
|
|
32
|
-
*/
|
|
33
|
-
openArticle({ articleId }: {
|
|
34
|
-
articleId: Hex;
|
|
35
|
-
}): PreparedInteraction;
|
|
36
|
-
/**
|
|
37
|
-
* Encode a read article interaction
|
|
38
|
-
* @param args
|
|
39
|
-
* @param args.articleId - The id of the article the user opened (32 bytes), could be a `keccak256` hash of the article slug, or your internal id
|
|
40
|
-
*/
|
|
41
|
-
readArticle({ articleId }: {
|
|
42
|
-
articleId: Hex;
|
|
43
|
-
}): PreparedInteraction;
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Purchase interactions allow you to track user purchases on your platform.
|
|
48
|
-
* After setting up these interactions, you can create acquisition campaign based on the user purchase (starting a new one, completed, or even purchase dropped).
|
|
49
|
-
*
|
|
50
|
-
* :::info
|
|
51
|
-
* To properly handle purchase interactions, ensure that the "Purchase" product type is enabled in your Business dashboard, and that you have set up everything correctly in the `Purchasetracker` section.
|
|
52
|
-
* :::
|
|
53
|
-
*
|
|
54
|
-
* :::note
|
|
55
|
-
* The `purchaseId` is used on both interactions. It can be computed like this:
|
|
56
|
-
*
|
|
57
|
-
* ```ts
|
|
58
|
-
* const purchaseId = keccak256(concatHex([productId, toHex(externalPurchaseId)]));
|
|
59
|
-
* ```
|
|
60
|
-
*
|
|
61
|
-
* With:
|
|
62
|
-
* - `productId`: The id of your product, you can find it in the product dashboard.
|
|
63
|
-
* - `externalPurchaseId`: The id of the purchase in your system (e.g. the shopify `order_id`).
|
|
64
|
-
* :::
|
|
65
|
-
*
|
|
66
|
-
* @description Encode purchase related user interactions
|
|
67
|
-
*
|
|
68
|
-
* @group Interactions Encoder
|
|
69
|
-
*
|
|
70
|
-
* @see {@link !actions.sendInteraction | `sendInteraction()`} Action used to send the prepared interaction to the Frak Wallet
|
|
71
|
-
* @see {@link PreparedInteraction} The prepared interaction object that can be sent
|
|
72
|
-
* @see {@link !actions.trackPurchaseStatus | `trackPurchaseStatus()`} Action that will automatically send the purchase upon completion
|
|
73
|
-
* @see [Purchase Webhooks](/wallet-sdk/references-api/webhook) Webhooks to be implemented on your side to confirm a purchase
|
|
74
|
-
* @see [Purchase Proof](/wallet-sdk/references-api/purchaseProof) Get a merklee proof for the purchase
|
|
75
|
-
*/
|
|
76
|
-
export declare const PurchaseInteractionEncoder: {
|
|
77
|
-
/**
|
|
78
|
-
* Encode a start purchase interaction
|
|
79
|
-
* @param args
|
|
80
|
-
* @param args.purchaseId - The id of the purchase that is being started.
|
|
81
|
-
*/
|
|
82
|
-
startPurchase({ purchaseId }: {
|
|
83
|
-
purchaseId: Hex;
|
|
84
|
-
}): PreparedInteraction;
|
|
85
|
-
/**
|
|
86
|
-
* Encode a complete purchase interaction
|
|
87
|
-
* @param args
|
|
88
|
-
* @param args.purchaseId - The id of the purchase that is being completed.
|
|
89
|
-
* @param args.proof - The merkle proof that the user has completed the purchase (see [Purchase Webhooks](/wallet-sdk/references-api/webhook) for more details).
|
|
90
|
-
*/
|
|
91
|
-
completedPurchase({ purchaseId, proof, }: {
|
|
92
|
-
purchaseId: Hex;
|
|
93
|
-
proof: Hex[];
|
|
94
|
-
}): PreparedInteraction;
|
|
95
|
-
/**
|
|
96
|
-
* Encode an unsafe complete purchase interaction (when we can't provide the proof)
|
|
97
|
-
* @param args
|
|
98
|
-
* @param args.purchaseId - The id of the purchase that is being completed.
|
|
99
|
-
*/
|
|
100
|
-
unsafeCompletedPurchase({ purchaseId, }: {
|
|
101
|
-
purchaseId: Hex;
|
|
102
|
-
}): PreparedInteraction;
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* Referral interactions allow you to track user sharing activities.
|
|
107
|
-
* These interactions are essential for platforms looking to grow their user base through user-to-user referrals and reward systems.
|
|
108
|
-
*
|
|
109
|
-
* :::info
|
|
110
|
-
* To properly handle referral interactions, ensure that the "Referral" product type is enabled in your Business dashboard.
|
|
111
|
-
* :::
|
|
112
|
-
*
|
|
113
|
-
* @description Encode referral related user interactions
|
|
114
|
-
*
|
|
115
|
-
* @group Interactions Encoder
|
|
116
|
-
*
|
|
117
|
-
* @see {@link PreparedInteraction} The prepared interaction object that can be sent
|
|
118
|
-
* @see {@link !actions.sendInteraction | `sendInteraction()`} Action used to send the prepared interaction to the Frak Wallet
|
|
119
|
-
*/
|
|
120
|
-
export declare const ReferralInteractionEncoder: {
|
|
121
|
-
/**
|
|
122
|
-
* Records the event of a user creating a referral link. Note that this interaction doesn't actually create the link itself; it only sends an event to track that a link was created.
|
|
123
|
-
*/
|
|
124
|
-
createLink(): PreparedInteraction;
|
|
125
|
-
/**
|
|
126
|
-
* Encode a referred interaction
|
|
127
|
-
* @param args
|
|
128
|
-
* @param args.referrer - The Ethereum address of the user who made the referral
|
|
129
|
-
*/
|
|
130
|
-
referred({ referrer }: {
|
|
131
|
-
referrer: Address;
|
|
132
|
-
}): PreparedInteraction;
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* Retail interactions allow you to track user activities on your retails products.
|
|
137
|
-
*
|
|
138
|
-
* :::info
|
|
139
|
-
* To properly handle retail interactions, ensure that the "Retail" product type is enabled in your Business dashboard.
|
|
140
|
-
* :::
|
|
141
|
-
*
|
|
142
|
-
* @description Encode retail related user interactions
|
|
143
|
-
*
|
|
144
|
-
* @group Interactions Encoder
|
|
145
|
-
*
|
|
146
|
-
* @see {@link PreparedInteraction} The prepared interaction object that can be sent
|
|
147
|
-
* @see {@link !actions.sendInteraction | `sendInteraction()`} Action used to send the prepared interaction to the Frak Wallet
|
|
148
|
-
*/
|
|
149
|
-
export declare const RetailInteractionEncoder: {
|
|
150
|
-
/**
|
|
151
|
-
* Encode a customer meeting retail interaction
|
|
152
|
-
* @param args
|
|
153
|
-
* @param args.agencyId - The id of the agency that the customer is meeting with
|
|
154
|
-
*
|
|
155
|
-
*/
|
|
156
|
-
customerMeeting({ agencyId }: {
|
|
157
|
-
agencyId: Hex;
|
|
158
|
-
}): PreparedInteraction;
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Webshop interactions allow you to track user activities on your webshop.
|
|
163
|
-
*
|
|
164
|
-
* :::info
|
|
165
|
-
* To properly handle webshop interactions, ensure that the "WebShop" product type is enabled in your Business dashboard.
|
|
166
|
-
* :::
|
|
167
|
-
*
|
|
168
|
-
* @description Encode webshop related user interactions
|
|
169
|
-
*
|
|
170
|
-
* @group Interactions Encoder
|
|
171
|
-
*
|
|
172
|
-
* @see {@link PreparedInteraction} The prepared interaction object that can be sent
|
|
173
|
-
* @see {@link !actions.sendInteraction | `sendInteraction()`} Action used to send the prepared interaction to the Frak Wallet
|
|
174
|
-
*/
|
|
175
|
-
export declare const WebShopInteractionEncoder: {
|
|
176
|
-
/**
|
|
177
|
-
* Encode an open webshop interaction
|
|
178
|
-
*/
|
|
179
|
-
open(): PreparedInteraction;
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
export { }
|
|
1
|
+
import { a as PressInteractionEncoder, i as PurchaseInteractionEncoder, n as RetailInteractionEncoder, r as ReferralInteractionEncoder, t as WebShopInteractionEncoder } from "./index-zDq-VlKx.cjs";
|
|
2
|
+
export { PressInteractionEncoder, PurchaseInteractionEncoder, ReferralInteractionEncoder, RetailInteractionEncoder, WebShopInteractionEncoder };
|
package/dist/interactions.d.ts
CHANGED
|
@@ -1,182 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Represent a prepared user interaction, ready to be sent on-chain via the wallet
|
|
6
|
-
*/
|
|
7
|
-
declare type PreparedInteraction = {
|
|
8
|
-
handlerTypeDenominator: Hex;
|
|
9
|
-
interactionData: Hex;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Press interactions allow you to track user engagement with articles or other press content on your platform.
|
|
14
|
-
* After setting up these interactions, you can create acquisition campaign based on the user engagement with your press content.
|
|
15
|
-
*
|
|
16
|
-
* :::info
|
|
17
|
-
* To properly handle press interactions, ensure that the "Press" product type is enabled in your Business dashboard.
|
|
18
|
-
* :::
|
|
19
|
-
*
|
|
20
|
-
* @description Encode press related user interactions
|
|
21
|
-
*
|
|
22
|
-
* @group Interactions Encoder
|
|
23
|
-
*
|
|
24
|
-
* @see {@link PreparedInteraction} The prepared interaction object that can be sent
|
|
25
|
-
* @see {@link !actions.sendInteraction | `sendInteraction()`} Action used to send the prepared interaction to the Frak Wallet
|
|
26
|
-
*/
|
|
27
|
-
export declare const PressInteractionEncoder: {
|
|
28
|
-
/**
|
|
29
|
-
* Encode an open article interaction
|
|
30
|
-
* @param args
|
|
31
|
-
* @param args.articleId - The id of the article the user opened (32 bytes), could be a `keccak256` hash of the article slug, or your internal id
|
|
32
|
-
*/
|
|
33
|
-
openArticle({ articleId }: {
|
|
34
|
-
articleId: Hex;
|
|
35
|
-
}): PreparedInteraction;
|
|
36
|
-
/**
|
|
37
|
-
* Encode a read article interaction
|
|
38
|
-
* @param args
|
|
39
|
-
* @param args.articleId - The id of the article the user opened (32 bytes), could be a `keccak256` hash of the article slug, or your internal id
|
|
40
|
-
*/
|
|
41
|
-
readArticle({ articleId }: {
|
|
42
|
-
articleId: Hex;
|
|
43
|
-
}): PreparedInteraction;
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Purchase interactions allow you to track user purchases on your platform.
|
|
48
|
-
* After setting up these interactions, you can create acquisition campaign based on the user purchase (starting a new one, completed, or even purchase dropped).
|
|
49
|
-
*
|
|
50
|
-
* :::info
|
|
51
|
-
* To properly handle purchase interactions, ensure that the "Purchase" product type is enabled in your Business dashboard, and that you have set up everything correctly in the `Purchasetracker` section.
|
|
52
|
-
* :::
|
|
53
|
-
*
|
|
54
|
-
* :::note
|
|
55
|
-
* The `purchaseId` is used on both interactions. It can be computed like this:
|
|
56
|
-
*
|
|
57
|
-
* ```ts
|
|
58
|
-
* const purchaseId = keccak256(concatHex([productId, toHex(externalPurchaseId)]));
|
|
59
|
-
* ```
|
|
60
|
-
*
|
|
61
|
-
* With:
|
|
62
|
-
* - `productId`: The id of your product, you can find it in the product dashboard.
|
|
63
|
-
* - `externalPurchaseId`: The id of the purchase in your system (e.g. the shopify `order_id`).
|
|
64
|
-
* :::
|
|
65
|
-
*
|
|
66
|
-
* @description Encode purchase related user interactions
|
|
67
|
-
*
|
|
68
|
-
* @group Interactions Encoder
|
|
69
|
-
*
|
|
70
|
-
* @see {@link !actions.sendInteraction | `sendInteraction()`} Action used to send the prepared interaction to the Frak Wallet
|
|
71
|
-
* @see {@link PreparedInteraction} The prepared interaction object that can be sent
|
|
72
|
-
* @see {@link !actions.trackPurchaseStatus | `trackPurchaseStatus()`} Action that will automatically send the purchase upon completion
|
|
73
|
-
* @see [Purchase Webhooks](/wallet-sdk/references-api/webhook) Webhooks to be implemented on your side to confirm a purchase
|
|
74
|
-
* @see [Purchase Proof](/wallet-sdk/references-api/purchaseProof) Get a merklee proof for the purchase
|
|
75
|
-
*/
|
|
76
|
-
export declare const PurchaseInteractionEncoder: {
|
|
77
|
-
/**
|
|
78
|
-
* Encode a start purchase interaction
|
|
79
|
-
* @param args
|
|
80
|
-
* @param args.purchaseId - The id of the purchase that is being started.
|
|
81
|
-
*/
|
|
82
|
-
startPurchase({ purchaseId }: {
|
|
83
|
-
purchaseId: Hex;
|
|
84
|
-
}): PreparedInteraction;
|
|
85
|
-
/**
|
|
86
|
-
* Encode a complete purchase interaction
|
|
87
|
-
* @param args
|
|
88
|
-
* @param args.purchaseId - The id of the purchase that is being completed.
|
|
89
|
-
* @param args.proof - The merkle proof that the user has completed the purchase (see [Purchase Webhooks](/wallet-sdk/references-api/webhook) for more details).
|
|
90
|
-
*/
|
|
91
|
-
completedPurchase({ purchaseId, proof, }: {
|
|
92
|
-
purchaseId: Hex;
|
|
93
|
-
proof: Hex[];
|
|
94
|
-
}): PreparedInteraction;
|
|
95
|
-
/**
|
|
96
|
-
* Encode an unsafe complete purchase interaction (when we can't provide the proof)
|
|
97
|
-
* @param args
|
|
98
|
-
* @param args.purchaseId - The id of the purchase that is being completed.
|
|
99
|
-
*/
|
|
100
|
-
unsafeCompletedPurchase({ purchaseId, }: {
|
|
101
|
-
purchaseId: Hex;
|
|
102
|
-
}): PreparedInteraction;
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* Referral interactions allow you to track user sharing activities.
|
|
107
|
-
* These interactions are essential for platforms looking to grow their user base through user-to-user referrals and reward systems.
|
|
108
|
-
*
|
|
109
|
-
* :::info
|
|
110
|
-
* To properly handle referral interactions, ensure that the "Referral" product type is enabled in your Business dashboard.
|
|
111
|
-
* :::
|
|
112
|
-
*
|
|
113
|
-
* @description Encode referral related user interactions
|
|
114
|
-
*
|
|
115
|
-
* @group Interactions Encoder
|
|
116
|
-
*
|
|
117
|
-
* @see {@link PreparedInteraction} The prepared interaction object that can be sent
|
|
118
|
-
* @see {@link !actions.sendInteraction | `sendInteraction()`} Action used to send the prepared interaction to the Frak Wallet
|
|
119
|
-
*/
|
|
120
|
-
export declare const ReferralInteractionEncoder: {
|
|
121
|
-
/**
|
|
122
|
-
* Records the event of a user creating a referral link. Note that this interaction doesn't actually create the link itself; it only sends an event to track that a link was created.
|
|
123
|
-
*/
|
|
124
|
-
createLink(): PreparedInteraction;
|
|
125
|
-
/**
|
|
126
|
-
* Encode a referred interaction
|
|
127
|
-
* @param args
|
|
128
|
-
* @param args.referrer - The Ethereum address of the user who made the referral
|
|
129
|
-
*/
|
|
130
|
-
referred({ referrer }: {
|
|
131
|
-
referrer: Address;
|
|
132
|
-
}): PreparedInteraction;
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* Retail interactions allow you to track user activities on your retails products.
|
|
137
|
-
*
|
|
138
|
-
* :::info
|
|
139
|
-
* To properly handle retail interactions, ensure that the "Retail" product type is enabled in your Business dashboard.
|
|
140
|
-
* :::
|
|
141
|
-
*
|
|
142
|
-
* @description Encode retail related user interactions
|
|
143
|
-
*
|
|
144
|
-
* @group Interactions Encoder
|
|
145
|
-
*
|
|
146
|
-
* @see {@link PreparedInteraction} The prepared interaction object that can be sent
|
|
147
|
-
* @see {@link !actions.sendInteraction | `sendInteraction()`} Action used to send the prepared interaction to the Frak Wallet
|
|
148
|
-
*/
|
|
149
|
-
export declare const RetailInteractionEncoder: {
|
|
150
|
-
/**
|
|
151
|
-
* Encode a customer meeting retail interaction
|
|
152
|
-
* @param args
|
|
153
|
-
* @param args.agencyId - The id of the agency that the customer is meeting with
|
|
154
|
-
*
|
|
155
|
-
*/
|
|
156
|
-
customerMeeting({ agencyId }: {
|
|
157
|
-
agencyId: Hex;
|
|
158
|
-
}): PreparedInteraction;
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Webshop interactions allow you to track user activities on your webshop.
|
|
163
|
-
*
|
|
164
|
-
* :::info
|
|
165
|
-
* To properly handle webshop interactions, ensure that the "WebShop" product type is enabled in your Business dashboard.
|
|
166
|
-
* :::
|
|
167
|
-
*
|
|
168
|
-
* @description Encode webshop related user interactions
|
|
169
|
-
*
|
|
170
|
-
* @group Interactions Encoder
|
|
171
|
-
*
|
|
172
|
-
* @see {@link PreparedInteraction} The prepared interaction object that can be sent
|
|
173
|
-
* @see {@link !actions.sendInteraction | `sendInteraction()`} Action used to send the prepared interaction to the Frak Wallet
|
|
174
|
-
*/
|
|
175
|
-
export declare const WebShopInteractionEncoder: {
|
|
176
|
-
/**
|
|
177
|
-
* Encode an open webshop interaction
|
|
178
|
-
*/
|
|
179
|
-
open(): PreparedInteraction;
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
export { }
|
|
1
|
+
import { a as PressInteractionEncoder, i as PurchaseInteractionEncoder, n as RetailInteractionEncoder, r as ReferralInteractionEncoder, t as WebShopInteractionEncoder } from "./index-7OZ39x1U.js";
|
|
2
|
+
export { PressInteractionEncoder, PurchaseInteractionEncoder, ReferralInteractionEncoder, RetailInteractionEncoder, WebShopInteractionEncoder };
|
package/dist/interactions.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a as e,i as t,n,r,t as i}from"./interactions-DnfM3oe0.js";export{e as PressInteractionEncoder,t as PurchaseInteractionEncoder,r as ReferralInteractionEncoder,n as RetailInteractionEncoder,i as WebShopInteractionEncoder};
|