@frak-labs/core-sdk 0.0.19 → 0.1.0-beta.278e9605
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/package.json +26 -17
- 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.ts +73 -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 +338 -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/actions.cjs +0 -1
- package/dist/actions.d.cts +0 -1400
- package/dist/actions.d.ts +0 -1400
- package/dist/actions.js +0 -1
- package/dist/bundle.cjs +0 -13
- package/dist/bundle.d.cts +0 -2022
- package/dist/bundle.d.ts +0 -2022
- package/dist/bundle.js +0 -13
- package/dist/index.cjs +0 -13
- package/dist/index.d.cts +0 -1373
- package/dist/index.d.ts +0 -1373
- package/dist/index.js +0 -13
- package/dist/interactions.cjs +0 -1
- package/dist/interactions.d.cts +0 -182
- package/dist/interactions.d.ts +0 -182
- package/dist/interactions.js +0 -1
package/dist/index.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import{OpenPanel as e}from"@openpanel/web";import{CborDecoder as t,CborEncoder as n}from"@jsonjoy.com/json-pack/lib/cbor/index.js";import{bytesToHex as r,hexToBytes as o,sha256 as a}from"viem";class i extends Error{code;data;constructor(e,t,n){super(t),this.code=e,this.data=n}}class s extends i{constructor(e){super(l.internalError,e)}}class c extends i{constructor(){super(l.clientNotConnected,"Client not found")}}let l={parseError:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internalError:-32603,serverError:-32e3,clientNotConnected:-32001,configError:-32002,corruptedResponse:-32003,clientAborted:-32004,walletNotConnected:-32005,serverErrorForInteractionDelegation:-32006};class d{_promise;_resolve;_reject;constructor(){this._promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}get promise(){return this._promise}resolve=e=>{this._resolve?.(e)};reject=e=>{this._reject?.(e)}}function u(e){return btoa(Array.from(e,e=>String.fromCharCode(e)).join("")).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function f(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))}let p=new n;function h(e){let t={...e,validationHash:w(e)};return p.encode(t)}function m(e){return p.encode(e)}function g(e){return u(m(e))}function w(e){return a(p.encode(e))}let b=new t;function y(e){if(!e.length)throw new i(l.corruptedResponse,"Missing compressed data");let t=v(e);if(!t)throw new i(l.corruptedResponse,"Invalid compressed data");if(!t?.validationHash)throw new i(l.corruptedResponse,"Missing validation hash");let{validationHash:n,...r}=t;if(w(r)!==t.validationHash)throw new i(l.corruptedResponse,"Invalid data validation hash");return t}function v(e){try{return b.decode(e)}catch(t){return console.error("Invalid compressed data",{e:t,data:e}),null}}function k(e){return v(f(e))}let C="nexus-wallet-backup";class R{config;iframe;isSetupDone=!1;lastResponse=null;lastRequest=null;constructor(e,t){this.config=e,this.iframe=t,this.lastRequest=null,this.lastResponse=null}setLastResponse(e){this.lastResponse={event:e.data,origin:e.origin,timestamp:Date.now()}}setLastRequest(e,t){this.lastRequest={event:e,target:t,timestamp:Date.now()}}updateSetupStatus(e){this.isSetupDone=e}base64Encode(e){try{return btoa(JSON.stringify(e))}catch(e){return console.warn("Failed to encode debug data",e),btoa("Failed to encode data")}}getIframeStatus(){return this.iframe?{loading:this.iframe.hasAttribute("loading"),url:this.iframe.src,readyState:this.iframe.contentDocument?.readyState?+("complete"===this.iframe.contentDocument.readyState):-1,contentWindow:!!this.iframe.contentWindow,isConnected:this.iframe.isConnected}:null}getNavigatorInfo(){return navigator?{userAgent:navigator.userAgent,language:navigator.language,onLine:navigator.onLine,screenWidth:window.screen.width,screenHeight:window.screen.height,pixelRatio:window.devicePixelRatio}:null}gatherDebugInfo(e){let t=this.getIframeStatus(),n=this.getNavigatorInfo(),r="Unknown";return e instanceof i?r=`FrakRpcError: ${e.code} '${e.message}'`:e instanceof Error?r=e.message:"string"==typeof e&&(r=e),{timestamp:new Date().toISOString(),encodedUrl:btoa(window.location.href),encodedConfig:this.config?this.base64Encode(this.config):"no-config",navigatorInfo:n?this.base64Encode(n):"no-navigator",iframeStatus:t?this.base64Encode(t):"not-iframe",lastRequest:this.lastRequest?this.base64Encode(this.lastRequest):"No Frak request logged",lastResponse:this.lastResponse?this.base64Encode(this.lastResponse):"No Frak response logged",clientStatus:this.isSetupDone?"setup":"not-setup",error:r}}static empty(){return new R}formatDebugInfo(e){let t=this.gatherDebugInfo(e);return`
|
|
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 S={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 E({walletBaseUrl:e,config:t}){let n=document.querySelector("#frak-wallet");n&&n.remove();let r=document.createElement("iframe");return r.id=S.id,r.name=S.name,r.allow=S.allow,r.style.zIndex=S.style.zIndex.toString(),I({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 I({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 x({config:t,iframe:n}){let r,o=function(){let e=new Map;return{createChannel:t=>{let n=Math.random().toString(36).substring(7);return e.set(n,t),n},getRpcResolver:t=>e.get(t),removeChannel:t=>e.delete(t),destroy:()=>e.clear()}}(),a=function({iframe:e}){let t=new d;return{handleEvent:async n=>{switch(n.iframeLifecycle){case"connected":t.resolve(!0);break;case"do-backup":n.data.backup?localStorage.setItem(C,n.data.backup):localStorage.removeItem(C);break;case"remove-backup":localStorage.removeItem(C);break;case"show":case"hide":I({iframe:e,isVisible:"show"===n.iframeLifecycle});break;case"handshake":e.contentWindow?.postMessage({clientLifecycle:"handshake-response",data:{token:n.data.token,currentUrl:window.location.href}},"*");break;case"redirect":window.location.href=`${n.data.baseRedirectUrl}${encodeURIComponent(window.location.href)}`}},isConnected:t.promise}}({iframe:n}),c=new R(t,n),u=function({frakWalletUrl:e,iframe:t,channelManager:n,iframeLifecycleManager:r,debugInfo:o}){if("undefined"==typeof window)throw new i(l.configError,"iframe client should be used in the browser");if(!t.contentWindow)throw new i(l.configError,"The iframe does not have a product window");let a=t.contentWindow;async function s(t){if(!t.origin)return;try{if(new URL(t.origin).origin.toLowerCase()!==new URL(e).origin.toLowerCase())return}catch(e){console.log("Unable to check frak msg origin",e);return}if("object"!=typeof t.data)return;if(o.setLastResponse(t),"iframeLifecycle"in t.data)return void await r.handleEvent(t.data);if("clientLifecycle"in t.data)return void console.error("Client lifecycle event received on the client side, dismissing it");let a=t.data.id,i=n.getRpcResolver(a);i&&i(t.data)}return window.addEventListener("message",s),{sendEvent:function(t){a.postMessage(t,{targetOrigin:e}),o.setLastRequest(t,e)},cleanup:function(){window.removeEventListener("message",s)}}}({frakWalletUrl:t?.walletUrl??"https://wallet.frak.id",iframe:n,channelManager:o,iframeLifecycleManager:a,debugInfo:c}),f=async e=>{if(!await a.isConnected)throw new i(l.clientNotConnected,"The iframe provider isn't connected yet");let t=new d,n=o.createChannel(e=>{let r=y(e.data);r.error?t.reject(new i(r.error.code,r.error.message,r.error?.data)):t.resolve(r.result),o.removeChannel(n)}),r=h(e);return u.sendEvent({id:n,topic:e.method,data:r}),t.promise},p=async(e,t)=>{if(!await a.isConnected)throw new i(l.clientNotConnected,"The iframe provider isn't connected yet");let n=o.createChannel(e=>{let n=y(e.data);if(n.result)t(n.result);else throw new s("No valid result in the response")}),r=h(e);u.sendEvent({id:n,topic:e.method,data:r})},m=function(e,t){let n,r,o=()=>e.sendEvent({clientLifecycle:"heartbeat"});function a(){n&&clearInterval(n),r&&clearTimeout(r)}return async function(){o(),n=setInterval(o,100),r=setTimeout(()=>{a(),console.log("Heartbeat timeout: connection failed")},3e4),await t.isConnected,a()}(),a}(u,a),g=async()=>{m(),o.destroy(),u.cleanup(),n.remove()};console.log("[Frak SDK] Initializing OpenPanel"),(r=new e({apiUrl:"https://op-api.gcp.frak.id",clientId:"f305d11d-b93b-487c-80d4-92deb7903e98",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.0.19"}),!0)})).setGlobalProperties({sdkVersion:"0.0.19"}),r.init();let w=L({config:t,messageHandler:u,lifecycleManager:a}).then(()=>c.updateSetupStatus(!0));return{config:t,debugInfo:c,waitForConnection:a.isConnected,waitForSetup:w,request:f,listenerRequest:p,destroy:g,openPanel:r}}async function L({config:e,messageHandler:t,lifecycleManager:n}){async function r(){let n=e.customizations?.css;n&&t.sendEvent({clientLifecycle:"modal-css",data:{cssLink:n}})}async function o(){let n=e.customizations?.i18n;n&&t.sendEvent({clientLifecycle:"modal-i18n",data:{i18n:n}})}async function a(){if("undefined"==typeof window)return;let e=window.localStorage.getItem(C);e&&t.sendEvent({clientLifecycle:"restore-backup",data:{backup:e}})}await n.isConnected,await Promise.allSettled([r(),o(),a()])}let F={eur:"fr-FR",usd:"en-US",gbp:"en-GB"};function U(e){return e&&e in F?e:"eur"}async function D({config:e}){let t=function(e){let t=U(e.metadata?.currency);return{...e,metadata:{...e.metadata,currency:t}}}(e),n=await E({config:t});if(!n)return void console.error("Failed to create iframe");let r=x({config:t,iframe:n});return(await r.waitForSetup,await r.waitForConnection)?r:void console.error("Failed to connect to client")}let A="fCtx";function N(e){if(e?.r)try{let t=o(e.r);return u(t)}catch(t){console.error("Error compressing Frak context",{e:t,context:e})}}function $(e){if(e&&0!==e.length)try{let t=f(e);return{r:r(t,{size:20})}}catch(t){console.error("Error decompressing Frak context",{e:t,context:e})}}function q({url:e}){if(!e)return null;let t=new URL(e).searchParams.get(A);return t?$(t):null}function j({url:e,context:t}){if(!e)return null;let n=q({url:e}),r=n?{...n,...t}:t;if(!r.r)return null;let o=N(r);if(!o)return null;let a=new URL(e);return a.searchParams.set(A,o),a.toString()}function P(e){let t=new URL(e);return t.searchParams.delete(A),t.toString()}let _={compress:N,decompress:$,parse:q,update:j,remove:P,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?j({url:r,context:t}):P(r))&&window.history.replaceState(null,"",n.toString())}};function M(e){return e?F[e]??F.eur:F.eur}function T(e){return e?`${e}Amount`:"eurAmount"}function V(e,t){let n=M(t),r=U(t);return e.toLocaleString(n,{style:"currency",currency:r,minimumFractionDigits:0,maximumFractionDigits:2})}function W(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)}}let z={dapp:1,press:2,webshop:3,retail:4,referral:30,purchase:31},H=Object.entries(z).reduce((e,[t,n])=>(e[t]=BigInt(1)<<BigInt(n),e),{}),O={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"}};export{c as ClientNotFound,R as DebugInfoGatherer,d as Deferred,_ as FrakContextManager,i as FrakRpcError,l as RpcErrorCodes,f as base64urlDecode,u as base64urlEncode,S as baseIframeProps,m as compressJson,g as compressJsonToB64,x as createIFrameFrakClient,E as createIframe,y as decompressDataAndCheckHash,v as decompressJson,k as decompressJsonFromB64,V as formatAmount,T as getCurrencyAmountKey,U as getSupportedCurrency,M as getSupportedLocale,h as hashAndCompressData,O as interactionTypes,F as locales,z as productTypes,H as productTypesMask,D as setupClient,W as trackEvent};
|
package/dist/interactions.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";let __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,r)=>{for(var t in r)__webpack_require__.o(r,t)&&!__webpack_require__.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},__webpack_require__.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{PressInteractionEncoder:()=>PressInteractionEncoder,ReferralInteractionEncoder:()=>ReferralInteractionEncoder,RetailInteractionEncoder:()=>RetailInteractionEncoder,PurchaseInteractionEncoder:()=>PurchaseInteractionEncoder,WebShopInteractionEncoder:()=>WebShopInteractionEncoder});let external_viem_namespaceObject=require("viem"),interactionTypes={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"}},productTypes={dapp:1,press:2,webshop:3,retail:4,referral:30,purchase:31},productTypesMask=Object.entries(productTypes).reduce((e,[r,t])=>(e[r]=BigInt(1)<<BigInt(t),e),{}),PressInteractionEncoder={openArticle({articleId:e}){let r=(0,external_viem_namespaceObject.concatHex)([interactionTypes.press.openArticle,(0,external_viem_namespaceObject.pad)(e,{size:32})]);return{handlerTypeDenominator:(0,external_viem_namespaceObject.toHex)(productTypes.press),interactionData:r}},readArticle({articleId:e}){let r=(0,external_viem_namespaceObject.concatHex)([interactionTypes.press.readArticle,(0,external_viem_namespaceObject.pad)(e,{size:32})]);return{handlerTypeDenominator:(0,external_viem_namespaceObject.toHex)(productTypes.press),interactionData:r}}},ReferralInteractionEncoder={createLink:()=>({handlerTypeDenominator:(0,external_viem_namespaceObject.toHex)(productTypes.referral),interactionData:interactionTypes.referral.createLink}),referred({referrer:e}){let r=(0,external_viem_namespaceObject.concatHex)([interactionTypes.referral.referred,(0,external_viem_namespaceObject.pad)(e,{size:32})]);return{handlerTypeDenominator:(0,external_viem_namespaceObject.toHex)(productTypes.referral),interactionData:r}}},PurchaseInteractionEncoder={startPurchase({purchaseId:e}){let r=(0,external_viem_namespaceObject.concatHex)([interactionTypes.purchase.started,(0,external_viem_namespaceObject.pad)(e,{size:32})]);return{handlerTypeDenominator:(0,external_viem_namespaceObject.toHex)(productTypes.purchase),interactionData:r}},completedPurchase({purchaseId:e,proof:r}){let t=(0,external_viem_namespaceObject.encodeAbiParameters)([{type:"uint256"},{type:"bytes32[]"}],[BigInt(e),r]),a=(0,external_viem_namespaceObject.concatHex)([interactionTypes.purchase.completed,t]);return{handlerTypeDenominator:(0,external_viem_namespaceObject.toHex)(productTypes.purchase),interactionData:a}},unsafeCompletedPurchase({purchaseId:e}){let r=(0,external_viem_namespaceObject.concatHex)([interactionTypes.purchase.unsafeCompleted,(0,external_viem_namespaceObject.pad)(e,{size:32})]);return{handlerTypeDenominator:(0,external_viem_namespaceObject.toHex)(productTypes.purchase),interactionData:r}}},WebShopInteractionEncoder={open:()=>({handlerTypeDenominator:(0,external_viem_namespaceObject.toHex)(productTypes.webshop),interactionData:interactionTypes.webshop.open})},RetailInteractionEncoder={customerMeeting({agencyId:e}){let r=(0,external_viem_namespaceObject.concatHex)([interactionTypes.retail.customerMeeting,(0,external_viem_namespaceObject.pad)(e,{size:32})]);return{handlerTypeDenominator:(0,external_viem_namespaceObject.toHex)(productTypes.retail),interactionData:r}}};for(var __webpack_i__ in exports.PressInteractionEncoder=__webpack_exports__.PressInteractionEncoder,exports.PurchaseInteractionEncoder=__webpack_exports__.PurchaseInteractionEncoder,exports.ReferralInteractionEncoder=__webpack_exports__.ReferralInteractionEncoder,exports.RetailInteractionEncoder=__webpack_exports__.RetailInteractionEncoder,exports.WebShopInteractionEncoder=__webpack_exports__.WebShopInteractionEncoder,__webpack_exports__)-1===["PressInteractionEncoder","PurchaseInteractionEncoder","ReferralInteractionEncoder","RetailInteractionEncoder","WebShopInteractionEncoder"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
|
package/dist/interactions.d.cts
DELETED
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
import { Address } from 'viem';
|
|
2
|
-
import { Hex } from 'viem';
|
|
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 { }
|
package/dist/interactions.d.ts
DELETED
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
import { Address } from 'viem';
|
|
2
|
-
import { Hex } from 'viem';
|
|
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 { }
|
package/dist/interactions.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{concatHex as e,encodeAbiParameters as r,pad as t,toHex as n}from"viem";let a="0xc0a24ffb",o="0xd5bd0fbe",i="0xb311798f",c="0x010cc3b9",l="0xb2c0f17c",p="0xd87e90c3",s="0x8403aeb4",d="0x4d5b14e0",h="0x74489004",u={dapp:1,press:2,webshop:3,retail:4,referral:30,purchase:31};Object.entries(u).reduce((e,[r,t])=>(e[r]=BigInt(1)<<BigInt(t),e),{});let m={openArticle({articleId:r}){let o=e([a,t(r,{size:32})]);return{handlerTypeDenominator:n(u.press),interactionData:o}},readArticle({articleId:r}){let a=e([o,t(r,{size:32})]);return{handlerTypeDenominator:n(u.press),interactionData:a}}},b={createLink:()=>({handlerTypeDenominator:n(u.referral),interactionData:l}),referred({referrer:r}){let a=e([c,t(r,{size:32})]);return{handlerTypeDenominator:n(u.referral),interactionData:a}}},f={startPurchase({purchaseId:r}){let a=e([p,t(r,{size:32})]);return{handlerTypeDenominator:n(u.purchase),interactionData:a}},completedPurchase({purchaseId:t,proof:a}){let o=r([{type:"uint256"},{type:"bytes32[]"}],[BigInt(t),a]),i=e([s,o]);return{handlerTypeDenominator:n(u.purchase),interactionData:i}},unsafeCompletedPurchase({purchaseId:r}){let a=e([d,t(r,{size:32})]);return{handlerTypeDenominator:n(u.purchase),interactionData:a}}},y={open:()=>({handlerTypeDenominator:n(u.webshop),interactionData:i})},D={customerMeeting({agencyId:r}){let a=e([h,t(r,{size:32})]);return{handlerTypeDenominator:n(u.retail),interactionData:a}}};export{m as PressInteractionEncoder,f as PurchaseInteractionEncoder,b as ReferralInteractionEncoder,D as RetailInteractionEncoder,y as WebShopInteractionEncoder};
|