@dodoex/wallet-web3 0.0.14-1 → 0.0.14-2
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/{blocto-223f9017.js → blocto-ddf1a226.js} +1 -1
- package/dist/cjs/{blocto-c1312fad.cjs → blocto-441cef8f.cjs} +1 -1
- package/dist/cjs/{index-3b88ad10.cjs → index-265a2d13.cjs} +1 -1
- package/dist/cjs/{index-07479f45.cjs → index-61453635.cjs} +1 -1
- package/dist/cjs/{index-fea5a208.cjs → index-e7c7f6c0.cjs} +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/{portis-76aa44d1.cjs → portis-a82d8030.cjs} +1 -1
- package/dist/cjs/{provider-5c3f73e0.cjs → provider-48672f08.cjs} +1 -1
- package/dist/cjs/providers/connector/uniPass.d.ts +1 -0
- package/dist/cjs/{rainbow-2cbb4b2d.cjs → rainbow-a3647cd8.cjs} +1 -1
- package/dist/cjs/{uAuth-690e6a02.cjs → uAuth-745e5a62.cjs} +1 -1
- package/dist/cjs/uniPass-e6b12586.cjs +1 -0
- package/dist/cjs/{walletConnect-e6bd45f7.cjs → walletConnect-e2c7990d.cjs} +1 -1
- package/dist/cjs/{walletLink-b876f19f.cjs → walletLink-19f7104a.cjs} +1 -1
- package/dist/{index-02596fd4.js → index-5bc882a3.js} +1 -1
- package/dist/{index-cc5b2d7c.js → index-6cae1440.js} +1 -1
- package/dist/{index-712d98a3.js → index-caa9693d.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{portis-3c32194e.js → portis-db12c484.js} +1 -1
- package/dist/{provider-78c10544.js → provider-e707e76e.js} +1 -1
- package/dist/providers/connector/uniPass.d.ts +1 -0
- package/dist/{rainbow-7483018f.js → rainbow-1c79f0e4.js} +1 -1
- package/dist/{uAuth-9e2a9206.js → uAuth-b783529b.js} +1 -1
- package/dist/uniPass-5d448d75.js +1 -0
- package/dist/{walletConnect-bc50f8a7.js → walletConnect-9260cccd.js} +1 -1
- package/dist/walletLink-531f70ac.js +1 -0
- package/package.json +1 -1
- package/dist/cjs/uniPass-9dbd75fb.cjs +0 -1
- package/dist/uniPass-c88d283c.js +0 -1
- package/dist/walletLink-70db71fe.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,a as r}from"./index-
|
|
1
|
+
import{_ as e,a as r}from"./index-caa9693d.js";import t from"@blocto/sdk";import"@ethersproject/providers";import"zustand";import"@ethersproject/strings";import"@ethersproject/bytes";import"@ethersproject/constants";import"@ethersproject/contracts";import"@ethersproject/address";import"@ethersproject/properties";import"@ethersproject/transactions";import"@ethersproject/keccak256";function o({chainId:o,rpcUrl:c,rpc:n,bloctoParams:s},i){return e(this,void 0,void 0,(function*(){let e;if(!o)throw new Error("chainId is required");c?e=c:o&&n&&(e=n[o]);const p=new t({appId:null==s?void 0:s.appId,ethereum:{chainId:o,rpc:e}}).ethereum;if(!p)throw new Error("No provider");return p.on("connect",i.connect),p.on("disconnect",i.disconnect),p.on("accountsChanged",i.accountsChanged),p.on("chainChanged",i.chainChanged),yield p.request({method:"eth_requestAccounts"}),r(p)}))}export{o as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./index-
|
|
1
|
+
"use strict";var e=require("./index-61453635.cjs"),r=require("@blocto/sdk");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("@ethersproject/providers"),require("zustand"),require("@ethersproject/strings"),require("@ethersproject/bytes"),require("@ethersproject/constants"),require("@ethersproject/contracts"),require("@ethersproject/address"),require("@ethersproject/properties"),require("@ethersproject/transactions"),require("@ethersproject/keccak256");var n=t(r);exports.default=function({chainId:r,rpcUrl:t,rpc:o,bloctoParams:c},i){return e.__awaiter(this,void 0,void 0,(function*(){let s;if(!r)throw new Error("chainId is required");t?s=t:r&&o&&(s=o[r]);const u=new n.default({appId:null==c?void 0:c.appId,ethereum:{chainId:r,rpc:s}}).ethereum;if(!u)throw new Error("No provider");return u.on("connect",i.connect),u.on("disconnect",i.disconnect),u.on("accountsChanged",i.accountsChanged),u.on("chainChanged",i.chainChanged),yield u.request({method:"eth_requestAccounts"}),e.convertWeb3Provider(u)}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("./index-
|
|
1
|
+
"use strict";var e=require("./index-61453635.cjs"),t=require("@safe-global/safe-apps-sdk"),r=require("@safe-global/safe-apps-provider"),n=require("@safe-global/api-kit");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("@ethersproject/providers"),require("zustand"),require("@ethersproject/strings"),require("@ethersproject/bytes"),require("@ethersproject/constants"),require("@ethersproject/contracts"),require("@ethersproject/address"),require("@ethersproject/properties"),require("@ethersproject/transactions"),require("@ethersproject/keccak256");var o=s(t),a=s(n);let i,c;function u(){return e.__awaiter(this,void 0,void 0,(function*(){return c||(c=new o.default),void 0===i&&(i=yield Promise.race([c.safe.getInfo(),new Promise((e=>setTimeout(e,200)))])),i}))}const f={1:"https://safe-transaction-mainnet.safe.global/",5:"https://safe-transaction-goerli.safe.global/",42161:"https://safe-transaction-arbitrum.safe.global/",43114:"https://safe-transaction-avalanche.safe.global/",1313161554:"https://safe-transaction-aurora.safe.global/",56:"https://safe-transaction-bsc.safe.global/",10:"https://safe-transaction-optimism.safe.global/",137:"https://safe-transaction-polygon.safe.global/"};let l;function d(t){return e.__awaiter(this,void 0,void 0,(function*(){if((null==l?void 0:l.chainId)===t)return l.safeService;if(!e.useWalletStore.getState().provider)throw new Error("provider is undefined");const r=function(){return{getEip3770Address:t=>e.__awaiter(this,void 0,void 0,(function*(){const{address:e,prefix:r}=function(e){const t=e.split(":"),r=t.length>1?t[1]:t[0];return{prefix:t.length>1?t[0]:"",address:r}}(t);return{address:e,prefix:r}}))}}(),n=f[t];if(!n)return;const s=new a.default({txServiceUrl:n,ethAdapter:r});return l={safeService:s,chainId:t},l.safeService}))}exports.default=function(t){return e.__awaiter(this,void 0,void 0,(function*(){const n=yield u();if(!n)throw Error("Could not load Safe information");const s=new r.SafeAppProvider(n,c);return s.on("connect",t.connect),s.on("disconnect",t.disconnect),s.on("accountsChanged",t.accountsChanged),s.on("chainChanged",t.chainChanged),s.on("message",t.message),e.convertWeb3Provider(s)}))},exports.getAccountIsSafe=function(t,r){return e.__awaiter(this,void 0,void 0,(function*(){if(!r)return!1;const e=yield d(t);if(!e)return!1;try{return!!(yield e.getSafeInfo(r))}catch(e){return console.error(e),!1}}))},exports.getConnectedSafe=u,exports.getIsSafe=function(){return e.__awaiter(this,void 0,void 0,(function*(){return!!(yield u())}))},exports.getSafeHashDetailUrl=function(e,t,r){const n={1:"eth",5:"gor",137:"matic",56:"bnb",42161:"arb1",10:"oeth",43114:"avax",1313161554:"aurora"}[t];if(!n)throw new Error(`Not Supported network: ${t}`);return`https://app.safe.global/transactions/tx?id=multisig_${r}_${e}&safe=${n}%3A${r}`},exports.getSafeTxHash=function(t,r,n){return e.__awaiter(this,void 0,void 0,(function*(){const e=yield d(t);if(!e)return console.error(`chainId: ${t} is not supported safe`),n;if(n!==r)return n;const s=yield e.getMultisigTransactions(n),[o]=s.results;return o.safeTxHash}))},exports.getSafeTxStatus=function(t,r,n){return e.__awaiter(this,void 0,void 0,(function*(){const e=yield d(t);if(!e)throw new Error(`chainId: ${t} is not supported safe`);try{const{results:t}=yield e.getMultisigTransactions(n),s=t.find((e=>e.safeTxHash.toLocaleLowerCase()===r.toLocaleLowerCase()));if(!s)return null;if(t.some((e=>!(e.nonce!==s.nonce||e.safeTxHash.toLocaleLowerCase()===r.toLocaleLowerCase()||!e.isExecuted||!e.isSuccessful))))return"rejected";if(null===s.isExecuted||null===s.isSuccessful)return null;return{status:s.isExecuted&&s.isSuccessful||!1,transactionHash:s.transactionHash,blockNumber:s.blockNumber||null}}catch(e){throw console.error(e),new Error(`safeTxHash: ${r} is not valid.`)}}))};
|