@dodoex/wallet-web3 0.0.40-2 → 0.0.40-4
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/{DefaultJsonRpcProvider-364a16a2.js → DefaultJsonRpcProvider-0d7925ff.js} +1 -1
- package/dist/__node-resolve_empty-261d59ac.js +1 -0
- package/dist/__tslib-0e83d985.js +1 -0
- package/dist/{alchemy-provider-5870b6fa-8fbacf61.js → alchemy-provider-5870b6fa-e395a256.js} +1 -1
- package/dist/{alchemy-websocket-provider-213da986-0121b03d.js → alchemy-websocket-provider-213da986-313bda01.js} +1 -1
- package/dist/{blocto-34243ed4.js → blocto-edcf7e9c.js} +1 -1
- package/dist/{bn-b7624e9d.js → bn-92d59440.js} +1 -1
- package/dist/{browser-ponyfill-3b79f0e4.js → browser-ponyfill-d3098539.js} +1 -1
- package/dist/{ccip-016a1f59.js → ccip-579ffb0a.js} +1 -1
- package/dist/cjs/{DefaultJsonRpcProvider-a94708b3.cjs → DefaultJsonRpcProvider-bca8f91d.cjs} +1 -1
- package/dist/cjs/{__node-resolve_empty-26284176.cjs → __node-resolve_empty-265d1c49.cjs} +1 -1
- package/dist/cjs/__tslib-23f33cbc.cjs +1 -0
- package/dist/cjs/{alchemy-provider-5870b6fa-b4296005.cjs → alchemy-provider-5870b6fa-96ba77e7.cjs} +1 -1
- package/dist/cjs/{alchemy-websocket-provider-213da986-a6830135.cjs → alchemy-websocket-provider-213da986-6aab7eae.cjs} +1 -1
- package/dist/cjs/{blocto-1d0d2893.cjs → blocto-d87e4c02.cjs} +1 -1
- package/dist/cjs/{bn-f89c8fd2.cjs → bn-70ac244c.cjs} +1 -1
- package/dist/cjs/{browser-ponyfill-d62ef4bf.cjs → browser-ponyfill-71fb8794.cjs} +1 -1
- package/dist/cjs/{ccip-b4e734fd.cjs → ccip-e892e984.cjs} +1 -1
- package/dist/cjs/{draggabilly-57e73b82.cjs → draggabilly-14f61cef.cjs} +1 -1
- package/dist/cjs/{ethers-772b1cf3.cjs → ethers-70b6183e.cjs} +1 -1
- package/dist/cjs/{id-80cf99a8.cjs → id-64cfc377.cjs} +1 -1
- package/dist/cjs/{index-ddb7482e.cjs → index-0ed73dc0.cjs} +1 -1
- package/dist/cjs/{index-88f00c83.cjs → index-106a55ec.cjs} +1 -1
- package/dist/cjs/{index-a60557e5.cjs → index-18b9efa9.cjs} +5 -5
- package/dist/cjs/{index-a5d1fc7d.cjs → index-2d21ff5b.cjs} +1 -1
- package/dist/cjs/{index-a61f4ed4.cjs → index-2ddcd00d.cjs} +1 -1
- package/dist/cjs/{index-495da4ae.cjs → index-8a737425.cjs} +1 -1
- package/dist/cjs/{index-f56317c4.cjs → index-94459054.cjs} +1 -1
- package/dist/cjs/{index-a5ded8c9.cjs → index-9ce25397.cjs} +1 -1
- package/dist/cjs/{index-3b1c3d83.cjs → index-a4ac3bd5.cjs} +1 -1
- package/dist/cjs/{index-3ec270bc.cjs → index-b92a55b8.cjs} +1 -1
- package/dist/cjs/{index-dd3eb942.cjs → index-d0ceb723.cjs} +1 -1
- package/dist/cjs/{index-ba947a0e.cjs → index-d16b6756.cjs} +2 -2
- package/dist/cjs/{index-4925f240.cjs → index-f63cfc3f.cjs} +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/{index.es-6457f876.cjs → index.es-091ee5b4.cjs} +1 -1
- package/dist/cjs/{interface-a86a59a0.cjs → interface-885a5be0.cjs} +1 -1
- package/dist/cjs/{lib-typedarrays-73f7411c.cjs → lib-typedarrays-88b4f6fa.cjs} +1 -1
- package/dist/cjs/{portis-ccffc275.cjs → portis-838df928.cjs} +1 -1
- package/dist/cjs/{provider-62b688fe.cjs → provider-4c7501d6.cjs} +1 -1
- package/dist/cjs/providers/connector/types.d.ts +1 -1
- package/dist/cjs/{rainbow-d4b2160c.cjs → rainbow-7d2fe1e2.cjs} +1 -1
- package/dist/cjs/{sha224-59d7c2f4.cjs → sha224-158bd458.cjs} +1 -1
- package/dist/cjs/{sha256-583ac6ee.cjs → sha256-6071af96.cjs} +1 -1
- package/dist/cjs/{uAuth-e3b2e493.cjs → uAuth-921a815b.cjs} +1 -1
- package/dist/cjs/{walletConnect-d7cad7d8.cjs → walletConnect-70d89c92.cjs} +1 -1
- package/dist/cjs/{walletLink-84b36969.cjs → walletLink-7fe3af33.cjs} +1 -1
- package/dist/{draggabilly-d415e35d.js → draggabilly-2580bf5b.js} +1 -1
- package/dist/{ethers-1ae3e4fa.js → ethers-833b2300.js} +1 -1
- package/dist/{id-6feb8a9a.js → id-3aece8c0.js} +1 -1
- package/dist/index-14387775.js +1 -0
- package/dist/{index-ee62f708.js → index-1a005328.js} +2 -2
- package/dist/{index-4bb05276.js → index-21722c04.js} +1 -1
- package/dist/{index-846c4ffa.js → index-33f10a1b.js} +1 -1
- package/dist/{index-515f54ab.js → index-3dfcceec.js} +5 -5
- package/dist/{index-9f927876.js → index-767c26b7.js} +1 -1
- package/dist/{index-33028157.js → index-7decf620.js} +1 -1
- package/dist/{index-ca6d18a2.js → index-9a4379d7.js} +1 -1
- package/dist/{index-8bd78414.js → index-9cc0c074.js} +1 -1
- package/dist/{index-24cfd57b.js → index-b09fd06f.js} +1 -1
- package/dist/{index-85ba09c2.js → index-b5d79167.js} +1 -1
- package/dist/{index-b271e5c1.js → index-cd6bd2ce.js} +1 -1
- package/dist/{index-1c4edfc7.js → index-e75a363b.js} +1 -1
- package/dist/{index.es-aded1b18.js → index.es-e8743b8d.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{interface-1e8541e5.js → interface-c94b78af.js} +1 -1
- package/dist/{lib-typedarrays-633d9f0c.js → lib-typedarrays-a8bb783b.js} +1 -1
- package/dist/{portis-9a642930.js → portis-2205d07c.js} +1 -1
- package/dist/{provider-f66474d9.js → provider-4d3d7268.js} +1 -1
- package/dist/providers/connector/types.d.ts +1 -1
- package/dist/{rainbow-ee8fcc0b.js → rainbow-27aaabde.js} +1 -1
- package/dist/sha224-7c9278b8.js +1 -0
- package/dist/{sha256-6dd71d49.js → sha256-fe7bb483.js} +1 -1
- package/dist/{uAuth-15130e34.js → uAuth-6044680b.js} +1 -1
- package/dist/{walletConnect-7bb7a1f1.js → walletConnect-9e745470.js} +1 -1
- package/dist/{walletLink-15c06b7d.js → walletLink-26ad7eac.js} +1 -1
- package/package.json +3 -3
- package/dist/__node-resolve_empty-483b15e9.js +0 -1
- package/dist/__tslib-52669014.js +0 -1
- package/dist/cjs/__tslib-25766973.cjs +0 -1
- package/dist/index-bf6567c3.js +0 -1
- package/dist/sha224-4e5611c9.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,l as r,m as t,n as o,E as n,o as s,p as i,u as
|
|
1
|
+
import{_ as e,l as r,m as t,n as o,E as n,o as s,p as i,u as d}from"./index-7decf620.js";export{q as getIsCyber}from"./index-7decf620.js";import{getAddress as a}from"@ethersproject/address";import"events";import{hexlify as c}from"@ethersproject/bytes";import{t as p}from"./id-3aece8c0.js";import{T as h}from"./index-cd6bd2ce.js";import{Signer as u}from"@ethersproject/abstract-signer";import{D as l}from"./DefaultJsonRpcProvider-0d7925ff.js";import{defineReadOnly as m}from"@ethersproject/properties";import"@ethersproject/providers";import"zustand";import"@ethersproject/constants";import"@ethersproject/contracts";import"@ethersproject/transactions";import"./bn-92d59440.js";import"./__node-resolve_empty-261d59ac.js";class v extends u{constructor(e,r,t,o){super(),this._address=r,this._index=null!=t?t:0,this.provider=e,this.app=o}_legacySignMessage(e){throw new Error("Method not implemented.")}sendUncheckedTransaction(e){throw new Error("Method not implemented.")}unlock(e){throw new Error("Method not implemented.")}getAddress(){return e(this,void 0,void 0,(function*(){return Promise.resolve(a(this._address))}))}signMessage(t){return e(this,void 0,void 0,(function*(){const e=r(),o="string"==typeof t?p(t):t,n=yield this.getAddress();return yield e.send("personal_sign",[c(o),n.toLowerCase()])}))}_signTypedData(o,n,s){var i,d;return e(this,void 0,void 0,(function*(){const a=r(),c=yield h.resolveNames(o,n,s,(r=>e(this,void 0,void 0,(function*(){return yield a.resolveName(r)})))),p=null!==(d=null===(i=t())||void 0===i?void 0:i.ownerAddress)&&void 0!==d?d:"";return yield a.send("eth_signTypedData_v4",[p.toLowerCase(),JSON.stringify(h.getPayload(c.domain,n,c.value))])}))}signTransaction(r){return e(this,void 0,void 0,(function*(){throw new Error("Method not implemented.")}))}sendTransaction(r){return e(this,void 0,void 0,(function*(){const e=yield this.getChainId(),t=o(this.app,e);return{hash:yield t.sendTransaction({to:r.to,value:r.value,data:r.data}).catch((e=>{if(e.name===n.SendTransactionError&&(console.error(e.shortMessage),e.shortMessage))throw new Error(e.shortMessage);throw e}))}}))}connect(e){return new v(null!=e?e:this.provider,this._address,this._index,this.app)}connectUnchecked(){return new v(this.provider,this._address,this._index,this.app)}}function f(r,t){return e(this,void 0,void 0,(function*(){const o=yield function({appName:r,appLogoUrl:t,rpcUrl:o,rpc:n,chainId:d,cyberParams:c,JsonRpcProvider:p=l}){return e(this,void 0,void 0,(function*(){if(!r||!t)throw new Error("appName and appLogoUrl is required.");if(!(null==c?void 0:c.appId))throw new Error("cyberParams.appId and appLogoUrl is required.");const{app:h,cyberAccount:u}=yield s({appName:r,appLogoUrl:t,appId:null==c?void 0:c.appId});if(!u)throw new Error("cyberAccount is not valid.");const l=u.address,f=new class extends p{constructor(e,r){super(e,r),this.updateUpWalletConfig=e=>{const r=null==n?void 0:n[e];if(!i.includes(e))throw new Error(`chainId ${e} not supported`);if("object"==typeof this.network)this.network.chainId=e;else{const r={chainId:e,name:"unknown"};m(this,"_network",r),this.emit("network",r,null)}return this.rpcUrl=r,this.emit("chainChanged",`0x${e.toString(16)}`),{result:!0}}}getSigner(){return new v(f,l,0,h)}listAccounts(){return e(this,void 0,void 0,(function*(){return[l]}))}getAddress(){return Promise.resolve(a(l))}}(o,d);return f}))}(r);return o.on("connect",t.connect),o.on("disconnect",t.disconnect),o.on("accountsChanged",t.accountsChanged),o.on("chainChanged",t.chainChanged),o.on("message",t.message),o}))}function g(e){var r;const t=e.addChainParameters.chainId,o="string"==typeof t&&(null==t?void 0:t.startsWith("0x"))?parseInt(t,16):Number(t);if(!i.includes(o))throw new Error(`chainId ${o} not supported`);return null===(r=d.getState().provider)||void 0===r?void 0:r.updateUpWalletConfig(o)}export{f as default,g as switchChain};
|