@dodoex/wallet-web3 0.3.4 → 0.4.1-rise
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/{alchemy-provider-5870b6fa-d73f10c3.js → alchemy-provider-5870b6fa-14ec4a67.js} +1 -1
- package/dist/{alchemy-websocket-provider-213da986-5548964b.js → alchemy-websocket-provider-213da986-248efea7.js} +1 -1
- package/dist/{blocto-087ab98b.js → blocto-f754a82a.js} +1 -1
- package/dist/{ccip-b0d2cb9b.js → ccip-97718869.js} +1 -1
- package/dist/ccip-e1bced07.js +1 -0
- package/dist/cjs/{alchemy-provider-5870b6fa-13c38c30.cjs → alchemy-provider-5870b6fa-116ab07a.cjs} +1 -1
- package/dist/cjs/{alchemy-websocket-provider-213da986-9c2a561f.cjs → alchemy-websocket-provider-213da986-87ccad9d.cjs} +1 -1
- package/dist/cjs/{blocto-59170006.cjs → blocto-95507d3f.cjs} +1 -1
- package/dist/cjs/{ccip-f9b919b2.cjs → ccip-51bad854.cjs} +1 -1
- package/dist/cjs/ccip-b38d78bc.cjs +1 -0
- package/dist/cjs/{draggabilly-b2bd6560.cjs → draggabilly-e359aaca.cjs} +1 -1
- package/dist/cjs/id-2a5c5ef2.cjs +1 -0
- package/dist/cjs/{index-8f9c08b7.cjs → index-10a24541.cjs} +1 -1
- package/dist/cjs/{index-6cb01ff5.cjs → index-39f61aea.cjs} +1 -1
- package/dist/cjs/index-5f0913a9.cjs +2 -0
- package/dist/cjs/{index-4088da7a.cjs → index-643e5119.cjs} +1 -1
- package/dist/cjs/{index-909ed09f.cjs → index-69bd892e.cjs} +1 -1
- package/dist/cjs/{index-c8776c7e.cjs → index-7af70508.cjs} +3 -3
- package/dist/cjs/{index-e3a09800.cjs → index-96e65b8a.cjs} +1 -1
- package/dist/cjs/{index-7e2b99b8.cjs → index-9ccb1170.cjs} +1 -1
- package/dist/cjs/index-bb10a98a.cjs +6 -0
- package/dist/cjs/{index-a9e41217.cjs → index-f544eb4c.cjs} +1 -1
- package/dist/cjs/index-fadaf8b8.cjs +28 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/{index.es-5658402e.cjs → index.es-f545ef05.cjs} +1 -1
- package/dist/cjs/{interface-f8513d40.cjs → interface-8a637174.cjs} +1 -1
- package/dist/cjs/lib-typedarrays-cad6d780.cjs +1 -0
- package/dist/cjs/{portis-f1e438bd.cjs → portis-6bb18e8c.cjs} +1 -1
- package/dist/cjs/{provider-1469a098.cjs → provider-ef4d48ff.cjs} +1 -1
- package/dist/cjs/providers/connector/alchemy/index.d.ts +12 -8
- package/dist/cjs/providers/connector/index.d.ts +3 -907
- package/dist/cjs/providers/connector/rise/index.d.ts +3 -0
- package/dist/cjs/providers/connector/rise/provider.d.ts +2 -0
- package/dist/cjs/providers/wallets/index.d.ts +4 -0
- package/dist/cjs/providers/wallets/standalone.d.ts +1 -0
- package/dist/cjs/providers/wallets/types.d.ts +1 -0
- package/dist/cjs/{rainbow-3dc6f968.cjs → rainbow-23f226c3.cjs} +1 -1
- package/dist/cjs/secp256k1-12b6c26a.cjs +2 -0
- package/dist/cjs/sha224-80c902fd.cjs +1 -0
- package/dist/cjs/{sha256-981f903c.cjs → sha256-5fef9f66.cjs} +1 -1
- package/dist/cjs/{typed-data-d4238233.cjs → typed-data-6fcfdd47.cjs} +1 -1
- package/dist/cjs/uAuth-2e9ca189.cjs +1 -0
- package/dist/cjs/{walletConnect-e69e2a9a.cjs → walletConnect-a924de37.cjs} +1 -1
- package/dist/cjs/{walletLink-0560c895.cjs → walletLink-61f852a1.cjs} +1 -1
- package/dist/{draggabilly-4433218d.js → draggabilly-3125c6e9.js} +1 -1
- package/dist/id-cdf2dadd.js +1 -0
- package/dist/{index-fe2d0915.js → index-388a0406.js} +1 -1
- package/dist/{index-43cf1b4a.js → index-3f3b3b93.js} +1 -1
- package/dist/index-435c5426.js +2 -0
- package/dist/index-4f2cd06b.js +6 -0
- package/dist/index-9534d8ad.js +28 -0
- package/dist/{index-a02313f2.js → index-bbbb136d.js} +1 -1
- package/dist/{index-e8d823f4.js → index-be44c6cf.js} +1 -1
- package/dist/{index-8d7041e4.js → index-ce22e241.js} +3 -3
- package/dist/{index-08b24f87.js → index-dca9f9d5.js} +1 -1
- package/dist/{index-98e3a5b7.js → index-ecc4ef84.js} +1 -1
- package/dist/{index-e23ece16.js → index-f9b4c373.js} +1 -1
- package/dist/{index.es-0097b19b.js → index.es-54e0c8fc.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{interface-6ba1137a.js → interface-a828a662.js} +1 -1
- package/dist/lib-typedarrays-87be4777.js +1 -0
- package/dist/{portis-37b07247.js → portis-2c5bf8b6.js} +1 -1
- package/dist/{provider-db4424b4.js → provider-68c12b1a.js} +1 -1
- package/dist/providers/connector/alchemy/index.d.ts +12 -8
- package/dist/providers/connector/index.d.ts +3 -907
- package/dist/providers/connector/rise/index.d.ts +3 -0
- package/dist/providers/connector/rise/provider.d.ts +2 -0
- package/dist/providers/wallets/index.d.ts +4 -0
- package/dist/providers/wallets/standalone.d.ts +1 -0
- package/dist/providers/wallets/types.d.ts +1 -0
- package/dist/{rainbow-367d8171.js → rainbow-049a1739.js} +1 -1
- package/dist/secp256k1-981bc92b.js +2 -0
- package/dist/sha224-5fac1d2c.js +1 -0
- package/dist/{sha256-d65763b0.js → sha256-5efde761.js} +1 -1
- package/dist/{typed-data-a771d851.js → typed-data-fd8be8f8.js} +1 -1
- package/dist/uAuth-d6acd696.js +1 -0
- package/dist/{walletConnect-c14d2cb7.js → walletConnect-bad92dcf.js} +1 -1
- package/dist/{walletLink-062c2a28.js → walletLink-b85ce653.js} +1 -1
- package/package.json +5 -4
- package/dist/cjs/id-6aec2278.cjs +0 -1
- package/dist/cjs/index-5fba0284.cjs +0 -28
- package/dist/cjs/index-afede0c1.cjs +0 -6
- package/dist/cjs/lib-typedarrays-0c53ed3f.cjs +0 -1
- package/dist/cjs/sha224-a96222a0.cjs +0 -1
- package/dist/cjs/uAuth-89a23338.cjs +0 -1
- package/dist/id-b18759a6.js +0 -1
- package/dist/index-4ce5e1ef.js +0 -6
- package/dist/index-8d387984.js +0 -28
- package/dist/lib-typedarrays-72196011.js +0 -1
- package/dist/sha224-4183d3c7.js +0 -1
- package/dist/uAuth-2c8aeeba.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./index-
|
|
1
|
+
"use strict";var e=require("./index-fadaf8b8.cjs"),r=require("@ethersproject/address");require("events");var t=require("@ethersproject/bytes"),n=require("./typed-data-6fcfdd47.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-2a5c5ef2.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)};
|