@dodoex/wallet-web3 0.0.58 → 0.0.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/{alchemy-provider-5870b6fa-275a8455.js → alchemy-provider-5870b6fa-2ed4832c.js} +1 -1
  2. package/dist/{alchemy-websocket-provider-213da986-aa9ecfd0.js → alchemy-websocket-provider-213da986-ddfcb433.js} +1 -1
  3. package/dist/{blocto-791cbb27.js → blocto-d43d7341.js} +1 -1
  4. package/dist/{ccip-7dadf6a9.js → ccip-75215805.js} +1 -1
  5. package/dist/cjs/{alchemy-provider-5870b6fa-29cfb8a1.cjs → alchemy-provider-5870b6fa-16a63e70.cjs} +1 -1
  6. package/dist/cjs/{alchemy-websocket-provider-213da986-649c3604.cjs → alchemy-websocket-provider-213da986-b8cbe6b0.cjs} +1 -1
  7. package/dist/cjs/{blocto-abe28c89.cjs → blocto-d830cc24.cjs} +1 -1
  8. package/dist/cjs/{ccip-ece82f8b.cjs → ccip-ca9ae56e.cjs} +1 -1
  9. package/dist/cjs/{draggabilly-30280796.cjs → draggabilly-79ddacdd.cjs} +1 -1
  10. package/dist/cjs/id-4507e35f.cjs +1 -0
  11. package/dist/cjs/{index-f92d7ecc.cjs → index-06be4ff2.cjs} +1 -1
  12. package/dist/cjs/{index-7a50f668.cjs → index-094f81dc.cjs} +3 -3
  13. package/dist/cjs/{index-4eb76886.cjs → index-5460eb74.cjs} +1 -1
  14. package/dist/cjs/index-64722cd0.cjs +9 -0
  15. package/dist/cjs/{index-71cfb84c.cjs → index-65572df9.cjs} +1 -1
  16. package/dist/cjs/{index-e2503ea7.cjs → index-ad0b02bb.cjs} +1 -1
  17. package/dist/cjs/{index-3dcd8d0f.cjs → index-caa0c996.cjs} +1 -1
  18. package/dist/cjs/index-cb645a87.cjs +15 -0
  19. package/dist/cjs/{index-379d33d3.cjs → index-d2573d17.cjs} +1 -1
  20. package/dist/cjs/{index-455207fe.cjs → index-f2c8038e.cjs} +1 -1
  21. package/dist/cjs/index.cjs +1 -1
  22. package/dist/cjs/{index.es-ab8e2d3e.cjs → index.es-ee15fea2.cjs} +1 -1
  23. package/dist/cjs/{interface-1297e999.cjs → interface-8bbec4f0.cjs} +1 -1
  24. package/dist/cjs/{lib-typedarrays-04be10a0.cjs → lib-typedarrays-b45db9a1.cjs} +1 -1
  25. package/dist/cjs/{portis-4f29962a.cjs → portis-961205cf.cjs} +1 -1
  26. package/dist/cjs/{provider-84f7b1ae.cjs → provider-dd1eef68.cjs} +1 -1
  27. package/dist/cjs/{rainbow-9be8869f.cjs → rainbow-a299d356.cjs} +1 -1
  28. package/dist/cjs/{sha224-07a623f8.cjs → sha224-15a92c1b.cjs} +1 -1
  29. package/dist/cjs/{sha256-135a5849.cjs → sha256-05d101c7.cjs} +1 -1
  30. package/dist/cjs/{typed-data-fe081a9e.cjs → typed-data-42019304.cjs} +1 -1
  31. package/dist/cjs/{uAuth-c1bbe504.cjs → uAuth-eb3b2467.cjs} +1 -1
  32. package/dist/cjs/v4-3e682452.cjs +1 -0
  33. package/dist/cjs/{walletConnect-ece1a9c9.cjs → walletConnect-2c328de3.cjs} +1 -1
  34. package/dist/cjs/{walletLink-cabf8e17.cjs → walletLink-29b8f1c9.cjs} +2 -2
  35. package/dist/{draggabilly-b9eae80b.js → draggabilly-32784a47.js} +1 -1
  36. package/dist/id-0214e2ce.js +1 -0
  37. package/dist/{index-470a8086.js → index-35324bc1.js} +3 -3
  38. package/dist/index-65b0f053.js +9 -0
  39. package/dist/{index-da293700.js → index-7df41cc4.js} +1 -1
  40. package/dist/{index-da0bdf44.js → index-88d2c42d.js} +1 -1
  41. package/dist/{index-f68a386f.js → index-964ed3a9.js} +3 -3
  42. package/dist/{index-9326c292.js → index-bed51078.js} +1 -1
  43. package/dist/{index-2bab1170.js → index-c7682b0b.js} +1 -1
  44. package/dist/{index-d7a77120.js → index-e248c87f.js} +1 -1
  45. package/dist/{index-6bad863a.js → index-e7156d31.js} +1 -1
  46. package/dist/{index-308a7e2f.js → index-ec60e4bd.js} +1 -1
  47. package/dist/{index.es-0c832906.js → index.es-7135e671.js} +1 -1
  48. package/dist/index.js +1 -1
  49. package/dist/{interface-f49b83ae.js → interface-6f99ee10.js} +1 -1
  50. package/dist/{lib-typedarrays-6d518241.js → lib-typedarrays-079e730a.js} +1 -1
  51. package/dist/{portis-29b24667.js → portis-2609b313.js} +1 -1
  52. package/dist/{provider-28ce7015.js → provider-711cc7e1.js} +1 -1
  53. package/dist/{rainbow-3d9a3b7d.js → rainbow-8ced3aac.js} +1 -1
  54. package/dist/sha224-9e2e0a0d.js +1 -0
  55. package/dist/{sha256-5075706a.js → sha256-e3045510.js} +1 -1
  56. package/dist/{typed-data-69ea9cd3.js → typed-data-33459e88.js} +1 -1
  57. package/dist/{uAuth-6fab8b0f.js → uAuth-f9e91ad8.js} +1 -1
  58. package/dist/v4-95658a31.js +1 -0
  59. package/dist/{walletConnect-787c2108.js → walletConnect-37fb9cd8.js} +1 -1
  60. package/dist/{walletLink-248d773b.js → walletLink-4c0608b4.js} +2 -2
  61. package/package.json +2 -2
  62. package/dist/cjs/id-39097b77.cjs +0 -1
  63. package/dist/cjs/index-5af978c1.cjs +0 -37
  64. package/dist/cjs/index-85ea75ed.cjs +0 -15
  65. package/dist/id-9a04f0f9.js +0 -1
  66. package/dist/index-7757b00c.js +0 -37
  67. package/dist/sha224-e1e17438.js +0 -1
