@dodoex/wallet-web3 0.0.34-2 → 0.0.34-3
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/__node-resolve_empty-5ca02702.js +1 -0
- package/dist/__tslib-b57427f1.js +1 -0
- package/dist/{blocto-215f14c4.js → blocto-53865eae.js} +1 -1
- package/dist/{bn-52852639.js → bn-53c76a3b.js} +1 -1
- package/dist/{browser-ponyfill-5642a8c7.js → browser-ponyfill-7755f936.js} +1 -1
- package/dist/cjs/{__node-resolve_empty-ba23ab6c.cjs → __node-resolve_empty-2ed13f23.cjs} +1 -1
- package/dist/cjs/__tslib-5075b745.cjs +1 -0
- package/dist/cjs/{blocto-11feaa6c.cjs → blocto-b197e0ed.cjs} +1 -1
- package/dist/cjs/{bn-a6988b27.cjs → bn-c7b10248.cjs} +1 -1
- package/dist/cjs/{browser-ponyfill-88af9641.cjs → browser-ponyfill-06e7485b.cjs} +1 -1
- package/dist/cjs/{draggabilly-db35bea0.cjs → draggabilly-b7c8d360.cjs} +1 -1
- package/dist/cjs/{ethers-fa90fa4d.cjs → ethers-5e0917d9.cjs} +1 -1
- package/dist/cjs/{id-d52c2566.cjs → id-957afd64.cjs} +1 -1
- package/dist/cjs/{index-d6d91382.cjs → index-17201521.cjs} +1 -1
- package/dist/cjs/{index-66664a48.cjs → index-229ab74e.cjs} +1 -1
- package/dist/cjs/{index-0a9b5e69.cjs → index-43ebbf90.cjs} +1 -1
- package/dist/cjs/{index-88e68337.cjs → index-4d630349.cjs} +1 -1
- package/dist/cjs/{index-3d3912cf.cjs → index-93196761.cjs} +1 -1
- package/dist/cjs/{index-03bf297e.cjs → index-a65b2ed9.cjs} +1 -1
- package/dist/cjs/{index-315c639f.cjs → index-cf9228e5.cjs} +1 -1
- package/dist/cjs/{index-13c8702e.cjs → index-d0c28dd5.cjs} +1 -1
- package/dist/cjs/{index-d73313cc.cjs → index-d9cd1772.cjs} +1 -1
- package/dist/cjs/{index-38da2fc6.cjs → index-def5ba88.cjs} +2 -2
- package/dist/cjs/{index-59128ec7.cjs → index-f31554d5.cjs} +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/{index.es-4dea0d6e.cjs → index.es-a52e6150.cjs} +1 -1
- package/dist/cjs/{interface-07c9df07.cjs → interface-f058190d.cjs} +1 -1
- package/dist/cjs/{lib-typedarrays-9506107b.cjs → lib-typedarrays-b1cc17b4.cjs} +1 -1
- package/dist/cjs/{portis-2add05e6.cjs → portis-d26d1211.cjs} +1 -1
- package/dist/cjs/{provider-df34ba55.cjs → provider-ff61dd78.cjs} +1 -1
- package/dist/cjs/{rainbow-c1d0ea5f.cjs → rainbow-67a78559.cjs} +1 -1
- package/dist/cjs/{sha224-64018b78.cjs → sha224-db87a820.cjs} +1 -1
- package/dist/cjs/{sha256-47629c7b.cjs → sha256-9701fc11.cjs} +1 -1
- package/dist/cjs/{typed-data-aad4cb7d.cjs → typed-data-687b7cc5.cjs} +1 -1
- package/dist/cjs/{uAuth-683b32b0.cjs → uAuth-3914d07f.cjs} +1 -1
- package/dist/cjs/{walletConnect-b572229a.cjs → walletConnect-420ae38c.cjs} +1 -1
- package/dist/cjs/{walletLink-e2580625.cjs → walletLink-2b8a1d57.cjs} +1 -1
- package/dist/{draggabilly-5586381c.js → draggabilly-6749fb13.js} +1 -1
- package/dist/{ethers-fe938f80.js → ethers-8d0f359b.js} +1 -1
- package/dist/{id-8eee9cee.js → id-9141cd94.js} +1 -1
- package/dist/{index-0460be19.js → index-028368fa.js} +1 -1
- package/dist/{index-24c5d717.js → index-0ce3be59.js} +1 -1
- package/dist/{index-4085118c.js → index-15bdafe8.js} +1 -1
- package/dist/index-30cee19c.js +1 -0
- package/dist/{index-33518ba5.js → index-38a2b32c.js} +1 -1
- package/dist/{index-22955b76.js → index-5abb7d26.js} +1 -1
- package/dist/{index-86347eba.js → index-66fea03f.js} +1 -1
- package/dist/{index-62176b36.js → index-7b1db3a5.js} +1 -1
- package/dist/{index-da20db12.js → index-8400d105.js} +1 -1
- package/dist/{index-27bc0eaa.js → index-9cb24b04.js} +2 -2
- package/dist/{index-a129bc11.js → index-cc4e29b8.js} +1 -1
- package/dist/{index.es-e357be07.js → index.es-97634eaa.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{interface-039babdb.js → interface-40f53a95.js} +1 -1
- package/dist/{lib-typedarrays-bf5f5b3a.js → lib-typedarrays-8f7a7c6f.js} +1 -1
- package/dist/{portis-c2efef0e.js → portis-4a88a53f.js} +1 -1
- package/dist/{provider-03cbafbc.js → provider-6d84aaad.js} +1 -1
- package/dist/{rainbow-1009b82d.js → rainbow-97391f2e.js} +1 -1
- package/dist/{sha224-9f884b19.js → sha224-50b02425.js} +1 -1
- package/dist/{sha256-d6ef3f77.js → sha256-febb5248.js} +1 -1
- package/dist/{typed-data-113c2c03.js → typed-data-9913b176.js} +1 -1
- package/dist/{uAuth-1cee9730.js → uAuth-3a1f57d8.js} +1 -1
- package/dist/{walletConnect-2b7c6534.js → walletConnect-d3c8e011.js} +1 -1
- package/dist/{walletLink-236909d4.js → walletLink-e0a1f4e6.js} +1 -1
- package/package.json +1 -1
- package/dist/__node-resolve_empty-5a085621.js +0 -1
- package/dist/__tslib-2b2649d1.js +0 -1
- package/dist/cjs/__tslib-d3ade361.cjs +0 -1
- package/dist/index-7a4d4cf1.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as a}from"./index-5abb7d26.js";import{C as r,E as e,a as s,F as t,b as o,P as n,c as i,A as c,d as m,I as d,f,e as p,L as F,T as g}from"./interface-40f53a95.js";var b=a(Object.freeze({__proto__:null,ConstructorFragment:r,ErrorFragment:e,EventFragment:s,Fragment:t,FunctionFragment:o,ParamType:n,FormatTypes:i,AbiCoder:c,defaultAbiCoder:m,Interface:d,Indexed:f,checkResultErrors:p,LogDescription:F,TransactionDescription:g}));export{b as r};
|
|
@@ -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 a}from"./index-
|
|
1
|
+
import{_ as e,l as r,m as t,n as o,E as n,o as s,p as i,u as a}from"./index-5abb7d26.js";export{q as getIsCyber}from"./index-5abb7d26.js";import{JsonRpcProvider as d}from"@ethersproject/providers";import{getAddress as c}from"@ethersproject/address";import"events";import{hexlify as h}from"@ethersproject/bytes";import{t as p}from"./id-9141cd94.js";import{T as u}from"./typed-data-9913b176.js";import{Signer as l}from"@ethersproject/abstract-signer";import{deepCopy as m}from"@ethersproject/properties";import{f as v}from"./index-028368fa.js";import"zustand";import"@ethersproject/constants";import"@ethersproject/contracts";import"@ethersproject/transactions";import"./__node-resolve_empty-5ca02702.js";class g extends l{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(c(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",[h(o),n.toLowerCase()])}))}_signTypedData(o,n,s){var i,a;return e(this,void 0,void 0,(function*(){const d=r(),c=yield u.resolveNames(o,n,s,(r=>e(this,void 0,void 0,(function*(){return yield d.resolveName(r)})))),h=null!==(a=null===(i=t())||void 0===i?void 0:i.ownerAddress)&&void 0!==a?a:"";return yield d.send("eth_signTypedData_v4",[h.toLowerCase(),JSON.stringify(u.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 g(null!=e?e:this.provider,this._address,this._index,this.app)}connectUnchecked(){return new g(this.provider,this._address,this._index,this.app)}}function f(e){if(e.error){const r=new Error(e.error.message);throw r.code=e.error.code,r.data=e.error.data,r}return e.result}function w(r,t){return e(this,void 0,void 0,(function*(){const o=yield function({appName:r,appLogoUrl:t,rpcUrl:o,rpc:n,chainId:a,cyberParams:h}){return e(this,void 0,void 0,(function*(){if(!r||!t)throw new Error("appName and appLogoUrl is required.");if(!(null==h?void 0:h.appId))throw new Error("cyberParams.appId and appLogoUrl is required.");const{app:p,cyberAccount:u}=yield s({appName:r,appLogoUrl:t,appId:null==h?void 0:h.appId});if(!u)throw new Error("cyberAccount is not valid.");const l=u.address,w=new class extends d{constructor(e,r){super(e,r),this.updateUpWalletConfig=e=>{const r=null==n?void 0:n[e];if(!i.includes(e)||!r)throw new Error(`chainId ${e} not supported`);return this.chainId=e,r&&(this.rpcUrl=r),this.emit("chainChanged",`0x${e.toString(16)}`),{result:!0}},this.rpcUrl=e,this.chainId=a}getSigner(){return new g(w,l,0,p)}listAccounts(){return e(this,void 0,void 0,(function*(){return[l]}))}getNetwork(){return this.chainId?Promise.resolve({chainId:this.chainId,name:"unknown"}):super.getNetwork()}send(e,r){const t={method:e,params:r,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:m(t),provider:this});const o=["eth_chainId","eth_blockNumber"].indexOf(e)>=0;if(o&&this._cache[e])return this._cache[e];const n=v({url:this.rpcUrl},JSON.stringify(t),f).then((e=>(this.emit("debug",{action:"response",request:t,response:e,provider:this}),e)),(e=>{throw this.emit("debug",{action:"response",error:e,request:t,provider:this}),e}));return o&&(this._cache[e]=n,setTimeout((()=>{this._cache[e]=null}),0)),n}getAddress(){return Promise.resolve(c(l))}}(o,a);return w}))}(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 y(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=a.getState().provider)||void 0===r?void 0:r.updateUpWalletConfig(o)}export{w as default,y as switchChain};
|