@dodoex/wallet-web3 0.0.43-14 → 0.0.43-16
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/__tslib-7e1f95aa.js +1 -0
- package/dist/{alchemy-provider-5870b6fa-51735fe9.js → alchemy-provider-5870b6fa-0a352288.js} +1 -1
- package/dist/{alchemy-websocket-provider-213da986-921375b7.js → alchemy-websocket-provider-213da986-395a73e5.js} +1 -1
- package/dist/{blocto-71b39205.js → blocto-c9c400e3.js} +1 -1
- package/dist/{ccip-fbbc6a9c.js → ccip-6bd0c6dd.js} +1 -1
- package/dist/cjs/__tslib-65cfee6e.cjs +1 -0
- package/dist/cjs/{alchemy-provider-5870b6fa-b6192a00.cjs → alchemy-provider-5870b6fa-fcd41853.cjs} +1 -1
- package/dist/cjs/{alchemy-websocket-provider-213da986-5e45bb1e.cjs → alchemy-websocket-provider-213da986-caaf1af8.cjs} +1 -1
- package/dist/cjs/{blocto-8fd3ec65.cjs → blocto-8d29cd04.cjs} +1 -1
- package/dist/cjs/{ccip-9dad11f4.cjs → ccip-b74ac658.cjs} +1 -1
- package/dist/cjs/{draggabilly-fcb205ac.cjs → draggabilly-6ecd1d28.cjs} +1 -1
- package/dist/cjs/id-d2c2876b.cjs +1 -0
- package/dist/cjs/{index-45873e53.cjs → index-0ee34d28.cjs} +1 -1
- package/dist/cjs/{index-307d8725.cjs → index-16cff674.cjs} +1 -1
- package/dist/cjs/{index-e91c887f.cjs → index-25304bed.cjs} +1 -1
- package/dist/cjs/{index-89086382.cjs → index-3e9b2c6d.cjs} +1 -1
- package/dist/cjs/index-69a8663c.cjs +1 -0
- package/dist/cjs/{index-c4f36a13.cjs → index-85db795c.cjs} +1 -1
- package/dist/cjs/index-908bd0e0.cjs +28 -0
- package/dist/cjs/{index-10b18de1.cjs → index-bdfc10b7.cjs} +1 -1
- package/dist/cjs/{index-22040a66.cjs → index-cd2ab657.cjs} +2 -2
- package/dist/cjs/index-f3bb4b9f.cjs +1 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/{index.es-1b463c70.cjs → index.es-1ee6dff8.cjs} +1 -1
- package/dist/cjs/{interface-db53e061.cjs → interface-aa401a68.cjs} +1 -1
- package/dist/cjs/{lib-typedarrays-5f5d4c89.cjs → lib-typedarrays-e12c64c0.cjs} +1 -1
- package/dist/cjs/{portis-b744916d.cjs → portis-bcfda7d2.cjs} +1 -1
- package/dist/cjs/{provider-925060ff.cjs → provider-9671b91b.cjs} +1 -1
- package/dist/cjs/providers/connector/alchemy/index.d.ts +777 -0
- package/dist/cjs/providers/connector/alchemy/provider.d.ts +776 -0
- package/dist/cjs/providers/connector/index.d.ts +776 -0
- package/dist/cjs/{rainbow-de64d54b.cjs → rainbow-bffeca67.cjs} +1 -1
- package/dist/cjs/{sha224-857103f6.cjs → sha224-e12b762e.cjs} +1 -1
- package/dist/cjs/{sha256-317509b0.cjs → sha256-87b3a64e.cjs} +1 -1
- package/dist/cjs/{typed-data-0cf712b3.cjs → typed-data-d8785f60.cjs} +1 -1
- package/dist/cjs/uAuth-a31a7652.cjs +1 -0
- package/dist/cjs/{walletConnect-4691ab1c.cjs → walletConnect-0dfe31e9.cjs} +1 -1
- package/dist/cjs/walletLink-81174e2e.cjs +3 -0
- package/dist/{draggabilly-f7fe0ce3.js → draggabilly-498d38e9.js} +1 -1
- package/dist/id-63f07629.js +1 -0
- package/dist/{index-244cb4c1.js → index-0513e323.js} +1 -1
- package/dist/{index-8c443943.js → index-112c8642.js} +1 -1
- package/dist/index-30305fa2.js +1 -0
- package/dist/{index-c3dabbc8.js → index-718c48ae.js} +2 -2
- package/dist/{index-53e178a7.js → index-7cb61612.js} +1 -1
- package/dist/index-892198b7.js +1 -0
- package/dist/{index-9cc5818d.js → index-8ec766b6.js} +6 -6
- package/dist/{index-f40ec5e2.js → index-a09a186c.js} +1 -1
- package/dist/index-ae7aa0ff.js +1 -0
- package/dist/{index-9a6e16f5.js → index-c4a6d64e.js} +1 -1
- package/dist/{index.es-da9e2ef4.js → index.es-37c96e8d.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{interface-e3f4467e.js → interface-b846e20f.js} +1 -1
- package/dist/{lib-typedarrays-94916a13.js → lib-typedarrays-76dcbec2.js} +1 -1
- package/dist/{portis-ae4a0df7.js → portis-1045f78a.js} +1 -1
- package/dist/{provider-ef2c5880.js → provider-e830c3fd.js} +1 -1
- package/dist/providers/connector/alchemy/index.d.ts +777 -0
- package/dist/providers/connector/alchemy/provider.d.ts +776 -0
- package/dist/providers/connector/index.d.ts +776 -0
- package/dist/rainbow-ff982597.js +1 -0
- package/dist/sha224-59fa256e.js +1 -0
- package/dist/{sha256-691ff40a.js → sha256-523c7af1.js} +1 -1
- package/dist/{typed-data-e9104da2.js → typed-data-0b589cba.js} +1 -1
- package/dist/uAuth-1dd65c6f.js +1 -0
- package/dist/{walletConnect-06b6a7b3.js → walletConnect-f4aa9a5e.js} +1 -1
- package/dist/walletLink-84b7e914.js +3 -0
- package/package.json +3 -3
- package/dist/__tslib-e11d5e00.js +0 -1
- package/dist/cjs/__tslib-10018e2f.cjs +0 -1
- package/dist/cjs/ethers-0751484f.cjs +0 -1
- package/dist/cjs/id-6d57f7e8.cjs +0 -1
- package/dist/cjs/index-8a366833.cjs +0 -1
- package/dist/cjs/index-bfa43161.cjs +0 -28
- package/dist/cjs/index-da4f971a.cjs +0 -1
- package/dist/cjs/index-eb009275.cjs +0 -1
- package/dist/cjs/uAuth-958da028.cjs +0 -1
- package/dist/cjs/walletLink-1947c792.cjs +0 -3
- package/dist/ethers-4aab6082.js +0 -1
- package/dist/id-c5aaef9e.js +0 -1
- package/dist/index-592ea046.js +0 -1
- package/dist/index-63c98c9c.js +0 -1
- package/dist/index-6d5a83b8.js +0 -1
- package/dist/index-a0e81906.js +0 -1
- package/dist/rainbow-c5d6f1b8.js +0 -1
- package/dist/sha224-5df1f951.js +0 -1
- package/dist/uAuth-ef06ae8f.js +0 -1
- package/dist/walletLink-28b68605.js +0 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./index-
|
|
1
|
+
"use strict";var e=require("./index-908bd0e0.cjs"),r=require("@ethersproject/address");require("events");var t=require("@ethersproject/bytes"),n=require("./typed-data-d8785f60.cjs"),i=require("@ethersproject/abstract-signer"),o=require("@ethersproject/properties");require("@ethersproject/providers"),require("zustand"),require("buffer"),require("@ethersproject/abstract-provider"),require("@ethersproject/contracts"),require("@ethersproject/constants"),require("@ethersproject/transactions"),require("./id-d2c2876b.cjs");class s extends i.Signer{constructor(e,r,t,n){super(),this._address=r,this._index=null!=t?t:0,this.provider=e,this.app=n}_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.__awaiter(this,void 0,void 0,(function*(){return Promise.resolve(r.getAddress(this._address))}))}signMessage(r){return e.__awaiter(this,void 0,void 0,(function*(){const n=e.getOwnerProvider(),i="string"==typeof r?e.toUtf8Bytes(r):r,o=yield this.getAddress();return yield n.send("personal_sign",[t.hexlify(i),o.toLowerCase()])}))}_signTypedData(r,t,i){var o,s;return e.__awaiter(this,void 0,void 0,(function*(){const a=e.getOwnerProvider(),d=yield n.TypedDataEncoder.resolveNames(r,t,i,(r=>e.__awaiter(this,void 0,void 0,(function*(){return yield a.resolveName(r)})))),c=null!==(s=null===(o=e.getCyberAccount())||void 0===o?void 0:o.ownerAddress)&&void 0!==s?s:"";return yield a.send("eth_signTypedData_v4",[c.toLowerCase(),JSON.stringify(n.TypedDataEncoder.getPayload(d.domain,t,d.value))])}))}signTransaction(r){return e.__awaiter(this,void 0,void 0,(function*(){throw new Error("Method not implemented.")}))}sendTransaction(r){return e.__awaiter(this,void 0,void 0,(function*(){const t=yield this.getChainId(),n=e.getCyberChain(this.app,t);return{hash:yield n.sendTransaction({to:r.to,value:r.value,data:r.data}).catch((r=>{if(r.name===e.ErrorType.SendTransactionError&&(console.error(r.shortMessage),r.shortMessage))throw new Error(r.shortMessage);throw r}))}}))}connect(e){return new s(null!=e?e:this.provider,this._address,this._index,this.app)}connectUnchecked(){return new s(this.provider,this._address,this._index,this.app)}}exports.getIsCyber=e.getIsCyber,exports.default=function(t,n){return e.__awaiter(this,void 0,void 0,(function*(){const i=yield function({appName:t,appLogoUrl:n,rpcUrl:i,rpc:a,chainId:d,cyberParams:c,JsonRpcProvider:u=e.DefaultJsonRpcProvider}){return e.__awaiter(this,void 0,void 0,(function*(){if(!t||!n)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:p}=yield e.connect({appName:t,appLogoUrl:n,appId:null==c?void 0:c.appId});if(!p)throw new Error("cyberAccount is not valid.");const l=p.address,v=new class extends u{constructor(r,t){super(r,t),this.updateUpWalletConfig=r=>{const t=null==a?void 0:a[r];if(!e.supportChains.includes(r))throw new Error(`chainId ${r} not supported`);if("object"==typeof this.network)this.network.chainId=r;else{const e={chainId:r,name:"unknown"};o.defineReadOnly(this,"_network",e),this.emit("network",e,null)}return this.rpcUrl=t,this.emit("chainChanged",`0x${r.toString(16)}`),{result:!0}}}getSigner(){return new s(v,l,0,h)}listAccounts(){return e.__awaiter(this,void 0,void 0,(function*(){return[l]}))}getAddress(){return Promise.resolve(r.getAddress(l))}}(i,d);return v}))}(t);return i.on("connect",n.connect),i.on("disconnect",n.disconnect),i.on("accountsChanged",n.accountsChanged),i.on("chainChanged",n.chainChanged),i.on("message",n.message),i}))},exports.switchChain=function(r){var t;const n=r.addChainParameters.chainId,i="string"==typeof n&&(null==n?void 0:n.startsWith("0x"))?parseInt(n,16):Number(n);if(!e.supportChains.includes(i))throw new Error(`chainId ${i} not supported`);return null===(t=e.useWalletStore.getState().provider)||void 0===t?void 0:t.updateUpWalletConfig(i)};
|