@web3auth/no-modal 10.0.0-alpha.1 → 10.0.0-alpha.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.
Files changed (260) hide show
  1. package/dist/lib.cjs/base/chain/IChainInterface.js +5 -10
  2. package/dist/lib.cjs/base/chain/config.js +18 -18
  3. package/dist/lib.cjs/base/connector/baseConnector.js +3 -6
  4. package/dist/lib.cjs/base/errors/index.js +0 -10
  5. package/dist/lib.cjs/base/plugin/IPlugin.js +2 -2
  6. package/dist/lib.cjs/base/plugin/errors.js +0 -2
  7. package/dist/lib.cjs/base/utils.js +7 -7
  8. package/dist/lib.cjs/connectors/auth-connector/authConnector.js +164 -53
  9. package/dist/lib.cjs/connectors/auth-connector/config/authConnectionConfig.js +216 -0
  10. package/dist/lib.cjs/connectors/auth-connector/config/config-build.js +54 -0
  11. package/dist/lib.cjs/connectors/auth-connector/config/config-env.js +361 -0
  12. package/dist/lib.cjs/connectors/base-evm-connector/baseEvmConnector.js +8 -2
  13. package/dist/lib.cjs/connectors/base-solana-connector/baseSolanaConnector.js +7 -1
  14. package/dist/lib.cjs/connectors/coinbase-connector/coinbaseConnector.js +11 -3
  15. package/dist/lib.cjs/connectors/injected-evm-connector/injectedEvmConnector.js +13 -5
  16. package/dist/lib.cjs/connectors/injected-solana-connector/index.js +2 -2
  17. package/dist/lib.cjs/connectors/injected-solana-connector/walletStandardConnector.js +14 -5
  18. package/dist/lib.cjs/connectors/wallet-connect-v2-connector/WalletConnectV2Provider.js +25 -7
  19. package/dist/lib.cjs/connectors/wallet-connect-v2-connector/config.js +33 -32
  20. package/dist/lib.cjs/connectors/wallet-connect-v2-connector/index.js +16 -4
  21. package/dist/lib.cjs/connectors/wallet-connect-v2-connector/walletConnectV2Connector.js +18 -17
  22. package/dist/lib.cjs/connectors/wallet-connect-v2-connector/walletConnectV2Utils.js +12 -2
  23. package/dist/lib.cjs/index.js +75 -53
  24. package/dist/lib.cjs/noModal.js +33 -27
  25. package/dist/lib.cjs/plugins/nft-checkout-plugin/embed.js +0 -3
  26. package/dist/lib.cjs/plugins/nft-checkout-plugin/plugin.js +10 -3
  27. package/dist/lib.cjs/plugins/wallet-services-plugin/plugin.js +13 -11
  28. package/dist/lib.cjs/providers/account-abstraction-provider/providers/AccountAbstractionProvider.js +15 -6
  29. package/dist/lib.cjs/providers/account-abstraction-provider/providers/utils.js +10 -0
  30. package/dist/lib.cjs/providers/account-abstraction-provider/rpc/ethRpcMiddlewares.js +0 -2
  31. package/dist/lib.cjs/providers/base-provider/baseProvider.js +32 -12
  32. package/dist/lib.cjs/providers/base-provider/index.js +4 -0
  33. package/dist/lib.cjs/providers/base-provider/utils.js +10 -2
  34. package/dist/lib.cjs/providers/ethereum-mpc-provider/providers/signingProviders/EthereumSigningProvider.js +18 -5
  35. package/dist/lib.cjs/providers/ethereum-mpc-provider/providers/signingProviders/signingUtils.js +12 -2
  36. package/dist/lib.cjs/providers/ethereum-mpc-provider/rpc/ethRpcMiddlewares.js +0 -1
  37. package/dist/lib.cjs/providers/ethereum-provider/providers/converter.js +0 -1
  38. package/dist/lib.cjs/providers/ethereum-provider/providers/privateKeyProviders/TransactionFormatter/formatter.js +12 -11
  39. package/dist/lib.cjs/providers/ethereum-provider/providers/privateKeyProviders/TransactionFormatter/interfaces.js +3 -5
  40. package/dist/lib.cjs/providers/ethereum-provider/providers/privateKeyProviders/TransactionFormatter/utils.js +1 -2
  41. package/dist/lib.cjs/providers/ethereum-provider/rpc/walletMidddleware.js +0 -8
  42. package/dist/lib.cjs/providers/solana-provider/providers/injectedProviders/base/baseInjectedProvider.js +13 -0
  43. package/dist/lib.cjs/providers/solana-provider/providers/injectedProviders/base/providerHandlers.js +4 -4
  44. package/dist/lib.cjs/providers/solana-provider/providers/injectedProviders/walletStandardProvider.js +15 -8
  45. package/dist/lib.cjs/providers/solana-provider/providers/privateKeyProvider/solanaPrivateKeyProvider.js +13 -2
  46. package/dist/lib.cjs/providers/solana-provider/providers/privateKeyProvider/solanaPrivateKeyUtils.js +14 -4
  47. package/dist/lib.cjs/providers/solana-provider/solanaWallet.js +0 -3
  48. package/dist/lib.cjs/providers/xrpl-provider/providers/privateKeyProviders/xrplPrivateKeyProvider.js +13 -2
  49. package/dist/lib.cjs/providers/xrpl-provider/rpc/xrplRpcMiddlewares.js +0 -1
  50. package/dist/lib.cjs/react/no-modal/Web3AuthInnerContext.js +11 -3
  51. package/dist/lib.cjs/react/no-modal/hooks/useWeb3Auth.js +11 -0
  52. package/dist/lib.cjs/react/wallet-services-plugin/WalletServicesContext.js +10 -1
  53. package/dist/lib.cjs/react/wallet-services-plugin/hooks/useWalletServicesPlugin.js +11 -0
  54. package/dist/{types → lib.cjs/types}/base/chain/IChainInterface.d.ts +2 -8
  55. package/dist/{types → lib.cjs/types}/base/connector/interfaces.d.ts +11 -3
  56. package/dist/{types → lib.cjs/types}/base/core/IWeb3Auth.d.ts +1 -1
  57. package/dist/{types → lib.cjs/types}/base/interfaces.d.ts +2 -1
  58. package/dist/{types → lib.cjs/types}/connectors/auth-connector/authConnector.d.ts +5 -1
  59. package/dist/lib.cjs/types/connectors/auth-connector/config/authConnectionConfig.d.ts +2 -0
  60. package/dist/lib.cjs/types/connectors/auth-connector/config/config-build.d.ts +18 -0
  61. package/dist/lib.cjs/types/connectors/auth-connector/config/config-env.d.ts +60 -0
  62. package/dist/lib.cjs/types/connectors/auth-connector/interface.d.ts +15 -0
  63. package/dist/{types → lib.cjs/types}/connectors/wallet-connect-v2-connector/WalletConnectV2Provider.d.ts +1 -2
  64. package/dist/{types → lib.cjs/types}/noModal.d.ts +2 -2
  65. package/dist/{types → lib.cjs/types}/providers/base-provider/baseProvider.d.ts +3 -7
  66. package/dist/{types → lib.cjs/types}/providers/base-provider/commonPrivateKeyProvider.d.ts +1 -2
  67. package/dist/{types → lib.cjs/types}/providers/base-provider/interfaces.d.ts +3 -1
  68. package/dist/lib.cjs/types/providers/base-provider/utils.d.ts +9 -0
  69. package/dist/{types → lib.cjs/types}/providers/ethereum-mpc-provider/providers/signingProviders/EthereumSigningProvider.d.ts +1 -2
  70. package/dist/{types → lib.cjs/types}/providers/solana-provider/providers/privateKeyProvider/solanaPrivateKeyProvider.d.ts +1 -2
  71. package/dist/{types → lib.cjs/types}/providers/xrpl-provider/providers/privateKeyProviders/xrplPrivateKeyProvider.d.ts +1 -2
  72. package/dist/lib.cjs/vue/no-modal/Web3AuthProvider.js +12 -3
  73. package/dist/lib.cjs/vue/no-modal/composables/useWeb3Auth.js +12 -1
  74. package/dist/lib.cjs/vue/wallet-services-plugin/WalletServicesProvider.js +11 -3
  75. package/dist/lib.cjs/vue/wallet-services-plugin/composables/useWalletServicesPlugin.js +12 -1
  76. package/dist/lib.esm/base/chain/IChainInterface.js +2 -10
  77. package/dist/lib.esm/base/chain/config.js +2 -2
  78. package/dist/lib.esm/base/connector/baseConnector.js +2 -5
  79. package/dist/lib.esm/base/errors/index.js +0 -10
  80. package/dist/lib.esm/base/plugin/IPlugin.js +1 -1
  81. package/dist/lib.esm/base/plugin/errors.js +0 -2
  82. package/dist/lib.esm/base/utils.js +5 -5
  83. package/dist/lib.esm/connectors/auth-connector/authConnector.js +159 -48
  84. package/dist/lib.esm/connectors/auth-connector/config/authConnectionConfig.js +214 -0
  85. package/dist/lib.esm/connectors/auth-connector/config/config-build.js +48 -0
  86. package/dist/lib.esm/connectors/auth-connector/config/config-env.js +359 -0
  87. package/dist/lib.esm/connectors/base-evm-connector/baseEvmConnector.js +8 -2
  88. package/dist/lib.esm/connectors/base-solana-connector/baseSolanaConnector.js +7 -1
  89. package/dist/lib.esm/connectors/coinbase-connector/coinbaseConnector.js +10 -2
  90. package/dist/lib.esm/connectors/injected-evm-connector/injectedEvmConnector.js +12 -4
  91. package/dist/lib.esm/connectors/injected-solana-connector/walletStandardConnector.js +13 -4
  92. package/dist/lib.esm/connectors/wallet-connect-v2-connector/WalletConnectV2Provider.js +23 -5
  93. package/dist/lib.esm/connectors/wallet-connect-v2-connector/config.js +24 -19
  94. package/dist/lib.esm/connectors/wallet-connect-v2-connector/walletConnectV2Connector.js +16 -15
  95. package/dist/lib.esm/connectors/wallet-connect-v2-connector/walletConnectV2Utils.js +12 -2
  96. package/dist/lib.esm/index.js +13 -13
  97. package/dist/lib.esm/noModal.js +29 -23
  98. package/dist/lib.esm/plugins/nft-checkout-plugin/embed.js +1 -4
  99. package/dist/lib.esm/plugins/nft-checkout-plugin/plugin.js +10 -3
  100. package/dist/lib.esm/plugins/wallet-services-plugin/plugin.js +8 -6
  101. package/dist/lib.esm/providers/account-abstraction-provider/providers/AccountAbstractionProvider.js +12 -3
  102. package/dist/lib.esm/providers/account-abstraction-provider/providers/utils.js +10 -0
  103. package/dist/lib.esm/providers/account-abstraction-provider/rpc/ethRpcMiddlewares.js +0 -2
  104. package/dist/lib.esm/providers/base-provider/baseProvider.js +32 -12
  105. package/dist/lib.esm/providers/base-provider/index.js +1 -1
  106. package/dist/lib.esm/providers/base-provider/utils.js +9 -1
  107. package/dist/lib.esm/providers/ethereum-mpc-provider/providers/signingProviders/EthereumSigningProvider.js +16 -3
  108. package/dist/lib.esm/providers/ethereum-mpc-provider/providers/signingProviders/signingUtils.js +12 -2
  109. package/dist/lib.esm/providers/ethereum-mpc-provider/rpc/ethRpcMiddlewares.js +0 -1
  110. package/dist/lib.esm/providers/ethereum-provider/providers/converter.js +0 -1
  111. package/dist/lib.esm/providers/ethereum-provider/providers/privateKeyProviders/TransactionFormatter/formatter.js +12 -11
  112. package/dist/lib.esm/providers/ethereum-provider/providers/privateKeyProviders/TransactionFormatter/interfaces.js +3 -3
  113. package/dist/lib.esm/providers/ethereum-provider/providers/privateKeyProviders/TransactionFormatter/utils.js +1 -2
  114. package/dist/lib.esm/providers/ethereum-provider/rpc/walletMidddleware.js +0 -8
  115. package/dist/lib.esm/providers/solana-provider/providers/injectedProviders/base/baseInjectedProvider.js +13 -0
  116. package/dist/lib.esm/providers/solana-provider/providers/injectedProviders/base/providerHandlers.js +1 -1
  117. package/dist/lib.esm/providers/solana-provider/providers/injectedProviders/walletStandardProvider.js +12 -5
  118. package/dist/lib.esm/providers/solana-provider/providers/privateKeyProvider/solanaPrivateKeyProvider.js +12 -1
  119. package/dist/lib.esm/providers/solana-provider/providers/privateKeyProvider/solanaPrivateKeyUtils.js +11 -1
  120. package/dist/lib.esm/providers/solana-provider/rpc/solanaRpcMiddlewares.js +1 -1
  121. package/dist/lib.esm/providers/solana-provider/solanaWallet.js +0 -3
  122. package/dist/lib.esm/providers/xrpl-provider/providers/privateKeyProviders/xrplPrivateKeyProvider.js +12 -1
  123. package/dist/lib.esm/providers/xrpl-provider/rpc/xrplRpcMiddlewares.js +0 -1
  124. package/dist/lib.esm/react/no-modal/Web3AuthInnerContext.js +11 -3
  125. package/dist/lib.esm/react/no-modal/hooks/useWeb3Auth.js +11 -0
  126. package/dist/lib.esm/react/wallet-services-plugin/WalletServicesContext.js +10 -1
  127. package/dist/lib.esm/react/wallet-services-plugin/hooks/useWalletServicesPlugin.js +11 -0
  128. package/dist/lib.esm/vue/no-modal/Web3AuthProvider.js +12 -3
  129. package/dist/lib.esm/vue/no-modal/composables/useWeb3Auth.js +12 -1
  130. package/dist/lib.esm/vue/wallet-services-plugin/WalletServicesProvider.js +11 -3
  131. package/dist/lib.esm/vue/wallet-services-plugin/composables/useWalletServicesPlugin.js +12 -1
  132. package/dist/noModal.umd.min.js +1 -1
  133. package/package.json +25 -23
  134. package/dist/noModal.cjs.js +0 -14673
  135. package/dist/types/connectors/auth-connector/interface.d.ts +0 -14
  136. package/dist/types/providers/base-provider/utils.d.ts +0 -2
  137. /package/dist/{types → lib.cjs/types}/base/chain/config.d.ts +0 -0
  138. /package/dist/{types → lib.cjs/types}/base/composables/index.d.ts +0 -0
  139. /package/dist/{types → lib.cjs/types}/base/connector/baseConnector.d.ts +0 -0
  140. /package/dist/{types → lib.cjs/types}/base/connector/constants.d.ts +0 -0
  141. /package/dist/{types → lib.cjs/types}/base/connector/index.d.ts +0 -0
  142. /package/dist/{types → lib.cjs/types}/base/connector/utils.d.ts +0 -0
  143. /package/dist/{types → lib.cjs/types}/base/errors/index.d.ts +0 -0
  144. /package/dist/{types → lib.cjs/types}/base/hooks/index.d.ts +0 -0
  145. /package/dist/{types → lib.cjs/types}/base/index.d.ts +0 -0
  146. /package/dist/{types → lib.cjs/types}/base/loglevel.d.ts +0 -0
  147. /package/dist/{types → lib.cjs/types}/base/plugin/IPlugin.d.ts +0 -0
  148. /package/dist/{types → lib.cjs/types}/base/plugin/errors.d.ts +0 -0
  149. /package/dist/{types → lib.cjs/types}/base/plugin/index.d.ts +0 -0
  150. /package/dist/{types → lib.cjs/types}/base/provider/IProvider.d.ts +0 -0
  151. /package/dist/{types → lib.cjs/types}/base/utils.d.ts +0 -0
  152. /package/dist/{types → lib.cjs/types}/base/wallet/index.d.ts +0 -0
  153. /package/dist/{types → lib.cjs/types}/connectors/auth-connector/index.d.ts +0 -0
  154. /package/dist/{types → lib.cjs/types}/connectors/base-evm-connector/baseEvmConnector.d.ts +0 -0
  155. /package/dist/{types → lib.cjs/types}/connectors/base-evm-connector/index.d.ts +0 -0
  156. /package/dist/{types → lib.cjs/types}/connectors/base-solana-connector/baseSolanaConnector.d.ts +0 -0
  157. /package/dist/{types → lib.cjs/types}/connectors/base-solana-connector/index.d.ts +0 -0
  158. /package/dist/{types → lib.cjs/types}/connectors/coinbase-connector/coinbaseConnector.d.ts +0 -0
  159. /package/dist/{types → lib.cjs/types}/connectors/coinbase-connector/index.d.ts +0 -0
  160. /package/dist/{types → lib.cjs/types}/connectors/index.d.ts +0 -0
  161. /package/dist/{types → lib.cjs/types}/connectors/injected-evm-connector/index.d.ts +0 -0
  162. /package/dist/{types → lib.cjs/types}/connectors/injected-evm-connector/injectedEvmConnector.d.ts +0 -0
  163. /package/dist/{types → lib.cjs/types}/connectors/injected-solana-connector/index.d.ts +0 -0
  164. /package/dist/{types → lib.cjs/types}/connectors/injected-solana-connector/utils.d.ts +0 -0
  165. /package/dist/{types → lib.cjs/types}/connectors/injected-solana-connector/walletStandardConnector.d.ts +0 -0
  166. /package/dist/{types → lib.cjs/types}/connectors/wallet-connect-v2-connector/config.d.ts +0 -0
  167. /package/dist/{types → lib.cjs/types}/connectors/wallet-connect-v2-connector/index.d.ts +0 -0
  168. /package/dist/{types → lib.cjs/types}/connectors/wallet-connect-v2-connector/interface.d.ts +0 -0
  169. /package/dist/{types → lib.cjs/types}/connectors/wallet-connect-v2-connector/utils.d.ts +0 -0
  170. /package/dist/{types → lib.cjs/types}/connectors/wallet-connect-v2-connector/walletConnectV2Connector.d.ts +0 -0
  171. /package/dist/{types → lib.cjs/types}/connectors/wallet-connect-v2-connector/walletConnectV2Utils.d.ts +0 -0
  172. /package/dist/{types → lib.cjs/types}/index.d.ts +0 -0
  173. /package/dist/{types → lib.cjs/types}/plugins/index.d.ts +0 -0
  174. /package/dist/{types → lib.cjs/types}/plugins/nft-checkout-plugin/embed.d.ts +0 -0
  175. /package/dist/{types → lib.cjs/types}/plugins/nft-checkout-plugin/enums.d.ts +0 -0
  176. /package/dist/{types → lib.cjs/types}/plugins/nft-checkout-plugin/index.d.ts +0 -0
  177. /package/dist/{types → lib.cjs/types}/plugins/nft-checkout-plugin/plugin.d.ts +0 -0
  178. /package/dist/{types → lib.cjs/types}/plugins/nft-checkout-plugin/utils.d.ts +0 -0
  179. /package/dist/{types → lib.cjs/types}/plugins/wallet-services-plugin/index.d.ts +0 -0
  180. /package/dist/{types → lib.cjs/types}/plugins/wallet-services-plugin/plugin.d.ts +0 -0
  181. /package/dist/{types → lib.cjs/types}/providers/account-abstraction-provider/index.d.ts +0 -0
  182. /package/dist/{types → lib.cjs/types}/providers/account-abstraction-provider/providers/AccountAbstractionProvider.d.ts +0 -0
  183. /package/dist/{types → lib.cjs/types}/providers/account-abstraction-provider/providers/index.d.ts +0 -0
  184. /package/dist/{types → lib.cjs/types}/providers/account-abstraction-provider/providers/smartAccounts/index.d.ts +0 -0
  185. /package/dist/{types → lib.cjs/types}/providers/account-abstraction-provider/providers/utils.d.ts +0 -0
  186. /package/dist/{types → lib.cjs/types}/providers/account-abstraction-provider/rpc/ethRpcMiddlewares.d.ts +0 -0
  187. /package/dist/{types → lib.cjs/types}/providers/account-abstraction-provider/rpc/index.d.ts +0 -0
  188. /package/dist/{types → lib.cjs/types}/providers/base-provider/CommonJRPCProvider.d.ts +0 -0
  189. /package/dist/{types → lib.cjs/types}/providers/base-provider/index.d.ts +0 -0
  190. /package/dist/{types → lib.cjs/types}/providers/base-provider/jrpcClient.d.ts +0 -0
  191. /package/dist/{types → lib.cjs/types}/providers/ethereum-mpc-provider/index.d.ts +0 -0
  192. /package/dist/{types → lib.cjs/types}/providers/ethereum-mpc-provider/providers/index.d.ts +0 -0
  193. /package/dist/{types → lib.cjs/types}/providers/ethereum-mpc-provider/providers/signingProviders/index.d.ts +0 -0
  194. /package/dist/{types → lib.cjs/types}/providers/ethereum-mpc-provider/providers/signingProviders/signingUtils.d.ts +0 -0
  195. /package/dist/{types → lib.cjs/types}/providers/ethereum-mpc-provider/rpc/ethRpcMiddlewares.d.ts +0 -0
  196. /package/dist/{types → lib.cjs/types}/providers/ethereum-mpc-provider/rpc/interfaces.d.ts +0 -0
  197. /package/dist/{types → lib.cjs/types}/providers/ethereum-provider/index.d.ts +0 -0
  198. /package/dist/{types → lib.cjs/types}/providers/ethereum-provider/providers/converter.d.ts +0 -0
  199. /package/dist/{types → lib.cjs/types}/providers/ethereum-provider/providers/index.d.ts +0 -0
  200. /package/dist/{types → lib.cjs/types}/providers/ethereum-provider/providers/privateKeyProviders/TransactionFormatter/constants.d.ts +0 -0
  201. /package/dist/{types → lib.cjs/types}/providers/ethereum-provider/providers/privateKeyProviders/TransactionFormatter/formatter.d.ts +0 -0
  202. /package/dist/{types → lib.cjs/types}/providers/ethereum-provider/providers/privateKeyProviders/TransactionFormatter/index.d.ts +0 -0
  203. /package/dist/{types → lib.cjs/types}/providers/ethereum-provider/providers/privateKeyProviders/TransactionFormatter/interfaces.d.ts +0 -0
  204. /package/dist/{types → lib.cjs/types}/providers/ethereum-provider/providers/privateKeyProviders/TransactionFormatter/utils.d.ts +0 -0
  205. /package/dist/{types → lib.cjs/types}/providers/ethereum-provider/providers/privateKeyProviders/index.d.ts +0 -0
  206. /package/dist/{types → lib.cjs/types}/providers/ethereum-provider/providers/utils.d.ts +0 -0
  207. /package/dist/{types → lib.cjs/types}/providers/ethereum-provider/rpc/ethRpcMiddlewares.d.ts +0 -0
  208. /package/dist/{types → lib.cjs/types}/providers/ethereum-provider/rpc/index.d.ts +0 -0
  209. /package/dist/{types → lib.cjs/types}/providers/ethereum-provider/rpc/interfaces.d.ts +0 -0
  210. /package/dist/{types → lib.cjs/types}/providers/ethereum-provider/rpc/jrpcClient.d.ts +0 -0
  211. /package/dist/{types → lib.cjs/types}/providers/ethereum-provider/rpc/walletMidddleware.d.ts +0 -0
  212. /package/dist/{types → lib.cjs/types}/providers/index.d.ts +0 -0
  213. /package/dist/{types → lib.cjs/types}/providers/solana-provider/index.d.ts +0 -0
  214. /package/dist/{types → lib.cjs/types}/providers/solana-provider/interface.d.ts +0 -0
  215. /package/dist/{types → lib.cjs/types}/providers/solana-provider/providers/index.d.ts +0 -0
  216. /package/dist/{types → lib.cjs/types}/providers/solana-provider/providers/injectedProviders/base/baseInjectedProvider.d.ts +0 -0
  217. /package/dist/{types → lib.cjs/types}/providers/solana-provider/providers/injectedProviders/base/providerHandlers.d.ts +0 -0
  218. /package/dist/{types → lib.cjs/types}/providers/solana-provider/providers/injectedProviders/index.d.ts +0 -0
  219. /package/dist/{types → lib.cjs/types}/providers/solana-provider/providers/injectedProviders/utils.d.ts +0 -0
  220. /package/dist/{types → lib.cjs/types}/providers/solana-provider/providers/injectedProviders/walletStandardProvider.d.ts +0 -0
  221. /package/dist/{types → lib.cjs/types}/providers/solana-provider/providers/privateKeyProvider/index.d.ts +0 -0
  222. /package/dist/{types → lib.cjs/types}/providers/solana-provider/providers/privateKeyProvider/solanaPrivateKeyUtils.d.ts +0 -0
  223. /package/dist/{types → lib.cjs/types}/providers/solana-provider/rpc/JrpcClient.d.ts +0 -0
  224. /package/dist/{types → lib.cjs/types}/providers/solana-provider/rpc/index.d.ts +0 -0
  225. /package/dist/{types → lib.cjs/types}/providers/solana-provider/rpc/interfaces.d.ts +0 -0
  226. /package/dist/{types → lib.cjs/types}/providers/solana-provider/rpc/solanaRpcMiddlewares.d.ts +0 -0
  227. /package/dist/{types → lib.cjs/types}/providers/solana-provider/solanaWallet.d.ts +0 -0
  228. /package/dist/{types → lib.cjs/types}/providers/xrpl-provider/index.d.ts +0 -0
  229. /package/dist/{types → lib.cjs/types}/providers/xrpl-provider/providers/index.d.ts +0 -0
  230. /package/dist/{types → lib.cjs/types}/providers/xrpl-provider/providers/privateKeyProviders/constants.d.ts +0 -0
  231. /package/dist/{types → lib.cjs/types}/providers/xrpl-provider/providers/privateKeyProviders/index.d.ts +0 -0
  232. /package/dist/{types → lib.cjs/types}/providers/xrpl-provider/providers/privateKeyProviders/interface.d.ts +0 -0
  233. /package/dist/{types → lib.cjs/types}/providers/xrpl-provider/providers/privateKeyProviders/xrplWalletUtils.d.ts +0 -0
  234. /package/dist/{types → lib.cjs/types}/providers/xrpl-provider/rpc/JrpcClient.d.ts +0 -0
  235. /package/dist/{types → lib.cjs/types}/providers/xrpl-provider/rpc/xrplRpcMiddlewares.d.ts +0 -0
  236. /package/dist/{types → lib.cjs/types}/react/index.d.ts +0 -0
  237. /package/dist/{types → lib.cjs/types}/react/no-modal/Web3AuthInnerContext.d.ts +0 -0
  238. /package/dist/{types → lib.cjs/types}/react/no-modal/Web3AuthProvider.d.ts +0 -0
  239. /package/dist/{types → lib.cjs/types}/react/no-modal/hooks/index.d.ts +0 -0
  240. /package/dist/{types → lib.cjs/types}/react/no-modal/hooks/useWeb3Auth.d.ts +0 -0
  241. /package/dist/{types → lib.cjs/types}/react/no-modal/index.d.ts +0 -0
  242. /package/dist/{types → lib.cjs/types}/react/no-modal/interfaces.d.ts +0 -0
  243. /package/dist/{types → lib.cjs/types}/react/wallet-services-plugin/WalletServicesContext.d.ts +0 -0
  244. /package/dist/{types → lib.cjs/types}/react/wallet-services-plugin/WalletServicesProvider.d.ts +0 -0
  245. /package/dist/{types → lib.cjs/types}/react/wallet-services-plugin/hooks/index.d.ts +0 -0
  246. /package/dist/{types → lib.cjs/types}/react/wallet-services-plugin/hooks/useWalletServicesPlugin.d.ts +0 -0
  247. /package/dist/{types → lib.cjs/types}/react/wallet-services-plugin/index.d.ts +0 -0
  248. /package/dist/{types → lib.cjs/types}/react/wallet-services-plugin/interfaces.d.ts +0 -0
  249. /package/dist/{types → lib.cjs/types}/vue/index.d.ts +0 -0
  250. /package/dist/{types → lib.cjs/types}/vue/no-modal/Web3AuthProvider.d.ts +0 -0
  251. /package/dist/{types → lib.cjs/types}/vue/no-modal/composables/index.d.ts +0 -0
  252. /package/dist/{types → lib.cjs/types}/vue/no-modal/composables/useWeb3Auth.d.ts +0 -0
  253. /package/dist/{types → lib.cjs/types}/vue/no-modal/index.d.ts +0 -0
  254. /package/dist/{types → lib.cjs/types}/vue/no-modal/interfaces.d.ts +0 -0
  255. /package/dist/{types → lib.cjs/types}/vue/wallet-services-plugin/WalletServicesProvider.d.ts +0 -0
  256. /package/dist/{types → lib.cjs/types}/vue/wallet-services-plugin/composables/index.d.ts +0 -0
  257. /package/dist/{types → lib.cjs/types}/vue/wallet-services-plugin/composables/useWalletServicesPlugin.d.ts +0 -0
  258. /package/dist/{types → lib.cjs/types}/vue/wallet-services-plugin/context.d.ts +0 -0
  259. /package/dist/{types → lib.cjs/types}/vue/wallet-services-plugin/index.d.ts +0 -0
  260. /package/dist/{types → lib.cjs/types}/vue/wallet-services-plugin/interfaces.d.ts +0 -0
