@dodoex/wallet-web3 0.0.55-beta-entry.2 → 0.0.55

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 (93) hide show
  1. package/dist/{alchemy-provider-5870b6fa-c3458ce0.js → alchemy-provider-5870b6fa-13b8091b.js} +1 -1
  2. package/dist/{alchemy-websocket-provider-213da986-b76aadd7.js → alchemy-websocket-provider-213da986-092050ee.js} +1 -1
  3. package/dist/{blocto-8dcd5378.js → blocto-f6fc9aea.js} +1 -1
  4. package/dist/{ccip-2cdc0e6e.js → ccip-84b0dbe4.js} +1 -1
  5. package/dist/cjs/{alchemy-provider-5870b6fa-22229235.cjs → alchemy-provider-5870b6fa-64336a96.cjs} +1 -1
  6. package/dist/cjs/{alchemy-websocket-provider-213da986-d0bd62ee.cjs → alchemy-websocket-provider-213da986-a3b55d08.cjs} +1 -1
  7. package/dist/cjs/{blocto-9189db02.cjs → blocto-ac41246e.cjs} +1 -1
  8. package/dist/cjs/{ccip-cf4c8958.cjs → ccip-50cb6906.cjs} +1 -1
  9. package/dist/cjs/controllers/ConnectController.d.ts +6 -11
  10. package/dist/cjs/core/index.d.ts +2 -4
  11. package/dist/cjs/{draggabilly-4a795874.cjs → draggabilly-e7ced507.cjs} +1 -1
  12. package/dist/cjs/hash-808c8802.cjs +1 -0
  13. package/dist/cjs/id-9a0a1e7a.cjs +1 -0
  14. package/dist/cjs/index-187635d5.cjs +72 -0
  15. package/dist/cjs/index-1ed42dfb.cjs +1 -0
  16. package/dist/cjs/{index-8df03db9.cjs → index-2116322f.cjs} +2 -2
  17. package/dist/cjs/{index-63281f6f.cjs → index-431eafaf.cjs} +1 -1
  18. package/dist/cjs/{index-1d309dce.cjs → index-6311dfd3.cjs} +1 -1
  19. package/dist/cjs/{index-458ec813.cjs → index-797e10d2.cjs} +1 -1
  20. package/dist/cjs/index-8ff359b4.cjs +6 -0
  21. package/dist/cjs/{index-b289395f.cjs → index-bc5b594f.cjs} +1 -1
  22. package/dist/cjs/index-cdc94a75.cjs +28 -0
  23. package/dist/cjs/{index-d229b8b4.cjs → index-ee4bfece.cjs} +1 -1
  24. package/dist/cjs/index.cjs +1 -1
  25. package/dist/cjs/{index.es-f9414662.cjs → index.es-405d08ac.cjs} +1 -1
  26. package/dist/cjs/inherits_browser-38fa9d17.cjs +1 -0
  27. package/dist/cjs/{interface-af41c890.cjs → interface-f3e26846.cjs} +1 -1
  28. package/dist/cjs/{lib-typedarrays-b768ceaf.cjs → lib-typedarrays-73e8b914.cjs} +1 -1
  29. package/dist/cjs/{portis-e8a9cfb5.cjs → portis-61c3d3b4.cjs} +1 -1
  30. package/dist/cjs/{provider-bc656af9.cjs → provider-9eb163e3.cjs} +1 -1
  31. package/dist/cjs/providers/connector/alchemy/index.d.ts +12 -8
  32. package/dist/cjs/providers/connector/alchemy/provider.d.ts +12 -8
  33. package/dist/cjs/providers/connector/index.d.ts +12 -8
  34. package/dist/cjs/providers/wallets/index.d.ts +1 -3
  35. package/dist/cjs/providers/wallets/types.d.ts +0 -2
  36. package/dist/cjs/{rainbow-3b59bcb8.cjs → rainbow-33ee3015.cjs} +1 -1
  37. package/dist/cjs/sha224-7b52a06c.cjs +1 -0
  38. package/dist/cjs/{sha256-56f21b8c.cjs → sha256-05927a0c.cjs} +1 -1
  39. package/dist/cjs/{typed-data-a777dbe1.cjs → typed-data-757a1f81.cjs} +1 -1
  40. package/dist/cjs/uAuth-6fb05f6c.cjs +1 -0
  41. package/dist/cjs/{walletConnect-59deaaa7.cjs → walletConnect-25b4005b.cjs} +1 -1
  42. package/dist/cjs/walletLink-00ebda9a.cjs +3 -0
  43. package/dist/controllers/ConnectController.d.ts +6 -11
  44. package/dist/core/index.d.ts +2 -4
  45. package/dist/{draggabilly-36d7b3a5.js → draggabilly-0d779ed7.js} +1 -1
  46. package/dist/hash-92ae3757.js +1 -0
  47. package/dist/id-e3e24f85.js +1 -0
  48. package/dist/{index-0a7c220d.js → index-0d9deec3.js} +1 -1
  49. package/dist/index-2c8fd538.js +28 -0
  50. package/dist/{index-3e23698a.js → index-35578e2d.js} +1 -1
  51. package/dist/index-3ab5d29e.js +6 -0
  52. package/dist/index-44de3ecf.js +72 -0
  53. package/dist/{index-7e946bf1.js → index-745cc73f.js} +1 -1
  54. package/dist/index-8fd2e408.js +1 -0
  55. package/dist/{index-b967e22c.js → index-9c4f1453.js} +1 -1
  56. package/dist/{index-b6011204.js → index-aa945484.js} +2 -2
  57. package/dist/index-f20d44fd.js +1 -0
  58. package/dist/{index.es-68fc128f.js → index.es-b1d1827b.js} +1 -1
  59. package/dist/index.js +1 -1
  60. package/dist/inherits_browser-76e61e9e.js +1 -0
  61. package/dist/{interface-746c1865.js → interface-36186c54.js} +1 -1
  62. package/dist/{lib-typedarrays-5c5921fd.js → lib-typedarrays-ed0a9813.js} +1 -1
  63. package/dist/{portis-00d754f6.js → portis-63bd0722.js} +1 -1
  64. package/dist/{provider-4fe47dba.js → provider-d2bfbaca.js} +1 -1
  65. package/dist/providers/connector/alchemy/index.d.ts +12 -8
  66. package/dist/providers/connector/alchemy/provider.d.ts +12 -8
  67. package/dist/providers/connector/index.d.ts +12 -8
  68. package/dist/providers/wallets/index.d.ts +1 -3
  69. package/dist/providers/wallets/types.d.ts +0 -2
  70. package/dist/{rainbow-ba579cad.js → rainbow-41587daa.js} +1 -1
  71. package/dist/{sha224-ee67389b.js → sha224-b6089413.js} +1 -1
  72. package/dist/{sha256-6b5b8897.js → sha256-5f9a69f1.js} +1 -1
  73. package/dist/{typed-data-a96333aa.js → typed-data-4f5fbd06.js} +1 -1
  74. package/dist/uAuth-b64c1eab.js +1 -0
  75. package/dist/{walletConnect-6b2a7a4e.js → walletConnect-12293a0d.js} +1 -1
  76. package/dist/walletLink-66dc8df8.js +3 -0
  77. package/package.json +1 -1
  78. package/dist/cjs/id-5a06c725.cjs +0 -1
  79. package/dist/cjs/index-0d59d3a4.cjs +0 -37
  80. package/dist/cjs/index-2b5e634c.cjs +0 -1
  81. package/dist/cjs/index-32e6540a.cjs +0 -28
  82. package/dist/cjs/index-f92b0bd8.cjs +0 -6
  83. package/dist/cjs/sha224-542ed113.cjs +0 -1
  84. package/dist/cjs/uAuth-977cd558.cjs +0 -1
  85. package/dist/cjs/walletLink-8c611440.cjs +0 -3
  86. package/dist/id-cb48006b.js +0 -1
  87. package/dist/index-36aa5fe1.js +0 -37
  88. package/dist/index-7646623f.js +0 -1
  89. package/dist/index-8af79cad.js +0 -6
  90. package/dist/index-8c308a55.js +0 -1
  91. package/dist/index-98d378b6.js +0 -28
  92. package/dist/uAuth-6ea836c7.js +0 -1
  93. package/dist/walletLink-8d027247.js +0 -3
@@ -1 +0,0 @@
1
- import{_ as t,D as e,Z as n,$ as r,a0 as o,C as i}from"./index-98d378b6.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};