@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.
- package/dist/lib.cjs/base/chain/IChainInterface.js +5 -10
- package/dist/lib.cjs/base/chain/config.js +18 -18
- package/dist/lib.cjs/base/connector/baseConnector.js +3 -6
- package/dist/lib.cjs/base/errors/index.js +0 -10
- package/dist/lib.cjs/base/plugin/IPlugin.js +2 -2
- package/dist/lib.cjs/base/plugin/errors.js +0 -2
- package/dist/lib.cjs/base/utils.js +7 -7
- package/dist/lib.cjs/connectors/auth-connector/authConnector.js +164 -53
- package/dist/lib.cjs/connectors/auth-connector/config/authConnectionConfig.js +216 -0
- package/dist/lib.cjs/connectors/auth-connector/config/config-build.js +54 -0
- package/dist/lib.cjs/connectors/auth-connector/config/config-env.js +361 -0
- package/dist/lib.cjs/connectors/base-evm-connector/baseEvmConnector.js +8 -2
- package/dist/lib.cjs/connectors/base-solana-connector/baseSolanaConnector.js +7 -1
- package/dist/lib.cjs/connectors/coinbase-connector/coinbaseConnector.js +11 -3
- package/dist/lib.cjs/connectors/injected-evm-connector/injectedEvmConnector.js +13 -5
- package/dist/lib.cjs/connectors/injected-solana-connector/index.js +2 -2
- package/dist/lib.cjs/connectors/injected-solana-connector/walletStandardConnector.js +14 -5
- package/dist/lib.cjs/connectors/wallet-connect-v2-connector/WalletConnectV2Provider.js +25 -7
- package/dist/lib.cjs/connectors/wallet-connect-v2-connector/config.js +33 -32
- package/dist/lib.cjs/connectors/wallet-connect-v2-connector/index.js +16 -4
- package/dist/lib.cjs/connectors/wallet-connect-v2-connector/walletConnectV2Connector.js +18 -17
- package/dist/lib.cjs/connectors/wallet-connect-v2-connector/walletConnectV2Utils.js +12 -2
- package/dist/lib.cjs/index.js +75 -53
- package/dist/lib.cjs/noModal.js +33 -27
- package/dist/lib.cjs/plugins/nft-checkout-plugin/embed.js +0 -3
- package/dist/lib.cjs/plugins/nft-checkout-plugin/plugin.js +10 -3
- package/dist/lib.cjs/plugins/wallet-services-plugin/plugin.js +13 -11
- package/dist/lib.cjs/providers/account-abstraction-provider/providers/AccountAbstractionProvider.js +15 -6
- package/dist/lib.cjs/providers/account-abstraction-provider/providers/utils.js +10 -0
- package/dist/lib.cjs/providers/account-abstraction-provider/rpc/ethRpcMiddlewares.js +0 -2
- package/dist/lib.cjs/providers/base-provider/baseProvider.js +32 -12
- package/dist/lib.cjs/providers/base-provider/index.js +4 -0
- package/dist/lib.cjs/providers/base-provider/utils.js +10 -2
- package/dist/lib.cjs/providers/ethereum-mpc-provider/providers/signingProviders/EthereumSigningProvider.js +18 -5
- package/dist/lib.cjs/providers/ethereum-mpc-provider/providers/signingProviders/signingUtils.js +12 -2
- package/dist/lib.cjs/providers/ethereum-mpc-provider/rpc/ethRpcMiddlewares.js +0 -1
- package/dist/lib.cjs/providers/ethereum-provider/providers/converter.js +0 -1
- package/dist/lib.cjs/providers/ethereum-provider/providers/privateKeyProviders/TransactionFormatter/formatter.js +12 -11
- package/dist/lib.cjs/providers/ethereum-provider/providers/privateKeyProviders/TransactionFormatter/interfaces.js +3 -5
- package/dist/lib.cjs/providers/ethereum-provider/providers/privateKeyProviders/TransactionFormatter/utils.js +1 -2
- package/dist/lib.cjs/providers/ethereum-provider/rpc/walletMidddleware.js +0 -8
- package/dist/lib.cjs/providers/solana-provider/providers/injectedProviders/base/baseInjectedProvider.js +13 -0
- package/dist/lib.cjs/providers/solana-provider/providers/injectedProviders/base/providerHandlers.js +4 -4
- package/dist/lib.cjs/providers/solana-provider/providers/injectedProviders/walletStandardProvider.js +15 -8
- package/dist/lib.cjs/providers/solana-provider/providers/privateKeyProvider/solanaPrivateKeyProvider.js +13 -2
- package/dist/lib.cjs/providers/solana-provider/providers/privateKeyProvider/solanaPrivateKeyUtils.js +14 -4
- package/dist/lib.cjs/providers/solana-provider/solanaWallet.js +0 -3
- package/dist/lib.cjs/providers/xrpl-provider/providers/privateKeyProviders/xrplPrivateKeyProvider.js +13 -2
- package/dist/lib.cjs/providers/xrpl-provider/rpc/xrplRpcMiddlewares.js +0 -1
- package/dist/lib.cjs/react/no-modal/Web3AuthInnerContext.js +11 -3
- package/dist/lib.cjs/react/no-modal/hooks/useWeb3Auth.js +11 -0
- package/dist/lib.cjs/react/wallet-services-plugin/WalletServicesContext.js +10 -1
- package/dist/lib.cjs/react/wallet-services-plugin/hooks/useWalletServicesPlugin.js +11 -0
- package/dist/{types → lib.cjs/types}/base/chain/IChainInterface.d.ts +2 -8
- package/dist/{types → lib.cjs/types}/base/connector/interfaces.d.ts +11 -3
- package/dist/{types → lib.cjs/types}/base/core/IWeb3Auth.d.ts +1 -1
- package/dist/{types → lib.cjs/types}/base/interfaces.d.ts +2 -1
- package/dist/{types → lib.cjs/types}/connectors/auth-connector/authConnector.d.ts +5 -1
- package/dist/lib.cjs/types/connectors/auth-connector/config/authConnectionConfig.d.ts +2 -0
- package/dist/lib.cjs/types/connectors/auth-connector/config/config-build.d.ts +18 -0
- package/dist/lib.cjs/types/connectors/auth-connector/config/config-env.d.ts +60 -0
- package/dist/lib.cjs/types/connectors/auth-connector/interface.d.ts +15 -0
- package/dist/{types → lib.cjs/types}/connectors/wallet-connect-v2-connector/WalletConnectV2Provider.d.ts +1 -2
- package/dist/{types → lib.cjs/types}/noModal.d.ts +2 -2
- package/dist/{types → lib.cjs/types}/providers/base-provider/baseProvider.d.ts +3 -7
- package/dist/{types → lib.cjs/types}/providers/base-provider/commonPrivateKeyProvider.d.ts +1 -2
- package/dist/{types → lib.cjs/types}/providers/base-provider/interfaces.d.ts +3 -1
- package/dist/lib.cjs/types/providers/base-provider/utils.d.ts +9 -0
- package/dist/{types → lib.cjs/types}/providers/ethereum-mpc-provider/providers/signingProviders/EthereumSigningProvider.d.ts +1 -2
- package/dist/{types → lib.cjs/types}/providers/solana-provider/providers/privateKeyProvider/solanaPrivateKeyProvider.d.ts +1 -2
- package/dist/{types → lib.cjs/types}/providers/xrpl-provider/providers/privateKeyProviders/xrplPrivateKeyProvider.d.ts +1 -2
- package/dist/lib.cjs/vue/no-modal/Web3AuthProvider.js +12 -3
- package/dist/lib.cjs/vue/no-modal/composables/useWeb3Auth.js +12 -1
- package/dist/lib.cjs/vue/wallet-services-plugin/WalletServicesProvider.js +11 -3
- package/dist/lib.cjs/vue/wallet-services-plugin/composables/useWalletServicesPlugin.js +12 -1
- package/dist/lib.esm/base/chain/IChainInterface.js +2 -10
- package/dist/lib.esm/base/chain/config.js +2 -2
- package/dist/lib.esm/base/connector/baseConnector.js +2 -5
- package/dist/lib.esm/base/errors/index.js +0 -10
- package/dist/lib.esm/base/plugin/IPlugin.js +1 -1
- package/dist/lib.esm/base/plugin/errors.js +0 -2
- package/dist/lib.esm/base/utils.js +5 -5
- package/dist/lib.esm/connectors/auth-connector/authConnector.js +159 -48
- package/dist/lib.esm/connectors/auth-connector/config/authConnectionConfig.js +214 -0
- package/dist/lib.esm/connectors/auth-connector/config/config-build.js +48 -0
- package/dist/lib.esm/connectors/auth-connector/config/config-env.js +359 -0
- package/dist/lib.esm/connectors/base-evm-connector/baseEvmConnector.js +8 -2
- package/dist/lib.esm/connectors/base-solana-connector/baseSolanaConnector.js +7 -1
- package/dist/lib.esm/connectors/coinbase-connector/coinbaseConnector.js +10 -2
- package/dist/lib.esm/connectors/injected-evm-connector/injectedEvmConnector.js +12 -4
- package/dist/lib.esm/connectors/injected-solana-connector/walletStandardConnector.js +13 -4
- package/dist/lib.esm/connectors/wallet-connect-v2-connector/WalletConnectV2Provider.js +23 -5
- package/dist/lib.esm/connectors/wallet-connect-v2-connector/config.js +24 -19
- package/dist/lib.esm/connectors/wallet-connect-v2-connector/walletConnectV2Connector.js +16 -15
- package/dist/lib.esm/connectors/wallet-connect-v2-connector/walletConnectV2Utils.js +12 -2
- package/dist/lib.esm/index.js +13 -13
- package/dist/lib.esm/noModal.js +29 -23
- package/dist/lib.esm/plugins/nft-checkout-plugin/embed.js +1 -4
- package/dist/lib.esm/plugins/nft-checkout-plugin/plugin.js +10 -3
- package/dist/lib.esm/plugins/wallet-services-plugin/plugin.js +8 -6
- package/dist/lib.esm/providers/account-abstraction-provider/providers/AccountAbstractionProvider.js +12 -3
- package/dist/lib.esm/providers/account-abstraction-provider/providers/utils.js +10 -0
- package/dist/lib.esm/providers/account-abstraction-provider/rpc/ethRpcMiddlewares.js +0 -2
- package/dist/lib.esm/providers/base-provider/baseProvider.js +32 -12
- package/dist/lib.esm/providers/base-provider/index.js +1 -1
- package/dist/lib.esm/providers/base-provider/utils.js +9 -1
- package/dist/lib.esm/providers/ethereum-mpc-provider/providers/signingProviders/EthereumSigningProvider.js +16 -3
- package/dist/lib.esm/providers/ethereum-mpc-provider/providers/signingProviders/signingUtils.js +12 -2
- package/dist/lib.esm/providers/ethereum-mpc-provider/rpc/ethRpcMiddlewares.js +0 -1
- package/dist/lib.esm/providers/ethereum-provider/providers/converter.js +0 -1
- package/dist/lib.esm/providers/ethereum-provider/providers/privateKeyProviders/TransactionFormatter/formatter.js +12 -11
- package/dist/lib.esm/providers/ethereum-provider/providers/privateKeyProviders/TransactionFormatter/interfaces.js +3 -3
- package/dist/lib.esm/providers/ethereum-provider/providers/privateKeyProviders/TransactionFormatter/utils.js +1 -2
- package/dist/lib.esm/providers/ethereum-provider/rpc/walletMidddleware.js +0 -8
- package/dist/lib.esm/providers/solana-provider/providers/injectedProviders/base/baseInjectedProvider.js +13 -0
- package/dist/lib.esm/providers/solana-provider/providers/injectedProviders/base/providerHandlers.js +1 -1
- package/dist/lib.esm/providers/solana-provider/providers/injectedProviders/walletStandardProvider.js +12 -5
- package/dist/lib.esm/providers/solana-provider/providers/privateKeyProvider/solanaPrivateKeyProvider.js +12 -1
- package/dist/lib.esm/providers/solana-provider/providers/privateKeyProvider/solanaPrivateKeyUtils.js +11 -1
- package/dist/lib.esm/providers/solana-provider/rpc/solanaRpcMiddlewares.js +1 -1
- package/dist/lib.esm/providers/solana-provider/solanaWallet.js +0 -3
- package/dist/lib.esm/providers/xrpl-provider/providers/privateKeyProviders/xrplPrivateKeyProvider.js +12 -1
- package/dist/lib.esm/providers/xrpl-provider/rpc/xrplRpcMiddlewares.js +0 -1
- package/dist/lib.esm/react/no-modal/Web3AuthInnerContext.js +11 -3
- package/dist/lib.esm/react/no-modal/hooks/useWeb3Auth.js +11 -0
- package/dist/lib.esm/react/wallet-services-plugin/WalletServicesContext.js +10 -1
- package/dist/lib.esm/react/wallet-services-plugin/hooks/useWalletServicesPlugin.js +11 -0
- package/dist/lib.esm/vue/no-modal/Web3AuthProvider.js +12 -3
- package/dist/lib.esm/vue/no-modal/composables/useWeb3Auth.js +12 -1
- package/dist/lib.esm/vue/wallet-services-plugin/WalletServicesProvider.js +11 -3
- package/dist/lib.esm/vue/wallet-services-plugin/composables/useWalletServicesPlugin.js +12 -1
- package/dist/noModal.umd.min.js +1 -1
- package/package.json +25 -23
- package/dist/noModal.cjs.js +0 -14673
- package/dist/types/connectors/auth-connector/interface.d.ts +0 -14
- package/dist/types/providers/base-provider/utils.d.ts +0 -2
- /package/dist/{types → lib.cjs/types}/base/chain/config.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/base/composables/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/base/connector/baseConnector.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/base/connector/constants.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/base/connector/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/base/connector/utils.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/base/errors/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/base/hooks/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/base/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/base/loglevel.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/base/plugin/IPlugin.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/base/plugin/errors.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/base/plugin/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/base/provider/IProvider.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/base/utils.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/base/wallet/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/connectors/auth-connector/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/connectors/base-evm-connector/baseEvmConnector.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/connectors/base-evm-connector/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/connectors/base-solana-connector/baseSolanaConnector.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/connectors/base-solana-connector/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/connectors/coinbase-connector/coinbaseConnector.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/connectors/coinbase-connector/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/connectors/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/connectors/injected-evm-connector/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/connectors/injected-evm-connector/injectedEvmConnector.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/connectors/injected-solana-connector/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/connectors/injected-solana-connector/utils.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/connectors/injected-solana-connector/walletStandardConnector.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/connectors/wallet-connect-v2-connector/config.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/connectors/wallet-connect-v2-connector/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/connectors/wallet-connect-v2-connector/interface.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/connectors/wallet-connect-v2-connector/utils.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/connectors/wallet-connect-v2-connector/walletConnectV2Connector.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/connectors/wallet-connect-v2-connector/walletConnectV2Utils.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/plugins/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/plugins/nft-checkout-plugin/embed.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/plugins/nft-checkout-plugin/enums.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/plugins/nft-checkout-plugin/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/plugins/nft-checkout-plugin/plugin.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/plugins/nft-checkout-plugin/utils.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/plugins/wallet-services-plugin/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/plugins/wallet-services-plugin/plugin.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/account-abstraction-provider/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/account-abstraction-provider/providers/AccountAbstractionProvider.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/account-abstraction-provider/providers/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/account-abstraction-provider/providers/smartAccounts/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/account-abstraction-provider/providers/utils.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/account-abstraction-provider/rpc/ethRpcMiddlewares.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/account-abstraction-provider/rpc/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/base-provider/CommonJRPCProvider.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/base-provider/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/base-provider/jrpcClient.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/ethereum-mpc-provider/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/ethereum-mpc-provider/providers/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/ethereum-mpc-provider/providers/signingProviders/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/ethereum-mpc-provider/providers/signingProviders/signingUtils.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/ethereum-mpc-provider/rpc/ethRpcMiddlewares.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/ethereum-mpc-provider/rpc/interfaces.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/ethereum-provider/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/ethereum-provider/providers/converter.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/ethereum-provider/providers/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/ethereum-provider/providers/privateKeyProviders/TransactionFormatter/constants.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/ethereum-provider/providers/privateKeyProviders/TransactionFormatter/formatter.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/ethereum-provider/providers/privateKeyProviders/TransactionFormatter/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/ethereum-provider/providers/privateKeyProviders/TransactionFormatter/interfaces.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/ethereum-provider/providers/privateKeyProviders/TransactionFormatter/utils.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/ethereum-provider/providers/privateKeyProviders/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/ethereum-provider/providers/utils.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/ethereum-provider/rpc/ethRpcMiddlewares.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/ethereum-provider/rpc/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/ethereum-provider/rpc/interfaces.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/ethereum-provider/rpc/jrpcClient.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/ethereum-provider/rpc/walletMidddleware.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/solana-provider/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/solana-provider/interface.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/solana-provider/providers/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/solana-provider/providers/injectedProviders/base/baseInjectedProvider.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/solana-provider/providers/injectedProviders/base/providerHandlers.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/solana-provider/providers/injectedProviders/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/solana-provider/providers/injectedProviders/utils.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/solana-provider/providers/injectedProviders/walletStandardProvider.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/solana-provider/providers/privateKeyProvider/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/solana-provider/providers/privateKeyProvider/solanaPrivateKeyUtils.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/solana-provider/rpc/JrpcClient.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/solana-provider/rpc/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/solana-provider/rpc/interfaces.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/solana-provider/rpc/solanaRpcMiddlewares.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/solana-provider/solanaWallet.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/xrpl-provider/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/xrpl-provider/providers/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/xrpl-provider/providers/privateKeyProviders/constants.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/xrpl-provider/providers/privateKeyProviders/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/xrpl-provider/providers/privateKeyProviders/interface.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/xrpl-provider/providers/privateKeyProviders/xrplWalletUtils.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/xrpl-provider/rpc/JrpcClient.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/providers/xrpl-provider/rpc/xrplRpcMiddlewares.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/react/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/react/no-modal/Web3AuthInnerContext.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/react/no-modal/Web3AuthProvider.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/react/no-modal/hooks/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/react/no-modal/hooks/useWeb3Auth.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/react/no-modal/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/react/no-modal/interfaces.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/react/wallet-services-plugin/WalletServicesContext.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/react/wallet-services-plugin/WalletServicesProvider.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/react/wallet-services-plugin/hooks/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/react/wallet-services-plugin/hooks/useWalletServicesPlugin.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/react/wallet-services-plugin/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/react/wallet-services-plugin/interfaces.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/vue/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/vue/no-modal/Web3AuthProvider.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/vue/no-modal/composables/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/vue/no-modal/composables/useWeb3Auth.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/vue/no-modal/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/vue/no-modal/interfaces.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/vue/wallet-services-plugin/WalletServicesProvider.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/vue/wallet-services-plugin/composables/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/vue/wallet-services-plugin/composables/useWalletServicesPlugin.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/vue/wallet-services-plugin/context.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/vue/wallet-services-plugin/index.d.ts +0 -0
- /package/dist/{types → lib.cjs/types}/vue/wallet-services-plugin/interfaces.d.ts +0 -0
|
@@ -5,7 +5,6 @@ import { BigNumber } from 'bignumber.js';
|
|
|
5
5
|
const BIG_NUMBER_WEI_MULTIPLIER = new BigNumber("1e18");
|
|
6
6
|
const BIG_NUMBER_GWEI_MULTIPLIER = new BigNumber("1e9");
|
|
7
7
|
const BIG_NUMBER_ETH_MULTIPLIER = new BigNumber("1");
|
|
8
|
-
|
|
9
8
|
// Setter Maps
|
|
10
9
|
const toBigNumber = {
|
|
11
10
|
hex: n => typeof n === "string" ? new BigNumber(stripHexPrefix(n), 16) : new BigNumber(n, 16),
|
|
@@ -2,7 +2,17 @@ import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
|
2
2
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
3
3
|
import { addHexPrefix, stripHexPrefix } from '@ethereumjs/util';
|
|
4
4
|
import { BigNumber } from 'bignumber.js';
|
|
5
|
+
import '../../../../../base/errors/index.js';
|
|
6
|
+
import '@toruslabs/base-controllers';
|
|
7
|
+
import '@web3auth/auth';
|
|
8
|
+
import '../../../../../base/wallet/index.js';
|
|
9
|
+
import '../../../../../base/connector/constants.js';
|
|
10
|
+
import 'jwt-decode';
|
|
5
11
|
import { log } from '../../../../../base/loglevel.js';
|
|
12
|
+
import '../../../../../base/plugin/errors.js';
|
|
13
|
+
import '../../../../../base/plugin/IPlugin.js';
|
|
14
|
+
import '@toruslabs/constants';
|
|
15
|
+
import '@toruslabs/http-helpers';
|
|
6
16
|
import { hexWEIToDecGWEI, decGWEIToHexWEI } from '../../converter.js';
|
|
7
17
|
import { bnLessThan, hexToBn, BnMultiplyByFraction, bnToHex } from '../../utils.js';
|
|
8
18
|
import { TRANSACTION_ENVELOPE_TYPES, EIP1559APIEndpoint, GAS_ESTIMATE_TYPES, LegacyGasAPIEndpoint, TRANSACTION_TYPES } from './constants.js';
|
|
@@ -98,18 +108,14 @@ class TransactionFormatter {
|
|
|
98
108
|
clonedTxParams.maxPriorityFeePerGas = clonedTxParams.maxFeePerGas;
|
|
99
109
|
}
|
|
100
110
|
}
|
|
101
|
-
|
|
102
111
|
// We remove the gasPrice param entirely when on an eip1559 compatible network
|
|
103
|
-
|
|
104
112
|
delete clonedTxParams.gasPrice;
|
|
105
113
|
} else {
|
|
106
114
|
// We ensure that maxFeePerGas and maxPriorityFeePerGas are not in the transaction params
|
|
107
115
|
// when not on a EIP1559 compatible network
|
|
108
|
-
|
|
109
116
|
delete clonedTxParams.maxPriorityFeePerGas;
|
|
110
117
|
delete clonedTxParams.maxFeePerGas;
|
|
111
118
|
}
|
|
112
|
-
|
|
113
119
|
// If we have gotten to this point, and none of gasPrice, maxPriorityFeePerGas or maxFeePerGas are
|
|
114
120
|
// set on txParams, it means that either we are on a non-EIP1559 network and the dapp didn't suggest
|
|
115
121
|
// a gas price, or we are on an EIP1559 network, and none of gasPrice, maxPriorityFeePerGas or maxFeePerGas
|
|
@@ -139,7 +145,6 @@ class TransactionFormatter {
|
|
|
139
145
|
method: "eth_feeHistory",
|
|
140
146
|
params: [noOfBlocks, newestBlock, percentileValues]
|
|
141
147
|
});
|
|
142
|
-
|
|
143
148
|
// this is in hex wei
|
|
144
149
|
const finalBaseFeePerGas = feeHistory.baseFeePerGas[feeHistory.baseFeePerGas.length - 1];
|
|
145
150
|
// this is in hex wei
|
|
@@ -198,7 +203,7 @@ class TransactionFormatter {
|
|
|
198
203
|
} else {
|
|
199
204
|
throw new Error("Chain id not supported by api");
|
|
200
205
|
}
|
|
201
|
-
} catch
|
|
206
|
+
} catch {
|
|
202
207
|
estimates = await this.fetchGasEstimatesViaEthFeeHistory();
|
|
203
208
|
}
|
|
204
209
|
gasData = {
|
|
@@ -214,7 +219,7 @@ class TransactionFormatter {
|
|
|
214
219
|
} else {
|
|
215
220
|
throw new Error("Main gas fee/price estimation failed. Use fallback");
|
|
216
221
|
}
|
|
217
|
-
} catch
|
|
222
|
+
} catch {
|
|
218
223
|
try {
|
|
219
224
|
const estimates = await this.fetchEthGasPriceEstimate();
|
|
220
225
|
gasData = {
|
|
@@ -274,7 +279,6 @@ class TransactionFormatter {
|
|
|
274
279
|
}
|
|
275
280
|
async estimateTxGas(txMeta) {
|
|
276
281
|
const txParams = _objectSpread({}, txMeta);
|
|
277
|
-
|
|
278
282
|
// `eth_estimateGas` can fail if the user has insufficient balance for the
|
|
279
283
|
// value being sent, or for the gas cost. We don't want to check their
|
|
280
284
|
// balance here, we just want the gas estimate. The gas price is removed
|
|
@@ -313,7 +317,6 @@ class TransactionFormatter {
|
|
|
313
317
|
const blockGasLimitBn = hexToBn(blockGasLimitHex);
|
|
314
318
|
const upperGasLimitBn = blockGasLimitBn.muln(0.9);
|
|
315
319
|
const bufferedGasLimitBn = initialGasLimitBn.muln(multiplier);
|
|
316
|
-
|
|
317
320
|
// if initialGasLimit is above blockGasLimit, dont modify it
|
|
318
321
|
if (initialGasLimitBn.gt(upperGasLimitBn)) return bnToHex(initialGasLimitBn);
|
|
319
322
|
// if bufferedGasLimit is below blockGasLimit, use bufferedGasLimit
|
|
@@ -360,7 +363,6 @@ class TransactionFormatter {
|
|
|
360
363
|
throw Error("TxGasUtil - Trying to call a function on a non-contract address");
|
|
361
364
|
}
|
|
362
365
|
const TWENTY_ONE_THOUSAND = 21000;
|
|
363
|
-
|
|
364
366
|
// This is a standard ether simple send, gas requirement is exactly 21k
|
|
365
367
|
return addHexPrefix(TWENTY_ONE_THOUSAND.toString(16));
|
|
366
368
|
}
|
|
@@ -368,7 +370,6 @@ class TransactionFormatter {
|
|
|
368
370
|
blockGasLimit,
|
|
369
371
|
estimatedGasHex
|
|
370
372
|
} = await this.analyzeGasUsage(txParams);
|
|
371
|
-
|
|
372
373
|
// add additional gas buffer to our estimation for safety
|
|
373
374
|
const gasLimit = this.addGasBuffer(addHexPrefix(estimatedGasHex), blockGasLimit);
|
|
374
375
|
return gasLimit;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
var SignTypedDataVersion;
|
|
2
|
+
(function (SignTypedDataVersion) {
|
|
2
3
|
SignTypedDataVersion["V1"] = "V1";
|
|
3
4
|
SignTypedDataVersion["V3"] = "V3";
|
|
4
5
|
SignTypedDataVersion["V4"] = "V4";
|
|
5
|
-
|
|
6
|
-
}({});
|
|
6
|
+
})(SignTypedDataVersion || (SignTypedDataVersion = {}));
|
|
7
7
|
|
|
8
8
|
export { SignTypedDataVersion };
|
|
@@ -27,7 +27,6 @@ async function fetchEip1159GasEstimates(url) {
|
|
|
27
27
|
});
|
|
28
28
|
return normalizedEstimates;
|
|
29
29
|
}
|
|
30
|
-
|
|
31
30
|
/**
|
|
32
31
|
* Hit the legacy MetaSwaps gasPrices estimate api and return the low, medium
|
|
33
32
|
* high values from that API.
|
|
@@ -61,7 +60,7 @@ async function validateTypedSignMessageDataV4(messageData, currentChainId) {
|
|
|
61
60
|
} else {
|
|
62
61
|
try {
|
|
63
62
|
data = JSON.parse(messageData.data);
|
|
64
|
-
} catch
|
|
63
|
+
} catch {
|
|
65
64
|
throw new Error("Data must be passed as a valid JSON string.");
|
|
66
65
|
}
|
|
67
66
|
}
|
|
@@ -14,11 +14,9 @@ function createWalletMiddleware({
|
|
|
14
14
|
if (!getAccounts) {
|
|
15
15
|
throw new Error("opts.getAccounts is required");
|
|
16
16
|
}
|
|
17
|
-
|
|
18
17
|
//
|
|
19
18
|
// utility
|
|
20
19
|
//
|
|
21
|
-
|
|
22
20
|
/**
|
|
23
21
|
* Validates the keyholder address, and returns a normalized (i.e. lowercase)
|
|
24
22
|
* copy of it.
|
|
@@ -39,19 +37,15 @@ function createWalletMiddleware({
|
|
|
39
37
|
message: `Invalid parameters: must provide an Ethereum address.`
|
|
40
38
|
});
|
|
41
39
|
}
|
|
42
|
-
|
|
43
40
|
//
|
|
44
41
|
// account lookups
|
|
45
42
|
//
|
|
46
|
-
|
|
47
43
|
async function lookupAccounts(req, res) {
|
|
48
44
|
res.result = await getAccounts(req);
|
|
49
45
|
}
|
|
50
|
-
|
|
51
46
|
//
|
|
52
47
|
// transaction signatures
|
|
53
48
|
//
|
|
54
|
-
|
|
55
49
|
async function sendTransaction(req, res) {
|
|
56
50
|
if (!processTransaction) {
|
|
57
51
|
throw rpcErrors.methodNotSupported();
|
|
@@ -72,11 +66,9 @@ function createWalletMiddleware({
|
|
|
72
66
|
txParams.from = await validateAndNormalizeKeyholder(txParams.from, req);
|
|
73
67
|
res.result = await processSignTransaction(txParams, req);
|
|
74
68
|
}
|
|
75
|
-
|
|
76
69
|
//
|
|
77
70
|
// message signatures
|
|
78
71
|
//
|
|
79
|
-
|
|
80
72
|
async function ethSign(req, res) {
|
|
81
73
|
if (!processEthSignMessage) {
|
|
82
74
|
throw rpcErrors.methodNotSupported();
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
import { JRPCEngine, providerFromEngine } from '@web3auth/auth';
|
|
2
2
|
import { WalletLoginError } from '../../../../../base/errors/index.js';
|
|
3
|
+
import '@toruslabs/base-controllers';
|
|
4
|
+
import '@babel/runtime/helpers/defineProperty';
|
|
5
|
+
import '../../../../../base/wallet/index.js';
|
|
6
|
+
import '../../../../../base/connector/constants.js';
|
|
7
|
+
import 'jwt-decode';
|
|
8
|
+
import '../../../../../base/loglevel.js';
|
|
9
|
+
import '../../../../../base/plugin/errors.js';
|
|
10
|
+
import '../../../../../base/plugin/IPlugin.js';
|
|
11
|
+
import '@toruslabs/constants';
|
|
12
|
+
import '@toruslabs/http-helpers';
|
|
3
13
|
import { BaseProvider } from '../../../../base-provider/baseProvider.js';
|
|
14
|
+
import '../../../../base-provider/CommonJRPCProvider.js';
|
|
15
|
+
import '../../../../base-provider/commonPrivateKeyProvider.js';
|
|
16
|
+
import '../../../../base-provider/utils.js';
|
|
4
17
|
import { createConfigMiddleware } from '../../../rpc/JrpcClient.js';
|
|
5
18
|
import { createSolanaMiddleware } from '../../../rpc/solanaRpcMiddlewares.js';
|
|
6
19
|
|
package/dist/lib.esm/providers/solana-provider/providers/injectedProviders/walletStandardProvider.js
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
import { SolanaSignAndSendTransaction, SolanaSignTransaction, SolanaSignMessage } from '@solana/wallet-standard-features';
|
|
2
2
|
import { PublicKey, VersionedTransaction } from '@solana/web3.js';
|
|
3
|
-
import bs58 from 'bs58';
|
|
3
|
+
import { bs58 } from '@toruslabs/bs58';
|
|
4
4
|
import { WalletLoginError } from '../../../../base/errors/index.js';
|
|
5
|
+
import '@toruslabs/base-controllers';
|
|
6
|
+
import '@babel/runtime/helpers/defineProperty';
|
|
7
|
+
import '@web3auth/auth';
|
|
8
|
+
import '../../../../base/wallet/index.js';
|
|
9
|
+
import '../../../../base/connector/constants.js';
|
|
10
|
+
import 'jwt-decode';
|
|
11
|
+
import '../../../../base/loglevel.js';
|
|
12
|
+
import '../../../../base/plugin/errors.js';
|
|
13
|
+
import '../../../../base/plugin/IPlugin.js';
|
|
14
|
+
import '@toruslabs/constants';
|
|
15
|
+
import '@toruslabs/http-helpers';
|
|
5
16
|
import { BaseInjectedProvider } from './base/baseInjectedProvider.js';
|
|
6
17
|
import { getBaseProviderHandlers } from './base/providerHandlers.js';
|
|
7
18
|
import { getSolanaChainByChainConfig } from './utils.js';
|
|
@@ -14,7 +25,6 @@ class WalletStandardProvider extends BaseInjectedProvider {
|
|
|
14
25
|
if (!account) throw WalletLoginError.notConnectedError();
|
|
15
26
|
return account;
|
|
16
27
|
};
|
|
17
|
-
|
|
18
28
|
/**
|
|
19
29
|
* Signs a message and returns the signature
|
|
20
30
|
* @param message - The message to sign
|
|
@@ -29,7 +39,6 @@ class WalletStandardProvider extends BaseInjectedProvider {
|
|
|
29
39
|
});
|
|
30
40
|
return bs58.encode(signature[0].signature);
|
|
31
41
|
};
|
|
32
|
-
|
|
33
42
|
/**
|
|
34
43
|
* Signs a transaction and returns the signature
|
|
35
44
|
* @param transaction - The transaction to sign
|
|
@@ -44,7 +53,6 @@ class WalletStandardProvider extends BaseInjectedProvider {
|
|
|
44
53
|
});
|
|
45
54
|
return bs58.encode(VersionedTransaction.deserialize(output[0].signedTransaction).signatures[0]);
|
|
46
55
|
};
|
|
47
|
-
|
|
48
56
|
/**
|
|
49
57
|
* Signs multiple transactions and returns the serialized transactions
|
|
50
58
|
* @param transactions - The transactions to sign
|
|
@@ -61,7 +69,6 @@ class WalletStandardProvider extends BaseInjectedProvider {
|
|
|
61
69
|
return Buffer.from(output[0].signedTransaction).toString("base64");
|
|
62
70
|
}));
|
|
63
71
|
};
|
|
64
|
-
|
|
65
72
|
/**
|
|
66
73
|
* Signs a transaction and sends it to the network
|
|
67
74
|
* @param transaction - The transaction to sign and send
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import { providerErrors, getED25519Key, JRPCEngine, providerFromEngine, rpcErrors } from '@web3auth/auth';
|
|
3
|
-
import { CHAIN_NAMESPACES } from '../../../../base/chain/IChainInterface.js';
|
|
4
3
|
import { WalletInitializationError } from '../../../../base/errors/index.js';
|
|
4
|
+
import { CHAIN_NAMESPACES } from '@toruslabs/base-controllers';
|
|
5
|
+
import '../../../../base/wallet/index.js';
|
|
6
|
+
import '../../../../base/connector/constants.js';
|
|
7
|
+
import 'jwt-decode';
|
|
8
|
+
import '../../../../base/loglevel.js';
|
|
9
|
+
import '../../../../base/plugin/errors.js';
|
|
10
|
+
import '../../../../base/plugin/IPlugin.js';
|
|
11
|
+
import '@toruslabs/constants';
|
|
12
|
+
import '@toruslabs/http-helpers';
|
|
5
13
|
import { BaseProvider } from '../../../base-provider/baseProvider.js';
|
|
14
|
+
import '../../../base-provider/CommonJRPCProvider.js';
|
|
15
|
+
import '../../../base-provider/commonPrivateKeyProvider.js';
|
|
16
|
+
import '../../../base-provider/utils.js';
|
|
6
17
|
import { createSolanaJsonRpcClient } from '../../rpc/JrpcClient.js';
|
|
7
18
|
import { createSolanaMiddleware, createSolanaChainSwitchMiddleware, createSolanaAccountMiddleware } from '../../rpc/solanaRpcMiddlewares.js';
|
|
8
19
|
import { getProviderHandlers } from './solanaPrivateKeyUtils.js';
|
package/dist/lib.esm/providers/solana-provider/providers/privateKeyProvider/solanaPrivateKeyUtils.js
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
import { Keypair, VersionedTransaction } from '@solana/web3.js';
|
|
2
|
+
import { bs58 } from '@toruslabs/bs58';
|
|
2
3
|
import { sign } from '@toruslabs/tweetnacl-js';
|
|
3
4
|
import { rpcErrors, providerErrors } from '@web3auth/auth';
|
|
4
|
-
import bs58 from 'bs58';
|
|
5
5
|
import { WalletInitializationError } from '../../../../base/errors/index.js';
|
|
6
|
+
import '@toruslabs/base-controllers';
|
|
7
|
+
import '@babel/runtime/helpers/defineProperty';
|
|
8
|
+
import '../../../../base/wallet/index.js';
|
|
9
|
+
import '../../../../base/connector/constants.js';
|
|
10
|
+
import 'jwt-decode';
|
|
11
|
+
import '../../../../base/loglevel.js';
|
|
12
|
+
import '../../../../base/plugin/errors.js';
|
|
13
|
+
import '../../../../base/plugin/IPlugin.js';
|
|
14
|
+
import '@toruslabs/constants';
|
|
15
|
+
import '@toruslabs/http-helpers';
|
|
6
16
|
|
|
7
17
|
async function getProviderHandlers({
|
|
8
18
|
privKey,
|
|
@@ -22,7 +22,6 @@ class SolanaWallet {
|
|
|
22
22
|
});
|
|
23
23
|
return signature;
|
|
24
24
|
}
|
|
25
|
-
|
|
26
25
|
/**
|
|
27
26
|
* Signs a transaction and returns the signature
|
|
28
27
|
* @param transaction - The transaction to sign
|
|
@@ -37,7 +36,6 @@ class SolanaWallet {
|
|
|
37
36
|
});
|
|
38
37
|
return signature;
|
|
39
38
|
}
|
|
40
|
-
|
|
41
39
|
/**
|
|
42
40
|
* Signs multiple transactions and returns the serialized transactions
|
|
43
41
|
* @param transactions - The transactions to sign
|
|
@@ -53,7 +51,6 @@ class SolanaWallet {
|
|
|
53
51
|
});
|
|
54
52
|
return signedTransactions;
|
|
55
53
|
}
|
|
56
|
-
|
|
57
54
|
/**
|
|
58
55
|
* Signs a message and returns the signature
|
|
59
56
|
* @param message - The message to sign
|
package/dist/lib.esm/providers/xrpl-provider/providers/privateKeyProviders/xrplPrivateKeyProvider.js
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
2
|
import { providerErrors, JRPCEngine, providerFromEngine, rpcErrors } from '@web3auth/auth';
|
|
3
|
-
import { CHAIN_NAMESPACES } from '../../../../base/chain/IChainInterface.js';
|
|
4
3
|
import { WalletInitializationError } from '../../../../base/errors/index.js';
|
|
4
|
+
import { CHAIN_NAMESPACES } from '@toruslabs/base-controllers';
|
|
5
|
+
import '../../../../base/wallet/index.js';
|
|
6
|
+
import '../../../../base/connector/constants.js';
|
|
7
|
+
import 'jwt-decode';
|
|
8
|
+
import '../../../../base/loglevel.js';
|
|
9
|
+
import '../../../../base/plugin/errors.js';
|
|
10
|
+
import '../../../../base/plugin/IPlugin.js';
|
|
11
|
+
import '@toruslabs/constants';
|
|
12
|
+
import '@toruslabs/http-helpers';
|
|
5
13
|
import { BaseProvider } from '../../../base-provider/baseProvider.js';
|
|
14
|
+
import '../../../base-provider/CommonJRPCProvider.js';
|
|
15
|
+
import '../../../base-provider/commonPrivateKeyProvider.js';
|
|
16
|
+
import '../../../base-provider/utils.js';
|
|
6
17
|
import { createXrplJsonRpcClient } from '../../rpc/JrpcClient.js';
|
|
7
18
|
import { RPC_METHODS, createXRPLMiddleware, creatXrplChainSwitchMiddleware } from '../../rpc/xrplRpcMiddlewares.js';
|
|
8
19
|
import { getProviderHandlers } from './xrplWalletUtils.js';
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import { createContext, useState, useCallback, useEffect, useMemo, createElement } from 'react';
|
|
2
2
|
import { WalletInitializationError, WalletLoginError } from '../../base/errors/index.js';
|
|
3
|
-
import
|
|
3
|
+
import '@toruslabs/base-controllers';
|
|
4
|
+
import '@babel/runtime/helpers/defineProperty';
|
|
5
|
+
import '@web3auth/auth';
|
|
6
|
+
import '../../base/wallet/index.js';
|
|
4
7
|
import { CONNECTOR_EVENTS, CONNECTOR_STATUS } from '../../base/connector/constants.js';
|
|
8
|
+
import 'jwt-decode';
|
|
9
|
+
import '../../base/loglevel.js';
|
|
10
|
+
import '../../base/plugin/errors.js';
|
|
11
|
+
import '../../base/plugin/IPlugin.js';
|
|
12
|
+
import '@toruslabs/constants';
|
|
13
|
+
import '@toruslabs/http-helpers';
|
|
14
|
+
import { Web3AuthNoModal } from '../../noModal.js';
|
|
5
15
|
|
|
6
16
|
const Web3AuthInnerContext = createContext(null);
|
|
7
17
|
function Web3AuthInnerProvider(params) {
|
|
@@ -69,9 +79,7 @@ function Web3AuthInnerProvider(params) {
|
|
|
69
79
|
if (isConnected) addState();else resetState();
|
|
70
80
|
}
|
|
71
81
|
}, [web3Auth, isConnected]);
|
|
72
|
-
|
|
73
82
|
// TODO: don't throw error in init, connect in v9
|
|
74
|
-
|
|
75
83
|
useEffect(() => {
|
|
76
84
|
const notReadyListener = () => setStatus(CONNECTOR_STATUS.NOT_READY);
|
|
77
85
|
const readyListener = () => {
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import { useContext } from 'react';
|
|
2
2
|
import { WalletInitializationError } from '../../../base/errors/index.js';
|
|
3
|
+
import '@toruslabs/base-controllers';
|
|
4
|
+
import '@babel/runtime/helpers/defineProperty';
|
|
5
|
+
import '@web3auth/auth';
|
|
6
|
+
import '../../../base/wallet/index.js';
|
|
7
|
+
import '../../../base/connector/constants.js';
|
|
8
|
+
import 'jwt-decode';
|
|
9
|
+
import '../../../base/loglevel.js';
|
|
10
|
+
import '../../../base/plugin/errors.js';
|
|
11
|
+
import '../../../base/plugin/IPlugin.js';
|
|
12
|
+
import '@toruslabs/constants';
|
|
13
|
+
import '@toruslabs/http-helpers';
|
|
3
14
|
import { Web3AuthInnerContext } from '../Web3AuthInnerContext.js';
|
|
4
15
|
|
|
5
16
|
const useWeb3Auth = () => {
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import { createContext, useState, useContext, useEffect, useCallback, useMemo, createElement } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import '../../base/errors/index.js';
|
|
3
|
+
import '@toruslabs/base-controllers';
|
|
4
|
+
import '@babel/runtime/helpers/defineProperty';
|
|
5
|
+
import '@web3auth/auth';
|
|
6
|
+
import '../../base/wallet/index.js';
|
|
3
7
|
import { CONNECTOR_STATUS } from '../../base/connector/constants.js';
|
|
8
|
+
import 'jwt-decode';
|
|
9
|
+
import '../../base/loglevel.js';
|
|
4
10
|
import { WalletServicesPluginError } from '../../base/plugin/errors.js';
|
|
11
|
+
import { EVM_PLUGINS, PLUGIN_EVENTS } from '../../base/plugin/IPlugin.js';
|
|
12
|
+
import '@toruslabs/constants';
|
|
13
|
+
import '@toruslabs/http-helpers';
|
|
5
14
|
|
|
6
15
|
const WalletServicesContext = createContext(null);
|
|
7
16
|
function WalletServicesContextProvider({
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import { useContext } from 'react';
|
|
2
2
|
import { WalletInitializationError } from '../../../base/errors/index.js';
|
|
3
|
+
import '@toruslabs/base-controllers';
|
|
4
|
+
import '@babel/runtime/helpers/defineProperty';
|
|
5
|
+
import '@web3auth/auth';
|
|
6
|
+
import '../../../base/wallet/index.js';
|
|
7
|
+
import '../../../base/connector/constants.js';
|
|
8
|
+
import 'jwt-decode';
|
|
9
|
+
import '../../../base/loglevel.js';
|
|
10
|
+
import '../../../base/plugin/errors.js';
|
|
11
|
+
import '../../../base/plugin/IPlugin.js';
|
|
12
|
+
import '@toruslabs/constants';
|
|
13
|
+
import '@toruslabs/http-helpers';
|
|
3
14
|
import { WalletServicesContext } from '../WalletServicesContext.js';
|
|
4
15
|
|
|
5
16
|
const useWalletServicesPlugin = () => {
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
import { defineComponent, h, shallowRef, ref, watch, provide } from 'vue';
|
|
2
|
-
import { Web3AuthContextKey } from '../../base/composables/index.js';
|
|
3
2
|
import { WalletInitializationError, WalletLoginError } from '../../base/errors/index.js';
|
|
4
|
-
import
|
|
3
|
+
import '@toruslabs/base-controllers';
|
|
4
|
+
import { Web3AuthContextKey } from '../../base/composables/index.js';
|
|
5
|
+
import '@babel/runtime/helpers/defineProperty';
|
|
6
|
+
import '@web3auth/auth';
|
|
7
|
+
import '../../base/wallet/index.js';
|
|
5
8
|
import { CONNECTOR_EVENTS, CONNECTOR_STATUS } from '../../base/connector/constants.js';
|
|
9
|
+
import 'jwt-decode';
|
|
10
|
+
import '../../base/loglevel.js';
|
|
11
|
+
import '../../base/plugin/errors.js';
|
|
12
|
+
import '../../base/plugin/IPlugin.js';
|
|
13
|
+
import '@toruslabs/constants';
|
|
14
|
+
import '@toruslabs/http-helpers';
|
|
15
|
+
import { Web3AuthNoModal } from '../../noModal.js';
|
|
6
16
|
|
|
7
17
|
const Web3AuthProvider = defineComponent({
|
|
8
18
|
name: "Web3AuthProvider",
|
|
@@ -141,7 +151,6 @@ const Web3AuthProvider = defineComponent({
|
|
|
141
151
|
const errorListener = () => {
|
|
142
152
|
status.value = CONNECTOR_EVENTS.ERRORED;
|
|
143
153
|
};
|
|
144
|
-
|
|
145
154
|
// unregister previous listeners
|
|
146
155
|
if (prevWeb3Auth && newWeb3Auth !== prevWeb3Auth) {
|
|
147
156
|
prevWeb3Auth.off(CONNECTOR_EVENTS.NOT_READY, notReadyListener);
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import { inject } from 'vue';
|
|
2
|
-
import { Web3AuthContextKey } from '../../../base/composables/index.js';
|
|
3
2
|
import { WalletInitializationError } from '../../../base/errors/index.js';
|
|
3
|
+
import '@toruslabs/base-controllers';
|
|
4
|
+
import { Web3AuthContextKey } from '../../../base/composables/index.js';
|
|
5
|
+
import '@babel/runtime/helpers/defineProperty';
|
|
6
|
+
import '@web3auth/auth';
|
|
7
|
+
import '../../../base/wallet/index.js';
|
|
8
|
+
import '../../../base/connector/constants.js';
|
|
9
|
+
import 'jwt-decode';
|
|
10
|
+
import '../../../base/loglevel.js';
|
|
11
|
+
import '../../../base/plugin/errors.js';
|
|
12
|
+
import '../../../base/plugin/IPlugin.js';
|
|
13
|
+
import '@toruslabs/constants';
|
|
14
|
+
import '@toruslabs/http-helpers';
|
|
4
15
|
|
|
5
16
|
const useWeb3Auth = () => {
|
|
6
17
|
const context = inject(Web3AuthContextKey);
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import { defineComponent, h, inject, ref, watch, provide } from 'vue';
|
|
2
|
+
import '../../base/errors/index.js';
|
|
3
|
+
import '@toruslabs/base-controllers';
|
|
2
4
|
import { Web3AuthContextKey } from '../../base/composables/index.js';
|
|
3
|
-
import
|
|
5
|
+
import '@babel/runtime/helpers/defineProperty';
|
|
6
|
+
import '@web3auth/auth';
|
|
7
|
+
import '../../base/wallet/index.js';
|
|
8
|
+
import { CONNECTOR_STATUS } from '../../base/connector/constants.js';
|
|
9
|
+
import 'jwt-decode';
|
|
10
|
+
import '../../base/loglevel.js';
|
|
4
11
|
import { WalletServicesPluginError } from '../../base/plugin/errors.js';
|
|
5
12
|
import { EVM_PLUGINS, PLUGIN_EVENTS } from '../../base/plugin/IPlugin.js';
|
|
6
|
-
import
|
|
13
|
+
import '@toruslabs/constants';
|
|
14
|
+
import '@toruslabs/http-helpers';
|
|
15
|
+
import { WalletServicesContextKey } from './context.js';
|
|
7
16
|
|
|
8
17
|
const WalletServicesProvider = defineComponent({
|
|
9
18
|
name: "WalletServicesProvider",
|
|
@@ -39,7 +48,6 @@ const WalletServicesProvider = defineComponent({
|
|
|
39
48
|
const disconnectedListener = () => {
|
|
40
49
|
isPluginConnected.value = false;
|
|
41
50
|
};
|
|
42
|
-
|
|
43
51
|
// unregister previous listeners
|
|
44
52
|
if (prevWalletServicesPlugin && newWalletServicesPlugin !== prevWalletServicesPlugin) {
|
|
45
53
|
prevWalletServicesPlugin.off(PLUGIN_EVENTS.CONNECTED, connectedListener);
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import { inject } from 'vue';
|
|
2
|
-
import
|
|
2
|
+
import '../../../base/errors/index.js';
|
|
3
|
+
import '@toruslabs/base-controllers';
|
|
4
|
+
import '@babel/runtime/helpers/defineProperty';
|
|
5
|
+
import '@web3auth/auth';
|
|
6
|
+
import '../../../base/wallet/index.js';
|
|
7
|
+
import '../../../base/connector/constants.js';
|
|
8
|
+
import 'jwt-decode';
|
|
9
|
+
import '../../../base/loglevel.js';
|
|
3
10
|
import { WalletServicesPluginError } from '../../../base/plugin/errors.js';
|
|
11
|
+
import '../../../base/plugin/IPlugin.js';
|
|
12
|
+
import '@toruslabs/constants';
|
|
13
|
+
import '@toruslabs/http-helpers';
|
|
14
|
+
import { WalletServicesContextKey } from '../context.js';
|
|
4
15
|
|
|
5
16
|
const useWalletServicesPlugin = () => {
|
|
6
17
|
const context = inject(WalletServicesContextKey);
|