@coinflowlabs/vue 1.0.6 → 1.0.7

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/README.md CHANGED
@@ -47,8 +47,12 @@ Props:
47
47
 
48
48
  # Changelog
49
49
 
50
+ ## 1.0.7
51
+
52
+ - Improving Withdraw With Session Keys
53
+
50
54
  ## 1.0.6
51
- -
55
+
52
56
  - Add credentialless to iframe
53
57
 
54
58
  ## 1.0.5
@@ -7,7 +7,7 @@ function Yr(n) {
7
7
  return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
8
8
  }
9
9
  function Wi(n) {
10
- if (n.__esModule) return n;
10
+ if (Object.prototype.hasOwnProperty.call(n, "__esModule")) return n;
11
11
  var t = n.default;
12
12
  if (typeof t == "function") {
13
13
  var e = function r() {
@@ -1,4 +1,4 @@
1
- (function(yt,et){typeof exports=="object"&&typeof module<"u"?et(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],et):(yt=typeof globalThis<"u"?globalThis:yt||self,et(yt.VueTypeWriter={},yt.Vue))})(this,function(yt,et){"use strict";var Qf=Object.defineProperty;var td=(yt,et,ir)=>et in yt?Qf(yt,et,{enumerable:!0,configurable:!0,writable:!0,value:ir}):yt[et]=ir;var fe=(yt,et,ir)=>td(yt,typeof et!="symbol"?et+"":et,ir);var ir=(n=>(n.Credits="Credits",n.USDC="USDC",n.Bank="Bank",n))(ir||{}),ms=(n=>(n.Rounded="rounded",n.Sharp="sharp",n.Pill="pill",n))(ms||{}),ws=(n=>(n.NoPreference="NoPreference",n.Frictionless="Frictionless",n.Challenge="Challenge",n))(ws||{}),bs=(n=>(n.card="card",n.ach="ach",n.fasterPayments="fasterPayments",n.sepa="sepa",n.pix="pix",n.usdc="usdc",n.googlePay="googlePay",n.applePay="applePay",n.credits="credits",n.crypto="crypto",n))(bs||{}),br=(n=>(n.VISA="VISA",n.MASTERCARD="MSTR",n.AMEX="AMEX",n.DISCOVER="DISC",n))(br||{});function Nr(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function Nn(n){if(n.__esModule)return n;var t=n.default;if(typeof t=="function"){var e=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var s=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,s.get?s:{enumerable:!0,get:function(){return n[r]}})}),e}var Fn={},Fr={},ks;function Na(){if(ks)return Fr;ks=1,Fr.byteLength=u,Fr.toByteArray=g,Fr.fromByteArray=M;for(var n=[],t=[],e=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,i=r.length;s<i;++s)n[s]=r[s],t[r.charCodeAt(s)]=s;t[45]=62,t[95]=63;function o(R){var C=R.length;if(C%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var _=R.indexOf("=");_===-1&&(_=C);var T=_===C?0:4-_%4;return[_,T]}function u(R){var C=o(R),_=C[0],T=C[1];return(_+T)*3/4-T}function f(R,C,_){return(C+_)*3/4-_}function g(R){var C,_=o(R),T=_[0],O=_[1],$=new e(f(R,T,O)),q=0,X=O>0?T-4:T,W;for(W=0;W<X;W+=4)C=t[R.charCodeAt(W)]<<18|t[R.charCodeAt(W+1)]<<12|t[R.charCodeAt(W+2)]<<6|t[R.charCodeAt(W+3)],$[q++]=C>>16&255,$[q++]=C>>8&255,$[q++]=C&255;return O===2&&(C=t[R.charCodeAt(W)]<<2|t[R.charCodeAt(W+1)]>>4,$[q++]=C&255),O===1&&(C=t[R.charCodeAt(W)]<<10|t[R.charCodeAt(W+1)]<<4|t[R.charCodeAt(W+2)]>>2,$[q++]=C>>8&255,$[q++]=C&255),$}function w(R){return n[R>>18&63]+n[R>>12&63]+n[R>>6&63]+n[R&63]}function k(R,C,_){for(var T,O=[],$=C;$<_;$+=3)T=(R[$]<<16&16711680)+(R[$+1]<<8&65280)+(R[$+2]&255),O.push(w(T));return O.join("")}function M(R){for(var C,_=R.length,T=_%3,O=[],$=16383,q=0,X=_-T;q<X;q+=$)O.push(k(R,q,q+$>X?X:q+$));return T===1?(C=R[_-1],O.push(n[C>>2]+n[C<<4&63]+"==")):T===2&&(C=(R[_-2]<<8)+R[_-1],O.push(n[C>>10]+n[C>>4&63]+n[C<<2&63]+"=")),O.join("")}return Fr}var tn={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var vs;function Fa(){return vs||(vs=1,tn.read=function(n,t,e,r,s){var i,o,u=s*8-r-1,f=(1<<u)-1,g=f>>1,w=-7,k=e?s-1:0,M=e?-1:1,R=n[t+k];for(k+=M,i=R&(1<<-w)-1,R>>=-w,w+=u;w>0;i=i*256+n[t+k],k+=M,w-=8);for(o=i&(1<<-w)-1,i>>=-w,w+=r;w>0;o=o*256+n[t+k],k+=M,w-=8);if(i===0)i=1-g;else{if(i===f)return o?NaN:(R?-1:1)*(1/0);o=o+Math.pow(2,r),i=i-g}return(R?-1:1)*o*Math.pow(2,i-r)},tn.write=function(n,t,e,r,s,i){var o,u,f,g=i*8-s-1,w=(1<<g)-1,k=w>>1,M=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,R=r?0:i-1,C=r?1:-1,_=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,o=w):(o=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-o))<1&&(o--,f*=2),o+k>=1?t+=M/f:t+=M*Math.pow(2,1-k),t*f>=2&&(o++,f/=2),o+k>=w?(u=0,o=w):o+k>=1?(u=(t*f-1)*Math.pow(2,s),o=o+k):(u=t*Math.pow(2,k-1)*Math.pow(2,s),o=0));s>=8;n[e+R]=u&255,R+=C,u/=256,s-=8);for(o=o<<s|u,g+=s;g>0;n[e+R]=o&255,R+=C,o/=256,g-=8);n[e+R-C]|=_*128}),tn}/*!
1
+ (function(yt,et){typeof exports=="object"&&typeof module<"u"?et(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],et):(yt=typeof globalThis<"u"?globalThis:yt||self,et(yt.VueTypeWriter={},yt.Vue))})(this,function(yt,et){"use strict";var Qf=Object.defineProperty;var td=(yt,et,ir)=>et in yt?Qf(yt,et,{enumerable:!0,configurable:!0,writable:!0,value:ir}):yt[et]=ir;var fe=(yt,et,ir)=>td(yt,typeof et!="symbol"?et+"":et,ir);var ir=(n=>(n.Credits="Credits",n.USDC="USDC",n.Bank="Bank",n))(ir||{}),ms=(n=>(n.Rounded="rounded",n.Sharp="sharp",n.Pill="pill",n))(ms||{}),ws=(n=>(n.NoPreference="NoPreference",n.Frictionless="Frictionless",n.Challenge="Challenge",n))(ws||{}),bs=(n=>(n.card="card",n.ach="ach",n.fasterPayments="fasterPayments",n.sepa="sepa",n.pix="pix",n.usdc="usdc",n.googlePay="googlePay",n.applePay="applePay",n.credits="credits",n.crypto="crypto",n))(bs||{}),br=(n=>(n.VISA="VISA",n.MASTERCARD="MSTR",n.AMEX="AMEX",n.DISCOVER="DISC",n))(br||{});function Nr(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function Nn(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var t=n.default;if(typeof t=="function"){var e=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var s=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,s.get?s:{enumerable:!0,get:function(){return n[r]}})}),e}var Fn={},Fr={},ks;function Na(){if(ks)return Fr;ks=1,Fr.byteLength=u,Fr.toByteArray=g,Fr.fromByteArray=M;for(var n=[],t=[],e=typeof Uint8Array<"u"?Uint8Array:Array,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,i=r.length;s<i;++s)n[s]=r[s],t[r.charCodeAt(s)]=s;t[45]=62,t[95]=63;function o(R){var C=R.length;if(C%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var _=R.indexOf("=");_===-1&&(_=C);var T=_===C?0:4-_%4;return[_,T]}function u(R){var C=o(R),_=C[0],T=C[1];return(_+T)*3/4-T}function f(R,C,_){return(C+_)*3/4-_}function g(R){var C,_=o(R),T=_[0],O=_[1],$=new e(f(R,T,O)),q=0,X=O>0?T-4:T,W;for(W=0;W<X;W+=4)C=t[R.charCodeAt(W)]<<18|t[R.charCodeAt(W+1)]<<12|t[R.charCodeAt(W+2)]<<6|t[R.charCodeAt(W+3)],$[q++]=C>>16&255,$[q++]=C>>8&255,$[q++]=C&255;return O===2&&(C=t[R.charCodeAt(W)]<<2|t[R.charCodeAt(W+1)]>>4,$[q++]=C&255),O===1&&(C=t[R.charCodeAt(W)]<<10|t[R.charCodeAt(W+1)]<<4|t[R.charCodeAt(W+2)]>>2,$[q++]=C>>8&255,$[q++]=C&255),$}function w(R){return n[R>>18&63]+n[R>>12&63]+n[R>>6&63]+n[R&63]}function k(R,C,_){for(var T,O=[],$=C;$<_;$+=3)T=(R[$]<<16&16711680)+(R[$+1]<<8&65280)+(R[$+2]&255),O.push(w(T));return O.join("")}function M(R){for(var C,_=R.length,T=_%3,O=[],$=16383,q=0,X=_-T;q<X;q+=$)O.push(k(R,q,q+$>X?X:q+$));return T===1?(C=R[_-1],O.push(n[C>>2]+n[C<<4&63]+"==")):T===2&&(C=(R[_-2]<<8)+R[_-1],O.push(n[C>>10]+n[C>>4&63]+n[C<<2&63]+"=")),O.join("")}return Fr}var tn={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var vs;function Fa(){return vs||(vs=1,tn.read=function(n,t,e,r,s){var i,o,u=s*8-r-1,f=(1<<u)-1,g=f>>1,w=-7,k=e?s-1:0,M=e?-1:1,R=n[t+k];for(k+=M,i=R&(1<<-w)-1,R>>=-w,w+=u;w>0;i=i*256+n[t+k],k+=M,w-=8);for(o=i&(1<<-w)-1,i>>=-w,w+=r;w>0;o=o*256+n[t+k],k+=M,w-=8);if(i===0)i=1-g;else{if(i===f)return o?NaN:(R?-1:1)*(1/0);o=o+Math.pow(2,r),i=i-g}return(R?-1:1)*o*Math.pow(2,i-r)},tn.write=function(n,t,e,r,s,i){var o,u,f,g=i*8-s-1,w=(1<<g)-1,k=w>>1,M=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,R=r?0:i-1,C=r?1:-1,_=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,o=w):(o=Math.floor(Math.log(t)/Math.LN2),t*(f=Math.pow(2,-o))<1&&(o--,f*=2),o+k>=1?t+=M/f:t+=M*Math.pow(2,1-k),t*f>=2&&(o++,f/=2),o+k>=w?(u=0,o=w):o+k>=1?(u=(t*f-1)*Math.pow(2,s),o=o+k):(u=t*Math.pow(2,k-1)*Math.pow(2,s),o=0));s>=8;n[e+R]=u&255,R+=C,u/=256,s-=8);for(o=o<<s|u,g+=s;g>0;n[e+R]=o&255,R+=C,o/=256,g-=8);n[e+R-C]|=_*128}),tn}/*!
2
2
  * The buffer module from node.js, for the browser.
3
3
  *
4
4
  * @author Feross Aboukhadijeh <https://feross.org>
@@ -24,6 +24,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
24
24
  lockAmount?: boolean;
25
25
  transactionSigner?: string;
26
26
  origins?: string[];
27
+ sessionKey?: string;
27
28
  merchantId: string;
28
29
  env?: import('../lib/common').CoinflowEnvs;
29
30
  loaderBackground?: string;
@@ -49,6 +50,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
49
50
  lockAmount?: boolean;
50
51
  transactionSigner?: string;
51
52
  origins?: string[];
53
+ sessionKey?: string;
52
54
  merchantId: string;
53
55
  env?: import('../lib/common').CoinflowEnvs;
54
56
  loaderBackground?: string;
@@ -73,6 +75,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
73
75
  lockAmount?: boolean;
74
76
  transactionSigner?: string;
75
77
  origins?: string[];
78
+ sessionKey?: string;
76
79
  merchantId: string;
77
80
  env?: import('../lib/common').CoinflowEnvs;
78
81
  loaderBackground?: string;
@@ -98,6 +101,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
98
101
  lockAmount?: boolean;
99
102
  transactionSigner?: string;
100
103
  origins?: string[];
104
+ sessionKey?: string;
101
105
  merchantId: string;
102
106
  env?: import('../lib/common').CoinflowEnvs;
103
107
  loaderBackground?: string;
@@ -123,6 +127,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
123
127
  lockAmount?: boolean;
124
128
  transactionSigner?: string;
125
129
  origins?: string[];
130
+ sessionKey?: string;
126
131
  merchantId: string;
127
132
  env?: import('../lib/common').CoinflowEnvs;
128
133
  loaderBackground?: string;
@@ -148,6 +153,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
148
153
  lockAmount?: boolean;
149
154
  transactionSigner?: string;
150
155
  origins?: string[];
156
+ sessionKey?: string;
151
157
  merchantId: string;
152
158
  env?: import('../lib/common').CoinflowEnvs;
153
159
  loaderBackground?: string;
@@ -156,31 +162,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
156
162
  theme?: import('../lib/common').MerchantTheme;
157
163
  wallet: import('../lib/common').EthWallet;
158
164
  usePermit?: boolean;
159
- } | {
160
- walletPubkey: string | null | undefined;
161
- route: string;
162
- transaction: undefined;
163
- sessionKey: string;
164
- signer: import('../lib/common').SolanaWalletProps | import('../lib/common').NearWalletProps | import('../lib/common').EthWalletProps | import('../lib/common').PolygonWalletProps | import('../lib/common').BaseWalletProps | import('../lib/common').ArbitrumWalletProps;
165
- blockchain?: undefined;
166
- onSuccess?: import('../lib/common').OnSuccessMethod;
167
- tokens?: string[];
168
- lockDefaultToken?: boolean;
169
- amount?: number;
170
- email?: string;
171
- bankAccountLinkRedirect?: string;
172
- additionalWallets?: {
173
- wallet: string;
174
- blockchain: "solana" | "eth" | "near" | "polygon" | "base" | "arbitrum";
175
- }[];
176
- lockAmount?: boolean;
177
- transactionSigner?: string;
178
- origins?: string[];
179
- merchantId: string;
180
- env?: import('../lib/common').CoinflowEnvs;
181
- loaderBackground?: string;
182
- handleHeightChange?: (height: string) => void;
183
- theme?: import('../lib/common').MerchantTheme;
184
165
  };
185
166
  messageHandlers(): {
186
167
  handleHeightChange: ((height: string) => void) | undefined;
@@ -312,6 +312,10 @@ export interface CoinflowCommonWithdrawProps extends CoinflowTypes {
312
312
  * The origin array would then be: [https://foo.com,https://bar.com]
313
313
  */
314
314
  origins?: string[];
315
+ /**
316
+ * If the withdrawer is authenticated with a sessionKey pass it here.
317
+ */
318
+ sessionKey?: string;
315
319
  }