@@ -4,7 +4,17 @@ var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
4
4
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
5
5
  var util = require('@ethereumjs/util');
6
6
  var bignumber_js = require('bignumber.js');
7
+ require('../../../../../base/errors/index.js');
8
+ require('@toruslabs/base-controllers');
9
+ require('@web3auth/auth');
10
+ require('../../../../../base/wallet/index.js');
11
+ require('../../../../../base/connector/constants.js');
12
+ require('jwt-decode');
7
13
  var loglevel = require('../../../../../base/loglevel.js');
14
+ require('../../../../../base/plugin/errors.js');
15
+ require('../../../../../base/plugin/IPlugin.js');
16
+ require('@toruslabs/constants');
17
+ require('@toruslabs/http-helpers');
8
18
  var converter = require('../../converter.js');
9
19
  var utils = require('../../utils.js');
10
20
  var constants = require('./constants.js');
@@ -100,18 +110,14 @@ class TransactionFormatter {
100
110
  clonedTxParams.maxPriorityFeePerGas = clonedTxParams.maxFeePerGas;
101
111
  }
102
112
  }
103
-
104
113
  // We remove the gasPrice param entirely when on an eip1559 compatible network
105
-
106
114
  delete clonedTxParams.gasPrice;
107
115
  } else {
108
116
  // We ensure that maxFeePerGas and maxPriorityFeePerGas are not in the transaction params
109
117
  // when not on a EIP1559 compatible network
110
-
111
118
  delete clonedTxParams.maxPriorityFeePerGas;
112
119
  delete clonedTxParams.maxFeePerGas;
113
120
  }