@@ -1 +1 @@
1
- import{_ as t,D as e,Z as n,$ as r,a0 as o,C as i}from"./index-f68a386f.js";import{getAddress as s}from"@ethersproject/address";import{Signer as a}from"@ethersproject/abstract-signer";import{UniPassPopupSDK as d}from"@unipasswallet/popup-sdk";import{defineReadOnly as l}from"@ethersproject/properties";import"@ethersproject/providers";import"zustand";import"@ethersproject/bytes";import"buffer";import"@ethersproject/abstract-provider";import"@ethersproject/contracts";import"events";import"@ethersproject/constants";import"@ethersproject/transactions";class c extends a{constructor(t,e,n,r){super(),this._address=n,this._index=null!=r?r:0,this.provider=t,this.upWallet=e}_legacySignMessage(t){throw new Error("Method not implemented.")}sendUncheckedTransaction(t){throw new Error("Method not implemented.")}unlock(t){throw new Error("Method not implemented.")}getAddress(){return t(this,void 0,void 0,(function*(){return Promise.resolve(s(this._address))}))}signMessage(e){return t(this,void 0,void 0,(function*(){if(!this.upWallet)throw new Error(`address unknown '${e}'`);return yield this.upWallet.signMessage(e,{isEIP191Prefix:!0,onAuthChain:!0})}))}_signTypedData(e,n,r){return t(this,void 0,void 0,(function*(){throw new Error("Method not implemented.")}))}signTransaction(e){return t(this,void 0,void 0,(function*(){if(!this.upWallet)throw new Error(`address unknown '${e.from}'`);return this.upWallet.sendTransaction({from:e.from,to:e.to,value:e.value,data:e.data})}))}sendTransaction(e){return t(this,void 0,void 0,(function*(){if(!this.upWallet)throw new Error(`address unknown '${e.from}'`);return{hash:yield this.upWallet.sendTransaction({from:e.from,to:e.to,value:e.value,data:e.data}),from:e.from}}))}connect(t){return new c(null!=t?t:this.provider,this.upWallet,this._address,this._index)}connectUnchecked(){return new c(this.provider,this.upWallet,this._address,this._index)}}function u(i){var a,u,p;return t(this,void 0,void 0,(function*(){const h=i.JsonRpcProvider||e,v=null!==(a=i.chainId)&&void 0!==a?a:1;let m=null!==(u=i.rpcUrl)&&void 0!==u?u:null===(p=i.rpc)||void 0===p?void 0:p[v];const f=new class extends h{constructor(t,e){super(t,e),this.updateUpWalletConfig=t=>{var e;const o=null===(e=i.rpc)||void 0===e?void 0:e[t];if(!n.includes(t))throw new Error(`chainId ${t} not supported`);if(this.upWallet.updateConfig({chainType:r(t),nodeRPC:o,appSettings:{chain:r(t)}}),"object"==typeof this.network)this.network.chainId=t;else{const e={chainId:t,name:"unknown"};l(this,"_network",e),this.emit("network",e,null)}return this.rpcUrl=o,this.emit("chainChanged",`0x${t.toString(16)}`),{result:!0}},this.rpcUrl=t,this.upWallet=new d({env:o(v),chainType:r(v),appSettings:{appIcon:i.appLogoUrl,appName:i.appName,chain:r(v)},rpcUrl:m,storageType:"sessionStorage"})}getSigner(){var t;const e=this.upWallet.getAccount();return new c(f,this.upWallet,null!==(t=null==e?void 0:e.address)&&void 0!==t?t:"",0)}connect(){return t(this,void 0,void 0,(function*(){const t=this.upWallet.getAccount();return t||(yield this.upWallet.login({email:false}))}))}disconnect(){return t(this,void 0,void 0,(function*(){yield this.upWallet.logout()}))}listAccounts(){return t(this,void 0,void 0,(function*(){const t=this.upWallet.getAccount();return(null==t?void 0:t.address)?[null==t?void 0:t.address]:[]}))}getAddress(){const t=this.upWallet.getAccount();return Promise.resolve((null==t?void 0:t.address)?s(null==t?void 0:t.address):null)}}(m,v);return f}))}function p(e,n){return t(this,void 0,void 0,(function*(){const t=yield u(e);return t.on("connect",n.connect),t.on("disconnect",(t=>{n.disconnect(t),n.accountsChanged([])})),t.on("accountsChanged",n.accountsChanged),t.on("chainChanged",n.chainChanged),t.on("message",(({type:t,data:e})=>n.message(t,e))),yield t.connect(),t}))}function h(){var t;null===(t=i.getState().provider)||void 0===t||t.disconnect()}function v(t){var e,n;return null===(n=null===(e=i.getState().provider)||void 0===e?void 0:e.upWallet)||void 0===n?void 0:n.signTypedData(t)}function m(t){var e;const r=t.addChainParameters.chainId,o="string"==typeof r&&(null==r?void 0:r.startsWith("0x"))?parseInt(r,16):Number(r);if(!n.includes(o))throw new Error(`chainId ${o} not supported`);return null===(e=i.getState().provider)||void 0===e?void 0:e.updateUpWalletConfig(o)}export{u as createProvider,p as default,h as disconnectWallet,v as signTypedData,m as switchChain};
1
+ import{_ as t,D as e,Z as n,$ as r,a0 as o,C as i}from"./index-964ed3a9.js";import{getAddress as s}from"@ethersproject/address";import{Signer as a}from"@ethersproject/abstract-signer";import{UniPassPopupSDK as d}from"@unipasswallet/popup-sdk";import{defineReadOnly as l}from"@ethersproject/properties";import"@ethersproject/providers";import"zustand";import"@ethersproject/bytes";import"buffer";import"@ethersproject/abstract-provider";import"@ethersproject/contracts";import"events";import"@ethersproject/constants";import"@ethersproject/transactions";class c extends a{constructor(t,e,n,r){super(),this._address=n,this._index=null!=r?r:0,this.provider=t,this.upWallet=e}_legacySignMessage(t){throw new Error("Method not implemented.")}sendUncheckedTransaction(t){throw new Error("Method not implemented.")}unlock(t){throw new Error("Method not implemented.")}getAddress(){return t(this,void 0,void 0,(function*(){return Promise.resolve(s(this._address))}))}signMessage(e){return t(this,void 0,void 0,(function*(){if(!this.upWallet)throw new Error(`address unknown '${e}'`);return yield this.upWallet.signMessage(e,{isEIP191Prefix:!0,onAuthChain:!0})}))}_signTypedData(e,n,r){return t(this,void 0,void 0,(function*(){throw new Error("Method not implemented.")}))}signTransaction(e){return t(this,void 0,void 0,(function*(){if(!this.upWallet)throw new Error(`address unknown '${e.from}'`);return this.upWallet.sendTransaction({from:e.from,to:e.to,value:e.value,data:e.data})}))}sendTransaction(e){return t(this,void 0,void 0,(function*(){if(!this.upWallet)throw new Error(`address unknown '${e.from}'`);return{hash:yield this.upWallet.sendTransaction({from:e.from,to:e.to,value:e.value,data:e.data}),from:e.from}}))}connect(t){return new c(null!=t?t:this.provider,this.upWallet,this._address,this._index)}connectUnchecked(){return new c(this.provider,this.upWallet,this._address,this._index)}}function u(i){var a,u,p;return t(this,void 0,void 0,(function*(){const h=i.JsonRpcProvider||e,v=null!==(a=i.chainId)&&void 0!==a?a:1;let m=null!==(u=i.rpcUrl)&&void 0!==u?u:null===(p=i.rpc)||void 0===p?void 0:p[v];const f=new class extends h{constructor(t,e){super(t,e),this.updateUpWalletConfig=t=>{var e;const o=null===(e=i.rpc)||void 0===e?void 0:e[t];if(!n.includes(t))throw new Error(`chainId ${t} not supported`);if(this.upWallet.updateConfig({chainType:r(t),nodeRPC:o,appSettings:{chain:r(t)}}),"object"==typeof this.network)this.network.chainId=t;else{const e={chainId:t,name:"unknown"};l(this,"_network",e),this.emit("network",e,null)}return this.rpcUrl=o,this.emit("chainChanged",`0x${t.toString(16)}`),{result:!0}},this.rpcUrl=t,this.upWallet=new d({env:o(v),chainType:r(v),appSettings:{appIcon:i.appLogoUrl,appName:i.appName,chain:r(v)},rpcUrl:m,storageType:"sessionStorage"})}getSigner(){var t;const e=this.upWallet.getAccount();return new c(f,this.upWallet,null!==(t=null==e?void 0:e.address)&&void 0!==t?t:"",0)}connect(){return t(this,void 0,void 0,(function*(){const t=this.upWallet.getAccount();return t||(yield this.upWallet.login({email:false}))}))}disconnect(){return t(this,void 0,void 0,(function*(){yield this.upWallet.logout()}))}listAccounts(){return t(this,void 0,void 0,(function*(){const t=this.upWallet.getAccount();return(null==t?void 0:t.address)?[null==t?void 0:t.address]:[]}))}getAddress(){const t=this.upWallet.getAccount();return Promise.resolve((null==t?void 0:t.address)?s(null==t?void 0:t.address):null)}}(m,v);return f}))}function p(e,n){return t(this,void 0,void 0,(function*(){const t=yield u(e);return t.on("connect",n.connect),t.on("disconnect",(t=>{n.disconnect(t),n.accountsChanged([])})),t.on("accountsChanged",n.accountsChanged),t.on("chainChanged",n.chainChanged),t.on("message",(({type:t,data:e})=>n.message(t,e))),yield t.connect(),t}))}function h(){var t;null===(t=i.getState().provider)||void 0===t||t.disconnect()}function v(t){var e,n;return null===(n=null===(e=i.getState().provider)||void 0===e?void 0:e.upWallet)||void 0===n?void 0:n.signTypedData(t)}function m(t){var e;const r=t.addChainParameters.chainId,o="string"==typeof r&&(null==r?void 0:r.startsWith("0x"))?parseInt(r,16):Number(r);if(!n.includes(o))throw new Error(`chainId ${o} not supported`);return null===(e=i.getState().provider)||void 0===e?void 0:e.updateUpWalletConfig(o)}export{u as createProvider,p as default,h as disconnectWallet,v as signTypedData,m as switchChain};
@@ -1,4 +1,4 @@
1
- import{a1 as e,a2 as t,a3 as n,a4 as s,Q as i,a5 as o,a6 as r,a7 as a,a8 as c,a9 as l,aa as d,ab as u,ac as h,ad as p,ae as m,af as f,ag as g,ah as w,ai as k,aj as y,ak as b,al as E,am as C,an as v,ao as S,ap as A,aq as I,ar as x,as as O,at as R,au as N,av as T,aw as M,ax as _,ay as B,az as P,aA as D,_ as j,A as L}from"./index-f68a386f.js";export{ax as isInBinance}from"./index-f68a386f.js";import*as F from"react";import z,{createContext as U,useState as H,useEffect as q,useCallback as V,useContext as W}from"react";import $ from"react-dom";import{I as J}from"./interface-f49b83ae.js";import"@ethersproject/address";import"@ethersproject/providers";import"zustand";import"@ethersproject/bytes";import"@ethersproject/properties";import"@ethersproject/abstract-signer";import"buffer";import"@ethersproject/abstract-provider";import"@ethersproject/contracts";import"events";import"@ethersproject/constants";import"@ethersproject/transactions";import"./id-9a04f0f9.js";var Q,K={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"},G=$;if("production"===process.env.NODE_ENV)Q=G.createRoot,G.hydrateRoot;else{var Z=G.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Q=function(e,t){Z.usingClientEntryPoint=!0;try{return G.createRoot(e,t)}finally{Z.usingClientEntryPoint=!1}}}var Y,X,ee=Object.defineProperty,te=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,ie=(e,t,n)=>t in e?ee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oe=(e,t)=>{for(var n in t||(t={}))ne.call(t,n)&&ie(e,n,t[n]);if(te)for(var n of te(t))se.call(t,n)&&ie(e,n,t[n]);return e},re=(e,t)=>{var n={};for(var s in e)ne.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&te)for(var s of te(e))t.indexOf(s)<0&&se.call(e,s)&&(n[s]=e[s]);return n};(e=>{const t=class{constructor(e,n,s,i){if(this.version=e,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version value out of range");if(i<-1||i>7)throw new RangeError("Mask value out of range");this.size=4*e+17;let r=[];for(let e=0;e<this.size;e++)r.push(!1);for(let e=0;e<this.size;e++)this.modules.push(r.slice()),this.isFunction.push(r.slice());this.drawFunctionPatterns();const a=this.addEccAndInterleave(s);if(this.drawCodewords(a),-1==i){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const n=this.getPenaltyScore();n<e&&(i=t,e=n),this.applyMask(t)}}o(0<=i&&i<=7),this.mask=i,this.applyMask(i),this.drawFormatBits(i),this.isFunction=[]}static encodeText(n,s){const i=e.QrSegment.makeSegments(n);return t.encodeSegments(i,s)}static encodeBinary(n,s){const i=e.QrSegment.makeBytes(n);return t.encodeSegments([i],s)}static encodeSegments(e,n,i=1,r=40,c=-1,l=!0){if(!(t.MIN_VERSION<=i&&i<=r&&r<=t.MAX_VERSION)||c<-1||c>7)throw new RangeError("Invalid value");let d,u;for(d=i;;d++){const s=8*t.getNumDataCodewords(d,n),i=a.getTotalBits(e,d);if(i<=s){u=i;break}if(d>=r)throw new RangeError("Data too long")}for(const e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])l&&u<=8*t.getNumDataCodewords(d,e)&&(n=e);let h=[];for(const t of e){s(t.mode.modeBits,4,h),s(t.numChars,t.mode.numCharCountBits(d),h);for(const e of t.getData())h.push(e)}o(h.length==u);const p=8*t.getNumDataCodewords(d,n);o(h.length<=p),s(0,Math.min(4,p-h.length),h),s(0,(8-h.length%8)%8,h),o(h.length%8==0);for(let e=236;h.length<p;e^=253)s(e,8,h);let m=[];for(;8*m.length<h.length;)m.push(0);return h.forEach(((e,t)=>m[t>>>3]|=e<<7-(7&t))),new t(d,n,m,c)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),t=e.length;for(let n=0;n<t;n++)for(let s=0;s<t;s++)0==n&&0==s||0==n&&s==t-1||n==t-1&&0==s||this.drawAlignmentPattern(e[n],e[s]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let n=t;for(let e=0;e<10;e++)n=n<<1^1335*(n>>>9);const s=21522^(t<<10|n);o(s>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,i(s,e));this.setFunctionModule(8,7,i(s,6)),this.setFunctionModule(8,8,i(s,7)),this.setFunctionModule(7,8,i(s,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,i(s,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,i(s,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,i(s,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^7973*(e>>>11);const t=this.version<<12|e;o(t>>>18==0);for(let e=0;e<18;e++){const n=i(t,e),s=this.size-11+e%3,o=Math.floor(e/3);this.setFunctionModule(s,o,n),this.setFunctionModule(o,s,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let s=-4;s<=4;s++){const i=Math.max(Math.abs(s),Math.abs(n)),o=e+s,r=t+n;0<=o&&o<this.size&&0<=r&&r<this.size&&this.setFunctionModule(o,r,2!=i&&4!=i)}}drawAlignmentPattern(e,t){for(let n=-2;n<=2;n++)for(let s=-2;s<=2;s++)this.setFunctionModule(e+s,t+n,1!=Math.max(Math.abs(s),Math.abs(n)))}setFunctionModule(e,t,n){this.modules[t][e]=n,this.isFunction[t][e]=!0}addEccAndInterleave(e){const n=this.version,s=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(n,s))throw new RangeError("Invalid argument");const i=t.NUM_ERROR_CORRECTION_BLOCKS[s.ordinal][n],r=t.ECC_CODEWORDS_PER_BLOCK[s.ordinal][n],a=Math.floor(t.getNumRawDataModules(n)/8),c=i-a%i,l=Math.floor(a/i);let d=[];const u=t.reedSolomonComputeDivisor(r);for(let n=0,s=0;n<i;n++){let i=e.slice(s,s+l-r+(n<c?0:1));s+=i.length;const o=t.reedSolomonComputeRemainder(i,u);n<c&&i.push(0),d.push(i.concat(o))}let h=[];for(let e=0;e<d[0].length;e++)d.forEach(((t,n)=>{(e!=l-r||n>=c)&&h.push(t[e])}));return o(h.length==a),h}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let s=0;s<this.size;s++)for(let o=0;o<2;o++){const r=t-o,a=0==(t+1&2)?this.size-1-s:s;!this.isFunction[a][r]&&n<8*e.length&&(this.modules[a][r]=i(e[n>>>3],7-(7&n)),n++)}}o(n==8*e.length)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let n=0;n<this.size;n++){let s;switch(e){case 0:s=(n+t)%2==0;break;case 1:s=t%2==0;break;case 2:s=n%3==0;break;case 3:s=(n+t)%3==0;break;case 4:s=(Math.floor(n/3)+Math.floor(t/2))%2==0;break;case 5:s=n*t%2+n*t%3==0;break;case 6:s=(n*t%2+n*t%3)%2==0;break;case 7:s=((n+t)%2+n*t%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[t][n]&&s&&(this.modules[t][n]=!this.modules[t][n])}}getPenaltyScore(){let e=0;for(let n=0;n<this.size;n++){let s=!1,i=0,o=[0,0,0,0,0,0,0];for(let r=0;r<this.size;r++)this.modules[n][r]==s?(i++,5==i?e+=t.PENALTY_N1:i>5&&e++):(this.finderPenaltyAddHistory(i,o),s||(e+=this.finderPenaltyCountPatterns(o)*t.PENALTY_N3),s=this.modules[n][r],i=1);e+=this.finderPenaltyTerminateAndCount(s,i,o)*t.PENALTY_N3}for(let n=0;n<this.size;n++){let s=!1,i=0,o=[0,0,0,0,0,0,0];for(let r=0;r<this.size;r++)this.modules[r][n]==s?(i++,5==i?e+=t.PENALTY_N1:i>5&&e++):(this.finderPenaltyAddHistory(i,o),s||(e+=this.finderPenaltyCountPatterns(o)*t.PENALTY_N3),s=this.modules[r][n],i=1);e+=this.finderPenaltyTerminateAndCount(s,i,o)*t.PENALTY_N3}for(let n=0;n<this.size-1;n++)for(let s=0;s<this.size-1;s++){const i=this.modules[n][s];i==this.modules[n][s+1]&&i==this.modules[n+1][s]&&i==this.modules[n+1][s+1]&&(e+=t.PENALTY_N2)}let n=0;for(const e of this.modules)n=e.reduce(((e,t)=>e+(t?1:0)),n);const s=this.size*this.size,i=Math.ceil(Math.abs(20*n-10*s)/s)-1;return o(0<=i&&i<=9),e+=i*t.PENALTY_N4,o(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{const e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2));let n=[6];for(let s=this.size-7;n.length<e;s-=t)n.splice(1,0,s);return n}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version number out of range");let n=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;n-=(25*t-10)*t-55,e>=7&&(n-=36)}return o(208<=n&&n<=29648),n}static getNumDataCodewords(e,n){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let n=[];for(let t=0;t<e-1;t++)n.push(0);n.push(1);let s=1;for(let i=0;i<e;i++){for(let e=0;e<n.length;e++)n[e]=t.reedSolomonMultiply(n[e],s),e+1<n.length&&(n[e]^=n[e+1]);s=t.reedSolomonMultiply(s,2)}return n}static reedSolomonComputeRemainder(e,n){let s=n.map((e=>0));for(const i of e){const e=i^s.shift();s.push(0),n.forEach(((n,i)=>s[i]^=t.reedSolomonMultiply(n,e)))}return s}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw new RangeError("Byte out of range");let n=0;for(let s=7;s>=0;s--)n=n<<1^285*(n>>>7),n^=(t>>>s&1)*e;return o(n>>>8==0),n}finderPenaltyCountPatterns(e){const t=e[1];o(t<=3*this.size);const n=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(n&&e[0]>=4*t&&e[6]>=t?1:0)+(n&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};let n=t;function s(e,t,n){if(t<0||t>31||e>>>t!=0)throw new RangeError("Value out of range");for(let s=t-1;s>=0;s--)n.push(e>>>s&1)}function i(e,t){return 0!=(e>>>t&1)}function o(e){if(!e)throw new Error("Assertion error")}n.MIN_VERSION=1,n.MAX_VERSION=40,n.PENALTY_N1=3,n.PENALTY_N2=3,n.PENALTY_N3=40,n.PENALTY_N4=10,n.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],n.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=n;const r=class{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw new RangeError("Invalid argument");this.bitData=n.slice()}static makeBytes(e){let t=[];for(const n of e)s(n,8,t);return new r(r.Mode.BYTE,e.length,t)}static makeNumeric(e){if(!r.isNumeric(e))throw new RangeError("String contains non-numeric characters");let t=[];for(let n=0;n<e.length;){const i=Math.min(e.length-n,3);s(parseInt(e.substr(n,i),10),3*i+1,t),n+=i}return new r(r.Mode.NUMERIC,e.length,t)}static makeAlphanumeric(e){if(!r.isAlphanumeric(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");let t,n=[];for(t=0;t+2<=e.length;t+=2){let i=45*r.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t));i+=r.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t+1)),s(i,11,n)}return t<e.length&&s(r.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t)),6,n),new r(r.Mode.ALPHANUMERIC,e.length,n)}static makeSegments(e){return""==e?[]:r.isNumeric(e)?[r.makeNumeric(e)]:r.isAlphanumeric(e)?[r.makeAlphanumeric(e)]:[r.makeBytes(r.toUtf8ByteArray(e))]}static makeEci(e){let t=[];if(e<0)throw new RangeError("ECI assignment value out of range");if(e<128)s(e,8,t);else if(e<16384)s(2,2,t),s(e,14,t);else{if(!(e<1e6))throw new RangeError("ECI assignment value out of range");s(6,3,t),s(e,21,t)}return new r(r.Mode.ECI,0,t)}static isNumeric(e){return r.NUMERIC_REGEX.test(e)}static isAlphanumeric(e){return r.ALPHANUMERIC_REGEX.test(e)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let n=0;for(const s of e){const e=s.mode.numCharCountBits(t);if(s.numChars>=1<<e)return 1/0;n+=4+e+s.bitData.length}return n}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)"%"!=e.charAt(n)?t.push(e.charCodeAt(n)):(t.push(parseInt(e.substr(n+1,2),16)),n+=2);return t}};let a=r;a.NUMERIC_REGEX=/^[0-9]*$/,a.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,a.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",e.QrSegment=a})(Y||(Y={})),(e=>{const t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};let n=t;n.LOW=new t(0,1),n.MEDIUM=new t(1,0),n.QUARTILE=new t(2,3),n.HIGH=new t(3,2),e.Ecc=n})((X=Y||(Y={})).QrCode||(X.QrCode={})),(e=>{(e=>{const t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};let n=t;n.NUMERIC=new t(1,[10,12,14]),n.ALPHANUMERIC=new t(2,[9,11,13]),n.BYTE=new t(4,[8,16,16]),n.KANJI=new t(8,[8,10,12]),n.ECI=new t(7,[0,0,0]),e.Mode=n})(e.QrSegment||(e.QrSegment={}))})(Y||(Y={}));var ae=Y,ce={L:ae.QrCode.Ecc.LOW,M:ae.QrCode.Ecc.MEDIUM,Q:ae.QrCode.Ecc.QUARTILE,H:ae.QrCode.Ecc.HIGH},le=128,de="L",ue="#FFFFFF",he="#000000",pe=!1,me=4,fe=.1;
1
+ import{a1 as e,a2 as t,a3 as n,a4 as s,Q as i,a5 as o,a6 as r,a7 as a,a8 as c,a9 as l,aa as d,ab as u,ac as h,ad as p,ae as m,af as f,ag as g,ah as w,ai as k,aj as y,ak as b,al as E,am as C,an as v,ao as S,ap as A,aq as I,ar as x,as as O,at as R,au as N,av as T,aw as M,ax as _,ay as B,az as P,aA as D,_ as j,A as L}from"./index-964ed3a9.js";export{ax as isInBinance}from"./index-964ed3a9.js";import*as F from"react";import z,{createContext as U,useState as H,useEffect as q,useCallback as V,useContext as W}from"react";import $ from"react-dom";import{I as J}from"./interface-6f99ee10.js";import"@ethersproject/address";import"@ethersproject/providers";import"zustand";import"@ethersproject/bytes";import"@ethersproject/properties";import"@ethersproject/abstract-signer";import"buffer";import"@ethersproject/abstract-provider";import"@ethersproject/contracts";import"events";import"@ethersproject/constants";import"@ethersproject/transactions";import"./id-0214e2ce.js";var Q,K={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"},G=$;if("production"===process.env.NODE_ENV)Q=G.createRoot,G.hydrateRoot;else{var Z=G.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Q=function(e,t){Z.usingClientEntryPoint=!0;try{return G.createRoot(e,t)}finally{Z.usingClientEntryPoint=!1}}}var Y,X,ee=Object.defineProperty,te=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,ie=(e,t,n)=>t in e?ee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oe=(e,t)=>{for(var n in t||(t={}))ne.call(t,n)&&ie(e,n,t[n]);if(te)for(var n of te(t))se.call(t,n)&&ie(e,n,t[n]);return e},re=(e,t)=>{var n={};for(var s in e)ne.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(null!=e&&te)for(var s of te(e))t.indexOf(s)<0&&se.call(e,s)&&(n[s]=e[s]);return n};(e=>{const t=class{constructor(e,n,s,i){if(this.version=e,this.errorCorrectionLevel=n,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version value out of range");if(i<-1||i>7)throw new RangeError("Mask value out of range");this.size=4*e+17;let r=[];for(let e=0;e<this.size;e++)r.push(!1);for(let e=0;e<this.size;e++)this.modules.push(r.slice()),this.isFunction.push(r.slice());this.drawFunctionPatterns();const a=this.addEccAndInterleave(s);if(this.drawCodewords(a),-1==i){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const n=this.getPenaltyScore();n<e&&(i=t,e=n),this.applyMask(t)}}o(0<=i&&i<=7),this.mask=i,this.applyMask(i),this.drawFormatBits(i),this.isFunction=[]}static encodeText(n,s){const i=e.QrSegment.makeSegments(n);return t.encodeSegments(i,s)}static encodeBinary(n,s){const i=e.QrSegment.makeBytes(n);return t.encodeSegments([i],s)}static encodeSegments(e,n,i=1,r=40,c=-1,l=!0){if(!(t.MIN_VERSION<=i&&i<=r&&r<=t.MAX_VERSION)||c<-1||c>7)throw new RangeError("Invalid value");let d,u;for(d=i;;d++){const s=8*t.getNumDataCodewords(d,n),i=a.getTotalBits(e,d);if(i<=s){u=i;break}if(d>=r)throw new RangeError("Data too long")}for(const e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])l&&u<=8*t.getNumDataCodewords(d,e)&&(n=e);let h=[];for(const t of e){s(t.mode.modeBits,4,h),s(t.numChars,t.mode.numCharCountBits(d),h);for(const e of t.getData())h.push(e)}o(h.length==u);const p=8*t.getNumDataCodewords(d,n);o(h.length<=p),s(0,Math.min(4,p-h.length),h),s(0,(8-h.length%8)%8,h),o(h.length%8==0);for(let e=236;h.length<p;e^=253)s(e,8,h);let m=[];for(;8*m.length<h.length;)m.push(0);return h.forEach(((e,t)=>m[t>>>3]|=e<<7-(7&t))),new t(d,n,m,c)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),t=e.length;for(let n=0;n<t;n++)for(let s=0;s<t;s++)0==n&&0==s||0==n&&s==t-1||n==t-1&&0==s||this.drawAlignmentPattern(e[n],e[s]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let n=t;for(let e=0;e<10;e++)n=n<<1^1335*(n>>>9);const s=21522^(t<<10|n);o(s>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,i(s,e));this.setFunctionModule(8,7,i(s,6)),this.setFunctionModule(8,8,i(s,7)),this.setFunctionModule(7,8,i(s,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,i(s,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,i(s,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,i(s,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^7973*(e>>>11);const t=this.version<<12|e;o(t>>>18==0);for(let e=0;e<18;e++){const n=i(t,e),s=this.size-11+e%3,o=Math.floor(e/3);this.setFunctionModule(s,o,n),this.setFunctionModule(o,s,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let s=-4;s<=4;s++){const i=Math.max(Math.abs(s),Math.abs(n)),o=e+s,r=t+n;0<=o&&o<this.size&&0<=r&&r<this.size&&this.setFunctionModule(o,r,2!=i&&4!=i)}}drawAlignmentPattern(e,t){for(let n=-2;n<=2;n++)for(let s=-2;s<=2;s++)this.setFunctionModule(e+s,t+n,1!=Math.max(Math.abs(s),Math.abs(n)))}setFunctionModule(e,t,n){this.modules[t][e]=n,this.isFunction[t][e]=!0}addEccAndInterleave(e){const n=this.version,s=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(n,s))throw new RangeError("Invalid argument");const i=t.NUM_ERROR_CORRECTION_BLOCKS[s.ordinal][n],r=t.ECC_CODEWORDS_PER_BLOCK[s.ordinal][n],a=Math.floor(t.getNumRawDataModules(n)/8),c=i-a%i,l=Math.floor(a/i);let d=[];const u=t.reedSolomonComputeDivisor(r);for(let n=0,s=0;n<i;n++){let i=e.slice(s,s+l-r+(n<c?0:1));s+=i.length;const o=t.reedSolomonComputeRemainder(i,u);n<c&&i.push(0),d.push(i.concat(o))}let h=[];for(let e=0;e<d[0].length;e++)d.forEach(((t,n)=>{(e!=l-r||n>=c)&&h.push(t[e])}));return o(h.length==a),h}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let s=0;s<this.size;s++)for(let o=0;o<2;o++){const r=t-o,a=0==(t+1&2)?this.size-1-s:s;!this.isFunction[a][r]&&n<8*e.length&&(this.modules[a][r]=i(e[n>>>3],7-(7&n)),n++)}}o(n==8*e.length)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let n=0;n<this.size;n++){let s;switch(e){case 0:s=(n+t)%2==0;break;case 1:s=t%2==0;break;case 2:s=n%3==0;break;case 3:s=(n+t)%3==0;break;case 4:s=(Math.floor(n/3)+Math.floor(t/2))%2==0;break;case 5:s=n*t%2+n*t%3==0;break;case 6:s=(n*t%2+n*t%3)%2==0;break;case 7:s=((n+t)%2+n*t%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[t][n]&&s&&(this.modules[t][n]=!this.modules[t][n])}}getPenaltyScore(){let e=0;for(let n=0;n<this.size;n++){let s=!1,i=0,o=[0,0,0,0,0,0,0];for(let r=0;r<this.size;r++)this.modules[n][r]==s?(i++,5==i?e+=t.PENALTY_N1:i>5&&e++):(this.finderPenaltyAddHistory(i,o),s||(e+=this.finderPenaltyCountPatterns(o)*t.PENALTY_N3),s=this.modules[n][r],i=1);e+=this.finderPenaltyTerminateAndCount(s,i,o)*t.PENALTY_N3}for(let n=0;n<this.size;n++){let s=!1,i=0,o=[0,0,0,0,0,0,0];for(let r=0;r<this.size;r++)this.modules[r][n]==s?(i++,5==i?e+=t.PENALTY_N1:i>5&&e++):(this.finderPenaltyAddHistory(i,o),s||(e+=this.finderPenaltyCountPatterns(o)*t.PENALTY_N3),s=this.modules[r][n],i=1);e+=this.finderPenaltyTerminateAndCount(s,i,o)*t.PENALTY_N3}for(let n=0;n<this.size-1;n++)for(let s=0;s<this.size-1;s++){const i=this.modules[n][s];i==this.modules[n][s+1]&&i==this.modules[n+1][s]&&i==this.modules[n+1][s+1]&&(e+=t.PENALTY_N2)}let n=0;for(const e of this.modules)n=e.reduce(((e,t)=>e+(t?1:0)),n);const s=this.size*this.size,i=Math.ceil(Math.abs(20*n-10*s)/s)-1;return o(0<=i&&i<=9),e+=i*t.PENALTY_N4,o(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{const e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2));let n=[6];for(let s=this.size-7;n.length<e;s-=t)n.splice(1,0,s);return n}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version number out of range");let n=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;n-=(25*t-10)*t-55,e>=7&&(n-=36)}return o(208<=n&&n<=29648),n}static getNumDataCodewords(e,n){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let n=[];for(let t=0;t<e-1;t++)n.push(0);n.push(1);let s=1;for(let i=0;i<e;i++){for(let e=0;e<n.length;e++)n[e]=t.reedSolomonMultiply(n[e],s),e+1<n.length&&(n[e]^=n[e+1]);s=t.reedSolomonMultiply(s,2)}return n}static reedSolomonComputeRemainder(e,n){let s=n.map((e=>0));for(const i of e){const e=i^s.shift();s.push(0),n.forEach(((n,i)=>s[i]^=t.reedSolomonMultiply(n,e)))}return s}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw new RangeError("Byte out of range");let n=0;for(let s=7;s>=0;s--)n=n<<1^285*(n>>>7),n^=(t>>>s&1)*e;return o(n>>>8==0),n}finderPenaltyCountPatterns(e){const t=e[1];o(t<=3*this.size);const n=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(n&&e[0]>=4*t&&e[6]>=t?1:0)+(n&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};let n=t;function s(e,t,n){if(t<0||t>31||e>>>t!=0)throw new RangeError("Value out of range");for(let s=t-1;s>=0;s--)n.push(e>>>s&1)}function i(e,t){return 0!=(e>>>t&1)}function o(e){if(!e)throw new Error("Assertion error")}n.MIN_VERSION=1,n.MAX_VERSION=40,n.PENALTY_N1=3,n.PENALTY_N2=3,n.PENALTY_N3=40,n.PENALTY_N4=10,n.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],n.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=n;const r=class{constructor(e,t,n){if(this.mode=e,this.numChars=t,this.bitData=n,t<0)throw new RangeError("Invalid argument");this.bitData=n.slice()}static makeBytes(e){let t=[];for(const n of e)s(n,8,t);return new r(r.Mode.BYTE,e.length,t)}static makeNumeric(e){if(!r.isNumeric(e))throw new RangeError("String contains non-numeric characters");let t=[];for(let n=0;n<e.length;){const i=Math.min(e.length-n,3);s(parseInt(e.substr(n,i),10),3*i+1,t),n+=i}return new r(r.Mode.NUMERIC,e.length,t)}static makeAlphanumeric(e){if(!r.isAlphanumeric(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");let t,n=[];for(t=0;t+2<=e.length;t+=2){let i=45*r.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t));i+=r.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t+1)),s(i,11,n)}return t<e.length&&s(r.ALPHANUMERIC_CHARSET.indexOf(e.charAt(t)),6,n),new r(r.Mode.ALPHANUMERIC,e.length,n)}static makeSegments(e){return""==e?[]:r.isNumeric(e)?[r.makeNumeric(e)]:r.isAlphanumeric(e)?[r.makeAlphanumeric(e)]:[r.makeBytes(r.toUtf8ByteArray(e))]}static makeEci(e){let t=[];if(e<0)throw new RangeError("ECI assignment value out of range");if(e<128)s(e,8,t);else if(e<16384)s(2,2,t),s(e,14,t);else{if(!(e<1e6))throw new RangeError("ECI assignment value out of range");s(6,3,t),s(e,21,t)}return new r(r.Mode.ECI,0,t)}static isNumeric(e){return r.NUMERIC_REGEX.test(e)}static isAlphanumeric(e){return r.ALPHANUMERIC_REGEX.test(e)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let n=0;for(const s of e){const e=s.mode.numCharCountBits(t);if(s.numChars>=1<<e)return 1/0;n+=4+e+s.bitData.length}return n}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)"%"!=e.charAt(n)?t.push(e.charCodeAt(n)):(t.push(parseInt(e.substr(n+1,2),16)),n+=2);return t}};let a=r;a.NUMERIC_REGEX=/^[0-9]*$/,a.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,a.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",e.QrSegment=a})(Y||(Y={})),(e=>{const t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};let n=t;n.LOW=new t(0,1),n.MEDIUM=new t(1,0),n.QUARTILE=new t(2,3),n.HIGH=new t(3,2),e.Ecc=n})((X=Y||(Y={})).QrCode||(X.QrCode={})),(e=>{(e=>{const t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};let n=t;n.NUMERIC=new t(1,[10,12,14]),n.ALPHANUMERIC=new t(2,[9,11,13]),n.BYTE=new t(4,[8,16,16]),n.KANJI=new t(8,[8,10,12]),n.ECI=new t(7,[0,0,0]),e.Mode=n})(e.QrSegment||(e.QrSegment={}))})(Y||(Y={}));var ae=Y,ce={L:ae.QrCode.Ecc.LOW,M:ae.QrCode.Ecc.MEDIUM,Q:ae.QrCode.Ecc.QUARTILE,H:ae.QrCode.Ecc.HIGH},le=128,de="L",ue="#FFFFFF",he="#000000",pe=!1,me=4,fe=.1;
2
2
  /**
3
3
  * @license qrcode.react
4
4
  * Copyright (c) Paul O'Shannessy
@@ -1 +1 @@
1
- import{hexlify as r,arrayify as t,isBytesLike as o}from"@ethersproject/bytes";import{L as e}from"./index-f68a386f.js";const n=new e("rlp/5.7.0");function s(r){const t=[];for(;r;)t.unshift(255&r),r>>=8;return t}function c(r,t,o){let e=0;for(let n=0;n<o;n++)e=256*e+r[t+n];return e}function h(r){if(Array.isArray(r)){let t=[];if(r.forEach((function(r){t=t.concat(h(r))})),t.length<=55)return t.unshift(192+t.length),t;const o=s(t.length);return o.unshift(247+o.length),o.concat(t)}o(r)||n.throwArgumentError("RLP object must be BytesLike","object",r);const e=Array.prototype.slice.call(t(r));if(1===e.length&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const c=s(e.length);return c.unshift(183+c.length),c.concat(e)}function u(t){return r(h(t))}function a(r,t,o,s){const c=[];for(;o<t+1+s;){const h=l(r,o);c.push(h.result),(o+=h.consumed)>t+1+s&&n.throwError("child data too short",e.errors.BUFFER_OVERRUN,{})}return{consumed:1+s,result:c}}function l(t,o){if(0===t.length&&n.throwError("data too short",e.errors.BUFFER_OVERRUN,{}),t[o]>=248){const r=t[o]-247;o+1+r>t.length&&n.throwError("data short segment too short",e.errors.BUFFER_OVERRUN,{});const s=c(t,o+1,r);return o+1+r+s>t.length&&n.throwError("data long segment too short",e.errors.BUFFER_OVERRUN,{}),a(t,o,o+1+r,r+s)}if(t[o]>=192){const r=t[o]-192;return o+1+r>t.length&&n.throwError("data array too short",e.errors.BUFFER_OVERRUN,{}),a(t,o,o+1,r)}if(t[o]>=184){const s=t[o]-183;o+1+s>t.length&&n.throwError("data array too short",e.errors.BUFFER_OVERRUN,{});const h=c(t,o+1,s);o+1+s+h>t.length&&n.throwError("data array too short",e.errors.BUFFER_OVERRUN,{});return{consumed:1+s+h,result:r(t.slice(o+1+s,o+1+s+h))}}if(t[o]>=128){const s=t[o]-128;o+1+s>t.length&&n.throwError("data too short",e.errors.BUFFER_OVERRUN,{});return{consumed:1+s,result:r(t.slice(o+1,o+1+s))}}return{consumed:1,result:r(t[o])}}function i(r){const o=t(r),e=l(o,0);return e.consumed!==o.length&&n.throwArgumentError("invalid rlp data","data",r),e.result}var f=Object.freeze({__proto__:null,encode:u,decode:i});export{i as d,u as e,f as i};
1
+ import{hexlify as r,arrayify as t,isBytesLike as o}from"@ethersproject/bytes";import{L as e}from"./index-964ed3a9.js";const n=new e("rlp/5.7.0");function s(r){const t=[];for(;r;)t.unshift(255&r),r>>=8;return t}function c(r,t,o){let e=0;for(let n=0;n<o;n++)e=256*e+r[t+n];return e}function h(r){if(Array.isArray(r)){let t=[];if(r.forEach((function(r){t=t.concat(h(r))})),t.length<=55)return t.unshift(192+t.length),t;const o=s(t.length);return o.unshift(247+o.length),o.concat(t)}o(r)||n.throwArgumentError("RLP object must be BytesLike","object",r);const e=Array.prototype.slice.call(t(r));if(1===e.length&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;const c=s(e.length);return c.unshift(183+c.length),c.concat(e)}function u(t){return r(h(t))}function a(r,t,o,s){const c=[];for(;o<t+1+s;){const h=l(r,o);c.push(h.result),(o+=h.consumed)>t+1+s&&n.throwError("child data too short",e.errors.BUFFER_OVERRUN,{})}return{consumed:1+s,result:c}}function l(t,o){if(0===t.length&&n.throwError("data too short",e.errors.BUFFER_OVERRUN,{}),t[o]>=248){const r=t[o]-247;o+1+r>t.length&&n.throwError("data short segment too short",e.errors.BUFFER_OVERRUN,{});const s=c(t,o+1,r);return o+1+r+s>t.length&&n.throwError("data long segment too short",e.errors.BUFFER_OVERRUN,{}),a(t,o,o+1+r,r+s)}if(t[o]>=192){const r=t[o]-192;return o+1+r>t.length&&n.throwError("data array too short",e.errors.BUFFER_OVERRUN,{}),a(t,o,o+1,r)}if(t[o]>=184){const s=t[o]-183;o+1+s>t.length&&n.throwError("data array too short",e.errors.BUFFER_OVERRUN,{});const h=c(t,o+1,s);o+1+s+h>t.length&&n.throwError("data array too short",e.errors.BUFFER_OVERRUN,{});return{consumed:1+s+h,result:r(t.slice(o+1+s,o+1+s+h))}}if(t[o]>=128){const s=t[o]-128;o+1+s>t.length&&n.throwError("data too short",e.errors.BUFFER_OVERRUN,{});return{consumed:1+s,result:r(t.slice(o+1,o+1+s))}}return{consumed:1,result:r(t[o])}}function i(r){const o=t(r),e=l(o,0);return e.consumed!==o.length&&n.throwArgumentError("invalid rlp data","data",r),e.result}var f=Object.freeze({__proto__:null,encode:u,decode:i});export{i as d,u as e,f as i};
@@ -1 +1 @@
1
- import{_ as t,aC as e,C as o}from"./index-f68a386f.js";export{aD as getAlchemySigner}from"./index-f68a386f.js";import"@ethersproject/providers";import"zustand";import"@ethersproject/bytes";import"@ethersproject/properties";import"@ethersproject/address";import"@ethersproject/abstract-signer";import"buffer";import"@ethersproject/abstract-provider";import"@ethersproject/contracts";import"events";import"@ethersproject/constants";import"@ethersproject/transactions";function r(o,r){return t(this,void 0,void 0,(function*(){const t=yield e(o);return t.on("connect",r.connect),t.on("disconnect",r.disconnect),t.on("accountsChanged",r.accountsChanged),t.on("chainChanged",r.chainChanged),t.on("message",r.message),t}))}function n(){var t;const e=null===(t=o.getState().provider)||void 0===t?void 0:t.provider;if(e)return e.disconnect()}function i(t){var e,r,n,i;return null===(i=null===(n=null===(r=null===(e=o.getState().provider)||void 0===e?void 0:e.smartAccountClient)||void 0===r?void 0:r.account)||void 0===n?void 0:n.signTypedDataWith6492)||void 0===i?void 0:i.call(n,t)}export{r as default,n as disconnect,i as signTypedData};
1
+ import{_ as t,aC as e,C as o}from"./index-964ed3a9.js";export{aD as getAlchemySigner}from"./index-964ed3a9.js";import"@ethersproject/providers";import"zustand";import"@ethersproject/bytes";import"@ethersproject/properties";import"@ethersproject/address";import"@ethersproject/abstract-signer";import"buffer";import"@ethersproject/abstract-provider";import"@ethersproject/contracts";import"events";import"@ethersproject/constants";import"@ethersproject/transactions";function r(o,r){return t(this,void 0,void 0,(function*(){const t=yield e(o);return t.on("connect",r.connect),t.on("disconnect",r.disconnect),t.on("accountsChanged",r.accountsChanged),t.on("chainChanged",r.chainChanged),t.on("message",r.message),t}))}function n(){var t;const e=null===(t=o.getState().provider)||void 0===t?void 0:t.provider;if(e)return e.disconnect()}function i(t){var e,r,n,i;return null===(i=null===(n=null===(r=null===(e=o.getState().provider)||void 0===e?void 0:e.smartAccountClient)||void 0===r?void 0:r.account)||void 0===n?void 0:n.signTypedDataWith6492)||void 0===i?void 0:i.call(n,t)}export{r as default,n as disconnect,i as signTypedData};