@multiplatform.one/web3 7.18.0 → 7.20.0
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/README.md +109 -4
- package/dist/cjs/bridge/BridgeClient.native.js.map +1 -1
- package/dist/cjs/bridge/BridgeHost.native.js.map +1 -1
- package/dist/cjs/bridge/SolanaBridge.native.js.map +1 -1
- package/dist/cjs/bridge/base64.native.js.map +1 -1
- package/dist/cjs/bridge/bridgeConnector.native.js.map +1 -1
- package/dist/cjs/bridge/eip1193.native.js.map +1 -1
- package/dist/cjs/bridge/index.native.js.map +1 -1
- package/dist/cjs/bridge/postMessageTransport.native.js.map +1 -1
- package/dist/cjs/bridge/protocol.native.js.map +1 -1
- package/dist/cjs/bridge/transport.native.js.map +1 -1
- package/dist/cjs/bundler/metaMaskConnectTimeouts.cjs +92 -0
- package/dist/cjs/bundler/metaMaskConnectTimeouts.native.js +123 -0
- package/dist/cjs/bundler/metaMaskConnectTimeouts.native.js.map +1 -0
- package/dist/cjs/clients/adapter.cjs +33 -0
- package/dist/cjs/clients/adapter.native.js +36 -0
- package/dist/cjs/clients/adapter.native.js.map +1 -0
- package/dist/cjs/clients/bitcoin.cjs +46 -0
- package/dist/cjs/clients/bitcoin.native.js +51 -0
- package/dist/cjs/clients/bitcoin.native.js.map +1 -0
- package/dist/cjs/clients/connector.cjs +45 -0
- package/dist/cjs/clients/connector.native.js +49 -0
- package/dist/cjs/clients/connector.native.js.map +1 -0
- package/dist/cjs/clients/evm.cjs +171 -0
- package/dist/cjs/clients/evm.native.js +198 -0
- package/dist/cjs/clients/evm.native.js.map +1 -0
- package/dist/cjs/clients/gpg.cjs +31 -0
- package/dist/cjs/clients/gpg.native.js +34 -0
- package/dist/cjs/clients/gpg.native.js.map +1 -0
- package/dist/cjs/clients/hooks.cjs +78 -0
- package/dist/cjs/clients/hooks.native.js +85 -0
- package/dist/cjs/clients/hooks.native.js.map +1 -0
- package/dist/cjs/clients/index.cjs +49 -0
- package/dist/cjs/clients/index.native.js +52 -0
- package/dist/cjs/clients/index.native.js.map +1 -0
- package/dist/cjs/clients/solana.cjs +322 -0
- package/dist/cjs/clients/solana.native.js +511 -0
- package/dist/cjs/clients/solana.native.js.map +1 -0
- package/dist/cjs/clients/solanaMessage.cjs +38 -0
- package/dist/cjs/clients/solanaMessage.native.js +44 -0
- package/dist/cjs/clients/solanaMessage.native.js.map +1 -0
- package/dist/cjs/clients/sui.cjs +46 -0
- package/dist/cjs/clients/sui.native.js +51 -0
- package/dist/cjs/clients/sui.native.js.map +1 -0
- package/dist/cjs/clients/types.cjs +37 -0
- package/dist/cjs/clients/types.native.js +160 -0
- package/dist/cjs/clients/types.native.js.map +1 -0
- package/dist/cjs/clients/useSolanaClient.cjs +50 -0
- package/dist/cjs/clients/useSolanaClient.native.js +57 -0
- package/dist/cjs/clients/useSolanaClient.native.js.map +1 -0
- package/dist/cjs/clients/walletStandard.cjs +63 -0
- package/dist/cjs/clients/walletStandard.native.js +71 -0
- package/dist/cjs/clients/walletStandard.native.js.map +1 -0
- package/dist/cjs/components/NetworkSwitcher.native.js.map +1 -1
- package/dist/cjs/components/TransactionStatus.native.js.map +1 -1
- package/dist/cjs/components/index.native.js.map +1 -1
- package/dist/cjs/connectkit/adapters/BitcoinAdapter.native.js.map +1 -1
- package/dist/cjs/connectkit/adapters/EthereumAdapter.native.js.map +1 -1
- package/dist/cjs/connectkit/adapters/SolanaAdapter.native.js.map +1 -1
- package/dist/cjs/connectkit/adapters/SuiAdapter.native.js.map +1 -1
- package/dist/cjs/connectkit/adapters/discover.native.js.map +1 -1
- package/dist/cjs/connectkit/adapters/index.native.js.map +1 -1
- package/dist/cjs/connectkit/adapters/messages.native.js.map +1 -1
- package/dist/cjs/connectkit/adapters/types.native.js.map +1 -1
- package/dist/cjs/connectkit/assets/chains.native.js.map +1 -1
- package/dist/cjs/connectkit/components/BalanceButton/index.native.js +1 -1
- package/dist/cjs/connectkit/components/BalanceButton/index.native.js.map +1 -1
- package/dist/cjs/connectkit/components/Common/Avatar/index.native.js.map +1 -1
- package/dist/cjs/connectkit/components/Common/Avatar/styles.native.js.map +1 -1
- package/dist/cjs/connectkit/components/Common/Chain/index.native.js.map +1 -1
- package/dist/cjs/connectkit/components/Common/Chain/styles.native.js.map +1 -1
- package/dist/cjs/connectkit/components/Common/ChainSelect/index.native.js +2 -2
- package/dist/cjs/connectkit/components/Common/ChainSelect/index.native.js.map +1 -1
- package/dist/cjs/connectkit/components/Common/ChainSelectDropdown/index.native.js +1 -1
- package/dist/cjs/connectkit/components/Common/ChainSelectDropdown/index.native.js.map +1 -1
- package/dist/cjs/connectkit/components/Common/ChainSelectDropdown/styles.native.js.map +1 -1
- package/dist/cjs/connectkit/components/Common/ChainSelectList/index.native.js.map +1 -1
- package/dist/cjs/connectkit/components/Common/ChainSelectList/styles.native.js.map +1 -1
- package/dist/cjs/connectkit/components/Common/ConnectorList/index.cjs +10 -29
- package/dist/cjs/connectkit/components/Common/ConnectorList/index.native.js +11 -32
- package/dist/cjs/connectkit/components/Common/ConnectorList/index.native.js.map +1 -1
- package/dist/cjs/connectkit/components/Common/ConnectorList/styles.native.js.map +1 -1
- package/dist/cjs/connectkit/components/ConnectButton/index.native.js +4 -4
- package/dist/cjs/connectkit/components/ConnectButton/index.native.js.map +1 -1
- package/dist/cjs/connectkit/components/ConnectButton/styles.native.js.map +1 -1
- package/dist/cjs/connectkit/components/ConnectModal/ConnectUsing.cjs +4 -38
- package/dist/cjs/connectkit/components/ConnectModal/ConnectUsing.native.js +5 -43
- package/dist/cjs/connectkit/components/ConnectModal/ConnectUsing.native.js.map +1 -1
- package/dist/cjs/connectkit/components/ConnectModal/ConnectWithInjector/CircleSpinner/index.native.js.map +1 -1
- package/dist/cjs/connectkit/components/ConnectModal/ConnectWithInjector/CircleSpinner/styles.native.js.map +1 -1
- package/dist/cjs/connectkit/components/ConnectModal/ConnectWithInjector/SquircleSpinner/index.native.js.map +1 -1
- package/dist/cjs/connectkit/components/ConnectModal/ConnectWithInjector/SquircleSpinner/styles.native.js.map +1 -1
- package/dist/cjs/connectkit/components/ConnectModal/ConnectWithInjector/index.cjs +0 -14
- package/dist/cjs/connectkit/components/ConnectModal/ConnectWithInjector/index.native.js +10 -65
- package/dist/cjs/connectkit/components/ConnectModal/ConnectWithInjector/index.native.js.map +1 -1
- package/dist/cjs/connectkit/components/ConnectModal/ConnectWithInjector/styles.native.js.map +1 -1
- package/dist/cjs/connectkit/components/ConnectModal/demo.cjs +0 -15
- package/dist/cjs/connectkit/components/ConnectModal/demo.native.js +9 -24
- package/dist/cjs/connectkit/components/ConnectModal/demo.native.js.map +1 -1
- package/dist/cjs/connectkit/components/NetworkButton/index.native.js +2 -2
- package/dist/cjs/connectkit/components/NetworkButton/index.native.js.map +1 -1
- package/dist/cjs/connectkit/components/Pages/About/graphics.native.js.map +1 -1
- package/dist/cjs/connectkit/components/Pages/About/index.native.js.map +1 -1
- package/dist/cjs/connectkit/components/Pages/About/styles.native.js.map +1 -1
- package/dist/cjs/connectkit/components/Pages/Connectors/index.native.js +1 -1
- package/dist/cjs/connectkit/components/Pages/Connectors/index.native.js.map +1 -1
- package/dist/cjs/connectkit/components/Pages/Connectors/styles.native.js.map +1 -1
- package/dist/cjs/connectkit/components/Pages/DownloadApp/index.native.js.map +1 -1
- package/dist/cjs/connectkit/components/Pages/Onboarding/index.native.js.map +1 -1
- package/dist/cjs/connectkit/components/Pages/Onboarding/styles.native.js.map +1 -1
- package/dist/cjs/connectkit/components/Pages/Profile/index.native.js +2 -2
- package/dist/cjs/connectkit/components/Pages/Profile/index.native.js.map +1 -1
- package/dist/cjs/connectkit/components/Pages/Profile/styles.native.js.map +1 -1
- package/dist/cjs/connectkit/components/Pages/SignInWithEthereum/index.native.js +3 -3
- package/dist/cjs/connectkit/components/Pages/SignInWithEthereum/index.native.js.map +1 -1
- package/dist/cjs/connectkit/components/Pages/SignInWithEthereum/styles.native.js.map +1 -1
- package/dist/cjs/connectkit/components/Pages/SwitchNetworks/index.native.js +1 -1
- package/dist/cjs/connectkit/components/Pages/SwitchNetworks/index.native.js.map +1 -1
- package/dist/cjs/connectkit/components/Standard/SIWE/index.native.js +1 -1
- package/dist/cjs/connectkit/components/Standard/SIWE/index.native.js.map +1 -1
- package/dist/cjs/connectkit/components/Standard/SIWE/styles.native.js.map +1 -1
- package/dist/cjs/connectkit/components/contexts/web3/index.cjs +0 -15
- package/dist/cjs/connectkit/components/contexts/web3/index.native.js +0 -17
- package/dist/cjs/connectkit/components/contexts/web3/index.native.js.map +1 -1
- package/dist/cjs/connectkit/connectors/aaveAccountConnector.cjs +57 -0
- package/dist/cjs/connectkit/connectors/aaveAccountConnector.native.js +67 -0
- package/dist/cjs/connectkit/connectors/aaveAccountConnector.native.js.map +1 -0
- package/dist/cjs/connectkit/connectors/createWalletMessage.native.js.map +1 -1
- package/dist/cjs/connectkit/connectors/embeddedDesktop.cjs +1 -1
- package/dist/cjs/connectkit/connectors/embeddedDesktop.native.js +1 -1
- package/dist/cjs/connectkit/connectors/embeddedDesktop.native.js.map +1 -1
- package/dist/cjs/connectkit/connectors/ensureWalletConnectors.native.js.map +1 -1
- package/dist/cjs/connectkit/connectors/getWalletConnectors.native.js.map +1 -1
- package/dist/cjs/connectkit/connectors/metaMaskConnectConnector.cjs +255 -0
- package/dist/cjs/connectkit/connectors/metaMaskConnectConnector.native.js +315 -0
- package/dist/cjs/connectkit/connectors/metaMaskConnectConnector.native.js.map +1 -0
- package/dist/cjs/connectkit/connectors/syntheticChains.native.js.map +1 -1
- package/dist/cjs/connectkit/connectors/walletAdapterConnector.cjs +2 -0
- package/dist/cjs/connectkit/connectors/walletAdapterConnector.native.js +2 -0
- package/dist/cjs/connectkit/connectors/walletAdapterConnector.native.js.map +1 -1
- package/dist/cjs/connectkit/constants/chainConfigs.native.js.map +1 -1
- package/dist/cjs/connectkit/defaultConfig.cjs +8 -2
- package/dist/cjs/connectkit/defaultConfig.native.js +8 -2
- package/dist/cjs/connectkit/defaultConfig.native.js.map +1 -1
- package/dist/cjs/connectkit/defaultConnectors.cjs +19 -37
- package/dist/cjs/connectkit/defaultConnectors.native.js +19 -37
- package/dist/cjs/connectkit/defaultConnectors.native.js.map +1 -1
- package/dist/cjs/connectkit/defaultTransports.native.js.map +1 -1
- package/dist/cjs/connectkit/hooks/useChainIsSupported.native.js.map +1 -1
- package/dist/cjs/connectkit/hooks/useChains.native.js.map +1 -1
- package/dist/cjs/connectkit/hooks/useConnect.native.js.map +1 -1
- package/dist/cjs/connectkit/hooks/useConnectCallback.native.js.map +1 -1
- package/dist/cjs/connectkit/hooks/useConnectors.cjs +1 -5
- package/dist/cjs/connectkit/hooks/useConnectors.native.js +1 -5
- package/dist/cjs/connectkit/hooks/useConnectors.native.js.map +1 -1
- package/dist/cjs/connectkit/hooks/useEnsFallbackConfig.native.js.map +1 -1
- package/dist/cjs/connectkit/hooks/useLastConnector.native.js.map +1 -1
- package/dist/cjs/connectkit/index.cjs +2 -0
- package/dist/cjs/connectkit/index.native.js +10 -8
- package/dist/cjs/connectkit/index.native.js.map +1 -1
- package/dist/cjs/connectkit/openConnector/context.native.js.map +1 -1
- package/dist/cjs/connectkit/openConnector/device.native.js.map +1 -1
- package/dist/cjs/connectkit/openConnector/index.native.js.map +1 -1
- package/dist/cjs/connectkit/openConnector/launcher.native.js.map +1 -1
- package/dist/cjs/connectkit/profileHeaderAction.native.js +1 -1
- package/dist/cjs/connectkit/profileHeaderAction.native.js.map +1 -1
- package/dist/cjs/connectkit/screens.cjs +1 -14
- package/dist/cjs/connectkit/screens.native.js +23 -40
- package/dist/cjs/connectkit/screens.native.js.map +1 -1
- package/dist/cjs/connectkit/siwe/SIWEContext.native.js.map +1 -1
- package/dist/cjs/connectkit/siwe/SIWEProvider.cjs +7 -7
- package/dist/cjs/connectkit/siwe/SIWEProvider.native.js +10 -9
- package/dist/cjs/connectkit/siwe/SIWEProvider.native.js.map +1 -1
- package/dist/cjs/connectkit/siwe/connectIntent.native.js.map +1 -1
- package/dist/cjs/connectkit/siwe/index.native.js.map +1 -1
- package/dist/cjs/connectkit/siwe/useSIWE.native.js.map +1 -1
- package/dist/cjs/connectkit/useWeb3Modal.native.js +2 -2
- package/dist/cjs/connectkit/useWeb3Modal.native.js.map +1 -1
- package/dist/cjs/connectkit/wallets/index.cjs +4 -3
- package/dist/cjs/connectkit/wallets/index.native.js +4 -3
- package/dist/cjs/connectkit/wallets/index.native.js.map +1 -1
- package/dist/cjs/connectkit/wallets/useWallets.cjs +7 -22
- package/dist/cjs/connectkit/wallets/useWallets.native.js +6 -22
- package/dist/cjs/connectkit/wallets/useWallets.native.js.map +1 -1
- package/dist/cjs/connectkit/wallets/walletConfigs.cjs +3 -62
- package/dist/cjs/connectkit/wallets/walletConfigs.native.js +2 -65
- package/dist/cjs/connectkit/wallets/walletConfigs.native.js.map +1 -1
- package/dist/cjs/connectkit/web3Bridge.cjs +2 -6
- package/dist/cjs/connectkit/web3Bridge.native.js +4 -9
- package/dist/cjs/connectkit/web3Bridge.native.js.map +1 -1
- package/dist/cjs/connectkit/web3Provider.native.js.map +1 -1
- package/dist/cjs/esbuild.cjs +54 -0
- package/dist/cjs/esbuild.native.js +57 -0
- package/dist/cjs/esbuild.native.js.map +1 -0
- package/dist/cjs/examples/LockContract.native.js.map +1 -1
- package/dist/cjs/examples/index.native.js.map +1 -1
- package/dist/cjs/hooks/index.native.js.map +1 -1
- package/dist/cjs/hooks/useContractRead.native.js.map +1 -1
- package/dist/cjs/hooks/useContractWrite.native.js.map +1 -1
- package/dist/cjs/hooks/useWallet.cjs +1 -2
- package/dist/cjs/hooks/useWallet.native.js +1 -4
- package/dist/cjs/hooks/useWallet.native.js.map +1 -1
- package/dist/cjs/index.cjs +2 -1
- package/dist/cjs/index.native.js +6 -5
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/providers/WalletProvider.cjs +1 -2
- package/dist/cjs/providers/index.native.js.map +1 -1
- package/dist/cjs/providers/mockConnector.native.js.map +1 -1
- package/dist/cjs/providers/native/deepLink.cjs +1 -1
- package/dist/cjs/providers/native/deepLink.native.js +1 -1
- package/dist/cjs/providers/native/deepLink.native.js.map +1 -1
- package/dist/cjs/providers/native/inject.native.js.map +1 -1
- package/dist/cjs/providers/native/visibility.native.js.map +1 -1
- package/dist/cjs/providers/walletConfig.native.js.map +1 -1
- package/dist/cjs/siws/index.native.js.map +1 -1
- package/dist/cjs/siws/message.native.js.map +1 -1
- package/dist/cjs/siws/signWithBridge.native.js.map +1 -1
- package/dist/cjs/siws/verify.native.js.map +1 -1
- package/dist/cjs/solana.cjs +41 -0
- package/dist/cjs/solana.native.js +44 -0
- package/dist/cjs/solana.native.js.map +1 -0
- package/dist/cjs/vite.cjs +76 -0
- package/dist/cjs/vite.native.js +79 -0
- package/dist/cjs/vite.native.js.map +1 -0
- package/dist/esm/bundler/metaMaskConnectTimeouts.mjs +64 -0
- package/dist/esm/bundler/metaMaskConnectTimeouts.mjs.map +1 -0
- package/dist/esm/bundler/metaMaskConnectTimeouts.native.js +92 -0
- package/dist/esm/bundler/metaMaskConnectTimeouts.native.js.map +1 -0
- package/dist/esm/clients/adapter.mjs +8 -0
- package/dist/esm/clients/adapter.mjs.map +1 -0
- package/dist/esm/clients/adapter.native.js +8 -0
- package/dist/esm/clients/adapter.native.js.map +1 -0
- package/dist/esm/clients/bitcoin.mjs +21 -0
- package/dist/esm/clients/bitcoin.mjs.map +1 -0
- package/dist/esm/clients/bitcoin.native.js +23 -0
- package/dist/esm/clients/bitcoin.native.js.map +1 -0
- package/dist/esm/clients/connector.mjs +20 -0
- package/dist/esm/clients/connector.mjs.map +1 -0
- package/dist/esm/clients/connector.native.js +21 -0
- package/dist/esm/clients/connector.native.js.map +1 -0
- package/dist/esm/clients/evm.mjs +146 -0
- package/dist/esm/clients/evm.mjs.map +1 -0
- package/dist/esm/clients/evm.native.js +170 -0
- package/dist/esm/clients/evm.native.js.map +1 -0
- package/dist/esm/clients/gpg.mjs +3 -0
- package/dist/esm/clients/gpg.mjs.map +1 -0
- package/dist/esm/clients/gpg.native.js +3 -0
- package/dist/esm/clients/gpg.native.js.map +1 -0
- package/dist/esm/clients/hooks.mjs +51 -0
- package/dist/esm/clients/hooks.mjs.map +1 -0
- package/dist/esm/clients/hooks.native.js +55 -0
- package/dist/esm/clients/hooks.native.js.map +1 -0
- package/dist/esm/clients/index.mjs +11 -0
- package/dist/esm/clients/index.mjs.map +1 -0
- package/dist/esm/clients/index.native.js +11 -0
- package/dist/esm/clients/index.native.js.map +1 -0
- package/dist/esm/clients/solana.mjs +289 -0
- package/dist/esm/clients/solana.mjs.map +1 -0
- package/dist/esm/clients/solana.native.js +475 -0
- package/dist/esm/clients/solana.native.js.map +1 -0
- package/dist/esm/clients/solanaMessage.mjs +13 -0
- package/dist/esm/clients/solanaMessage.mjs.map +1 -0
- package/dist/esm/clients/solanaMessage.native.js +16 -0
- package/dist/esm/clients/solanaMessage.native.js.map +1 -0
- package/dist/esm/clients/sui.mjs +21 -0
- package/dist/esm/clients/sui.mjs.map +1 -0
- package/dist/esm/clients/sui.native.js +23 -0
- package/dist/esm/clients/sui.native.js.map +1 -0
- package/dist/esm/clients/types.mjs +12 -0
- package/dist/esm/clients/types.mjs.map +1 -0
- package/dist/esm/clients/types.native.js +132 -0
- package/dist/esm/clients/types.native.js.map +1 -0
- package/dist/esm/clients/useSolanaClient.mjs +25 -0
- package/dist/esm/clients/useSolanaClient.mjs.map +1 -0
- package/dist/esm/clients/useSolanaClient.native.js +29 -0
- package/dist/esm/clients/useSolanaClient.native.js.map +1 -0
- package/dist/esm/clients/walletStandard.mjs +33 -0
- package/dist/esm/clients/walletStandard.mjs.map +1 -0
- package/dist/esm/clients/walletStandard.native.js +38 -0
- package/dist/esm/clients/walletStandard.native.js.map +1 -0
- package/dist/esm/connectkit/components/Common/ConnectorList/index.mjs +11 -30
- package/dist/esm/connectkit/components/Common/ConnectorList/index.mjs.map +1 -1
- package/dist/esm/connectkit/components/Common/ConnectorList/index.native.js +12 -33
- package/dist/esm/connectkit/components/Common/ConnectorList/index.native.js.map +1 -1
- package/dist/esm/connectkit/components/ConnectModal/ConnectUsing.mjs +4 -38
- package/dist/esm/connectkit/components/ConnectModal/ConnectUsing.mjs.map +1 -1
- package/dist/esm/connectkit/components/ConnectModal/ConnectUsing.native.js +4 -42
- package/dist/esm/connectkit/components/ConnectModal/ConnectUsing.native.js.map +1 -1
- package/dist/esm/connectkit/components/ConnectModal/ConnectWithInjector/index.mjs +1 -15
- package/dist/esm/connectkit/components/ConnectModal/ConnectWithInjector/index.mjs.map +1 -1
- package/dist/esm/connectkit/components/ConnectModal/ConnectWithInjector/index.native.js +8 -63
- package/dist/esm/connectkit/components/ConnectModal/ConnectWithInjector/index.native.js.map +1 -1
- package/dist/esm/connectkit/components/ConnectModal/demo.mjs +0 -15
- package/dist/esm/connectkit/components/ConnectModal/demo.mjs.map +1 -1
- package/dist/esm/connectkit/components/ConnectModal/demo.native.js +0 -15
- package/dist/esm/connectkit/components/ConnectModal/demo.native.js.map +1 -1
- package/dist/esm/connectkit/components/contexts/web3/index.mjs +0 -15
- package/dist/esm/connectkit/components/contexts/web3/index.mjs.map +1 -1
- package/dist/esm/connectkit/components/contexts/web3/index.native.js +0 -17
- package/dist/esm/connectkit/components/contexts/web3/index.native.js.map +1 -1
- package/dist/esm/connectkit/connectors/aaveAccountConnector.mjs +31 -0
- package/dist/esm/connectkit/connectors/aaveAccountConnector.mjs.map +1 -0
- package/dist/esm/connectkit/connectors/aaveAccountConnector.native.js +38 -0
- package/dist/esm/connectkit/connectors/aaveAccountConnector.native.js.map +1 -0
- package/dist/esm/connectkit/connectors/embeddedDesktop.mjs +1 -1
- package/dist/esm/connectkit/connectors/embeddedDesktop.mjs.map +1 -1
- package/dist/esm/connectkit/connectors/embeddedDesktop.native.js +1 -1
- package/dist/esm/connectkit/connectors/embeddedDesktop.native.js.map +1 -1
- package/dist/esm/connectkit/connectors/metaMaskConnectConnector.mjs +216 -0
- package/dist/esm/connectkit/connectors/metaMaskConnectConnector.mjs.map +1 -0
- package/dist/esm/connectkit/connectors/metaMaskConnectConnector.native.js +273 -0
- package/dist/esm/connectkit/connectors/metaMaskConnectConnector.native.js.map +1 -0
- package/dist/esm/connectkit/connectors/walletAdapterConnector.mjs +2 -0
- package/dist/esm/connectkit/connectors/walletAdapterConnector.mjs.map +1 -1
- package/dist/esm/connectkit/connectors/walletAdapterConnector.native.js +2 -0
- package/dist/esm/connectkit/connectors/walletAdapterConnector.native.js.map +1 -1
- package/dist/esm/connectkit/defaultConfig.mjs +8 -2
- package/dist/esm/connectkit/defaultConfig.mjs.map +1 -1
- package/dist/esm/connectkit/defaultConfig.native.js +8 -2
- package/dist/esm/connectkit/defaultConfig.native.js.map +1 -1
- package/dist/esm/connectkit/defaultConnectors.mjs +16 -34
- package/dist/esm/connectkit/defaultConnectors.mjs.map +1 -1
- package/dist/esm/connectkit/defaultConnectors.native.js +16 -34
- package/dist/esm/connectkit/defaultConnectors.native.js.map +1 -1
- package/dist/esm/connectkit/hooks/useConnectors.mjs +1 -4
- package/dist/esm/connectkit/hooks/useConnectors.mjs.map +1 -1
- package/dist/esm/connectkit/hooks/useConnectors.native.js +1 -4
- package/dist/esm/connectkit/hooks/useConnectors.native.js.map +1 -1
- package/dist/esm/connectkit/index.mjs +2 -1
- package/dist/esm/connectkit/index.mjs.map +1 -1
- package/dist/esm/connectkit/index.native.js +2 -1
- package/dist/esm/connectkit/index.native.js.map +1 -1
- package/dist/esm/connectkit/screens.mjs +1 -14
- package/dist/esm/connectkit/screens.mjs.map +1 -1
- package/dist/esm/connectkit/screens.native.js +16 -33
- package/dist/esm/connectkit/screens.native.js.map +1 -1
- package/dist/esm/connectkit/siwe/SIWEProvider.mjs +7 -7
- package/dist/esm/connectkit/siwe/SIWEProvider.mjs.map +1 -1
- package/dist/esm/connectkit/siwe/SIWEProvider.native.js +10 -9
- package/dist/esm/connectkit/siwe/SIWEProvider.native.js.map +1 -1
- package/dist/esm/connectkit/wallets/index.mjs +3 -2
- package/dist/esm/connectkit/wallets/index.mjs.map +1 -1
- package/dist/esm/connectkit/wallets/index.native.js +3 -2
- package/dist/esm/connectkit/wallets/index.native.js.map +1 -1
- package/dist/esm/connectkit/wallets/useWallets.mjs +2 -17
- package/dist/esm/connectkit/wallets/useWallets.mjs.map +1 -1
- package/dist/esm/connectkit/wallets/useWallets.native.js +1 -17
- package/dist/esm/connectkit/wallets/useWallets.native.js.map +1 -1
- package/dist/esm/connectkit/wallets/walletConfigs.mjs +4 -63
- package/dist/esm/connectkit/wallets/walletConfigs.mjs.map +1 -1
- package/dist/esm/connectkit/wallets/walletConfigs.native.js +3 -66
- package/dist/esm/connectkit/wallets/walletConfigs.native.js.map +1 -1
- package/dist/esm/connectkit/web3Bridge.mjs +3 -7
- package/dist/esm/connectkit/web3Bridge.mjs.map +1 -1
- package/dist/esm/connectkit/web3Bridge.native.js +3 -8
- package/dist/esm/connectkit/web3Bridge.native.js.map +1 -1
- package/dist/esm/esbuild.mjs +29 -0
- package/dist/esm/esbuild.mjs.map +1 -0
- package/dist/esm/esbuild.native.js +29 -0
- package/dist/esm/esbuild.native.js.map +1 -0
- package/dist/esm/hooks/useWallet.mjs +1 -2
- package/dist/esm/hooks/useWallet.mjs.map +1 -1
- package/dist/esm/hooks/useWallet.native.js +1 -4
- package/dist/esm/hooks/useWallet.native.js.map +1 -1
- package/dist/esm/index.mjs +1 -0
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +1 -0
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/providers/WalletProvider.mjs +1 -2
- package/dist/esm/providers/WalletProvider.mjs.map +1 -1
- package/dist/esm/providers/native/deepLink.mjs +1 -1
- package/dist/esm/providers/native/deepLink.mjs.map +1 -1
- package/dist/esm/providers/native/deepLink.native.js +1 -1
- package/dist/esm/providers/native/deepLink.native.js.map +1 -1
- package/dist/esm/providers/walletConfig.mjs.map +1 -1
- package/dist/esm/providers/walletConfig.native.js.map +1 -1
- package/dist/esm/solana.mjs +5 -0
- package/dist/esm/solana.mjs.map +1 -0
- package/dist/esm/solana.native.js +5 -0
- package/dist/esm/solana.native.js.map +1 -0
- package/dist/esm/vite.mjs +51 -0
- package/dist/esm/vite.mjs.map +1 -0
- package/dist/esm/vite.native.js +51 -0
- package/dist/esm/vite.native.js.map +1 -0
- package/dist/jsx/bundler/metaMaskConnectTimeouts.mjs +64 -0
- package/dist/jsx/bundler/metaMaskConnectTimeouts.mjs.map +1 -0
- package/dist/jsx/bundler/metaMaskConnectTimeouts.native.js +123 -0
- package/dist/jsx/bundler/metaMaskConnectTimeouts.native.js.map +1 -0
- package/dist/jsx/clients/adapter.mjs +8 -0
- package/dist/jsx/clients/adapter.mjs.map +1 -0
- package/dist/jsx/clients/adapter.native.js +36 -0
- package/dist/jsx/clients/adapter.native.js.map +1 -0
- package/dist/jsx/clients/bitcoin.mjs +21 -0
- package/dist/jsx/clients/bitcoin.mjs.map +1 -0
- package/dist/jsx/clients/bitcoin.native.js +51 -0
- package/dist/jsx/clients/bitcoin.native.js.map +1 -0
- package/dist/jsx/clients/connector.mjs +20 -0
- package/dist/jsx/clients/connector.mjs.map +1 -0
- package/dist/jsx/clients/connector.native.js +49 -0
- package/dist/jsx/clients/connector.native.js.map +1 -0
- package/dist/jsx/clients/evm.mjs +146 -0
- package/dist/jsx/clients/evm.mjs.map +1 -0
- package/dist/jsx/clients/evm.native.js +198 -0
- package/dist/jsx/clients/evm.native.js.map +1 -0
- package/dist/jsx/clients/gpg.mjs +3 -0
- package/dist/jsx/clients/gpg.mjs.map +1 -0
- package/dist/jsx/clients/gpg.native.js +34 -0
- package/dist/jsx/clients/gpg.native.js.map +1 -0
- package/dist/jsx/clients/hooks.mjs +51 -0
- package/dist/jsx/clients/hooks.mjs.map +1 -0
- package/dist/jsx/clients/hooks.native.js +85 -0
- package/dist/jsx/clients/hooks.native.js.map +1 -0
- package/dist/jsx/clients/index.mjs +11 -0
- package/dist/jsx/clients/index.mjs.map +1 -0
- package/dist/jsx/clients/index.native.js +52 -0
- package/dist/jsx/clients/index.native.js.map +1 -0
- package/dist/jsx/clients/solana.mjs +289 -0
- package/dist/jsx/clients/solana.mjs.map +1 -0
- package/dist/jsx/clients/solana.native.js +511 -0
- package/dist/jsx/clients/solana.native.js.map +1 -0
- package/dist/jsx/clients/solanaMessage.mjs +13 -0
- package/dist/jsx/clients/solanaMessage.mjs.map +1 -0
- package/dist/jsx/clients/solanaMessage.native.js +44 -0
- package/dist/jsx/clients/solanaMessage.native.js.map +1 -0
- package/dist/jsx/clients/sui.mjs +21 -0
- package/dist/jsx/clients/sui.mjs.map +1 -0
- package/dist/jsx/clients/sui.native.js +51 -0
- package/dist/jsx/clients/sui.native.js.map +1 -0
- package/dist/jsx/clients/types.mjs +12 -0
- package/dist/jsx/clients/types.mjs.map +1 -0
- package/dist/jsx/clients/types.native.js +160 -0
- package/dist/jsx/clients/types.native.js.map +1 -0
- package/dist/jsx/clients/useSolanaClient.mjs +25 -0
- package/dist/jsx/clients/useSolanaClient.mjs.map +1 -0
- package/dist/jsx/clients/useSolanaClient.native.js +57 -0
- package/dist/jsx/clients/useSolanaClient.native.js.map +1 -0
- package/dist/jsx/clients/walletStandard.mjs +33 -0
- package/dist/jsx/clients/walletStandard.mjs.map +1 -0
- package/dist/jsx/clients/walletStandard.native.js +71 -0
- package/dist/jsx/clients/walletStandard.native.js.map +1 -0
- package/dist/jsx/connectkit/components/Common/ConnectorList/index.mjs +11 -30
- package/dist/jsx/connectkit/components/Common/ConnectorList/index.mjs.map +1 -1
- package/dist/jsx/connectkit/components/Common/ConnectorList/index.native.js +11 -32
- package/dist/jsx/connectkit/components/Common/ConnectorList/index.native.js.map +1 -1
- package/dist/jsx/connectkit/components/ConnectModal/ConnectUsing.mjs +4 -38
- package/dist/jsx/connectkit/components/ConnectModal/ConnectUsing.mjs.map +1 -1
- package/dist/jsx/connectkit/components/ConnectModal/ConnectUsing.native.js +4 -42
- package/dist/jsx/connectkit/components/ConnectModal/ConnectUsing.native.js.map +1 -1
- package/dist/jsx/connectkit/components/ConnectModal/ConnectWithInjector/index.mjs +1 -15
- package/dist/jsx/connectkit/components/ConnectModal/ConnectWithInjector/index.mjs.map +1 -1
- package/dist/jsx/connectkit/components/ConnectModal/ConnectWithInjector/index.native.js +7 -62
- package/dist/jsx/connectkit/components/ConnectModal/ConnectWithInjector/index.native.js.map +1 -1
- package/dist/jsx/connectkit/components/ConnectModal/demo.mjs +0 -15
- package/dist/jsx/connectkit/components/ConnectModal/demo.mjs.map +1 -1
- package/dist/jsx/connectkit/components/ConnectModal/demo.native.js +0 -15
- package/dist/jsx/connectkit/components/ConnectModal/demo.native.js.map +1 -1
- package/dist/jsx/connectkit/components/contexts/web3/index.mjs +0 -15
- package/dist/jsx/connectkit/components/contexts/web3/index.mjs.map +1 -1
- package/dist/jsx/connectkit/components/contexts/web3/index.native.js +0 -17
- package/dist/jsx/connectkit/components/contexts/web3/index.native.js.map +1 -1
- package/dist/jsx/connectkit/connectors/aaveAccountConnector.mjs +31 -0
- package/dist/jsx/connectkit/connectors/aaveAccountConnector.mjs.map +1 -0
- package/dist/jsx/connectkit/connectors/aaveAccountConnector.native.js +67 -0
- package/dist/jsx/connectkit/connectors/aaveAccountConnector.native.js.map +1 -0
- package/dist/jsx/connectkit/connectors/embeddedDesktop.mjs +1 -1
- package/dist/jsx/connectkit/connectors/embeddedDesktop.mjs.map +1 -1
- package/dist/jsx/connectkit/connectors/embeddedDesktop.native.js +1 -1
- package/dist/jsx/connectkit/connectors/metaMaskConnectConnector.mjs +216 -0
- package/dist/jsx/connectkit/connectors/metaMaskConnectConnector.mjs.map +1 -0
- package/dist/jsx/connectkit/connectors/metaMaskConnectConnector.native.js +315 -0
- package/dist/jsx/connectkit/connectors/metaMaskConnectConnector.native.js.map +1 -0
- package/dist/jsx/connectkit/connectors/walletAdapterConnector.mjs +2 -0
- package/dist/jsx/connectkit/connectors/walletAdapterConnector.mjs.map +1 -1
- package/dist/jsx/connectkit/connectors/walletAdapterConnector.native.js +2 -0
- package/dist/jsx/connectkit/connectors/walletAdapterConnector.native.js.map +1 -1
- package/dist/jsx/connectkit/defaultConfig.mjs +8 -2
- package/dist/jsx/connectkit/defaultConfig.mjs.map +1 -1
- package/dist/jsx/connectkit/defaultConfig.native.js +8 -2
- package/dist/jsx/connectkit/defaultConfig.native.js.map +1 -1
- package/dist/jsx/connectkit/defaultConnectors.mjs +16 -34
- package/dist/jsx/connectkit/defaultConnectors.mjs.map +1 -1
- package/dist/jsx/connectkit/defaultConnectors.native.js +19 -37
- package/dist/jsx/connectkit/defaultConnectors.native.js.map +1 -1
- package/dist/jsx/connectkit/hooks/useConnectors.mjs +1 -4
- package/dist/jsx/connectkit/hooks/useConnectors.mjs.map +1 -1
- package/dist/jsx/connectkit/hooks/useConnectors.native.js +1 -5
- package/dist/jsx/connectkit/hooks/useConnectors.native.js.map +1 -1
- package/dist/jsx/connectkit/index.mjs +2 -1
- package/dist/jsx/connectkit/index.mjs.map +1 -1
- package/dist/jsx/connectkit/index.native.js +2 -0
- package/dist/jsx/connectkit/index.native.js.map +1 -1
- package/dist/jsx/connectkit/screens.mjs +1 -14
- package/dist/jsx/connectkit/screens.mjs.map +1 -1
- package/dist/jsx/connectkit/screens.native.js +16 -33
- package/dist/jsx/connectkit/screens.native.js.map +1 -1
- package/dist/jsx/connectkit/siwe/SIWEProvider.mjs +7 -7
- package/dist/jsx/connectkit/siwe/SIWEProvider.mjs.map +1 -1
- package/dist/jsx/connectkit/siwe/SIWEProvider.native.js +10 -9
- package/dist/jsx/connectkit/siwe/SIWEProvider.native.js.map +1 -1
- package/dist/jsx/connectkit/wallets/index.mjs +3 -2
- package/dist/jsx/connectkit/wallets/index.mjs.map +1 -1
- package/dist/jsx/connectkit/wallets/index.native.js +4 -3
- package/dist/jsx/connectkit/wallets/index.native.js.map +1 -1
- package/dist/jsx/connectkit/wallets/useWallets.mjs +2 -17
- package/dist/jsx/connectkit/wallets/useWallets.mjs.map +1 -1
- package/dist/jsx/connectkit/wallets/useWallets.native.js +6 -22
- package/dist/jsx/connectkit/wallets/useWallets.native.js.map +1 -1
- package/dist/jsx/connectkit/wallets/walletConfigs.mjs +4 -63
- package/dist/jsx/connectkit/wallets/walletConfigs.mjs.map +1 -1
- package/dist/jsx/connectkit/wallets/walletConfigs.native.js +2 -65
- package/dist/jsx/connectkit/wallets/walletConfigs.native.js.map +1 -1
- package/dist/jsx/connectkit/web3Bridge.mjs +3 -7
- package/dist/jsx/connectkit/web3Bridge.mjs.map +1 -1
- package/dist/jsx/connectkit/web3Bridge.native.js +2 -7
- package/dist/jsx/connectkit/web3Bridge.native.js.map +1 -1
- package/dist/jsx/esbuild.mjs +29 -0
- package/dist/jsx/esbuild.mjs.map +1 -0
- package/dist/jsx/esbuild.native.js +57 -0
- package/dist/jsx/esbuild.native.js.map +1 -0
- package/dist/jsx/hooks/useWallet.mjs +1 -2
- package/dist/jsx/hooks/useWallet.mjs.map +1 -1
- package/dist/jsx/hooks/useWallet.native.js +1 -4
- package/dist/jsx/hooks/useWallet.native.js.map +1 -1
- package/dist/jsx/index.js +1 -0
- package/dist/jsx/index.js.map +1 -1
- package/dist/jsx/index.mjs +1 -0
- package/dist/jsx/index.mjs.map +1 -1
- package/dist/jsx/index.native.js +1 -0
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/providers/WalletProvider.mjs +1 -2
- package/dist/jsx/providers/WalletProvider.mjs.map +1 -1
- package/dist/jsx/providers/native/deepLink.mjs +1 -1
- package/dist/jsx/providers/native/deepLink.mjs.map +1 -1
- package/dist/jsx/providers/native/deepLink.native.js +1 -1
- package/dist/jsx/providers/native/deepLink.native.js.map +1 -1
- package/dist/jsx/providers/walletConfig.mjs.map +1 -1
- package/dist/jsx/providers/walletConfig.native.js.map +1 -1
- package/dist/jsx/solana.mjs +5 -0
- package/dist/jsx/solana.mjs.map +1 -0
- package/dist/jsx/solana.native.js +44 -0
- package/dist/jsx/solana.native.js.map +1 -0
- package/dist/jsx/vite.mjs +51 -0
- package/dist/jsx/vite.mjs.map +1 -0
- package/dist/jsx/vite.native.js +79 -0
- package/dist/jsx/vite.native.js.map +1 -0
- package/package.json +29 -10
- package/src/bundler/metaMaskConnectTimeouts.spec.ts +390 -0
- package/src/bundler/metaMaskConnectTimeouts.ts +126 -0
- package/src/clients/adapter.ts +13 -0
- package/src/clients/bitcoin.ts +42 -0
- package/src/clients/connector.spec.ts +78 -0
- package/src/clients/connector.ts +36 -0
- package/src/clients/evm.spec.ts +265 -0
- package/src/clients/evm.ts +223 -0
- package/src/clients/gpg.spec.ts +169 -0
- package/src/clients/gpg.ts +8 -0
- package/src/clients/hooks.spec.tsx +113 -0
- package/src/clients/hooks.ts +51 -0
- package/src/clients/index.ts +40 -0
- package/src/clients/solana.spec.ts +444 -0
- package/src/clients/solana.ts +465 -0
- package/src/clients/solanaMessage.ts +34 -0
- package/src/clients/sui.ts +42 -0
- package/src/clients/types.ts +40 -0
- package/src/clients/useSolanaClient.ts +31 -0
- package/src/clients/walletStandard.ts +87 -0
- package/src/connectkit/adapters/SolanaAdapter.ts +1 -1
- package/src/connectkit/adapters/discover.ts +1 -1
- package/src/connectkit/components/Common/ConnectorList/index.tsx +20 -50
- package/src/connectkit/components/ConnectModal/ConnectUsing.tsx +11 -62
- package/src/connectkit/components/ConnectModal/ConnectWithInjector/index.tsx +10 -70
- package/src/connectkit/components/ConnectModal/demo.tsx +1 -19
- package/src/connectkit/components/contexts/web3/index.tsx +1 -23
- package/src/connectkit/connectors/aaveAccountConnector.spec.ts +87 -0
- package/src/connectkit/connectors/aaveAccountConnector.ts +43 -0
- package/src/connectkit/connectors/embeddedDesktop.spec.ts +5 -5
- package/src/connectkit/connectors/embeddedDesktop.ts +5 -5
- package/src/connectkit/connectors/metaMaskConnectConnector.spec.ts +230 -0
- package/src/connectkit/connectors/metaMaskConnectConnector.ts +272 -0
- package/src/connectkit/connectors/walletAdapterConnector.ts +2 -0
- package/src/connectkit/defaultConfig.ts +16 -7
- package/src/connectkit/defaultConnectors.ts +19 -40
- package/src/connectkit/hooks/useConnectors.ts +0 -10
- package/src/connectkit/index.ts +4 -0
- package/src/connectkit/screens.tsx +1 -21
- package/src/connectkit/siwe/SIWEProvider.spec.tsx +180 -0
- package/src/connectkit/siwe/SIWEProvider.tsx +11 -13
- package/src/connectkit/wallets/index.ts +5 -2
- package/src/connectkit/wallets/useWallets.tsx +1 -20
- package/src/connectkit/wallets/walletConfigs.tsx +2 -64
- package/src/connectkit/web3Bridge.tsx +4 -21
- package/src/esbuild.ts +42 -0
- package/src/hooks/useWallet.spec.ts +6 -15
- package/src/hooks/useWallet.ts +1 -2
- package/src/index.ts +4 -0
- package/src/providers/WalletProvider.native.tsx +1 -1
- package/src/providers/WalletProvider.tsx +5 -7
- package/src/providers/mockConnector.ts +2 -2
- package/src/providers/native/deepLink.spec.ts +3 -4
- package/src/providers/native/deepLink.ts +1 -2
- package/src/providers/native/inject.spec.ts +1 -1
- package/src/providers/walletConfig.spec.ts +1 -1
- package/src/providers/walletConfig.ts +2 -1
- package/src/solana.ts +30 -0
- package/src/vite.ts +60 -0
- package/types/bundler/metaMaskConnectTimeouts.d.ts +36 -0
- package/types/bundler/metaMaskConnectTimeouts.d.ts.map +1 -0
- package/types/clients/adapter.d.ts +5 -0
- package/types/clients/adapter.d.ts.map +1 -0
- package/types/clients/bitcoin.d.ts +21 -0
- package/types/clients/bitcoin.d.ts.map +1 -0
- package/types/clients/connector.d.ts +14 -0
- package/types/clients/connector.d.ts.map +1 -0
- package/types/clients/evm.d.ts +68 -0
- package/types/clients/evm.d.ts.map +1 -0
- package/types/clients/gpg.d.ts +2 -0
- package/types/clients/gpg.d.ts.map +1 -0
- package/types/clients/hooks.d.ts +16 -0
- package/types/clients/hooks.d.ts.map +1 -0
- package/types/clients/index.d.ts +10 -0
- package/types/clients/index.d.ts.map +1 -0
- package/types/clients/solana.d.ts +111 -0
- package/types/clients/solana.d.ts.map +1 -0
- package/types/clients/solanaMessage.d.ts +18 -0
- package/types/clients/solanaMessage.d.ts.map +1 -0
- package/types/clients/sui.d.ts +21 -0
- package/types/clients/sui.d.ts.map +1 -0
- package/types/clients/types.d.ts +27 -0
- package/types/clients/types.d.ts.map +1 -0
- package/types/clients/useSolanaClient.d.ts +11 -0
- package/types/clients/useSolanaClient.d.ts.map +1 -0
- package/types/clients/walletStandard.d.ts +63 -0
- package/types/clients/walletStandard.d.ts.map +1 -0
- package/types/connectkit/adapters/discover.d.ts +1 -1
- package/types/connectkit/components/Common/ConnectorList/index.d.ts.map +1 -1
- package/types/connectkit/components/ConnectModal/ConnectUsing.d.ts.map +1 -1
- package/types/connectkit/components/ConnectModal/ConnectWithInjector/index.d.ts +0 -1
- package/types/connectkit/components/ConnectModal/ConnectWithInjector/index.d.ts.map +1 -1
- package/types/connectkit/components/ConnectModal/demo.d.ts.map +1 -1
- package/types/connectkit/components/contexts/web3/index.d.ts +1 -5
- package/types/connectkit/components/contexts/web3/index.d.ts.map +1 -1
- package/types/connectkit/connectors/aaveAccountConnector.d.ts +5 -0
- package/types/connectkit/connectors/aaveAccountConnector.d.ts.map +1 -0
- package/types/connectkit/connectors/embeddedDesktop.d.ts +4 -4
- package/types/connectkit/connectors/embeddedDesktop.d.ts.map +1 -1
- package/types/connectkit/connectors/metaMaskConnectConnector.d.ts +35 -0
- package/types/connectkit/connectors/metaMaskConnectConnector.d.ts.map +1 -0
- package/types/connectkit/connectors/walletAdapterConnector.d.ts.map +1 -1
- package/types/connectkit/defaultConfig.d.ts +3 -2
- package/types/connectkit/defaultConfig.d.ts.map +1 -1
- package/types/connectkit/defaultConnectors.d.ts +3 -4
- package/types/connectkit/defaultConnectors.d.ts.map +1 -1
- package/types/connectkit/hooks/useConnectors.d.ts +0 -1
- package/types/connectkit/hooks/useConnectors.d.ts.map +1 -1
- package/types/connectkit/index.d.ts +1 -0
- package/types/connectkit/index.d.ts.map +1 -1
- package/types/connectkit/screens.d.ts +0 -4
- package/types/connectkit/screens.d.ts.map +1 -1
- package/types/connectkit/siwe/SIWEProvider.d.ts.map +1 -1
- package/types/connectkit/wallets/index.d.ts.map +1 -1
- package/types/connectkit/wallets/useWallets.d.ts.map +1 -1
- package/types/connectkit/wallets/walletConfigs.d.ts +0 -2
- package/types/connectkit/wallets/walletConfigs.d.ts.map +1 -1
- package/types/connectkit/web3Bridge.d.ts.map +1 -1
- package/types/esbuild.d.ts +31 -0
- package/types/esbuild.d.ts.map +1 -0
- package/types/hooks/useWallet.d.ts.map +1 -1
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
- package/types/providers/WalletProvider.d.ts.map +1 -1
- package/types/providers/mockConnector.d.ts +2 -2
- package/types/providers/native/deepLink.d.ts +1 -1
- package/types/providers/native/deepLink.d.ts.map +1 -1
- package/types/providers/walletConfig.d.ts +2 -1
- package/types/providers/walletConfig.d.ts.map +1 -1
- package/types/solana.d.ts +4 -0
- package/types/solana.d.ts.map +1 -0
- package/types/vite.d.ts +12 -0
- package/types/vite.d.ts.map +1 -0
- package/dist/cjs/connectkit/components/ConnectModal/ConnectWithQRCode.cjs +0 -133
- package/dist/cjs/connectkit/components/ConnectModal/ConnectWithQRCode.native.js +0 -179
- package/dist/cjs/connectkit/components/ConnectModal/ConnectWithQRCode.native.js.map +0 -1
- package/dist/cjs/connectkit/components/Pages/MobileConnectors/index.cjs +0 -158
- package/dist/cjs/connectkit/components/Pages/MobileConnectors/index.native.js +0 -183
- package/dist/cjs/connectkit/components/Pages/MobileConnectors/index.native.js.map +0 -1
- package/dist/cjs/connectkit/components/Pages/MobileConnectors/styles.cjs +0 -90
- package/dist/cjs/connectkit/components/Pages/MobileConnectors/styles.native.js +0 -99
- package/dist/cjs/connectkit/components/Pages/MobileConnectors/styles.native.js.map +0 -1
- package/dist/cjs/connectkit/connectors/metaMaskSdkConnector.cjs +0 -398
- package/dist/cjs/connectkit/connectors/metaMaskSdkConnector.native.js +0 -453
- package/dist/cjs/connectkit/connectors/metaMaskSdkConnector.native.js.map +0 -1
- package/dist/cjs/connectkit/hooks/connectors/useCoinbaseWalletUri.cjs +0 -0
- package/dist/cjs/connectkit/hooks/connectors/useCoinbaseWalletUri.native.js +0 -2
- package/dist/cjs/connectkit/hooks/connectors/useCoinbaseWalletUri.native.js.map +0 -1
- package/dist/cjs/connectkit/hooks/connectors/useWalletConnectUri.cjs +0 -113
- package/dist/cjs/connectkit/hooks/connectors/useWalletConnectUri.native.js +0 -117
- package/dist/cjs/connectkit/hooks/connectors/useWalletConnectUri.native.js.map +0 -1
- package/dist/cjs/connectkit/hooks/useWalletConnectModal.cjs +0 -74
- package/dist/cjs/connectkit/hooks/useWalletConnectModal.native.js +0 -79
- package/dist/cjs/connectkit/hooks/useWalletConnectModal.native.js.map +0 -1
- package/dist/esm/connectkit/components/ConnectModal/ConnectWithQRCode.mjs +0 -108
- package/dist/esm/connectkit/components/ConnectModal/ConnectWithQRCode.mjs.map +0 -1
- package/dist/esm/connectkit/components/ConnectModal/ConnectWithQRCode.native.js +0 -140
- package/dist/esm/connectkit/components/ConnectModal/ConnectWithQRCode.native.js.map +0 -1
- package/dist/esm/connectkit/components/Pages/MobileConnectors/index.mjs +0 -133
- package/dist/esm/connectkit/components/Pages/MobileConnectors/index.mjs.map +0 -1
- package/dist/esm/connectkit/components/Pages/MobileConnectors/index.native.js +0 -144
- package/dist/esm/connectkit/components/Pages/MobileConnectors/index.native.js.map +0 -1
- package/dist/esm/connectkit/components/Pages/MobileConnectors/styles.mjs +0 -61
- package/dist/esm/connectkit/components/Pages/MobileConnectors/styles.mjs.map +0 -1
- package/dist/esm/connectkit/components/Pages/MobileConnectors/styles.native.js +0 -67
- package/dist/esm/connectkit/components/Pages/MobileConnectors/styles.native.js.map +0 -1
- package/dist/esm/connectkit/connectors/metaMaskSdkConnector.mjs +0 -362
- package/dist/esm/connectkit/connectors/metaMaskSdkConnector.mjs.map +0 -1
- package/dist/esm/connectkit/connectors/metaMaskSdkConnector.native.js +0 -414
- package/dist/esm/connectkit/connectors/metaMaskSdkConnector.native.js.map +0 -1
- package/dist/esm/connectkit/hooks/connectors/useCoinbaseWalletUri.mjs +0 -2
- package/dist/esm/connectkit/hooks/connectors/useCoinbaseWalletUri.mjs.map +0 -1
- package/dist/esm/connectkit/hooks/connectors/useCoinbaseWalletUri.native.js +0 -2
- package/dist/esm/connectkit/hooks/connectors/useCoinbaseWalletUri.native.js.map +0 -1
- package/dist/esm/connectkit/hooks/connectors/useWalletConnectUri.mjs +0 -88
- package/dist/esm/connectkit/hooks/connectors/useWalletConnectUri.mjs.map +0 -1
- package/dist/esm/connectkit/hooks/connectors/useWalletConnectUri.native.js +0 -89
- package/dist/esm/connectkit/hooks/connectors/useWalletConnectUri.native.js.map +0 -1
- package/dist/esm/connectkit/hooks/useWalletConnectModal.mjs +0 -49
- package/dist/esm/connectkit/hooks/useWalletConnectModal.mjs.map +0 -1
- package/dist/esm/connectkit/hooks/useWalletConnectModal.native.js +0 -51
- package/dist/esm/connectkit/hooks/useWalletConnectModal.native.js.map +0 -1
- package/dist/jsx/connectkit/components/ConnectModal/ConnectWithQRCode.mjs +0 -108
- package/dist/jsx/connectkit/components/ConnectModal/ConnectWithQRCode.mjs.map +0 -1
- package/dist/jsx/connectkit/components/ConnectModal/ConnectWithQRCode.native.js +0 -179
- package/dist/jsx/connectkit/components/ConnectModal/ConnectWithQRCode.native.js.map +0 -1
- package/dist/jsx/connectkit/components/Pages/MobileConnectors/index.mjs +0 -133
- package/dist/jsx/connectkit/components/Pages/MobileConnectors/index.mjs.map +0 -1
- package/dist/jsx/connectkit/components/Pages/MobileConnectors/index.native.js +0 -183
- package/dist/jsx/connectkit/components/Pages/MobileConnectors/index.native.js.map +0 -1
- package/dist/jsx/connectkit/components/Pages/MobileConnectors/styles.mjs +0 -61
- package/dist/jsx/connectkit/components/Pages/MobileConnectors/styles.mjs.map +0 -1
- package/dist/jsx/connectkit/components/Pages/MobileConnectors/styles.native.js +0 -99
- package/dist/jsx/connectkit/components/Pages/MobileConnectors/styles.native.js.map +0 -1
- package/dist/jsx/connectkit/connectors/metaMaskSdkConnector.mjs +0 -362
- package/dist/jsx/connectkit/connectors/metaMaskSdkConnector.mjs.map +0 -1
- package/dist/jsx/connectkit/connectors/metaMaskSdkConnector.native.js +0 -453
- package/dist/jsx/connectkit/connectors/metaMaskSdkConnector.native.js.map +0 -1
- package/dist/jsx/connectkit/hooks/connectors/useCoinbaseWalletUri.mjs +0 -2
- package/dist/jsx/connectkit/hooks/connectors/useCoinbaseWalletUri.mjs.map +0 -1
- package/dist/jsx/connectkit/hooks/connectors/useCoinbaseWalletUri.native.js +0 -2
- package/dist/jsx/connectkit/hooks/connectors/useCoinbaseWalletUri.native.js.map +0 -1
- package/dist/jsx/connectkit/hooks/connectors/useWalletConnectUri.mjs +0 -88
- package/dist/jsx/connectkit/hooks/connectors/useWalletConnectUri.mjs.map +0 -1
- package/dist/jsx/connectkit/hooks/connectors/useWalletConnectUri.native.js +0 -117
- package/dist/jsx/connectkit/hooks/connectors/useWalletConnectUri.native.js.map +0 -1
- package/dist/jsx/connectkit/hooks/useWalletConnectModal.mjs +0 -49
- package/dist/jsx/connectkit/hooks/useWalletConnectModal.mjs.map +0 -1
- package/dist/jsx/connectkit/hooks/useWalletConnectModal.native.js +0 -79
- package/dist/jsx/connectkit/hooks/useWalletConnectModal.native.js.map +0 -1
- package/src/connectkit/components/ConnectModal/ConnectWithQRCode.tsx +0 -188
- package/src/connectkit/components/Pages/MobileConnectors/index.tsx +0 -142
- package/src/connectkit/components/Pages/MobileConnectors/styles.ts +0 -66
- package/src/connectkit/connectors/metaMaskSdkConnector.ts +0 -505
- package/src/connectkit/hooks/connectors/useCoinbaseWalletUri.tsx +0 -101
- package/src/connectkit/hooks/connectors/useWalletConnectUri.ts +0 -99
- package/src/connectkit/hooks/useWalletConnectModal.tsx +0 -52
- package/types/connectkit/components/ConnectModal/ConnectWithQRCode.d.ts +0 -6
- package/types/connectkit/components/ConnectModal/ConnectWithQRCode.d.ts.map +0 -1
- package/types/connectkit/components/Pages/MobileConnectors/index.d.ts +0 -4
- package/types/connectkit/components/Pages/MobileConnectors/index.d.ts.map +0 -1
- package/types/connectkit/components/Pages/MobileConnectors/styles.d.ts +0 -6
- package/types/connectkit/components/Pages/MobileConnectors/styles.d.ts.map +0 -1
- package/types/connectkit/connectors/metaMaskSdkConnector.d.ts +0 -30
- package/types/connectkit/connectors/metaMaskSdkConnector.d.ts.map +0 -1
- package/types/connectkit/hooks/connectors/useCoinbaseWalletUri.d.ts +0 -1
- package/types/connectkit/hooks/connectors/useCoinbaseWalletUri.d.ts.map +0 -1
- package/types/connectkit/hooks/connectors/useWalletConnectUri.d.ts +0 -8
- package/types/connectkit/hooks/connectors/useWalletConnectUri.d.ts.map +0 -1
- package/types/connectkit/hooks/useWalletConnectModal.d.ts +0 -5
- package/types/connectkit/hooks/useWalletConnectModal.d.ts.map +0 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
+
value: true
|
|
24
|
+
}), mod);
|
|
25
|
+
var solanaMessage_exports = {};
|
|
26
|
+
__export(solanaMessage_exports, {
|
|
27
|
+
solanaMessageClient: () => solanaMessageClient
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(solanaMessage_exports);
|
|
30
|
+
var capabilities = ["signMessage"];
|
|
31
|
+
function solanaMessageClient(adapter) {
|
|
32
|
+
var chain = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "solana:mainnet";
|
|
33
|
+
if (!adapter.address) throw new Error("solanaMessageClient: connect a Solana wallet first");
|
|
34
|
+
return {
|
|
35
|
+
family: "solana",
|
|
36
|
+
address: adapter.address,
|
|
37
|
+
chainId: chain,
|
|
38
|
+
capabilities,
|
|
39
|
+
signMessage: function signMessage(message) {
|
|
40
|
+
return adapter.signMessage(message);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=solanaMessage.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","solanaMessage_exports","solanaMessageClient","module","exports","capabilities","adapter","chain","arguments","length","address","Error","family","chainId","signMessage","message"],"sources":["solanaMessage.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar solanaMessage_exports = {};\n__export(solanaMessage_exports, {\n solanaMessageClient: () => solanaMessageClient\n});\nmodule.exports = __toCommonJS(solanaMessage_exports);\nvar capabilities = [\n \"signMessage\"\n];\nfunction solanaMessageClient(adapter) {\n var chain = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : \"solana:mainnet\";\n if (!adapter.address) throw new Error(\"solanaMessageClient: connect a Solana wallet first\");\n return {\n family: \"solana\",\n address: adapter.address,\n chainId: chain,\n capabilities,\n signMessage: function signMessage(message) {\n return adapter.signMessage(message);\n }\n };\n}\n//# sourceMappingURL=solanaMessage.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAACK,mBAAmB;AAClD,IAAIC,YAAY,GAAGN,MAAM,CAACO,SAAS,CAACC,cAAc;AAClD,IAAIC,QAAQ,GAAGA,CAACC,MAAM,EAAEC,GAAG,KAAK;EAC9B,KAAK,IAAIC,IAAI,IAAID,GAAG,EAClBZ,SAAS,CAACW,MAAM,EAAEE,IAAI,EAAE;IAAEC,GAAG,EAAEF,GAAG,CAACC,IAAI,CAAC;IAAEE,UAAU,EAAE;EAAK,CAAC,CAAC;AACjE,CAAC;AACD,IAAIC,WAAW,GAAGA,CAACC,EAAE,EAAEC,IAAI,EAAEC,MAAM,EAAEC,IAAI,KAAK;EAC5C,IAAIF,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,IAAI,OAAOA,IAAI,KAAK,UAAU,EAAE;IAClE,KAAK,IAAIG,GAAG,IAAIhB,iBAAiB,CAACa,IAAI,CAAC,EACrC,IAAI,CAACX,YAAY,CAACe,IAAI,CAACL,EAAE,E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,46 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var sui_exports = {};
|
|
24
|
+
__export(sui_exports, {
|
|
25
|
+
suiClient: () => suiClient
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(sui_exports);
|
|
28
|
+
var import_types = require("./types.cjs");
|
|
29
|
+
const txTodo = "needs @mysten/sui's Transaction plus the wallet's sui:signTransaction / sui:signAndExecuteTransaction features";
|
|
30
|
+
const capabilities = ["signMessage"];
|
|
31
|
+
function suiClient(adapter) {
|
|
32
|
+
if (!adapter.address) throw new Error("suiClient: connect a Sui wallet first");
|
|
33
|
+
return {
|
|
34
|
+
family: "sui",
|
|
35
|
+
address: adapter.address,
|
|
36
|
+
chainId: "sui:mainnet",
|
|
37
|
+
capabilities,
|
|
38
|
+
signMessage: message => adapter.signMessage(message),
|
|
39
|
+
signTransaction: async () => {
|
|
40
|
+
throw new import_types.UnsupportedClientMethodError("sui", "signTransaction", txTodo);
|
|
41
|
+
},
|
|
42
|
+
signAndExecuteTransaction: async () => {
|
|
43
|
+
throw new import_types.UnsupportedClientMethodError("sui", "signAndExecuteTransaction", txTodo);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
+
value: true
|
|
24
|
+
}), mod);
|
|
25
|
+
var sui_exports = {};
|
|
26
|
+
__export(sui_exports, {
|
|
27
|
+
suiClient: () => suiClient
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(sui_exports);
|
|
30
|
+
var import_types = require("./types.native.js");
|
|
31
|
+
var txTodo = "needs @mysten/sui's Transaction plus the wallet's sui:signTransaction / sui:signAndExecuteTransaction features";
|
|
32
|
+
var capabilities = ["signMessage"];
|
|
33
|
+
function suiClient(adapter) {
|
|
34
|
+
if (!adapter.address) throw new Error("suiClient: connect a Sui wallet first");
|
|
35
|
+
return {
|
|
36
|
+
family: "sui",
|
|
37
|
+
address: adapter.address,
|
|
38
|
+
chainId: "sui:mainnet",
|
|
39
|
+
capabilities,
|
|
40
|
+
signMessage: function signMessage(message) {
|
|
41
|
+
return adapter.signMessage(message);
|
|
42
|
+
},
|
|
43
|
+
signTransaction: async function signTransaction() {
|
|
44
|
+
throw new import_types.UnsupportedClientMethodError("sui", "signTransaction", txTodo);
|
|
45
|
+
},
|
|
46
|
+
signAndExecuteTransaction: async function signAndExecuteTransaction() {
|
|
47
|
+
throw new import_types.UnsupportedClientMethodError("sui", "signAndExecuteTransaction", txTodo);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=sui.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","sui_exports","suiClient","module","exports","import_types","require","txTodo","capabilities","adapter","address","Error","family","chainId","signMessage","message","signTransaction","UnsupportedClientMethodError","signAndExecuteTransaction"],"sources":["sui.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar sui_exports = {};\n__export(sui_exports, {\n suiClient: () => suiClient\n});\nmodule.exports = __toCommonJS(sui_exports);\nvar import_types = require(\"./types\");\nvar txTodo = \"needs @mysten/sui's Transaction plus the wallet's sui:signTransaction / sui:signAndExecuteTransaction features\";\nvar capabilities = [\n \"signMessage\"\n];\nfunction suiClient(adapter) {\n if (!adapter.address) throw new Error(\"suiClient: connect a Sui wallet first\");\n return {\n family: \"sui\",\n address: adapter.address,\n chainId: \"sui:mainnet\",\n capabilities,\n signMessage: function signMessage(message) {\n return adapter.signMessage(message);\n },\n signTransaction: async function signTransaction() {\n throw new import_types.UnsupportedClientMethodError(\"sui\", \"signTransaction\", txTodo);\n },\n signAndExecuteTransaction: async function signAndExecuteTransaction() {\n throw new import_types.UnsupportedClientMethodError(\"sui\", \"signAndExecuteTransaction\", txTodo);\n }\n };\n}\n//# sourceMappingURL=sui.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAACK,mBAAmB;AAClD,IAAIC,YAAY,GAAGN,MAAM,CAACO,SAAS,CAACC,cAAc;AAClD,IAAIC,QAAQ,GAAGA,CAACC,MAAM,EAAEC,GAAG,KAAK;EAC9B,KAAK,IAAIC,IAAI,IAAID,GAAG,EAClBZ,SAAS,CAACW,MAAM,EAAEE,IAAI,EAAE;IAAEC,GAAG,EAAEF,GAAG,CAACC,IAAI,CAAC;IAAEE,UAAU,EAAE;EAAK,CAAC,CAAC;AACjE,CAAC;AACD,IAAIC,WAAW,GAAGA,CAACC,EAAE,EAAEC,IAAI,EAAEC,MAAM,EAAEC,IAAI,KAAK;EAC5C,IAAIF,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,IAAI,OAAOA,IAAI,KAAK,UAAU,EAAE;IAClE,KAAK,IAAI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CAAA,EAAG;MAChD,MAAM,IAAIX,YAAY,CAACY,4BAA4B,CAAC,KAAK,EAAE,iBAAiB,EAAEV,MAAM,CAAC;IACvF,CAAC;IACDW,yBAAyB,EAAE,eAAeA,yBAAyBA,CAAA,EAAG;MACpE,MAAM,IAAIb,YAAY,CAACY,4BAA4B,CAAC,KAAK,EAAE,2BAA2B,EAAEV,MAAM,CAAC;IACjG;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var types_exports = {};
|
|
24
|
+
__export(types_exports, {
|
|
25
|
+
UnsupportedClientMethodError: () => UnsupportedClientMethodError
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(types_exports);
|
|
28
|
+
class UnsupportedClientMethodError extends Error {
|
|
29
|
+
constructor(family, method, detail) {
|
|
30
|
+
super(`${family} client: ${method} is not supported${detail ? ` (${detail})` : ""}`);
|
|
31
|
+
this.family = family;
|
|
32
|
+
this.method = method;
|
|
33
|
+
this.name = "UnsupportedClientMethodError";
|
|
34
|
+
}
|
|
35
|
+
family;
|
|
36
|
+
method;
|
|
37
|
+
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
+
value: true
|
|
24
|
+
}), mod);
|
|
25
|
+
var types_exports = {};
|
|
26
|
+
__export(types_exports, {
|
|
27
|
+
UnsupportedClientMethodError: () => UnsupportedClientMethodError
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(types_exports);
|
|
30
|
+
function _assert_this_initialized(self) {
|
|
31
|
+
if (self === void 0) {
|
|
32
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
33
|
+
}
|
|
34
|
+
return self;
|
|
35
|
+
}
|
|
36
|
+
function _call_super(_this, derived, args) {
|
|
37
|
+
derived = _get_prototype_of(derived);
|
|
38
|
+
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
39
|
+
}
|
|
40
|
+
function _class_call_check(instance, Constructor) {
|
|
41
|
+
if (!(instance instanceof Constructor)) {
|
|
42
|
+
throw new TypeError("Cannot call a class as a function");
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function _construct(Parent, args, Class) {
|
|
46
|
+
if (_is_native_reflect_construct()) {
|
|
47
|
+
_construct = Reflect.construct;
|
|
48
|
+
} else {
|
|
49
|
+
_construct = function construct(Parent2, args2, Class2) {
|
|
50
|
+
var a = [null];
|
|
51
|
+
a.push.apply(a, args2);
|
|
52
|
+
var Constructor = Function.bind.apply(Parent2, a);
|
|
53
|
+
var instance = new Constructor();
|
|
54
|
+
if (Class2) _set_prototype_of(instance, Class2.prototype);
|
|
55
|
+
return instance;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
return _construct.apply(null, arguments);
|
|
59
|
+
}
|
|
60
|
+
function _define_property(obj, key, value) {
|
|
61
|
+
if (key in obj) {
|
|
62
|
+
Object.defineProperty(obj, key, {
|
|
63
|
+
value,
|
|
64
|
+
enumerable: true,
|
|
65
|
+
configurable: true,
|
|
66
|
+
writable: true
|
|
67
|
+
});
|
|
68
|
+
} else {
|
|
69
|
+
obj[key] = value;
|
|
70
|
+
}
|
|
71
|
+
return obj;
|
|
72
|
+
}
|
|
73
|
+
function _get_prototype_of(o) {
|
|
74
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o2) {
|
|
75
|
+
return o2.__proto__ || Object.getPrototypeOf(o2);
|
|
76
|
+
};
|
|
77
|
+
return _get_prototype_of(o);
|
|
78
|
+
}
|
|
79
|
+
function _inherits(subClass, superClass) {
|
|
80
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
81
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
82
|
+
}
|
|
83
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
84
|
+
constructor: {
|
|
85
|
+
value: subClass,
|
|
86
|
+
writable: true,
|
|
87
|
+
configurable: true
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
91
|
+
}
|
|
92
|
+
function _is_native_function(fn) {
|
|
93
|
+
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
94
|
+
}
|
|
95
|
+
function _possible_constructor_return(self, call) {
|
|
96
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
97
|
+
return call;
|
|
98
|
+
}
|
|
99
|
+
return _assert_this_initialized(self);
|
|
100
|
+
}
|
|
101
|
+
function _set_prototype_of(o, p) {
|
|
102
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o2, p2) {
|
|
103
|
+
o2.__proto__ = p2;
|
|
104
|
+
return o2;
|
|
105
|
+
};
|
|
106
|
+
return _set_prototype_of(o, p);
|
|
107
|
+
}
|
|
108
|
+
function _type_of(obj) {
|
|
109
|
+
"@swc/helpers - typeof";
|
|
110
|
+
|
|
111
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
112
|
+
}
|
|
113
|
+
function _wrap_native_super(Class) {
|
|
114
|
+
var _cache = typeof Map === "function" ? /* @__PURE__ */new Map() : void 0;
|
|
115
|
+
_wrap_native_super = function wrapNativeSuper(Class2) {
|
|
116
|
+
if (Class2 === null || !_is_native_function(Class2)) return Class2;
|
|
117
|
+
if (typeof Class2 !== "function") {
|
|
118
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
119
|
+
}
|
|
120
|
+
if (typeof _cache !== "undefined") {
|
|
121
|
+
if (_cache.has(Class2)) return _cache.get(Class2);
|
|
122
|
+
_cache.set(Class2, Wrapper);
|
|
123
|
+
}
|
|
124
|
+
function Wrapper() {
|
|
125
|
+
return _construct(Class2, arguments, _get_prototype_of(this).constructor);
|
|
126
|
+
}
|
|
127
|
+
Wrapper.prototype = Object.create(Class2.prototype, {
|
|
128
|
+
constructor: {
|
|
129
|
+
value: Wrapper,
|
|
130
|
+
enumerable: false,
|
|
131
|
+
writable: true,
|
|
132
|
+
configurable: true
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
return _set_prototype_of(Wrapper, Class2);
|
|
136
|
+
};
|
|
137
|
+
return _wrap_native_super(Class);
|
|
138
|
+
}
|
|
139
|
+
function _is_native_reflect_construct() {
|
|
140
|
+
try {
|
|
141
|
+
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
142
|
+
} catch (_) {}
|
|
143
|
+
return (_is_native_reflect_construct = function () {
|
|
144
|
+
return !!result;
|
|
145
|
+
})();
|
|
146
|
+
}
|
|
147
|
+
var UnsupportedClientMethodError = /* @__PURE__ */function (Error1) {
|
|
148
|
+
"use strict";
|
|
149
|
+
|
|
150
|
+
_inherits(UnsupportedClientMethodError2, Error1);
|
|
151
|
+
function UnsupportedClientMethodError2(family, method, detail) {
|
|
152
|
+
_class_call_check(this, UnsupportedClientMethodError2);
|
|
153
|
+
var _this;
|
|
154
|
+
_this = _call_super(this, UnsupportedClientMethodError2, [`${family} client: ${method} is not supported${detail ? ` (${detail})` : ""}`]), _define_property(_this, "family", void 0), _define_property(_this, "method", void 0), _this.family = family, _this.method = method;
|
|
155
|
+
_this.name = "UnsupportedClientMethodError";
|
|
156
|
+
return _this;
|
|
157
|
+
}
|
|
158
|
+
return UnsupportedClientMethodError2;
|
|
159
|
+
}(_wrap_native_super(Error));
|
|
160
|
+
//# sourceMappingURL=types.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","types_exports","UnsupportedClientMethodError","module","exports","_assert_this_initialized","self","ReferenceError","_call_super","_this","derived","args","_get_prototype_of","_possible_constructor_return","_is_native_reflect_construct","Reflect","construct","constructor","apply","_class_call_check","instance","Constructor","TypeError","_construct","Parent","Class","Parent2","args2","Class2","a","push","Function","bind","_set_prototype_of","arguments","_define_property","obj","configurable","writable","o","setPrototypeOf","getPrototypeOf","o2","__proto__","_inherits","subClass","superClass","create","_is_native_function","fn","toString","indexOf","_type_of","p","p2","Symbol","_wrap_native_super","_cache","Map","wrapNativeSuper","has","set","Wrapper","result","Boolean","valueOf","_","Error1","UnsupportedClientMethodError2","family","method","detail","Error"],"sources":["types.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar types_exports = {};\n__export(types_exports, {\n UnsupportedClientMethodError: () => UnsupportedClientMethodError\n});\nmodule.exports = __toCommonJS(types_exports);\nfunction _assert_this_initialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}\nfunction _call_super(_this, derived, args) {\n derived = _get_prototype_of(derived);\n return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));\n}\nfunction _class_call_check(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\nfunction _construct(Parent, args, Class) {\n if (_is_native_reflect_construct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function construct(Parent2, args2, Class2) {\n var a = [\n null\n ];\n a.push.apply(a, args2);\n var Constructor = Function.bind.apply(Parent2, a);\n var instance = new Constructor();\n if (Class2) _set_prototype_of(instance, Class2.prototype);\n return instance;\n };\n }\n return _construct.apply(null, arguments);\n}\nfunction _define_property(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _get_prototype_of(o) {\n _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o2) {\n return o2.__proto__ || Object.getPrototypeOf(o2);\n };\n return _get_prototype_of(o);\n}\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _set_prototype_of(subClass, superClass);\n}\nfunction _is_native_function(fn) {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n}\nfunction _possible_constructor_return(self, call) {\n if (call && (_type_of(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n return _assert_this_initialized(self);\n}\nfunction _set_prototype_of(o, p) {\n _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o2, p2) {\n o2.__proto__ = p2;\n return o2;\n };\n return _set_prototype_of(o, p);\n}\nfunction _type_of(obj) {\n \"@swc/helpers - typeof\";\n return obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\nfunction _wrap_native_super(Class) {\n var _cache = typeof Map === \"function\" ? /* @__PURE__ */ new Map() : void 0;\n _wrap_native_super = function wrapNativeSuper(Class2) {\n if (Class2 === null || !_is_native_function(Class2)) return Class2;\n if (typeof Class2 !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class2)) return _cache.get(Class2);\n _cache.set(Class2, Wrapper);\n }\n function Wrapper() {\n return _construct(Class2, arguments, _get_prototype_of(this).constructor);\n }\n Wrapper.prototype = Object.create(Class2.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return _set_prototype_of(Wrapper, Class2);\n };\n return _wrap_native_super(Class);\n}\nfunction _is_native_reflect_construct() {\n try {\n var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {\n }));\n } catch (_) {\n }\n return (_is_native_reflect_construct = function() {\n return !!result;\n })();\n}\nvar UnsupportedClientMethodError = /* @__PURE__ */ (function(Error1) {\n \"use strict\";\n _inherits(UnsupportedClientMethodError2, Error1);\n function UnsupportedClientMethodError2(family, method, detail) {\n _class_call_check(this, UnsupportedClientMethodError2);\n var _this;\n _this = _call_super(this, UnsupportedClientMethodError2, [\n `${family} client: ${method} is not supported${detail ? ` (${detail})` : \"\"}`\n ]), _define_property(_this, \"family\", void 0), _define_property(_this, \"method\", void 0), _this.family = family, _this.method = method;\n _this.name = \"UnsupportedClientMethodError\";\n return _this;\n }\n return UnsupportedClientMethodError2;\n})(_wrap_native_super(Error));\n//# sourceMappingURL=types.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAACK,mBAAmB;AAClD,IAAIC,YAAY,GAAGN,MAAM,CAACO,SAAS,CAACC,cAAc;AAClD,IAAIC,QAAQ,GAAGA,CAACC,MAAM,EAAEC,GAAG,KAAK;EAC9B,KAAK,IAAIC,IAAI,IAAID,GAAG,EAClBZ,SAAS,CAACW,MAAM,EAAEE,IAAI,E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C,MAAM,GAAG,KAAKA,MAAM,GAAG,GAAG,EAAE,EAAE,CAC9E,CAAC,EAAEpC,gBAAgB,CAAC1B,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,EAAE0B,gBAAgB,CAAC1B,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,EAAEA,KAAK,CAAC4D,MAAM,GAAGA,MAAM,EAAE5D,KAAK,CAAC6D,MAAM,GAAGA,MAAM;IACtI7D,KAAK,CAACrB,IAAI,GAAG,8BAA8B;IAC3C,OAAOqB,KAAK;EACd;EACA,OAAO2D,6BAA6B;AACtC,CAAC,CAAEZ,kBAAkB,CAACgB,KAAK,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var useSolanaClient_exports = {};
|
|
24
|
+
__export(useSolanaClient_exports, {
|
|
25
|
+
useSolanaClient: () => useSolanaClient
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(useSolanaClient_exports);
|
|
28
|
+
var import_react = require("react");
|
|
29
|
+
var import_wagmi = require("wagmi");
|
|
30
|
+
var import_walletConfig = require("../providers/walletConfig.cjs");
|
|
31
|
+
var import_adapter = require("./adapter.cjs");
|
|
32
|
+
var import_solana = require("./solana.cjs");
|
|
33
|
+
function useSolanaClient(options = {}) {
|
|
34
|
+
const {
|
|
35
|
+
connector,
|
|
36
|
+
address
|
|
37
|
+
} = (0, import_wagmi.useAccount)();
|
|
38
|
+
const config = (0, import_react.useContext)(import_walletConfig.Web3ConfigContext);
|
|
39
|
+
const rpcUrl = options.rpcUrl ?? config?.solanaRpcUrl;
|
|
40
|
+
const chain = options.chain ?? (0, import_solana.solanaChainFromRpcUrl)(rpcUrl);
|
|
41
|
+
return (0, import_react.useMemo)(() => {
|
|
42
|
+
const adapter = (0, import_adapter.connectorAdapter)(connector, "solana");
|
|
43
|
+
if (!adapter?.address) return void 0;
|
|
44
|
+
return (0, import_solana.solanaClient)({
|
|
45
|
+
signer: (0, import_solana.injectedSolanaSigner)(adapter, chain),
|
|
46
|
+
rpcUrl,
|
|
47
|
+
chain
|
|
48
|
+
});
|
|
49
|
+
}, [connector, address, rpcUrl, chain]);
|
|
50
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
+
value: true
|
|
24
|
+
}), mod);
|
|
25
|
+
var useSolanaClient_exports = {};
|
|
26
|
+
__export(useSolanaClient_exports, {
|
|
27
|
+
useSolanaClient: () => useSolanaClient
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(useSolanaClient_exports);
|
|
30
|
+
var import_react = require("react");
|
|
31
|
+
var import_wagmi = require("wagmi");
|
|
32
|
+
var import_walletConfig = require("../providers/walletConfig.native.js");
|
|
33
|
+
var import_adapter = require("./adapter.native.js");
|
|
34
|
+
var import_solana = require("./solana.native.js");
|
|
35
|
+
function useSolanaClient() {
|
|
36
|
+
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
37
|
+
var _options_rpcUrl, _options_chain;
|
|
38
|
+
var {
|
|
39
|
+
connector,
|
|
40
|
+
address
|
|
41
|
+
} = (0, import_wagmi.useAccount)();
|
|
42
|
+
var config = (0, import_react.useContext)(import_walletConfig.Web3ConfigContext);
|
|
43
|
+
var rpcUrl = (_options_rpcUrl = options.rpcUrl) !== null && _options_rpcUrl !== void 0 ? _options_rpcUrl : config === null || config === void 0 ? void 0 : config.solanaRpcUrl;
|
|
44
|
+
var chain = (_options_chain = options.chain) !== null && _options_chain !== void 0 ? _options_chain : (0, import_solana.solanaChainFromRpcUrl)(rpcUrl);
|
|
45
|
+
return (0, import_react.useMemo)(function () {
|
|
46
|
+
var adapter = (0, import_adapter.connectorAdapter)(connector, "solana");
|
|
47
|
+
if (!(adapter === null || adapter === void 0 ? void 0 : adapter.address)) return void 0;
|
|
48
|
+
return (0, import_solana.solanaClient)({
|
|
49
|
+
signer: (0, import_solana.injectedSolanaSigner)(adapter, chain),
|
|
50
|
+
rpcUrl,
|
|
51
|
+
chain
|
|
52
|
+
});
|
|
53
|
+
},
|
|
54
|
+
// address is a dependency so an account switch inside one connector rebuilds the client
|
|
55
|
+
[connector, address, rpcUrl, chain]);
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=useSolanaClient.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","useSolanaClient_exports","useSolanaClient","module","exports","import_react","require","import_wagmi","import_walletConfig","import_adapter","import_solana","options","arguments","length","_options_rpcUrl","_options_chain","connector","address","useAccount","config","useContext","Web3ConfigContext","rpcUrl","solanaRpcUrl","chain","solanaChainFromRpcUrl","useMemo","adapter","connectorAdapter","solanaClient","signer","injectedSolanaSigner"],"sources":["useSolanaClient.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar useSolanaClient_exports = {};\n__export(useSolanaClient_exports, {\n useSolanaClient: () => useSolanaClient\n});\nmodule.exports = __toCommonJS(useSolanaClient_exports);\nvar import_react = require(\"react\");\nvar import_wagmi = require(\"wagmi\");\nvar import_walletConfig = require(\"../providers/walletConfig\");\nvar import_adapter = require(\"./adapter\");\nvar import_solana = require(\"./solana\");\nfunction useSolanaClient() {\n var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n var _options_rpcUrl, _options_chain;\n var { connector, address } = (0, import_wagmi.useAccount)();\n var config = (0, import_react.useContext)(import_walletConfig.Web3ConfigContext);\n var rpcUrl = (_options_rpcUrl = options.rpcUrl) !== null && _options_rpcUrl !== void 0 ? _options_rpcUrl : config === null || config === void 0 ? void 0 : config.solanaRpcUrl;\n var chain = (_options_chain = options.chain) !== null && _options_chain !== void 0 ? _options_chain : (0, import_solana.solanaChainFromRpcUrl)(rpcUrl);\n return (0, import_react.useMemo)(\n function() {\n var adapter = (0, import_adapter.connectorAdapter)(connector, \"solana\");\n if (!(adapter === null || adapter === void 0 ? void 0 : adapter.address)) return void 0;\n return (0, import_solana.solanaClient)({\n signer: (0, import_solana.injectedSolanaSigner)(adapter, chain),\n rpcUrl,\n chain\n });\n },\n // address is a dependency so an account switch inside one connector rebuilds the client\n [\n connector,\n address,\n rpcUrl,\n chain\n ]\n );\n}\n//# sourceMappingURL=useSolanaClient.js.map\n"],"mappings":"AAAA,YAAY;;AACZ,IAAIA,SAAS,GAAGC,MAAM,CAACC,cAAc;AACrC,IAAIC,gBAAgB,GAAGF,MAAM,CAACG,wBAAwB;AACtD,IAAIC,iBAAiB,GAAGJ,MAAM,CAACK,mBAAmB;AAClD,IAAIC,YAAY,GAAGN,MAAM,CAACO,SAAS,CAACC,cAAc;AAClD,IAAIC,QAAQ,GAAGA,CAACC,MAAM,EAAEC,GAAG,KAAK;EAC9B,KAAK,IAAIC,IAAI,IAAID,GAAG,EAClBZ,SAAS,CAACW,MAAM,EAAEE,IAAI,EAAE;IAAEC,GAAG,EAAEF,GAAG,CAACC,IAAI,CAAC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pB,aAAa,CAACqB,oBAAoB,EAAEJ,OAAO,EAAEH,KAAK,CAAC;MAC/DF,MAAM;MACNE;IACF,CAAC,CAAC;EACJ,CAAC;EACD;EACA,CACER,SAAS,EACTC,OAAO,EACPK,MAAM,EACNE,KAAK,CAET,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
14
|
+
get: () => from[key],
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
+
value: true
|
|
22
|
+
}), mod);
|
|
23
|
+
var walletStandard_exports = {};
|
|
24
|
+
__export(walletStandard_exports, {
|
|
25
|
+
SolanaSignAndSendTransaction: () => SolanaSignAndSendTransaction,
|
|
26
|
+
SolanaSignMessage: () => SolanaSignMessage,
|
|
27
|
+
SolanaSignTransaction: () => SolanaSignTransaction,
|
|
28
|
+
StandardConnect: () => StandardConnect,
|
|
29
|
+
getSolanaWallets: () => getSolanaWallets,
|
|
30
|
+
getStandardWallets: () => getStandardWallets
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(walletStandard_exports);
|
|
33
|
+
const SolanaSignMessage = "solana:signMessage";
|
|
34
|
+
const SolanaSignTransaction = "solana:signTransaction";
|
|
35
|
+
const SolanaSignAndSendTransaction = "solana:signAndSendTransaction";
|
|
36
|
+
const StandardConnect = "standard:connect";
|
|
37
|
+
function getStandardWallets() {
|
|
38
|
+
if (typeof window === "undefined") return [];
|
|
39
|
+
const wallets = [];
|
|
40
|
+
const api = {
|
|
41
|
+
register: (...registered) => {
|
|
42
|
+
wallets.push(...registered);
|
|
43
|
+
return () => {};
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
const onRegister = event => {
|
|
47
|
+
try {
|
|
48
|
+
event.detail(api);
|
|
49
|
+
} catch {}
|
|
50
|
+
};
|
|
51
|
+
window.addEventListener("wallet-standard:register-wallet", onRegister);
|
|
52
|
+
try {
|
|
53
|
+
window.dispatchEvent(new CustomEvent("wallet-standard:app-ready", {
|
|
54
|
+
detail: api
|
|
55
|
+
}));
|
|
56
|
+
} finally {
|
|
57
|
+
window.removeEventListener("wallet-standard:register-wallet", onRegister);
|
|
58
|
+
}
|
|
59
|
+
return [...new Set(wallets)];
|
|
60
|
+
}
|
|
61
|
+
function getSolanaWallets() {
|
|
62
|
+
return getStandardWallets().filter(wallet => wallet.features[SolanaSignTransaction] && wallet.features[StandardConnect]);
|
|
63
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: () => from[key],
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
23
|
+
value: true
|
|
24
|
+
}), mod);
|
|
25
|
+
var walletStandard_exports = {};
|
|
26
|
+
__export(walletStandard_exports, {
|
|
27
|
+
SolanaSignAndSendTransaction: () => SolanaSignAndSendTransaction,
|
|
28
|
+
SolanaSignMessage: () => SolanaSignMessage,
|
|
29
|
+
SolanaSignTransaction: () => SolanaSignTransaction,
|
|
30
|
+
StandardConnect: () => StandardConnect,
|
|
31
|
+
getSolanaWallets: () => getSolanaWallets,
|
|
32
|
+
getStandardWallets: () => getStandardWallets
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(walletStandard_exports);
|
|
35
|
+
var SolanaSignMessage = "solana:signMessage";
|
|
36
|
+
var SolanaSignTransaction = "solana:signTransaction";
|
|
37
|
+
var SolanaSignAndSendTransaction = "solana:signAndSendTransaction";
|
|
38
|
+
var StandardConnect = "standard:connect";
|
|
39
|
+
function getStandardWallets() {
|
|
40
|
+
if (typeof window === "undefined") return [];
|
|
41
|
+
var wallets = [];
|
|
42
|
+
var api = {
|
|
43
|
+
register: function register() {
|
|
44
|
+
for (var _len = arguments.length, registered = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
45
|
+
registered[_key] = arguments[_key];
|
|
46
|
+
}
|
|
47
|
+
wallets.push(...registered);
|
|
48
|
+
return function () {};
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
var onRegister = function onRegister2(event) {
|
|
52
|
+
try {
|
|
53
|
+
event.detail(api);
|
|
54
|
+
} catch (unused) {}
|
|
55
|
+
};
|
|
56
|
+
window.addEventListener("wallet-standard:register-wallet", onRegister);
|
|
57
|
+
try {
|
|
58
|
+
window.dispatchEvent(new CustomEvent("wallet-standard:app-ready", {
|
|
59
|
+
detail: api
|
|
60
|
+
}));
|
|
61
|
+
} finally {
|
|
62
|
+
window.removeEventListener("wallet-standard:register-wallet", onRegister);
|
|
63
|
+
}
|
|
64
|
+
return [...new Set(wallets)];
|
|
65
|
+
}
|
|
66
|
+
function getSolanaWallets() {
|
|
67
|
+
return getStandardWallets().filter(function (wallet) {
|
|
68
|
+
return wallet.features[SolanaSignTransaction] && wallet.features[StandardConnect];
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=walletStandard.native.js.map
|