114
-
115
121
  // If we have gotten to this point, and none of gasPrice, maxPriorityFeePerGas or maxFeePerGas are
116
122
  // set on txParams, it means that either we are on a non-EIP1559 network and the dapp didn't suggest
117
123
  // a gas price, or we are on an EIP1559 network, and none of gasPrice, maxPriorityFeePerGas or maxFeePerGas
@@ -141,7 +147,6 @@ class TransactionFormatter {
141
147
  method: "eth_feeHistory",
142
148
  params: [noOfBlocks, newestBlock, percentileValues]
143
149
  });
144
-
145
150
  // this is in hex wei
146
151
  const finalBaseFeePerGas = feeHistory.baseFeePerGas[feeHistory.baseFeePerGas.length - 1];
147
152
  // this is in hex wei
@@ -200,7 +205,7 @@ class TransactionFormatter {
200
205
  } else {
201
206
  throw new Error("Chain id not supported by api");
202
207
  }
203
- } catch (error) {
208
+ } catch {
204
209
  estimates = await this.fetchGasEstimatesViaEthFeeHistory();
205
210
  }
206
211
  gasData = {
@@ -216,7 +221,7 @@ class TransactionFormatter {
216
221
  } else {
217
222
  throw new Error("Main gas fee/price estimation failed. Use fallback");
218
223
  }
219
- } catch (e) {
224
+ } catch {
220
225
  try {
221
226
  const estimates = await this.fetchEthGasPriceEstimate();
222
227
  gasData = {
@@ -276,7 +281,6 @@ class TransactionFormatter {
276
281
  }
277
282
  async estimateTxGas(txMeta) {
278
283
  const txParams = _objectSpread({}, txMeta);
279
-
280
284
  // `eth_estimateGas` can fail if the user has insufficient balance for the
281
285
  // value being sent, or for the gas cost. We don't want to check their
282
286
  // balance here, we just want the gas estimate. The gas price is removed
@@ -315,7 +319,6 @@ class TransactionFormatter {
315
319
  const blockGasLimitBn = utils.hexToBn(blockGasLimitHex);
316
320
  const upperGasLimitBn = blockGasLimitBn.muln(0.9);
317
321
  const bufferedGasLimitBn = initialGasLimitBn.muln(multiplier);
318
-
319
322
  // if initialGasLimit is above blockGasLimit, dont modify it
320
323
  if (initialGasLimitBn.gt(upperGasLimitBn)) return utils.bnToHex(initialGasLimitBn);
321
324
  // if bufferedGasLimit is below blockGasLimit, use bufferedGasLimit
@@ -362,7 +365,6 @@ class TransactionFormatter {
362
365
  throw Error("TxGasUtil - Trying to call a function on a non-contract address");
363
366
  }
364
367
  const TWENTY_ONE_THOUSAND = 21000;
365
-
366
368
  // This is a standard ether simple send, gas requirement is exactly 21k
367
369
  return util.addHexPrefix(TWENTY_ONE_THOUSAND.toString(16));
368
370
  }
@@ -370,7 +372,6 @@ class TransactionFormatter {
370
372
  blockGasLimit,
371
373
  estimatedGasHex
372
374
  } = await this.analyzeGasUsage(txParams);
373
-
374
375
  // add additional gas buffer to our estimation for safety
375
376
  const gasLimit = this.addGasBuffer(util.addHexPrefix(estimatedGasHex), blockGasLimit);
376
377
  return gasLimit;
@@ -1,10 +1,8 @@
1
1
  'use strict';
2
2
 
3
- let SignTypedDataVersion = /*#__PURE__*/function (SignTypedDataVersion) {
3
+ exports.SignTypedDataVersion = void 0;
4
+ (function (SignTypedDataVersion) {
4
5
  SignTypedDataVersion["V1"] = "V1";
5
6
  SignTypedDataVersion["V3"] = "V3";
6
7
  SignTypedDataVersion["V4"] = "V4";
7
- return SignTypedDataVersion;
8
- }({});
9
-
10
- exports.SignTypedDataVersion = SignTypedDataVersion;
8
+ })(exports.SignTypedDataVersion || (exports.SignTypedDataVersion = {}));
@@ -29,7 +29,6 @@ async function fetchEip1159GasEstimates(url) {
29
29
  });
30
30
  return normalizedEstimates;
31
31
  }
32
-
33
32
  /**
34
33
  * Hit the legacy MetaSwaps gasPrices estimate api and return the low, medium
35
34
  * high values from that API.
@@ -63,7 +62,7 @@ async function validateTypedSignMessageDataV4(messageData, currentChainId) {
63
62
  } else {
64
63
  try {
65
64
  data = JSON.parse(messageData.data);
66
- } catch (e) {
65
+ } catch {
67
66
  throw new Error("Data must be passed as a valid JSON string.");
68
67
  }
69
68
  }
@@ -16,11 +16,9 @@ function createWalletMiddleware({
16
16
  if (!getAccounts) {
17
17
  throw new Error("opts.getAccounts is required");
18
18
  }
19
-
20
19
  //
21
20
  // utility
22
21
  //
23
-
24
22
  /**
25
23
  * Validates the keyholder address, and returns a normalized (i.e. lowercase)
26
24
  * copy of it.
@@ -41,19 +39,15 @@ function createWalletMiddleware({
41
39
  message: `Invalid parameters: must provide an Ethereum address.`
42
40
  });
43
41
  }
44
-
45
42
  //
46
43
  // account lookups
47
44
  //
48
-
49
45
  async function lookupAccounts(req, res) {
50
46
  res.result = await getAccounts(req);
51
47
  }
52
-
53
48
  //
54
49
  // transaction signatures
55
50
  //
56
-
57
51
  async function sendTransaction(req, res) {
58
52
  if (!processTransaction) {
59
53
  throw auth.rpcErrors.methodNotSupported();
@@ -74,11 +68,9 @@ function createWalletMiddleware({
74
68
  txParams.from = await validateAndNormalizeKeyholder(txParams.from, req);
75
69
  res.result = await processSignTransaction(txParams, req);
76
70
  }
77
-
78
71
  //
79
72
  // message signatures
80
73
  //
81
-
82
74
  async function ethSign(req, res) {
83
75
  if (!processEthSignMessage) {
84
76
  throw auth.rpcErrors.methodNotSupported();
@@ -2,7 +2,20 @@
2
2
 
3
3
  var auth = require('@web3auth/auth');
4
4
  var index = require('../../../../../base/errors/index.js');
5
+ require('@toruslabs/base-controllers');
6
+ require('@babel/runtime/helpers/defineProperty');
7
+ require('../../../../../base/wallet/index.js');
8
+ require('../../../../../base/connector/constants.js');
9
+ require('jwt-decode');
10
+ require('../../../../../base/loglevel.js');
11
+ require('../../../../../base/plugin/errors.js');
12
+ require('../../../../../base/plugin/IPlugin.js');
13
+ require('@toruslabs/constants');
14
+ require('@toruslabs/http-helpers');
5
15
  var baseProvider = require('../../../../base-provider/baseProvider.js');
16
+ require('../../../../base-provider/CommonJRPCProvider.js');
17
+ require('../../../../base-provider/commonPrivateKeyProvider.js');
18
+ require('../../../../base-provider/utils.js');
6
19
  var JrpcClient = require('../../../rpc/JrpcClient.js');
7
20
  var solanaRpcMiddlewares = require('../../../rpc/solanaRpcMiddlewares.js');
8
21
 
@@ -1,17 +1,17 @@
1
1
  'use strict';
2
2
 
3
+ var bs58 = require('@toruslabs/bs58');
3
4
  var auth = require('@web3auth/auth');
4
- var bs58 = require('bs58');
5
5
 
6
6
  const getBaseProviderHandlers = injectedProvider => {
7
7
  const providerHandlers = {
8
8
  requestAccounts: async () => {
9
- return injectedProvider.publicKey ? [bs58.encode(injectedProvider.publicKey.toBytes())] : [];
9
+ return injectedProvider.publicKey ? [bs58.bs58.encode(injectedProvider.publicKey.toBytes())] : [];
10
10
  },
11
11
  getPublicKey: async () => {
12
- return injectedProvider.publicKey ? bs58.encode(injectedProvider.publicKey.toBytes()) : "";
12
+ return injectedProvider.publicKey ? bs58.bs58.encode(injectedProvider.publicKey.toBytes()) : "";
13
13
  },
14
- getAccounts: async () => injectedProvider.publicKey ? [bs58.encode(injectedProvider.publicKey.toBytes())] : [],
14
+ getAccounts: async () => injectedProvider.publicKey ? [bs58.bs58.encode(injectedProvider.publicKey.toBytes())] : [],
15
15
  getPrivateKey: async () => {
16
16
  throw auth.rpcErrors.methodNotSupported();
17
17
  },
@@ -2,8 +2,19 @@
2
2
 
3
3
  var walletStandardFeatures = require('@solana/wallet-standard-features');
4
4
  var web3_js = require('@solana/web3.js');
5
- var bs58 = require('bs58');
5
+ var bs58 = require('@toruslabs/bs58');
6
6
  var index = require('../../../../base/errors/index.js');
7
+ require('@toruslabs/base-controllers');
8
+ require('@babel/runtime/helpers/defineProperty');
9
+ require('@web3auth/auth');
10
+ require('../../../../base/wallet/index.js');
11
+ require('../../../../base/connector/constants.js');
12
+ require('jwt-decode');
13
+ require('../../../../base/loglevel.js');
14
+ require('../../../../base/plugin/errors.js');
15
+ require('../../../../base/plugin/IPlugin.js');
16
+ require('@toruslabs/constants');
17
+ require('@toruslabs/http-helpers');
7
18
  var baseInjectedProvider = require('./base/baseInjectedProvider.js');
8
19
  var providerHandlers = require('./base/providerHandlers.js');
9
20
  var utils = require('./utils.js');
@@ -16,7 +27,6 @@ class WalletStandardProvider extends baseInjectedProvider.BaseInjectedProvider {
16
27
  if (!account) throw index.WalletLoginError.notConnectedError();
17
28
  return account;
18
29
  };
19
-
20
30
  /**
21
31
  * Signs a message and returns the signature
22
32
  * @param message - The message to sign
@@ -29,9 +39,8 @@ class WalletStandardProvider extends baseInjectedProvider.BaseInjectedProvider {
29
39
  account,
30
40
  message: uint8ArrayMessage
31
41
  });
32
- return bs58.encode(signature[0].signature);
42
+ return bs58.bs58.encode(signature[0].signature);
33
43
  };
34
-
35
44
  /**
36
45
  * Signs a transaction and returns the signature
37
46
  * @param transaction - The transaction to sign
@@ -44,9 +53,8 @@ class WalletStandardProvider extends baseInjectedProvider.BaseInjectedProvider {
44
53
  transaction: new Uint8Array(Buffer.from(transaction, "base64")),
45
54
  chain: chainIdentifier
46
55
  });
47
- return bs58.encode(web3_js.VersionedTransaction.deserialize(output[0].signedTransaction).signatures[0]);
56
+ return bs58.bs58.encode(web3_js.VersionedTransaction.deserialize(output[0].signedTransaction).signatures[0]);
48
57
  };
49
-
50
58
  /**
51
59
  * Signs multiple transactions and returns the serialized transactions
52
60
  * @param transactions - The transactions to sign
@@ -63,7 +71,6 @@ class WalletStandardProvider extends baseInjectedProvider.BaseInjectedProvider {
63
71
  return Buffer.from(output[0].signedTransaction).toString("base64");
64
72
  }));
65
73
  };
66
-
67
74
  /**
68
75
  * Signs a transaction and sends it to the network
69
76
  * @param transaction - The transaction to sign and send
@@ -76,7 +83,7 @@ class WalletStandardProvider extends baseInjectedProvider.BaseInjectedProvider {
76
83
  transaction: new Uint8Array(Buffer.from(transaction, "base64")),
77
84
  chain: chainIdentifier
78
85
  });
79
- return bs58.encode(output[0].signature);
86
+ return bs58.bs58.encode(output[0].signature);
80
87
  };
81
88
  return providerHandlers.getBaseProviderHandlers({
82
89
  get publicKey() {
@@ -2,9 +2,20 @@
2
2
 
3
3
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
4
4
  var auth = require('@web3auth/auth');
5
- var IChainInterface = require('../../../../base/chain/IChainInterface.js');
6
5
  var index = require('../../../../base/errors/index.js');
6
+ var baseControllers = require('@toruslabs/base-controllers');
7
+ require('../../../../base/wallet/index.js');
8
+ require('../../../../base/connector/constants.js');
9
+ require('jwt-decode');
10
+ require('../../../../base/loglevel.js');
11
+ require('../../../../base/plugin/errors.js');
12
+ require('../../../../base/plugin/IPlugin.js');
13
+ require('@toruslabs/constants');
14
+ require('@toruslabs/http-helpers');
7
15
  var baseProvider = require('../../../base-provider/baseProvider.js');
16
+ require('../../../base-provider/CommonJRPCProvider.js');
17
+ require('../../../base-provider/commonPrivateKeyProvider.js');
18
+ require('../../../base-provider/utils.js');
8
19
  var JrpcClient = require('../../rpc/JrpcClient.js');
9
20
  var solanaRpcMiddlewares = require('../../rpc/solanaRpcMiddlewares.js');
10
21
  var solanaPrivateKeyUtils = require('./solanaPrivateKeyUtils.js');
@@ -19,7 +30,7 @@ class SolanaPrivateKeyProvider extends baseProvider.BaseProvider {
19
30
  config,
20
31
  state
21
32
  });
22
- _defineProperty(this, "PROVIDER_CHAIN_NAMESPACE", IChainInterface.CHAIN_NAMESPACES.SOLANA);
33
+ _defineProperty(this, "PROVIDER_CHAIN_NAMESPACE", baseControllers.CHAIN_NAMESPACES.SOLANA);
23
34
  }
24
35
  async enable() {
25
36
  if (!this.state.privateKey) throw auth.providerErrors.custom({
@@ -1,10 +1,20 @@
1
1
  'use strict';
2
2
 
3
3
  var web3_js = require('@solana/web3.js');
4
+ var bs58 = require('@toruslabs/bs58');
4
5
  var tweetnaclJs = require('@toruslabs/tweetnacl-js');
5
6
  var auth = require('@web3auth/auth');
6
- var bs58 = require('bs58');
7
7
  var index = require('../../../../base/errors/index.js');
8
+ require('@toruslabs/base-controllers');
9
+ require('@babel/runtime/helpers/defineProperty');
10
+ require('../../../../base/wallet/index.js');
11
+ require('../../../../base/connector/constants.js');
12
+ require('jwt-decode');
13
+ require('../../../../base/loglevel.js');
14
+ require('../../../../base/plugin/errors.js');
15
+ require('../../../../base/plugin/IPlugin.js');
16
+ require('@toruslabs/constants');
17
+ require('@toruslabs/http-helpers');
8
18
 
9
19
  async function getProviderHandlers({
10
20
  privKey,
@@ -31,7 +41,7 @@ async function getProviderHandlers({
31
41
  }
32
42
  return privKey;
33
43
  },
34
- getSecretKey: async () => bs58.encode(keyPair.secretKey),
44
+ getSecretKey: async () => bs58.bs58.encode(keyPair.secretKey),
35
45
  signTransaction: async req => {
36
46
  var _req$params;
37
47
  if (!((_req$params = req.params) !== null && _req$params !== void 0 && _req$params.message)) {
@@ -40,7 +50,7 @@ async function getProviderHandlers({
40
50
  const serializedTransaction = req.params.message;
41
51
  const transaction = web3_js.VersionedTransaction.deserialize(Buffer.from(serializedTransaction, "base64"));
42
52
  transaction.sign([keyPair]);
43
- return bs58.encode(transaction.signatures[0]);
53
+ return bs58.bs58.encode(transaction.signatures[0]);
44
54
  },
45
55
  signMessage: async req => {
46
56
  var _req$params2;
@@ -48,7 +58,7 @@ async function getProviderHandlers({
48
58
  throw auth.rpcErrors.invalidParams("data");
49
59
  }
50
60
  const signedMsg = tweetnaclJs.sign.detached(Buffer.from(req.params.data, "utf-8"), keyPair.secretKey);
51
- return bs58.encode(signedMsg);
61
+ return bs58.bs58.encode(signedMsg);
52
62
  },
53
63
  signAndSendTransaction: async req => {
54
64
  var _req$params3;
@@ -24,7 +24,6 @@ class SolanaWallet {
24
24
  });
25
25
  return signature;
26
26
  }
27
-
28
27
  /**
29
28
  * Signs a transaction and returns the signature
30
29
  * @param transaction - The transaction to sign
@@ -39,7 +38,6 @@ class SolanaWallet {
39
38
  });
40
39
  return signature;
41
40
  }
42
-
43
41
  /**
44
42
  * Signs multiple transactions and returns the serialized transactions
45
43
  * @param transactions - The transactions to sign
@@ -55,7 +53,6 @@ class SolanaWallet {
55
53
  });
56
54
  return signedTransactions;
57
55
  }
58
-
59
56
  /**
60
57
  * Signs a message and returns the signature
61
58
  * @param message - The message to sign
@@ -2,9 +2,20 @@
2
2
 
3
3
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
4
4
  var auth = require('@web3auth/auth');
5
- var IChainInterface = require('../../../../base/chain/IChainInterface.js');
6
5
  var index = require('../../../../base/errors/index.js');
6
+ var baseControllers = require('@toruslabs/base-controllers');
7
+ require('../../../../base/wallet/index.js');
8
+ require('../../../../base/connector/constants.js');
9
+ require('jwt-decode');
10
+ require('../../../../base/loglevel.js');
11
+ require('../../../../base/plugin/errors.js');
12
+ require('../../../../base/plugin/IPlugin.js');
13
+ require('@toruslabs/constants');
14
+ require('@toruslabs/http-helpers');
7
15
  var baseProvider = require('../../../base-provider/baseProvider.js');
16
+ require('../../../base-provider/CommonJRPCProvider.js');
17
+ require('../../../base-provider/commonPrivateKeyProvider.js');
18
+ require('../../../base-provider/utils.js');
8
19
  var JrpcClient = require('../../rpc/JrpcClient.js');
9
20
  var xrplRpcMiddlewares = require('../../rpc/xrplRpcMiddlewares.js');
10
21
  var xrplWalletUtils = require('./xrplWalletUtils.js');
@@ -19,7 +30,7 @@ class XrplPrivateKeyProvider extends baseProvider.BaseProvider {
19
30
  config,
20
31
  state
21
32
  });
22
- _defineProperty(this, "PROVIDER_CHAIN_NAMESPACE", IChainInterface.CHAIN_NAMESPACES.XRPL);
33
+ _defineProperty(this, "PROVIDER_CHAIN_NAMESPACE", baseControllers.CHAIN_NAMESPACES.XRPL);
23
34
  }
24
35
  async enable() {
25
36
  if (!this.state.privateKey) throw auth.providerErrors.custom({
@@ -21,7 +21,6 @@ function createGetAccountsMiddleware({
21
21
  const {
22
22
  method
23
23
  } = request;
24
-
25
24
  // hack to override big ids from fetch middleware which are not supported in xrpl servers
26
25
  // TODO: fix this for xrpl controllers.
27
26
  request.id = baseControllers.randomId();
@@ -2,8 +2,18 @@
2
2
 
3
3
  var react = require('react');
4
4
  var index = require('../../base/errors/index.js');
5
- var noModal = require('../../noModal.js');
5
+ require('@toruslabs/base-controllers');
6
+ require('@babel/runtime/helpers/defineProperty');
7
+ require('@web3auth/auth');
8
+ require('../../base/wallet/index.js');
6
9
  var constants = require('../../base/connector/constants.js');
10
+ require('jwt-decode');
11
+ require('../../base/loglevel.js');
12
+ require('../../base/plugin/errors.js');
13
+ require('../../base/plugin/IPlugin.js');
14
+ require('@toruslabs/constants');
15
+ require('@toruslabs/http-helpers');
16
+ var noModal = require('../../noModal.js');
7
17
 
8
18
  const Web3AuthInnerContext = react.createContext(null);
9
19
  function Web3AuthInnerProvider(params) {
@@ -71,9 +81,7 @@ function Web3AuthInnerProvider(params) {
71
81
  if (isConnected) addState();else resetState();
72
82
  }
73
83
  }, [web3Auth, isConnected]);
74
-
75
84
  // TODO: don't throw error in init, connect in v9
76
-
77
85
  react.useEffect(() => {
78
86
  const notReadyListener = () => setStatus(constants.CONNECTOR_STATUS.NOT_READY);
79
87
  const readyListener = () => {
@@ -2,6 +2,17 @@
2
2
 
3
3
  var react = require('react');
4
4
  var index = require('../../../base/errors/index.js');
5
+ require('@toruslabs/base-controllers');
6
+ require('@babel/runtime/helpers/defineProperty');
7
+ require('@web3auth/auth');
8
+ require('../../../base/wallet/index.js');
9
+ require('../../../base/connector/constants.js');
10
+ require('jwt-decode');
11
+ require('../../../base/loglevel.js');
12
+ require('../../../base/plugin/errors.js');
13
+ require('../../../base/plugin/IPlugin.js');
14
+ require('@toruslabs/constants');
15
+ require('@toruslabs/http-helpers');
5
16
  var Web3AuthInnerContext = require('../Web3AuthInnerContext.js');
6
17
 
7
18
  const useWeb3Auth = () => {
@@ -1,9 +1,18 @@
1
1
  'use strict';
2
2
 
3
3
  var react = require('react');
4
- var IPlugin = require('../../base/plugin/IPlugin.js');
4
+ require('../../base/errors/index.js');
5
+ require('@toruslabs/base-controllers');
6
+ require('@babel/runtime/helpers/defineProperty');
7
+ require('@web3auth/auth');
8
+ require('../../base/wallet/index.js');
5
9
  var constants = require('../../base/connector/constants.js');
10
+ require('jwt-decode');
11
+ require('../../base/loglevel.js');
6
12
  var errors = require('../../base/plugin/errors.js');
13
+ var IPlugin = require('../../base/plugin/IPlugin.js');
14
+ require('@toruslabs/constants');
15
+ require('@toruslabs/http-helpers');
7
16
 
8
17
  const WalletServicesContext = react.createContext(null);
9
18
  function WalletServicesContextProvider({
@@ -2,6 +2,17 @@
2
2
 
3
3
  var react = require('react');
4
4
  var index = require('../../../base/errors/index.js');
5
+ require('@toruslabs/base-controllers');
6
+ require('@babel/runtime/helpers/defineProperty');
7
+ require('@web3auth/auth');
8
+ require('../../../base/wallet/index.js');
9
+ require('../../../base/connector/constants.js');
10
+ require('jwt-decode');
11
+ require('../../../base/loglevel.js');
12
+ require('../../../base/plugin/errors.js');
13
+ require('../../../base/plugin/IPlugin.js');
14
+ require('@toruslabs/constants');
15
+ require('@toruslabs/http-helpers');
5
16
  var WalletServicesContext = require('../WalletServicesContext.js');
6
17
 
7
18
  const useWalletServicesPlugin = () => {
@@ -1,11 +1,5 @@
1
- export declare const CHAIN_NAMESPACES: {
2
- readonly EIP155: "eip155";
3
- readonly SOLANA: "solana";
4
- readonly CASPER: "casper";
5
- readonly XRPL: "xrpl";
6
- readonly OTHER: "other";
7
- };
8
- export type ChainNamespaceType = (typeof CHAIN_NAMESPACES)[keyof typeof CHAIN_NAMESPACES];
1
+ import { CHAIN_NAMESPACES, type ChainNamespaceType } from "@toruslabs/base-controllers";
2
+ export { CHAIN_NAMESPACES, type ChainNamespaceType };
9
3
  export declare const CONNECTOR_NAMESPACES: {
10
4
  readonly EIP155: "eip155";
11
5
  readonly SOLANA: "solana";
@@ -1,4 +1,4 @@
1
- import { AuthUserInfo, JRPCRequest, JRPCResponse, Maybe, RequestArguments, SafeEventEmitter, SendCallBack, UX_MODE, type UX_MODE_TYPE, WEB3AUTH_NETWORK, type WEB3AUTH_NETWORK_TYPE } from "@web3auth/auth";
1
+ import { AUTH_CONNECTION_TYPE, AuthUserInfo, JRPCRequest, JRPCResponse, Maybe, RequestArguments, SafeEventEmitter, SendCallBack, UX_MODE, type UX_MODE_TYPE, WEB3AUTH_NETWORK, type WEB3AUTH_NETWORK_TYPE } from "@web3auth/auth";
2
2
  import { ConnectorNamespaceType, CustomChainConfig } from "../chain/IChainInterface";
3
3
  import { IWeb3AuthCoreOptions } from "../core/IWeb3Auth";
4
4
  import { Web3AuthError } from "../errors";
@@ -102,7 +102,7 @@ export interface BaseConnectorConfig {
102
102
  showOnMobile?: boolean;
103
103
  showOnDesktop?: boolean;
104
104
  }
105
- export type LoginMethodConfig = Record<string, {
105
+ export type LoginMethodConfig = Partial<Record<AUTH_CONNECTION_TYPE, {
106
106
  /**
107
107
  * Display Name. If not provided, we use the default for auth app
108
108
  */
@@ -139,7 +139,15 @@ export type LoginMethodConfig = Record<string, {
139
139
  * Whether to show the login button on mobile
140
140
  */
141
141
  showOnMobile?: boolean;
142
- }>;
142
+ /**
143
+ * Auth connection id of the provider.
144
+ */
145
+ authConnectionId?: string;
146
+ /**
147
+ * Grouped auth connection id of the provider.
148
+ */
149
+ groupedAuthConnectionId?: string;
150
+ }>>;
143
151
  export type WalletConnectV2Data = {
144
152
  uri: string;
145
153
  };
@@ -5,7 +5,7 @@ import { type CustomChainConfig } from "../chain/IChainInterface";
5
5
  import { CONNECTOR_EVENTS, type CONNECTOR_STATUS_TYPE, ConnectorEvents, type ConnectorFn, type IBaseProvider, type IConnector, type IProvider, type UserAuthInfo, type UserInfo, type WEB3AUTH_NETWORK_TYPE } from "../connector";
6
6
  import { type IPlugin, PluginFn } from "../plugin";
7
7
  import { type WALLET_CONNECTOR_TYPE } from "../wallet";
8
- export type WalletServicesConfig = Omit<WsEmbedParams, "buildEnv" | "enableLogging" | "chainConfig" | "confirmationStrategy" | "accountAbstractionConfig"> & {
8
+ export type WalletServicesConfig = Omit<WsEmbedParams, "buildEnv" | "enableLogging" | "chainId" | "chains" | "confirmationStrategy" | "accountAbstractionConfig"> & {
9
9
  /**
10
10
  * Determines how to show confirmation screens
11
11
  * @defaultValue default
@@ -1,4 +1,4 @@
1
- import { WhiteLabelData } from "@web3auth/auth";
1
+ import { AuthConnectionConfig, WhiteLabelData } from "@web3auth/auth";
2
2
  import { ChainNamespaceType } from "./chain/IChainInterface";
3
3
  export interface WhitelistResponse {
4
4
  urls: string[];
@@ -11,6 +11,7 @@ export interface PROJECT_CONFIG_RESPONSE {
11
11
  wallet_connect_project_id?: string;
12
12
  whitelist?: WhitelistResponse;
13
13
  key_export_enabled?: boolean;
14
+ auth_connection_config?: AuthConnectionConfig;
14
15
  }
15
16
  export interface WalletRegistryItem {
16
17
  name: string;
@@ -16,6 +16,7 @@ declare class AuthConnector extends BaseConnector<AuthLoginParams> {
16
16
  private loginSettings;
17
17
  private wsSettings;
18
18
  private wsEmbedInstance;
19
+ private authConnectionConfig;
19
20
  constructor(params: AuthConnectorOptions);
20
21
  get provider(): IProvider | null;
21
22
  get wsEmbed(): WsEmbed;
@@ -39,7 +40,10 @@ declare class AuthConnector extends BaseConnector<AuthLoginParams> {
39
40
  private getChain;
40
41
  private _getFinalPrivKey;
41
42
  private connectWithProvider;
43
+ private connectWithSocialLogin;
44
+ private connectWithJwtLogin;
45
+ private getOAuthProviderConfig;
42
46
  }
43
- export declare const authConnector: (params?: Omit<AuthConnectorOptions, "coreOptions">) => ConnectorFn;
47
+ export declare const authConnector: (params?: Omit<AuthConnectorOptions, "coreOptions" | "authConnectionConfig">) => ConnectorFn;
44
48
  export type AuthConnectorType = AuthConnector;
45
49
  export {};
@@ -0,0 +1,2 @@
1
+ import { AuthConnectionConfig, BUILD_ENV_TYPE, WEB3AUTH_NETWORK_TYPE } from "@web3auth/auth";
2
+ export declare const getAuthConnectionConfig: (environment: BUILD_ENV_TYPE, network: WEB3AUTH_NETWORK_TYPE) => AuthConnectionConfig;
@@ -0,0 +1,18 @@
1
+ import { BUILD_ENV_TYPE } from "@web3auth/auth";
2
+ import { LogLevelDesc } from "loglevel";
3
+ export declare const PASSWORDLESS_SERVER_API_URL = "https://api.web3auth.io/passwordless-service";
4
+ export declare const PASSWORDLESS_SERVER_SOCKET_URL = "https://api-passwordless.web3auth.io";
5
+ export declare const DEVELOP_PASSWORDLESS_SERVER_API_URL = "https://api-develop.web3auth.io/passwordless-service";
6
+ export declare const DEVELOP_PASSWORDLESS_SERVER_SOCKET_URL = "https://api-develop-passwordless.web3auth.io";
7
+ export declare const AUTH_SERVER_URL = "https://api.web3auth.io/auth-service";
8
+ export declare const DEVELOP_AUTH_SERVER_URL = "https://api-develop.web3auth.io/auth-service";
9
+ export interface ConfigBuild {
10
+ apiHost: string;
11
+ passwordlessBackendHost: string;
12
+ passwordlessHost: string;
13
+ sentrySampleRate: string;
14
+ sentryTransactionSampleRate: string;
15
+ supportsVersioning: boolean;
16
+ logLevel: LogLevelDesc;
17
+ }
18
+ export declare const configBuild: Record<BUILD_ENV_TYPE, ConfigBuild>;