@transak/transak-sdk
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -40,2 +40,22 @@ declare enum Environments { | ||
type SourceTokenData = { | ||
sourceTokenCode: string; | ||
sourceTokenAmount: number; | ||
}; | ||
type CryptoCurrencyData = { | ||
cryptoCurrencyCode: string; | ||
cryptoCurrencyName: string; | ||
cryptoCurrencyImageURL: string; | ||
}; | ||
type TokenData = { | ||
tokenID: string[]; | ||
collectionAddress: string; | ||
marketplace: string; | ||
normalizeRoyalties: boolean; | ||
nftName?: string; | ||
nftImage?: string; | ||
}; | ||
type QueryParams = { | ||
@@ -90,4 +110,6 @@ apiKey: string; | ||
isTransakOne?: boolean; | ||
sourceTokenData?: string; | ||
cryptoCurrencyData?: string; | ||
sourceTokenData?: SourceTokenData[]; | ||
cryptoCurrencyData?: CryptoCurrencyData[]; | ||
contractID?: string; | ||
tokenData?: TokenData[]; | ||
}; | ||
@@ -94,0 +116,0 @@ |
@@ -69,3 +69,3 @@ import p from"events";var i=(t=>(t.DEVELOPMENT="DEVELOPMENT",t.STAGING="STAGING",t.PRODUCTION="PRODUCTION",t))(i||{});var s=(n=>(n.TRANSAK_WIDGET_INITIALISED="TRANSAK_WIDGET_INITIALISED",n.TRANSAK_ORDER_CREATED="TRANSAK_ORDER_CREATED",n.TRANSAK_ORDER_SUCCESSFUL="TRANSAK_ORDER_SUCCESSFUL",n.TRANSAK_ORDER_CANCELLED="TRANSAK_ORDER_CANCELLED",n.TRANSAK_ORDER_FAILED="TRANSAK_ORDER_FAILED",n.TRANSAK_WALLET_REDIRECTION="TRANSAK_WALLET_REDIRECTION",n.TRANSAK_WIDGET_CLOSE_REQUEST="TRANSAK_WIDGET_CLOSE_REQUEST",n.TRANSAK_WIDGET_CLOSE="TRANSAK_WIDGET_CLOSE",n.TRANSAK_USER_INFO_RECEIVED="TRANSAK_USER_INFO_RECEIVED",n.TRANSAK_GET_USER_REQUEST="TRANSAK_GET_USER_REQUEST",n.TRANSAK_LOGOUT_USER_REQUEST="TRANSAK_LOGOUT_USER_REQUEST",n))(s||{});function A(e,o,r){return` | ||
</svg> | ||
`;import N from"query-string";import I from"pako";var m={DEVELOPMENT:"https://localhost:5005/",STAGING:"https://global-stg.transak.com",PRODUCTION:"https://global.transak.com"};function d(e){let{environment:o="STAGING"}=e,r={},t="";return Object.keys(e).forEach(a=>{if(!["environment","widgetWidth","widgetHeight"].includes(a)){if(["walletAddressesData","userData"].includes(a)){try{r[a]=JSON.stringify(e[a])}catch{}return}if(["nftData","sourceTokenData","cryptoCurrencyData"].includes(a)){try{r[a]=btoa(JSON.stringify(e[a]))}catch{}return}if(["calldata"].includes(a)){try{r[a]=btoa(String.fromCharCode.apply(null,I.deflate(e[a])))}catch{}return}r[a]=e[a]}}),t=N.stringify(r,{arrayFormat:"comma"}),`${m[o]}?${t}`}function S(e,o){let r=d(e),t=document.createElement("div");return t.id="transakRoot",t.innerHTML=` | ||
`;import N from"query-string";import I from"pako";var m={DEVELOPMENT:"https://localhost:5005/",STAGING:"https://global-stg.transak.com",PRODUCTION:"https://global.transak.com"};function d(e){let{environment:o="STAGING"}=e,r={},t="";return Object.keys(e).forEach(a=>{if(!["environment","widgetWidth","widgetHeight"].includes(a)){if(["walletAddressesData","userData"].includes(a)){try{r[a]=JSON.stringify(e[a])}catch{}return}if(["nftData","sourceTokenData","cryptoCurrencyData","tokenData"].includes(a)){try{r[a]=btoa(JSON.stringify(e[a]))}catch{}return}if(["calldata"].includes(a)){try{r[a]=btoa(String.fromCharCode.apply(null,I.deflate(e[a])))}catch{}return}r[a]=e[a]}}),t=N.stringify(r,{arrayFormat:"comma"}),`${m[o]}?${t}`}function S(e,o){let r=d(e),t=document.createElement("div");return t.id="transakRoot",t.innerHTML=` | ||
<div class="transak-modal"> | ||
@@ -72,0 +72,0 @@ ${_} |
{ | ||
"name": "@transak/transak-sdk", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Transak SDK that allows you to easily integrate fiat on/off ramp", | ||
@@ -5,0 +5,0 @@ "type": "module", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
58522
306