@dodoex/wallet-web3 0.0.62 → 0.0.63
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/dist/{alchemy-provider-5870b6fa-38f33585.js → alchemy-provider-5870b6fa-d51b7014.js} +1 -1
- package/dist/{alchemy-websocket-provider-213da986-b0e7fef7.js → alchemy-websocket-provider-213da986-5f234ac8.js} +1 -1
- package/dist/{blocto-0c74e612.js → blocto-24cbdd94.js} +1 -1
- package/dist/{ccip-9d8f8d89.js → ccip-21ef1b3b.js} +1 -1
- package/dist/cjs/{alchemy-provider-5870b6fa-0164e9ff.cjs → alchemy-provider-5870b6fa-c5801ed5.cjs} +1 -1
- package/dist/cjs/{alchemy-websocket-provider-213da986-4efc9690.cjs → alchemy-websocket-provider-213da986-3d476d06.cjs} +1 -1
- package/dist/cjs/{blocto-b7ca7d5b.cjs → blocto-28f92a22.cjs} +1 -1
- package/dist/cjs/{ccip-545eb875.cjs → ccip-65428de0.cjs} +1 -1
- package/dist/cjs/{draggabilly-b45bc2c5.cjs → draggabilly-a8e5ab93.cjs} +1 -1
- package/dist/cjs/id-71cf1fa6.cjs +1 -0
- package/dist/cjs/{index-bc496e27.cjs → index-055ffa2f.cjs} +1 -1
- package/dist/cjs/{index-f5d48911.cjs → index-0f82124c.cjs} +1 -1
- package/dist/cjs/{index-9132cb8b.cjs → index-16cd6a2d.cjs} +1 -1
- package/dist/cjs/{index-c0280d3c.cjs → index-4bf984c2.cjs} +1 -1
- package/dist/cjs/{index-011b622a.cjs → index-618127c4.cjs} +1 -1
- package/dist/cjs/{index-bb798ea5.cjs → index-93600ac6.cjs} +2 -2
- package/dist/cjs/{index-a3f72031.cjs → index-a0d301c9.cjs} +1 -1
- package/dist/cjs/{index-9f556c11.cjs → index-aea34936.cjs} +3 -3
- package/dist/cjs/{index-0eb0f4d4.cjs → index-bff3c910.cjs} +3 -3
- package/dist/cjs/{index-1106ceba.cjs → index-d0b2ec6b.cjs} +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/{index.es-8922349d.cjs → index.es-02345e77.cjs} +1 -1
- package/dist/cjs/{interface-7a300f30.cjs → interface-6111dfb5.cjs} +1 -1
- package/dist/cjs/lib-typedarrays-e9026c1a.cjs +1 -0
- package/dist/cjs/{portis-6e5eb3cd.cjs → portis-08939a6e.cjs} +1 -1
- package/dist/cjs/{provider-ce6ce636.cjs → provider-755a02b2.cjs} +1 -1
- package/dist/cjs/{rainbow-631380cf.cjs → rainbow-a3a0fa75.cjs} +1 -1
- package/dist/cjs/sha224-fc2fbe38.cjs +1 -0
- package/dist/cjs/{sha256-0bb158e1.cjs → sha256-853152b4.cjs} +1 -1
- package/dist/cjs/{typed-data-4750abca.cjs → typed-data-9f23bc08.cjs} +1 -1
- package/dist/cjs/uAuth-44e8faf0.cjs +1 -0
- package/dist/cjs/{walletConnect-e73e696a.cjs → walletConnect-ecc2f058.cjs} +1 -1
- package/dist/cjs/{walletLink-6a10a13d.cjs → walletLink-de96d6cc.cjs} +2 -2
- package/dist/{draggabilly-c7aa9c07.js → draggabilly-5b2f5974.js} +1 -1
- package/dist/id-1af63785.js +1 -0
- package/dist/{index-3efdd10d.js → index-1d29e57a.js} +1 -1
- package/dist/{index-b795eec5.js → index-27afb74e.js} +3 -3
- package/dist/{index-3680a86a.js → index-5f8b6b8f.js} +1 -1
- package/dist/{index-bccf1fbf.js → index-7a888445.js} +1 -1
- package/dist/{index-706af4ee.js → index-8664de78.js} +3 -3
- package/dist/{index-31a52f2b.js → index-89c14223.js} +1 -1
- package/dist/{index-a0e114cf.js → index-905444eb.js} +1 -1
- package/dist/{index-4f70bcd1.js → index-a3540e99.js} +1 -1
- package/dist/{index-e572cccc.js → index-aa55732c.js} +1 -1
- package/dist/{index-510d44e7.js → index-debde11b.js} +2 -2
- package/dist/{index.es-89efca97.js → index.es-5c8a1e97.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{interface-04605588.js → interface-62996b10.js} +1 -1
- package/dist/lib-typedarrays-c955555a.js +1 -0
- package/dist/{portis-683b08f2.js → portis-32fa54a1.js} +1 -1
- package/dist/{provider-59214f73.js → provider-011c6295.js} +1 -1
- package/dist/{rainbow-7f2ec969.js → rainbow-f0dfcce2.js} +1 -1
- package/dist/sha224-e64c0e03.js +1 -0
- package/dist/{sha256-9883fbdf.js → sha256-88710f5d.js} +1 -1
- package/dist/{typed-data-9292927b.js → typed-data-902deb9d.js} +1 -1
- package/dist/uAuth-7337c3d7.js +1 -0
- package/dist/{walletConnect-dbd7fe6e.js → walletConnect-a2a7cab2.js} +1 -1
- package/dist/{walletLink-b1751b96.js → walletLink-16dee5b6.js} +2 -2
- package/package.json +1 -1
- package/dist/cjs/id-356f6f2c.cjs +0 -1
- package/dist/cjs/lib-typedarrays-cbb6d67b.cjs +0 -1
- package/dist/cjs/sha224-9aaa7351.cjs +0 -1
- package/dist/cjs/uAuth-0b631695.cjs +0 -1
- package/dist/id-6088db7c.js +0 -1
- package/dist/lib-typedarrays-6a6d48b8.js +0 -1
- package/dist/sha224-46d4237c.js +0 -1
- package/dist/uAuth-d3d9852d.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as t}from"./index-
|
|
1
|
+
import{c as t}from"./index-27afb74e.js";function i(t,i){return i.forEach((function(i){i&&"string"!=typeof i&&!Array.isArray(i)&&Object.keys(i).forEach((function(e){if("default"!==e&&!(e in t)){var n=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:function(){return i[e]}})}}))})),Object.freeze(t)}var e,n={exports:{}},o={exports:{}};function s(){return e||(e=1,t=o,function(i,e){t.exports?t.exports=e():i.getSize=e()}(window,(function(){function t(t){let i=parseFloat(t);return-1==t.indexOf("%")&&!isNaN(i)&&i}let i=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];return function(e){if("string"==typeof e&&(e=document.querySelector(e)),!e||"object"!=typeof e||!e.nodeType)return;let n=getComputedStyle(e);if("none"==n.display)return function(){let t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0};return i.forEach((i=>{t[i]=0})),t}();let o={};o.width=e.offsetWidth,o.height=e.offsetHeight;let s=o.isBorderBox="border-box"==n.boxSizing;i.forEach((t=>{let i=n[t],e=parseFloat(i);o[t]=isNaN(e)?0:e}));let r=o.paddingLeft+o.paddingRight,h=o.paddingTop+o.paddingBottom,a=o.marginLeft+o.marginRight,d=o.marginTop+o.marginBottom,l=o.borderLeftWidth+o.borderRightWidth,c=o.borderTopWidth+o.borderBottomWidth,u=t(n.width);!1!==u&&(o.width=u+(s?0:r+l));let p=t(n.height);return!1!==p&&(o.height=p+(s?0:h+c)),o.innerWidth=o.width-(r+l),o.innerHeight=o.height-(h+c),o.outerWidth=o.width+a,o.outerHeight=o.height+d,o}}))),o.exports;var t}var r,h,a,d={exports:{}},l={exports:{}};function c(){return r||(r=1,i=l,e="undefined"!=typeof window?window:t,n=function(){function t(){}let i=t.prototype;return i.on=function(t,i){if(!t||!i)return this;let e=this._events=this._events||{},n=e[t]=e[t]||[];return n.includes(i)||n.push(i),this},i.once=function(t,i){if(!t||!i)return this;this.on(t,i);let e=this._onceEvents=this._onceEvents||{};return(e[t]=e[t]||{})[i]=!0,this},i.off=function(t,i){let e=this._events&&this._events[t];if(!e||!e.length)return this;let n=e.indexOf(i);return-1!=n&&e.splice(n,1),this},i.emitEvent=function(t,i){let e=this._events&&this._events[t];if(!e||!e.length)return this;e=e.slice(0),i=i||[];let n=this._onceEvents&&this._onceEvents[t];for(let o of e)n&&n[o]&&(this.off(t,o),delete n[o]),o.apply(this,i);return this},i.allOff=function(){return delete this._events,delete this._onceEvents,this},t},i.exports?i.exports=n():e.EvEmitter=n()),l.exports;var i,e,n}
|
|
2
2
|
/*!
|
|
3
3
|
* Unidragger v3.0.1
|
|
4
4
|
* Draggable base class
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{k as r,t}from"./index-27afb74e.js";function a(a){return r(t(a))}export{a as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as t,D as e,Z as n,$ as r,a0 as o,C as i}from"./index-
|
|
1
|
+
import{_ as t,D as e,Z as n,$ as r,a0 as o,C as i}from"./index-27afb74e.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};
|