@dodoex/wallet-web3 0.0.21-4 → 0.0.21

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.
Files changed (27) hide show
  1. package/dist/{blocto-9754dfac.js → blocto-bbb061fa.js} +1 -1
  2. package/dist/cjs/{blocto-d8a00219.cjs → blocto-d382d53b.cjs} +1 -1
  3. package/dist/cjs/{index-ca449f7d.cjs → index-1c6e8230.cjs} +1 -1
  4. package/dist/cjs/{index-c18abc26.cjs → index-58231958.cjs} +1 -1
  5. package/dist/cjs/{index-61710d5f.cjs → index-c498d633.cjs} +1 -1
  6. package/dist/cjs/{index-558adeb1.cjs → index-c5abbde1.cjs} +1 -1
  7. package/dist/cjs/{index-6c0ead52.cjs → index-e0aa2f48.cjs} +1 -1
  8. package/dist/cjs/index.cjs +1 -1
  9. package/dist/cjs/{portis-319015de.cjs → portis-fdb926d7.cjs} +1 -1
  10. package/dist/cjs/{provider-1f0419ef.cjs → provider-9afc4a95.cjs} +1 -1
  11. package/dist/cjs/{rainbow-6a1db73c.cjs → rainbow-113ea58d.cjs} +1 -1
  12. package/dist/cjs/{uAuth-6fd04f04.cjs → uAuth-434d4177.cjs} +1 -1
  13. package/dist/cjs/{walletConnect-03c7cb50.cjs → walletConnect-17eea654.cjs} +1 -1
  14. package/dist/cjs/{walletLink-2c3d718d.cjs → walletLink-4276b218.cjs} +1 -1
  15. package/dist/{index-5b3da01a.js → index-a00450f6.js} +1 -1
  16. package/dist/{index-b10fbc31.js → index-a36a80fb.js} +1 -1
  17. package/dist/{index-fe68cbc4.js → index-aa2a5692.js} +1 -1
  18. package/dist/{index-a9022840.js → index-c8644861.js} +1 -1
  19. package/dist/{index-6a9f4d75.js → index-fc3f83b2.js} +1 -1
  20. package/dist/index.js +1 -1
  21. package/dist/{portis-409cf5eb.js → portis-f3acd7da.js} +1 -1
  22. package/dist/{provider-e2b25195.js → provider-baa5f031.js} +1 -1
  23. package/dist/{rainbow-d8708431.js → rainbow-0854a012.js} +1 -1
  24. package/dist/{uAuth-aba3ed5f.js → uAuth-352d99fd.js} +1 -1
  25. package/dist/{walletConnect-5e23f01b.js → walletConnect-b2c68ef3.js} +1 -1
  26. package/dist/{walletLink-98548ca3.js → walletLink-173a8fe9.js} +1 -1
  27. package/package.json +1 -1
@@ -1 +1 @@
1
- import{_ as r,a as e}from"./index-6a9f4d75.js";import t from"@blocto/sdk";import"@cyberlab/cyber-app-sdk";import"@ethersproject/providers";import"zustand";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:i},s){return r(this,void 0,void 0,(function*(){let r;if(!o)throw new Error("chainId is required");c?r=c:o&&n&&(r=n[o]);const p=new t({appId:null==i?void 0:i.appId,ethereum:{chainId:o,rpc:r}}).ethereum;if(!p)throw new Error("No provider");return p.on("connect",s.connect),p.on("disconnect",s.disconnect),p.on("accountsChanged",s.accountsChanged),p.on("chainChanged",s.chainChanged),yield p.request({method:"eth_requestAccounts"}),e(p)}))}export{o as default};
1
+ import{_ as r,a as e}from"./index-fc3f83b2.js";import t from"@blocto/sdk";import"@cyberlab/cyber-app-sdk";import"@ethersproject/providers";import"zustand";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:i},s){return r(this,void 0,void 0,(function*(){let r;if(!o)throw new Error("chainId is required");c?r=c:o&&n&&(r=n[o]);const p=new t({appId:null==i?void 0:i.appId,ethereum:{chainId:o,rpc:r}}).ethereum;if(!p)throw new Error("No provider");return p.on("connect",s.connect),p.on("disconnect",s.disconnect),p.on("accountsChanged",s.accountsChanged),p.on("chainChanged",s.chainChanged),yield p.request({method:"eth_requestAccounts"}),e(p)}))}export{o as default};
@@ -1 +1 @@
1
- "use strict";var e=require("./index-c18abc26.cjs"),r=require("@blocto/sdk");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("@cyberlab/cyber-app-sdk"),require("@ethersproject/providers"),require("zustand"),require("@ethersproject/constants"),require("@ethersproject/contracts"),require("@ethersproject/address"),require("@ethersproject/properties"),require("@ethersproject/transactions"),require("@ethersproject/keccak256");var c=t(r);exports.default=function({chainId:r,rpcUrl:t,rpc:n,bloctoParams:o},i){return e.__awaiter(this,void 0,void 0,(function*(){let s;if(!r)throw new Error("chainId is required");t?s=t:r&&n&&(s=n[r]);const a=new c.default({appId:null==o?void 0:o.appId,ethereum:{chainId:r,rpc:s}}).ethereum;if(!a)throw new Error("No provider");return a.on("connect",i.connect),a.on("disconnect",i.disconnect),a.on("accountsChanged",i.accountsChanged),a.on("chainChanged",i.chainChanged),yield a.request({method:"eth_requestAccounts"}),e.convertWeb3Provider(a)}))};
1
+ "use strict";var e=require("./index-58231958.cjs"),r=require("@blocto/sdk");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("@cyberlab/cyber-app-sdk"),require("@ethersproject/providers"),require("zustand"),require("@ethersproject/constants"),require("@ethersproject/contracts"),require("@ethersproject/address"),require("@ethersproject/properties"),require("@ethersproject/transactions"),require("@ethersproject/keccak256");var c=t(r);exports.default=function({chainId:r,rpcUrl:t,rpc:n,bloctoParams:o},i){return e.__awaiter(this,void 0,void 0,(function*(){let s;if(!r)throw new Error("chainId is required");t?s=t:r&&n&&(s=n[r]);const a=new c.default({appId:null==o?void 0:o.appId,ethereum:{chainId:r,rpc:s}}).ethereum;if(!a)throw new Error("No provider");return a.on("connect",i.connect),a.on("disconnect",i.disconnect),a.on("accountsChanged",i.accountsChanged),a.on("chainChanged",i.chainChanged),yield a.request({method:"eth_requestAccounts"}),e.convertWeb3Provider(a)}))};
@@ -1 +1 @@
1
- "use strict";var e=require("./index-c18abc26.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("@cyberlab/cyber-app-sdk"),require("@ethersproject/providers"),require("zustand"),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.`)}}))};
1
+ "use strict";var e=require("./index-58231958.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("@cyberlab/cyber-app-sdk"),require("@ethersproject/providers"),require("zustand"),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.`)}}))};