@dodoex/wallet-web3 0.0.40-3 → 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-299c700d.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-139b1fd1.js → alchemy-provider-5870b6fa-e395a256.js} +1 -1
- package/dist/{alchemy-websocket-provider-213da986-b9e801c4.js → alchemy-websocket-provider-213da986-313bda01.js} +1 -1
- package/dist/{blocto-7d4e6f80.js → blocto-edcf7e9c.js} +1 -1
- package/dist/{bn-ef89aa13.js → bn-92d59440.js} +1 -1
- package/dist/{browser-ponyfill-c9bec61f.js → browser-ponyfill-d3098539.js} +1 -1
- package/dist/{ccip-9cff479e.js → ccip-579ffb0a.js} +1 -1
- package/dist/cjs/{DefaultJsonRpcProvider-2299a444.cjs → DefaultJsonRpcProvider-bca8f91d.cjs} +1 -1
- package/dist/cjs/{__node-resolve_empty-30585b19.cjs → __node-resolve_empty-265d1c49.cjs} +1 -1
- package/dist/cjs/__tslib-23f33cbc.cjs +1 -0
- package/dist/cjs/{alchemy-provider-5870b6fa-42d8df62.cjs → alchemy-provider-5870b6fa-96ba77e7.cjs} +1 -1
- package/dist/cjs/{alchemy-websocket-provider-213da986-0c9f4979.cjs → alchemy-websocket-provider-213da986-6aab7eae.cjs} +1 -1
- package/dist/cjs/{blocto-18f22fb5.cjs → blocto-d87e4c02.cjs} +1 -1
- package/dist/cjs/{bn-b1abac8e.cjs → bn-70ac244c.cjs} +1 -1
- package/dist/cjs/{browser-ponyfill-566abc09.cjs → browser-ponyfill-71fb8794.cjs} +1 -1
- package/dist/cjs/{ccip-e56b5aa7.cjs → ccip-e892e984.cjs} +1 -1
- package/dist/cjs/{draggabilly-72920c48.cjs → draggabilly-14f61cef.cjs} +1 -1
- package/dist/cjs/{ethers-741685f1.cjs → ethers-70b6183e.cjs} +1 -1
- package/dist/cjs/{id-0847676b.cjs → id-64cfc377.cjs} +1 -1
- package/dist/cjs/{index-dbea3c51.cjs → index-0ed73dc0.cjs} +1 -1
- package/dist/cjs/{index-4948e5fb.cjs → index-106a55ec.cjs} +1 -1
- package/dist/cjs/{index-b9e32afc.cjs → index-18b9efa9.cjs} +4 -4
- package/dist/cjs/{index-cc249ca1.cjs → index-2d21ff5b.cjs} +1 -1
- package/dist/cjs/{index-98a25859.cjs → index-2ddcd00d.cjs} +1 -1
- package/dist/cjs/{index-81418d4b.cjs → index-8a737425.cjs} +1 -1
- package/dist/cjs/{index-d426469f.cjs → index-94459054.cjs} +1 -1
- package/dist/cjs/{index-736e99c0.cjs → index-9ce25397.cjs} +1 -1
- package/dist/cjs/{index-80fb991d.cjs → index-a4ac3bd5.cjs} +1 -1
- package/dist/cjs/{index-dc0a7a0f.cjs → index-b92a55b8.cjs} +1 -1
- package/dist/cjs/{index-6ed4ce5b.cjs → index-d0ceb723.cjs} +1 -1
- package/dist/cjs/{index-bf5c734d.cjs → index-d16b6756.cjs} +2 -2
- package/dist/cjs/{index-81134912.cjs → index-f63cfc3f.cjs} +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/{index.es-edc255da.cjs → index.es-091ee5b4.cjs} +1 -1
- package/dist/cjs/{interface-585cb296.cjs → interface-885a5be0.cjs} +1 -1
- package/dist/cjs/{lib-typedarrays-a917c849.cjs → lib-typedarrays-88b4f6fa.cjs} +1 -1
- package/dist/cjs/{portis-4e4ee512.cjs → portis-838df928.cjs} +1 -1
- package/dist/cjs/{provider-73510c0a.cjs → provider-4c7501d6.cjs} +1 -1
- package/dist/cjs/{rainbow-517b6c6e.cjs → rainbow-7d2fe1e2.cjs} +1 -1
- package/dist/cjs/sha224-158bd458.cjs +1 -0
- package/dist/cjs/{sha256-065aa70a.cjs → sha256-6071af96.cjs} +1 -1
- package/dist/cjs/{uAuth-5744e755.cjs → uAuth-921a815b.cjs} +1 -1
- package/dist/cjs/{walletConnect-31bc14c6.cjs → walletConnect-70d89c92.cjs} +1 -1
- package/dist/cjs/{walletLink-0a176f38.cjs → walletLink-7fe3af33.cjs} +1 -1
- package/dist/{draggabilly-e1470fea.js → draggabilly-2580bf5b.js} +1 -1
- package/dist/{ethers-d2e48132.js → ethers-833b2300.js} +1 -1
- package/dist/{id-11566ef4.js → id-3aece8c0.js} +1 -1
- package/dist/index-14387775.js +1 -0
- package/dist/{index-49c775fc.js → index-1a005328.js} +2 -2
- package/dist/{index-bef54a1b.js → index-21722c04.js} +1 -1
- package/dist/{index-0727aef6.js → index-33f10a1b.js} +1 -1
- package/dist/{index-69ea5a3c.js → index-3dfcceec.js} +4 -4
- package/dist/{index-a66e2089.js → index-767c26b7.js} +1 -1
- package/dist/{index-5ea57185.js → index-7decf620.js} +1 -1
- package/dist/{index-c55f3d86.js → index-9a4379d7.js} +1 -1
- package/dist/{index-9d073082.js → index-9cc0c074.js} +1 -1
- package/dist/{index-63460da8.js → index-b09fd06f.js} +1 -1
- package/dist/{index-c5a5e669.js → index-b5d79167.js} +1 -1
- package/dist/{index-eed84c21.js → index-cd6bd2ce.js} +1 -1
- package/dist/{index-65de310f.js → index-e75a363b.js} +1 -1
- package/dist/{index.es-97e7f3f2.js → index.es-e8743b8d.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{interface-ee70601d.js → interface-c94b78af.js} +1 -1
- package/dist/{lib-typedarrays-2c8c058a.js → lib-typedarrays-a8bb783b.js} +1 -1
- package/dist/{portis-9f305aa1.js → portis-2205d07c.js} +1 -1
- package/dist/{provider-9d6f60f1.js → provider-4d3d7268.js} +1 -1
- package/dist/{rainbow-8811ebd1.js → rainbow-27aaabde.js} +1 -1
- package/dist/{sha224-90e4e285.js → sha224-7c9278b8.js} +1 -1
- package/dist/{sha256-38ef581d.js → sha256-fe7bb483.js} +1 -1
- package/dist/{uAuth-925cea9c.js → uAuth-6044680b.js} +1 -1
- package/dist/walletConnect-9e745470.js +1 -0
- package/dist/{walletLink-7643a397.js → walletLink-26ad7eac.js} +1 -1
- package/package.json +3 -3
- package/dist/__node-resolve_empty-72e75469.js +0 -1
- package/dist/__tslib-e5dcd2d5.js +0 -1
- package/dist/cjs/__tslib-9b6a9d80.cjs +0 -1
- package/dist/cjs/sha224-adfd6329.cjs +0 -1
- package/dist/index-e491b890.js +0 -1
- package/dist/walletConnect-021ca986.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};
|