@dodoex/wallet-web3 0.0.43-2 → 0.0.43-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/__tslib-b9063535.js +1 -0
- package/dist/alchemy-provider-5870b6fa-d23e5ee5.js +1 -0
- package/dist/alchemy-websocket-provider-213da986-0b22950f.js +1 -0
- package/dist/blocto-81cca48d.js +1 -0
- package/dist/ccip-8d34ca7b.js +1 -0
- package/dist/cjs/__tslib-c4e7aabc.cjs +1 -0
- package/dist/cjs/alchemy-provider-5870b6fa-1bd8b6bd.cjs +1 -0
- package/dist/cjs/alchemy-websocket-provider-213da986-d28efad0.cjs +1 -0
- package/dist/cjs/blocto-f237ffa1.cjs +1 -0
- package/dist/cjs/ccip-f3caf907.cjs +1 -0
- package/dist/cjs/{draggabilly-9347a024.cjs → draggabilly-e326df59.cjs} +1 -1
- package/dist/cjs/ethers-6d61cad7.cjs +1 -0
- package/dist/cjs/id-429f99e0.cjs +1 -0
- package/dist/cjs/{index-0e02422e.cjs → index-05816b53.cjs} +1 -1
- package/dist/cjs/{index-a4d7eb55.cjs → index-0f3725cc.cjs} +2 -2
- package/dist/cjs/index-13c33397.cjs +1 -0
- package/dist/cjs/index-2ff8acb7.cjs +28 -0
- package/dist/cjs/index-3236a05c.cjs +1 -0
- package/dist/cjs/index-3bc344a2.cjs +1 -0
- package/dist/cjs/index-557cb005.cjs +15 -0
- package/dist/{index-cd748d86.js → cjs/index-791c6860.cjs} +2 -2
- package/dist/cjs/index-793845be.cjs +6 -0
- package/dist/cjs/index-d39c8a59.cjs +1 -0
- package/dist/cjs/index-ef6f4cd5.cjs +1 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.es-cba506e1.cjs +9 -0
- package/dist/cjs/{interface-ca8f7e00.cjs → interface-e7093db3.cjs} +1 -1
- package/dist/cjs/{lib-typedarrays-b3b1a9b2.cjs → lib-typedarrays-6a913903.cjs} +1 -1
- package/dist/cjs/{portis-2628aa40.cjs → portis-bbf62ccd.cjs} +1 -1
- package/dist/cjs/provider-c5f6a090.cjs +1 -0
- package/dist/cjs/providers/connector/alchemy/provider.d.ts +42 -41
- package/dist/cjs/providers/wallets/standalone.d.ts +1 -0
- package/dist/cjs/rainbow-456904df.cjs +1 -0
- package/dist/cjs/{sha224-e08c8475.cjs → sha224-9a19fa11.cjs} +1 -1
- package/dist/cjs/sha256-be12467d.cjs +1 -0
- package/dist/cjs/typed-data-6a9095c9.cjs +1 -0
- package/dist/cjs/uAuth-7be759be.cjs +1 -0
- package/dist/cjs/walletConnect-cf4c0650.cjs +1 -0
- package/dist/cjs/walletLink-aed9d343.cjs +3 -0
- package/dist/{draggabilly-e394dd03.js → draggabilly-05a4c022.js} +1 -1
- package/dist/ethers-5083145b.js +1 -0
- package/dist/id-66f0017b.js +1 -0
- package/dist/{index-578e2937.js → index-194016af.js} +2 -2
- package/dist/index-1f959f94.js +1 -0
- package/dist/index-20eb855b.js +1 -0
- package/dist/index-30742353.js +1 -0
- package/dist/{index-fe4c3da3.js → index-32fea953.js} +2 -2
- package/dist/{cjs/index-123203f3.cjs → index-83581112.js} +2 -2
- package/dist/index-8740b83e.js +1 -0
- package/dist/index-89d5f09e.js +1 -0
- package/dist/index-d2fabfc5.js +15 -0
- package/dist/index-ddc227e4.js +1 -0
- package/dist/index-e25f9e24.js +28 -0
- package/dist/index.es-7ed72d41.js +9 -0
- package/dist/index.js +1 -1
- package/dist/{interface-2be6959d.js → interface-69689b2d.js} +1 -1
- package/dist/{lib-typedarrays-0fb1b85c.js → lib-typedarrays-b625647d.js} +1 -1
- package/dist/{portis-61fd1e59.js → portis-9d48bbdf.js} +1 -1
- package/dist/provider-b0524b31.js +1 -0
- package/dist/providers/connector/alchemy/provider.d.ts +42 -41
- package/dist/providers/wallets/standalone.d.ts +1 -0
- package/dist/rainbow-c332b668.js +1 -0
- package/dist/sha224-312b08a7.js +1 -0
- package/dist/sha256-b40ca149.js +1 -0
- package/dist/typed-data-493baf31.js +1 -0
- package/dist/uAuth-65fb6910.js +1 -0
- package/dist/walletConnect-4f48092f.js +1 -0
- package/dist/{walletLink-518a0d96.js → walletLink-bd6ba61a.js} +2 -2
- package/package.json +1 -1
- package/dist/DefaultJsonRpcProvider-cbd850bc.js +0 -1
- package/dist/__node-resolve_empty-c07e04b2.js +0 -1
- package/dist/__tslib-54b019af.js +0 -1
- package/dist/alchemy-provider-5870b6fa-077754c5.js +0 -1
- package/dist/alchemy-websocket-provider-213da986-3bfbc710.js +0 -1
- package/dist/blocto-46848faf.js +0 -1
- package/dist/bn-27b74013.js +0 -1
- package/dist/browser-ponyfill-9983e3af.js +0 -1
- package/dist/ccip-54b3b540.js +0 -1
- package/dist/cjs/DefaultJsonRpcProvider-4b2cbac3.cjs +0 -1
- package/dist/cjs/__node-resolve_empty-d89e5abe.cjs +0 -1
- package/dist/cjs/__tslib-2cb2dc52.cjs +0 -1
- package/dist/cjs/alchemy-provider-5870b6fa-1e0f04fc.cjs +0 -1
- package/dist/cjs/alchemy-websocket-provider-213da986-14086d26.cjs +0 -1
- package/dist/cjs/blocto-b08bae37.cjs +0 -1
- package/dist/cjs/bn-2fd35ed6.cjs +0 -1
- package/dist/cjs/browser-ponyfill-479139d5.cjs +0 -1
- package/dist/cjs/ccip-ffbee020.cjs +0 -1
- package/dist/cjs/ethers-6c134a78.cjs +0 -1
- package/dist/cjs/id-306822a4.cjs +0 -1
- package/dist/cjs/index-0c3f7f0d.cjs +0 -1
- package/dist/cjs/index-21f1272b.cjs +0 -1
- package/dist/cjs/index-3ee0c164.cjs +0 -15
- package/dist/cjs/index-449eebb0.cjs +0 -1
- package/dist/cjs/index-4b751ebb.cjs +0 -9
- package/dist/cjs/index-584ce2f2.cjs +0 -1
- package/dist/cjs/index-630bda42.cjs +0 -1
- package/dist/cjs/index-891edc27.cjs +0 -6
- package/dist/cjs/index-c8612d96.cjs +0 -20
- package/dist/cjs/index-d890bb01.cjs +0 -1
- package/dist/cjs/index-e373c760.cjs +0 -1
- package/dist/cjs/index.es-1a08ac77.cjs +0 -9
- package/dist/cjs/provider-ed5b8d31.cjs +0 -1
- package/dist/cjs/rainbow-66ff0e60.cjs +0 -1
- package/dist/cjs/sha256-ff3785f0.cjs +0 -1
- package/dist/cjs/uAuth-1c63d29f.cjs +0 -1
- package/dist/cjs/walletConnect-c94a63a7.cjs +0 -1
- package/dist/cjs/walletLink-24367174.cjs +0 -3
- package/dist/ethers-33678100.js +0 -1
- package/dist/id-66098a37.js +0 -1
- package/dist/index-1fae0e53.js +0 -1
- package/dist/index-27bb4d53.js +0 -1
- package/dist/index-493358d6.js +0 -1
- package/dist/index-4f7c4b45.js +0 -1
- package/dist/index-5b79ce49.js +0 -1
- package/dist/index-6aa8c5c1.js +0 -1
- package/dist/index-75067bb0.js +0 -15
- package/dist/index-76c2f135.js +0 -9
- package/dist/index-81e6d2c8.js +0 -20
- package/dist/index-9dc69b05.js +0 -1
- package/dist/index-fb276f03.js +0 -1
- package/dist/index.es-79e3646d.js +0 -9
- package/dist/provider-5ae74ef7.js +0 -1
- package/dist/rainbow-5edcbe7e.js +0 -1
- package/dist/sha224-ad024e21.js +0 -1
- package/dist/sha256-2a311540.js +0 -1
- package/dist/uAuth-70cae622.js +0 -1
- package/dist/walletConnect-526a0eb4.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("./index-2ff8acb7.cjs"),r=require("@ethersproject/address");require("events");var t=require("@ethersproject/bytes"),n=require("./typed-data-6a9095c9.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-429f99e0.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)};
|