316
320
  export type WalletTypes = SolanaWallet | NearWallet | EthWallet;
317
321
  export interface SolanaWalletProps {
@@ -346,12 +350,7 @@ export interface ArbitrumWalletProps {
346
350
  blockchain: 'arbitrum';
347
351
  }
348
352
  export type CoinflowArbitrumWithdrawProps = CoinflowEvmWithdrawProps & ArbitrumWalletProps;
349
- export interface CoinflowSessionKeyWithdrawProps extends CoinflowCommonWithdrawProps {
350
- sessionKey: string;
351
- signer: SolanaWalletProps | NearWalletProps | EthWalletProps | PolygonWalletProps | BaseWalletProps | ArbitrumWalletProps;
352
- blockchain?: undefined;
353
- }
354
- export type CoinflowWithdrawProps = CoinflowSolanaWithdrawProps | CoinflowNearWithdrawProps | CoinflowEthWithdrawProps | CoinflowPolygonWithdrawProps | CoinflowBaseWithdrawProps | CoinflowArbitrumWithdrawProps | CoinflowSessionKeyWithdrawProps;
353
+ export type CoinflowWithdrawProps = CoinflowSolanaWithdrawProps | CoinflowNearWithdrawProps | CoinflowEthWithdrawProps | CoinflowPolygonWithdrawProps | CoinflowBaseWithdrawProps | CoinflowArbitrumWithdrawProps;
355
354
  export interface CommonEvmRedeem {
356
355
  waitForHash?: boolean;
357
356
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coinflowlabs/vue",
3
3
  "private": false,
4
- "version": "1.0.6",
4
+ "version": "1.0.7",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",
@@ -31,21 +31,21 @@
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/bs58": "^4.0.4",
34
- "@rushstack/eslint-patch": "^1.10.5",
35
- "@types/node": "^22.13.5",
36
- "@vitejs/plugin-vue": "^5.2.1",
34
+ "@rushstack/eslint-patch": "^1.11.0",
35
+ "@types/node": "^22.13.10",
36
+ "@vitejs/plugin-vue": "^5.2.2",
37
37
  "@vue/eslint-config-prettier": "^10.2.0",
38
- "@vue/eslint-config-typescript": "^14.4.0",
38
+ "@vue/eslint-config-typescript": "^14.5.0",
39
39
  "copyfiles": "^2.4.1",
40
40
  "eslint": "^8.57.1",
41
- "eslint-plugin-vue": "^9.32.0",
42
- "prettier": "^3.5.2",
41
+ "eslint-plugin-vue": "^10.0.0",
42
+ "prettier": "^3.5.3",
43
43
  "typescript": "^5.6.3",
44
- "vite": "^6.2.0",
44
+ "vite": "^6.2.2",
45
45
  "vite-plugin-dts": "^4.4.0",
46
46
  "vitepress": "^1.6.3",
47
47
  "vue": "^3.5.13",
48
- "vue-tsc": "^2.2.4"
48
+ "vue-tsc": "^2.2.8"
49
49
  },
50
50
  "dependencies": {
51
51
  "lz-string": "^1.5.0"