@dodoex/wallet-web3 0.0.58-zerion.2 → 0.0.59

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 (69) hide show
  1. package/dist/{alchemy-provider-5870b6fa-db14a499.js → alchemy-provider-5870b6fa-589f95fb.js} +1 -1
  2. package/dist/{alchemy-websocket-provider-213da986-24fe7e7f.js → alchemy-websocket-provider-213da986-cb3f6d13.js} +1 -1
  3. package/dist/{blocto-96757bd9.js → blocto-c5529102.js} +1 -1
  4. package/dist/{ccip-dd8aa17a.js → ccip-21f3df95.js} +1 -1
  5. package/dist/cjs/{alchemy-provider-5870b6fa-cd9f7951.cjs → alchemy-provider-5870b6fa-7dbff82e.cjs} +1 -1
  6. package/dist/cjs/{alchemy-websocket-provider-213da986-5167c3c1.cjs → alchemy-websocket-provider-213da986-915e59a5.cjs} +1 -1
  7. package/dist/cjs/{blocto-edd2ea47.cjs → blocto-261a31d0.cjs} +1 -1
  8. package/dist/cjs/{ccip-676f8b27.cjs → ccip-f1fbb231.cjs} +1 -1
  9. package/dist/cjs/{draggabilly-c6706783.cjs → draggabilly-72f3760b.cjs} +1 -1
  10. package/dist/cjs/id-0d49e501.cjs +1 -0
  11. package/dist/cjs/{index-2f6bb9cf.cjs → index-0176ad2e.cjs} +1 -1
  12. package/dist/cjs/{index-c931ff0a.cjs → index-217b5c4f.cjs} +1 -1
  13. package/dist/cjs/{index-333a2d5b.cjs → index-2b341d84.cjs} +1 -1
  14. package/dist/cjs/{index-c47b8890.cjs → index-2d08e127.cjs} +1 -1
  15. package/dist/cjs/{index-2c3fb5f6.cjs → index-8c6ef280.cjs} +1 -1
  16. package/dist/cjs/{index-0b336c82.cjs → index-966a22b5.cjs} +2 -2
  17. package/dist/cjs/{index-99c41800.cjs → index-ac7227e1.cjs} +1 -1
  18. package/dist/cjs/{index-cb64b92a.cjs → index-aef1da34.cjs} +6 -6
  19. package/dist/cjs/{index-82dd2975.cjs → index-c49dcdd6.cjs} +1 -1
  20. package/dist/cjs/{index-dd2916a2.cjs → index-e5238e21.cjs} +2 -2
  21. package/dist/cjs/index.cjs +1 -1
  22. package/dist/cjs/{index.es-f43ae019.cjs → index.es-e6098928.cjs} +1 -1
  23. package/dist/cjs/{interface-18ac5b7b.cjs → interface-2c74464a.cjs} +1 -1
  24. package/dist/cjs/{lib-typedarrays-a81a32b6.cjs → lib-typedarrays-cfef0edf.cjs} +1 -1
  25. package/dist/cjs/{portis-a20d286a.cjs → portis-d48cb068.cjs} +1 -1
  26. package/dist/cjs/{provider-ee20c022.cjs → provider-12dc9e02.cjs} +1 -1
  27. package/dist/cjs/providers/connector/safeGnosis/query.d.ts +1 -0
  28. package/dist/cjs/providers/wallets/standalone.d.ts +0 -1
  29. package/dist/cjs/providers/wallets/types.d.ts +1 -1
  30. package/dist/cjs/{rainbow-ec8b655f.cjs → rainbow-d952afcf.cjs} +1 -1
  31. package/dist/cjs/{sha224-c8c782be.cjs → sha224-04465f0c.cjs} +1 -1
  32. package/dist/cjs/{sha256-fb8bfbb0.cjs → sha256-bbe51665.cjs} +1 -1
  33. package/dist/cjs/{typed-data-38c0e9d2.cjs → typed-data-eea997e8.cjs} +1 -1
  34. package/dist/cjs/{uAuth-3653c138.cjs → uAuth-f349d3f9.cjs} +1 -1
  35. package/dist/cjs/{walletConnect-4d704897.cjs → walletConnect-ccd2320e.cjs} +1 -1
  36. package/dist/cjs/{walletLink-d06d3b7f.cjs → walletLink-4e1dbde1.cjs} +2 -2
  37. package/dist/{draggabilly-664bc51b.js → draggabilly-f467c8ad.js} +1 -1
  38. package/dist/id-bc05d302.js +1 -0
  39. package/dist/{index-82a1d741.js → index-23f203a2.js} +1 -1
  40. package/dist/{index-d8ff6532.js → index-52bfe1fc.js} +1 -1
  41. package/dist/{index-5dd807d3.js → index-62abc14d.js} +1 -1
  42. package/dist/{index-1a213a81.js → index-6e27ec9e.js} +1 -1
  43. package/dist/{index-cd197267.js → index-833e7d64.js} +1 -1
  44. package/dist/index-918beed6.js +37 -0
  45. package/dist/{index-ae1bfa57.js → index-93c31449.js} +4 -4
  46. package/dist/{index-e924e2de.js → index-aa4ac942.js} +2 -2
  47. package/dist/{index-989d33f4.js → index-ad33ff35.js} +1 -1
  48. package/dist/{index-8cdda134.js → index-c022a99a.js} +1 -1
  49. package/dist/{index.es-976d019f.js → index.es-5fc53dd9.js} +1 -1
  50. package/dist/index.js +1 -1
  51. package/dist/{interface-a5c1f73b.js → interface-8a227f51.js} +1 -1
  52. package/dist/{lib-typedarrays-3860558f.js → lib-typedarrays-c8244c9d.js} +1 -1
  53. package/dist/{portis-6897145d.js → portis-0f0312ee.js} +1 -1
  54. package/dist/{provider-25a0c27a.js → provider-db98077c.js} +1 -1
  55. package/dist/providers/connector/safeGnosis/query.d.ts +1 -0
  56. package/dist/providers/wallets/standalone.d.ts +0 -1
  57. package/dist/providers/wallets/types.d.ts +1 -1
  58. package/dist/rainbow-10a6a646.js +1 -0
  59. package/dist/{sha224-0a518b04.js → sha224-bca1d36d.js} +1 -1
  60. package/dist/{sha256-f4558a89.js → sha256-69b47ed5.js} +1 -1
  61. package/dist/{typed-data-c956ca6b.js → typed-data-18ed8a93.js} +1 -1
  62. package/dist/{uAuth-59d4bcb4.js → uAuth-2d22b4be.js} +1 -1
  63. package/dist/{walletConnect-bd46d568.js → walletConnect-4c9c9d89.js} +1 -1
  64. package/dist/{walletLink-be9e2a4d.js → walletLink-466431e9.js} +2 -2
  65. package/package.json +1 -1
  66. package/dist/cjs/id-9172a425.cjs +0 -1
  67. package/dist/id-c7a26bbd.js +0 -1
  68. package/dist/index-bff6099c.js +0 -37
  69. package/dist/rainbow-6af98001.js +0 -1
@@ -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-ae1bfa57.js";export{ax as isInBinance}from"./index-ae1bfa57.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-a5c1f73b.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-c7a26bbd.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-93c31449.js";export{ax as isInBinance}from"./index-93c31449.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-8a227f51.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-bc05d302.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