@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,511 @@
|
|
|
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 solana_exports = {};
|
|
26
|
+
__export(solana_exports, {
|
|
27
|
+
SolanaConfirmationError: () => SolanaConfirmationError,
|
|
28
|
+
connectSolanaWallet: () => connectSolanaWallet,
|
|
29
|
+
findSolanaSigner: () => findSolanaSigner,
|
|
30
|
+
injectedSolanaSigner: () => injectedSolanaSigner,
|
|
31
|
+
solanaChainFromRpcUrl: () => solanaChainFromRpcUrl,
|
|
32
|
+
solanaClient: () => solanaClient,
|
|
33
|
+
solanaRpcUrls: () => solanaRpcUrls,
|
|
34
|
+
standardSolanaSigner: () => standardSolanaSigner,
|
|
35
|
+
transferSolInstruction: () => transferSolInstruction
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(solana_exports);
|
|
38
|
+
var import_kit = require("@solana/kit");
|
|
39
|
+
var import_types = require("./types.native.js");
|
|
40
|
+
var import_walletStandard = require("./walletStandard.native.js");
|
|
41
|
+
function _assert_this_initialized(self) {
|
|
42
|
+
if (self === void 0) {
|
|
43
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
44
|
+
}
|
|
45
|
+
return self;
|
|
46
|
+
}
|
|
47
|
+
function _call_super(_this, derived, args) {
|
|
48
|
+
derived = _get_prototype_of(derived);
|
|
49
|
+
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
50
|
+
}
|
|
51
|
+
function _class_call_check(instance, Constructor) {
|
|
52
|
+
if (!(instance instanceof Constructor)) {
|
|
53
|
+
throw new TypeError("Cannot call a class as a function");
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function _construct(Parent, args, Class) {
|
|
57
|
+
if (_is_native_reflect_construct()) {
|
|
58
|
+
_construct = Reflect.construct;
|
|
59
|
+
} else {
|
|
60
|
+
_construct = function construct(Parent2, args2, Class2) {
|
|
61
|
+
var a = [null];
|
|
62
|
+
a.push.apply(a, args2);
|
|
63
|
+
var Constructor = Function.bind.apply(Parent2, a);
|
|
64
|
+
var instance = new Constructor();
|
|
65
|
+
if (Class2) _set_prototype_of(instance, Class2.prototype);
|
|
66
|
+
return instance;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
return _construct.apply(null, arguments);
|
|
70
|
+
}
|
|
71
|
+
function _define_property(obj, key, value) {
|
|
72
|
+
if (key in obj) {
|
|
73
|
+
Object.defineProperty(obj, key, {
|
|
74
|
+
value,
|
|
75
|
+
enumerable: true,
|
|
76
|
+
configurable: true,
|
|
77
|
+
writable: true
|
|
78
|
+
});
|
|
79
|
+
} else {
|
|
80
|
+
obj[key] = value;
|
|
81
|
+
}
|
|
82
|
+
return obj;
|
|
83
|
+
}
|
|
84
|
+
function _get_prototype_of(o) {
|
|
85
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o2) {
|
|
86
|
+
return o2.__proto__ || Object.getPrototypeOf(o2);
|
|
87
|
+
};
|
|
88
|
+
return _get_prototype_of(o);
|
|
89
|
+
}
|
|
90
|
+
function _inherits(subClass, superClass) {
|
|
91
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
92
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
93
|
+
}
|
|
94
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
95
|
+
constructor: {
|
|
96
|
+
value: subClass,
|
|
97
|
+
writable: true,
|
|
98
|
+
configurable: true
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
102
|
+
}
|
|
103
|
+
function _instanceof(left, right) {
|
|
104
|
+
"@swc/helpers - instanceof";
|
|
105
|
+
|
|
106
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
107
|
+
return !!right[Symbol.hasInstance](left);
|
|
108
|
+
} else {
|
|
109
|
+
return left instanceof right;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
function _is_native_function(fn) {
|
|
113
|
+
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
114
|
+
}
|
|
115
|
+
function _possible_constructor_return(self, call) {
|
|
116
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
117
|
+
return call;
|
|
118
|
+
}
|
|
119
|
+
return _assert_this_initialized(self);
|
|
120
|
+
}
|
|
121
|
+
function _set_prototype_of(o, p) {
|
|
122
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o2, p2) {
|
|
123
|
+
o2.__proto__ = p2;
|
|
124
|
+
return o2;
|
|
125
|
+
};
|
|
126
|
+
return _set_prototype_of(o, p);
|
|
127
|
+
}
|
|
128
|
+
function _type_of(obj) {
|
|
129
|
+
"@swc/helpers - typeof";
|
|
130
|
+
|
|
131
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
132
|
+
}
|
|
133
|
+
function _wrap_native_super(Class) {
|
|
134
|
+
var _cache = typeof Map === "function" ? /* @__PURE__ */new Map() : void 0;
|
|
135
|
+
_wrap_native_super = function wrapNativeSuper(Class2) {
|
|
136
|
+
if (Class2 === null || !_is_native_function(Class2)) return Class2;
|
|
137
|
+
if (typeof Class2 !== "function") {
|
|
138
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
139
|
+
}
|
|
140
|
+
if (typeof _cache !== "undefined") {
|
|
141
|
+
if (_cache.has(Class2)) return _cache.get(Class2);
|
|
142
|
+
_cache.set(Class2, Wrapper);
|
|
143
|
+
}
|
|
144
|
+
function Wrapper() {
|
|
145
|
+
return _construct(Class2, arguments, _get_prototype_of(this).constructor);
|
|
146
|
+
}
|
|
147
|
+
Wrapper.prototype = Object.create(Class2.prototype, {
|
|
148
|
+
constructor: {
|
|
149
|
+
value: Wrapper,
|
|
150
|
+
enumerable: false,
|
|
151
|
+
writable: true,
|
|
152
|
+
configurable: true
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
return _set_prototype_of(Wrapper, Class2);
|
|
156
|
+
};
|
|
157
|
+
return _wrap_native_super(Class);
|
|
158
|
+
}
|
|
159
|
+
function _is_native_reflect_construct() {
|
|
160
|
+
try {
|
|
161
|
+
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
162
|
+
} catch (_) {}
|
|
163
|
+
return (_is_native_reflect_construct = function () {
|
|
164
|
+
return !!result;
|
|
165
|
+
})();
|
|
166
|
+
}
|
|
167
|
+
var solanaRpcUrls = {
|
|
168
|
+
"solana:mainnet": "https://api.mainnet-beta.solana.com",
|
|
169
|
+
"solana:devnet": "https://api.devnet.solana.com",
|
|
170
|
+
"solana:testnet": "https://api.testnet.solana.com",
|
|
171
|
+
"solana:localnet": "http://127.0.0.1:8899"
|
|
172
|
+
};
|
|
173
|
+
function solanaChainFromRpcUrl(rpcUrl) {
|
|
174
|
+
if (!rpcUrl) return "solana:mainnet";
|
|
175
|
+
if (/devnet/i.test(rpcUrl)) return "solana:devnet";
|
|
176
|
+
if (/testnet/i.test(rpcUrl)) return "solana:testnet";
|
|
177
|
+
if (/\/\/(localhost|127\.0\.0\.1|10\.0\.2\.2|\[::1\])[:/]/i.test(rpcUrl)) return "solana:localnet";
|
|
178
|
+
return "solana:mainnet";
|
|
179
|
+
}
|
|
180
|
+
var SolanaConfirmationError = /* @__PURE__ */function (Error1) {
|
|
181
|
+
"use strict";
|
|
182
|
+
|
|
183
|
+
_inherits(SolanaConfirmationError2, Error1);
|
|
184
|
+
function SolanaConfirmationError2(signature, reason, detail) {
|
|
185
|
+
_class_call_check(this, SolanaConfirmationError2);
|
|
186
|
+
var _this;
|
|
187
|
+
var mayStillLand = reason === "timeout";
|
|
188
|
+
_this = _call_super(this, SolanaConfirmationError2, [`solana transaction ${signature} ${detail}; ${mayStillLand ? "it may still land, so do not resend it until its blockhash expires" : "it will not land, so it is safe to retry"}`]), _define_property(_this, "signature", void 0), _define_property(_this, "reason", void 0), _define_property(_this, "mayStillLand", void 0), _this.signature = signature, _this.reason = reason;
|
|
189
|
+
_this.name = "SolanaConfirmationError";
|
|
190
|
+
_this.mayStillLand = mayStillLand;
|
|
191
|
+
return _this;
|
|
192
|
+
}
|
|
193
|
+
return SolanaConfirmationError2;
|
|
194
|
+
}(_wrap_native_super(Error));
|
|
195
|
+
var capabilities = ["signMessage", "signTransaction", "signAndSendTransaction", "sendTransaction"];
|
|
196
|
+
var systemProgram = (0, import_kit.address)("11111111111111111111111111111111");
|
|
197
|
+
var maxU64 = 0xffffffffffffffffn;
|
|
198
|
+
function transferSolInstruction(from, to, lamports) {
|
|
199
|
+
if (lamports < 0n || lamports > maxU64) {
|
|
200
|
+
throw new RangeError(`lamports must fit a u64, got ${lamports}`);
|
|
201
|
+
}
|
|
202
|
+
var data = new Uint8Array(12);
|
|
203
|
+
data[0] = 2;
|
|
204
|
+
var value = lamports;
|
|
205
|
+
for (var i = 4; i < 12; i++) {
|
|
206
|
+
data[i] = Number(value & 0xffn);
|
|
207
|
+
value >>= 8n;
|
|
208
|
+
}
|
|
209
|
+
return {
|
|
210
|
+
programAddress: systemProgram,
|
|
211
|
+
accounts: [{
|
|
212
|
+
address: from,
|
|
213
|
+
role: import_kit.AccountRole.WRITABLE_SIGNER
|
|
214
|
+
}, {
|
|
215
|
+
address: to,
|
|
216
|
+
role: import_kit.AccountRole.WRITABLE
|
|
217
|
+
}],
|
|
218
|
+
data
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
var toWire = function toWire2(transaction) {
|
|
222
|
+
return _instanceof(transaction, Uint8Array) ? transaction : Uint8Array.from((0, import_kit.getTransactionEncoder)().encode(transaction));
|
|
223
|
+
};
|
|
224
|
+
var fromWire = function fromWire2(bytes) {
|
|
225
|
+
return (0, import_kit.getTransactionDecoder)().decode(bytes);
|
|
226
|
+
};
|
|
227
|
+
var toSignature = function toSignature2(bytes) {
|
|
228
|
+
return (0, import_kit.getBase58Decoder)().decode(bytes);
|
|
229
|
+
};
|
|
230
|
+
var sleep = function sleep2(ms) {
|
|
231
|
+
return new Promise(function (resolve) {
|
|
232
|
+
return setTimeout(resolve, ms);
|
|
233
|
+
});
|
|
234
|
+
};
|
|
235
|
+
var lastValidBlockHeightOf = function lastValidBlockHeightOf2(transaction) {
|
|
236
|
+
if (_instanceof(transaction, Uint8Array)) return void 0;
|
|
237
|
+
var lifetime = transaction.lifetimeConstraint;
|
|
238
|
+
return lifetime === null || lifetime === void 0 ? void 0 : lifetime.lastValidBlockHeight;
|
|
239
|
+
};
|
|
240
|
+
var reached = function reached2(status, commitment) {
|
|
241
|
+
return (status === null || status === void 0 ? void 0 : status.confirmationStatus) === "finalized" || commitment === "confirmed" && (status === null || status === void 0 ? void 0 : status.confirmationStatus) === "confirmed";
|
|
242
|
+
};
|
|
243
|
+
function solanaClient(config) {
|
|
244
|
+
var _config_chain, _config_rpc, _config_rpcUrl;
|
|
245
|
+
var {
|
|
246
|
+
signer
|
|
247
|
+
} = config;
|
|
248
|
+
var chain = (_config_chain = config.chain) !== null && _config_chain !== void 0 ? _config_chain : solanaChainFromRpcUrl(config.rpcUrl);
|
|
249
|
+
var rpc = (_config_rpc = config.rpc) !== null && _config_rpc !== void 0 ? _config_rpc : (0, import_kit.createSolanaRpc)((_config_rpcUrl = config.rpcUrl) !== null && _config_rpcUrl !== void 0 ? _config_rpcUrl : solanaRpcUrls[chain]);
|
|
250
|
+
var owner = (0, import_kit.address)(signer.address);
|
|
251
|
+
var signTransaction = async function signTransaction2(transaction) {
|
|
252
|
+
return fromWire(await signer.signTransaction(toWire(transaction)));
|
|
253
|
+
};
|
|
254
|
+
var broadcast = function broadcast2(transaction) {
|
|
255
|
+
var tx = _instanceof(transaction, Uint8Array) ? fromWire(transaction) : transaction;
|
|
256
|
+
return rpc.sendTransaction((0, import_kit.getBase64EncodedWireTransaction)(tx), {
|
|
257
|
+
encoding: "base64"
|
|
258
|
+
}).send();
|
|
259
|
+
};
|
|
260
|
+
var sendTransaction = async function sendTransaction2(transaction) {
|
|
261
|
+
return {
|
|
262
|
+
signature: await broadcast(transaction),
|
|
263
|
+
lastValidBlockHeight: lastValidBlockHeightOf(transaction)
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
var signAndSendTransaction = async function signAndSendTransaction2(transaction) {
|
|
267
|
+
var lastValidBlockHeight = lastValidBlockHeightOf(transaction);
|
|
268
|
+
var wire = toWire(transaction);
|
|
269
|
+
if (signer.signAndSendTransaction) {
|
|
270
|
+
try {
|
|
271
|
+
var signature = toSignature(await signer.signAndSendTransaction(wire));
|
|
272
|
+
return {
|
|
273
|
+
signature,
|
|
274
|
+
lastValidBlockHeight
|
|
275
|
+
};
|
|
276
|
+
} catch (error) {
|
|
277
|
+
if (!_instanceof(error, import_types.UnsupportedClientMethodError)) throw error;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
return {
|
|
281
|
+
signature: await broadcast(await signer.signTransaction(wire)),
|
|
282
|
+
lastValidBlockHeight
|
|
283
|
+
};
|
|
284
|
+
};
|
|
285
|
+
var statusOf = async function statusOf2(signature) {
|
|
286
|
+
var {
|
|
287
|
+
value
|
|
288
|
+
} = await rpc.getSignatureStatuses([signature], {
|
|
289
|
+
searchTransactionHistory: true
|
|
290
|
+
}).send();
|
|
291
|
+
var status = value[0];
|
|
292
|
+
if (status === null || status === void 0 ? void 0 : status.err) {
|
|
293
|
+
throw new SolanaConfirmationError(signature, "failed", `failed on chain: ${JSON.stringify(status.err, function (_, v) {
|
|
294
|
+
return (typeof v === "undefined" ? "undefined" : _type_of(v)) === "bigint" ? `${v}` : v;
|
|
295
|
+
})}`);
|
|
296
|
+
}
|
|
297
|
+
return status;
|
|
298
|
+
};
|
|
299
|
+
return {
|
|
300
|
+
family: "solana",
|
|
301
|
+
address: owner,
|
|
302
|
+
chainId: chain,
|
|
303
|
+
capabilities,
|
|
304
|
+
rpc,
|
|
305
|
+
signer,
|
|
306
|
+
async signMessage(message) {
|
|
307
|
+
var bytes = typeof message === "string" ? new TextEncoder().encode(message) : message;
|
|
308
|
+
return (0, import_kit.getBase58Decoder)().decode(await signer.signMessage(bytes));
|
|
309
|
+
},
|
|
310
|
+
signTransaction,
|
|
311
|
+
signAndSendTransaction,
|
|
312
|
+
sendTransaction,
|
|
313
|
+
async confirmTransaction(submission) {
|
|
314
|
+
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
315
|
+
var {
|
|
316
|
+
signature,
|
|
317
|
+
lastValidBlockHeight: submitted
|
|
318
|
+
} = typeof submission === "string" ? {
|
|
319
|
+
signature: submission
|
|
320
|
+
} : submission;
|
|
321
|
+
var {
|
|
322
|
+
commitment = "confirmed",
|
|
323
|
+
lastValidBlockHeight = submitted,
|
|
324
|
+
timeoutMs = 9e4,
|
|
325
|
+
pollMs = 500
|
|
326
|
+
} = options;
|
|
327
|
+
var deadline = Date.now() + timeoutMs;
|
|
328
|
+
for (;;) {
|
|
329
|
+
if (reached(await statusOf(signature), commitment)) return;
|
|
330
|
+
if (lastValidBlockHeight !== void 0) {
|
|
331
|
+
var height = await rpc.getBlockHeight({
|
|
332
|
+
commitment
|
|
333
|
+
}).send();
|
|
334
|
+
if (height > lastValidBlockHeight) {
|
|
335
|
+
var status = await statusOf(signature);
|
|
336
|
+
if (reached(status, commitment)) return;
|
|
337
|
+
if (!status) {
|
|
338
|
+
throw new SolanaConfirmationError(signature, "expired", `expired: block height ${height} passed ${lastValidBlockHeight}`);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
} else if (Date.now() > deadline) {
|
|
342
|
+
throw new SolanaConfirmationError(signature, "timeout", `not ${commitment} after ${timeoutMs}ms`);
|
|
343
|
+
}
|
|
344
|
+
await sleep(pollMs);
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
async getBalance(target) {
|
|
348
|
+
var {
|
|
349
|
+
value
|
|
350
|
+
} = await rpc.getBalance(target ? (0, import_kit.address)(target) : owner).send();
|
|
351
|
+
return value;
|
|
352
|
+
},
|
|
353
|
+
async transferSol(param) {
|
|
354
|
+
var {
|
|
355
|
+
to,
|
|
356
|
+
lamports
|
|
357
|
+
} = param;
|
|
358
|
+
var {
|
|
359
|
+
value: latestBlockhash
|
|
360
|
+
} = await rpc.getLatestBlockhash().send();
|
|
361
|
+
var message = (0, import_kit.pipe)((0, import_kit.createTransactionMessage)({
|
|
362
|
+
version: 0
|
|
363
|
+
}), function (m) {
|
|
364
|
+
return (0, import_kit.setTransactionMessageFeePayer)(owner, m);
|
|
365
|
+
}, function (m) {
|
|
366
|
+
return (0, import_kit.setTransactionMessageLifetimeUsingBlockhash)(latestBlockhash, m);
|
|
367
|
+
}, function (m) {
|
|
368
|
+
return (0, import_kit.appendTransactionMessageInstruction)(transferSolInstruction(owner, (0, import_kit.address)(to), lamports), m);
|
|
369
|
+
});
|
|
370
|
+
var {
|
|
371
|
+
signature
|
|
372
|
+
} = await signAndSendTransaction((0, import_kit.compileTransaction)(message));
|
|
373
|
+
return {
|
|
374
|
+
signature,
|
|
375
|
+
lastValidBlockHeight: latestBlockhash.lastValidBlockHeight
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
function walletFeature(wallet, name) {
|
|
381
|
+
var feature = wallet.features[name];
|
|
382
|
+
if (!feature) {
|
|
383
|
+
throw new import_types.UnsupportedClientMethodError("solana", name, `${wallet.name} does not implement it`);
|
|
384
|
+
}
|
|
385
|
+
return feature;
|
|
386
|
+
}
|
|
387
|
+
function standardSolanaSigner(wallet, account) {
|
|
388
|
+
var chain = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "solana:mainnet";
|
|
389
|
+
var signer = {
|
|
390
|
+
address: account.address,
|
|
391
|
+
async signMessage(message) {
|
|
392
|
+
var feature = walletFeature(wallet, import_walletStandard.SolanaSignMessage);
|
|
393
|
+
var [output] = await feature.signMessage({
|
|
394
|
+
account,
|
|
395
|
+
message
|
|
396
|
+
});
|
|
397
|
+
return output.signature;
|
|
398
|
+
},
|
|
399
|
+
async signTransaction(transaction) {
|
|
400
|
+
var feature = walletFeature(wallet, import_walletStandard.SolanaSignTransaction);
|
|
401
|
+
var [output] = await feature.signTransaction({
|
|
402
|
+
account,
|
|
403
|
+
transaction,
|
|
404
|
+
chain
|
|
405
|
+
});
|
|
406
|
+
return output.signedTransaction;
|
|
407
|
+
}
|
|
408
|
+
};
|
|
409
|
+
if (wallet.features[import_walletStandard.SolanaSignAndSendTransaction]) {
|
|
410
|
+
signer.signAndSendTransaction = async function (transaction) {
|
|
411
|
+
var feature = walletFeature(wallet, import_walletStandard.SolanaSignAndSendTransaction);
|
|
412
|
+
var [output] = await feature.signAndSendTransaction({
|
|
413
|
+
account,
|
|
414
|
+
transaction,
|
|
415
|
+
chain
|
|
416
|
+
});
|
|
417
|
+
return output.signature;
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
return signer;
|
|
421
|
+
}
|
|
422
|
+
function findSolanaSigner(owner, chain) {
|
|
423
|
+
var _iteratorNormalCompletion = true,
|
|
424
|
+
_didIteratorError = false,
|
|
425
|
+
_iteratorError = void 0;
|
|
426
|
+
try {
|
|
427
|
+
for (var _iterator = (0, import_walletStandard.getSolanaWallets)()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
428
|
+
var wallet = _step.value;
|
|
429
|
+
var account = wallet.accounts.find(function (a) {
|
|
430
|
+
return a.address === owner;
|
|
431
|
+
});
|
|
432
|
+
if (account) return standardSolanaSigner(wallet, account, chain);
|
|
433
|
+
}
|
|
434
|
+
} catch (err) {
|
|
435
|
+
_didIteratorError = true;
|
|
436
|
+
_iteratorError = err;
|
|
437
|
+
} finally {
|
|
438
|
+
try {
|
|
439
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
440
|
+
_iterator.return();
|
|
441
|
+
}
|
|
442
|
+
} finally {
|
|
443
|
+
if (_didIteratorError) {
|
|
444
|
+
throw _iteratorError;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
return null;
|
|
449
|
+
}
|
|
450
|
+
async function connectSolanaWallet() {
|
|
451
|
+
var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
452
|
+
var _options_chain, _accounts_find;
|
|
453
|
+
var wallets = (0, import_walletStandard.getSolanaWallets)();
|
|
454
|
+
var wallet = options.wallet ? wallets.find(function (w) {
|
|
455
|
+
var _options_wallet;
|
|
456
|
+
return w.name.toLowerCase() === ((_options_wallet = options.wallet) === null || _options_wallet === void 0 ? void 0 : _options_wallet.toLowerCase());
|
|
457
|
+
}) : wallets[0];
|
|
458
|
+
if (!wallet) {
|
|
459
|
+
throw new Error(options.wallet ? `No Solana wallet named ${options.wallet} is installed` : "No Solana wallet found. Install Phantom, Solflare or Backpack.");
|
|
460
|
+
}
|
|
461
|
+
var {
|
|
462
|
+
accounts
|
|
463
|
+
} = await walletFeature(wallet, import_walletStandard.StandardConnect).connect({
|
|
464
|
+
silent: options.silent
|
|
465
|
+
});
|
|
466
|
+
var chain = (_options_chain = options.chain) !== null && _options_chain !== void 0 ? _options_chain : "solana:mainnet";
|
|
467
|
+
var account = (_accounts_find = accounts.find(function (a) {
|
|
468
|
+
return a.chains.includes(chain);
|
|
469
|
+
})) !== null && _accounts_find !== void 0 ? _accounts_find : accounts[0];
|
|
470
|
+
if (!account) throw new Error(`${wallet.name} returned no Solana account`);
|
|
471
|
+
return standardSolanaSigner(wallet, account, chain);
|
|
472
|
+
}
|
|
473
|
+
var utf8 = function utf82(bytes) {
|
|
474
|
+
try {
|
|
475
|
+
return new TextDecoder("utf-8", {
|
|
476
|
+
fatal: true
|
|
477
|
+
}).decode(bytes);
|
|
478
|
+
} catch (unused) {
|
|
479
|
+
return null;
|
|
480
|
+
}
|
|
481
|
+
};
|
|
482
|
+
function injectedSolanaSigner(adapter, chain) {
|
|
483
|
+
var owner = adapter.address;
|
|
484
|
+
if (!owner) throw new Error("injectedSolanaSigner: connect a Solana wallet first");
|
|
485
|
+
var standard = function standard2(method) {
|
|
486
|
+
var signer = findSolanaSigner(owner, chain);
|
|
487
|
+
if (!signer) {
|
|
488
|
+
throw new import_types.UnsupportedClientMethodError("solana", method, `no Wallet Standard wallet holds ${owner}; connect Phantom, Solflare or Backpack`);
|
|
489
|
+
}
|
|
490
|
+
return signer;
|
|
491
|
+
};
|
|
492
|
+
return {
|
|
493
|
+
address: owner,
|
|
494
|
+
async signMessage(message) {
|
|
495
|
+
var text = utf8(message);
|
|
496
|
+
if (text === null) return standard("signMessage").signMessage(message);
|
|
497
|
+
return Uint8Array.from((0, import_kit.getBase58Encoder)().encode(await adapter.signMessage(text)));
|
|
498
|
+
},
|
|
499
|
+
signTransaction: async function signTransaction(transaction) {
|
|
500
|
+
return standard("signTransaction").signTransaction(transaction);
|
|
501
|
+
},
|
|
502
|
+
async signAndSendTransaction(transaction) {
|
|
503
|
+
var signer = standard("signAndSendTransaction");
|
|
504
|
+
if (!signer.signAndSendTransaction) {
|
|
505
|
+
throw new import_types.UnsupportedClientMethodError("solana", "signAndSendTransaction");
|
|
506
|
+
}
|
|
507
|
+
return signer.signAndSendTransaction(transaction);
|
|
508
|
+
}
|
|
509
|
+
};
|
|
510
|
+
}
|
|
511
|
+
//# sourceMappingURL=solana.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","solana_exports","SolanaConfirmationError","connectSolanaWallet","findSolanaSigner","injectedSolanaSigner","solanaChainFromRpcUrl","solanaClient","solanaRpcUrls","standardSolanaSigner","transferSolInstruction","module","exports","import_kit","require","import_types","import_walletStandard","_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","_instanceof","left","right","Symbol","hasInstance","_is_native_function","fn","toString","indexOf","_type_of","p","p2","_wrap_native_super","_cache","Map","wrapNativeSuper","has","set","Wrapper","result","Boolean","valueOf","_","rpcUrl","test","Error1","SolanaConfirmationError2","signature","reason","detail","mayStillLand","Error","capabilities","systemProgram","address","maxU64","lamports","RangeError","data","Uint8Array","i","Number","programAddress","accounts","role","AccountRole","WRITABLE_SIGNER","WRITABLE","toWire","toWire2","transaction","getTransactionEncoder","encode","fromWire","fromWire2","bytes","getTransactionDecoder","decode","toSignature","toSignature2","getBase58Decoder","sleep","sleep2","ms","Promise","resolve","setTimeout","lastValidBlockHeightOf","lastValidBlockHeightOf2","lifetime","lifetimeConstraint","lastValidBlockHeight","reached","reached2","status","commitment","confirmationStatus","config","_config_chain","_config_rpc","_config_rpcUrl","signer","chain","rpc","createSolanaRpc","owner","signTransaction","signTransaction2","broadcast","broadcast2","tx","sendTransaction","getBase64EncodedWireTransaction","encoding","send","sendTransaction2","signAndSendTransaction","signAndSendTransaction2","wire","error","UnsupportedClientMethodError","statusOf","statusOf2","getSignatureStatuses","searchTransactionHistory","err","JSON","stringify","v","family","chainId","signMessage","message","TextEncoder","confirmTransaction","submission","options","length","submitted","timeoutMs","pollMs","deadline","Date","now","height","getBlockHeight","getBalance","transferSol","param","latestBlockhash","getLatestBlockhash","pipe","createTransactionMessage","version","m","setTransactionMessageFeePayer","setTransactionMessageLifetimeUsingBlockhash","appendTransactionMessageInstruction","compileTransaction","walletFeature","wallet","feature","features","account","SolanaSignMessage","output","SolanaSignTransaction","signedTransaction","SolanaSignAndSendTransaction","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","getSolanaWallets","iterator","_step","next","done","find","return","_options_chain","_accounts_find","wallets","w","_options_wallet","toLowerCase","StandardConnect","connect","silent","chains","includes","utf8","utf82","TextDecoder","fatal","unused","adapter","standard","standard2","method","text","getBase58Encoder"],"sources":["solana.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 solana_exports = {};\n__export(solana_exports, {\n SolanaConfirmationError: () => SolanaConfirmationError,\n connectSolanaWallet: () => connectSolanaWallet,\n findSolanaSigner: () => findSolanaSigner,\n injectedSolanaSigner: () => injectedSolanaSigner,\n solanaChainFromRpcUrl: () => solanaChainFromRpcUrl,\n solanaClient: () => solanaClient,\n solanaRpcUrls: () => solanaRpcUrls,\n standardSolanaSigner: () => standardSolanaSigner,\n transferSolInstruction: () => transferSolInstruction\n});\nmodule.exports = __toCommonJS(solana_exports);\nvar import_kit = require(\"@solana/kit\");\nvar import_types = require(\"./types\");\nvar import_walletStandard = require(\"./walletStandard\");\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 _instanceof(left, right) {\n \"@swc/helpers - instanceof\";\n if (right != null && typeof Symbol !== \"undefined\" && right[Symbol.hasInstance]) {\n return !!right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\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 solanaRpcUrls = {\n \"solana:mainnet\": \"https://api.mainnet-beta.solana.com\",\n \"solana:devnet\": \"https://api.devnet.solana.com\",\n \"solana:testnet\": \"https://api.testnet.solana.com\",\n \"solana:localnet\": \"http://127.0.0.1:8899\"\n};\nfunction solanaChainFromRpcUrl(rpcUrl) {\n if (!rpcUrl) return \"solana:mainnet\";\n if (/devnet/i.test(rpcUrl)) return \"solana:devnet\";\n if (/testnet/i.test(rpcUrl)) return \"solana:testnet\";\n if (/\\/\\/(localhost|127\\.0\\.0\\.1|10\\.0\\.2\\.2|\\[::1\\])[:/]/i.test(rpcUrl)) return \"solana:localnet\";\n return \"solana:mainnet\";\n}\nvar SolanaConfirmationError = /* @__PURE__ */ (function(Error1) {\n \"use strict\";\n _inherits(SolanaConfirmationError2, Error1);\n function SolanaConfirmationError2(signature, reason, detail) {\n _class_call_check(this, SolanaConfirmationError2);\n var _this;\n var mayStillLand = reason === \"timeout\";\n _this = _call_super(this, SolanaConfirmationError2, [\n `solana transaction ${signature} ${detail}; ${mayStillLand ? \"it may still land, so do not resend it until its blockhash expires\" : \"it will not land, so it is safe to retry\"}`\n ]), _define_property(_this, \"signature\", void 0), _define_property(_this, \"reason\", void 0), _define_property(_this, \"mayStillLand\", void 0), _this.signature = signature, _this.reason = reason;\n _this.name = \"SolanaConfirmationError\";\n _this.mayStillLand = mayStillLand;\n return _this;\n }\n return SolanaConfirmationError2;\n})(_wrap_native_super(Error));\nvar capabilities = [\n \"signMessage\",\n \"signTransaction\",\n \"signAndSendTransaction\",\n \"sendTransaction\"\n];\nvar systemProgram = (0, import_kit.address)(\"11111111111111111111111111111111\");\nvar maxU64 = 0xffffffffffffffffn;\nfunction transferSolInstruction(from, to, lamports) {\n if (lamports < 0n || lamports > maxU64) {\n throw new RangeError(`lamports must fit a u64, got ${lamports}`);\n }\n var data = new Uint8Array(12);\n data[0] = 2;\n var value = lamports;\n for (var i = 4; i < 12; i++) {\n data[i] = Number(value & 0xffn);\n value >>= 8n;\n }\n return {\n programAddress: systemProgram,\n accounts: [\n {\n address: from,\n role: import_kit.AccountRole.WRITABLE_SIGNER\n },\n {\n address: to,\n role: import_kit.AccountRole.WRITABLE\n }\n ],\n data\n };\n}\nvar toWire = function toWire2(transaction) {\n return _instanceof(transaction, Uint8Array) ? transaction : Uint8Array.from((0, import_kit.getTransactionEncoder)().encode(transaction));\n};\nvar fromWire = function fromWire2(bytes) {\n return (0, import_kit.getTransactionDecoder)().decode(bytes);\n};\nvar toSignature = function toSignature2(bytes) {\n return (0, import_kit.getBase58Decoder)().decode(bytes);\n};\nvar sleep = function sleep2(ms) {\n return new Promise(function(resolve) {\n return setTimeout(resolve, ms);\n });\n};\nvar lastValidBlockHeightOf = function lastValidBlockHeightOf2(transaction) {\n if (_instanceof(transaction, Uint8Array)) return void 0;\n var lifetime = transaction.lifetimeConstraint;\n return lifetime === null || lifetime === void 0 ? void 0 : lifetime.lastValidBlockHeight;\n};\nvar reached = function reached2(status, commitment) {\n return (status === null || status === void 0 ? void 0 : status.confirmationStatus) === \"finalized\" || commitment === \"confirmed\" && (status === null || status === void 0 ? void 0 : status.confirmationStatus) === \"confirmed\";\n};\nfunction solanaClient(config) {\n var _config_chain, _config_rpc, _config_rpcUrl;\n var { signer } = config;\n var chain = (_config_chain = config.chain) !== null && _config_chain !== void 0 ? _config_chain : solanaChainFromRpcUrl(config.rpcUrl);\n var rpc = (_config_rpc = config.rpc) !== null && _config_rpc !== void 0 ? _config_rpc : (0, import_kit.createSolanaRpc)((_config_rpcUrl = config.rpcUrl) !== null && _config_rpcUrl !== void 0 ? _config_rpcUrl : solanaRpcUrls[chain]);\n var owner = (0, import_kit.address)(signer.address);\n var signTransaction = async function signTransaction2(transaction) {\n return fromWire(await signer.signTransaction(toWire(transaction)));\n };\n var broadcast = function broadcast2(transaction) {\n var tx = _instanceof(transaction, Uint8Array) ? fromWire(transaction) : transaction;\n return rpc.sendTransaction((0, import_kit.getBase64EncodedWireTransaction)(tx), {\n encoding: \"base64\"\n }).send();\n };\n var sendTransaction = async function sendTransaction2(transaction) {\n return {\n signature: await broadcast(transaction),\n lastValidBlockHeight: lastValidBlockHeightOf(transaction)\n };\n };\n var signAndSendTransaction = async function signAndSendTransaction2(transaction) {\n var lastValidBlockHeight = lastValidBlockHeightOf(transaction);\n var wire = toWire(transaction);\n if (signer.signAndSendTransaction) {\n try {\n var signature = toSignature(await signer.signAndSendTransaction(wire));\n return {\n signature,\n lastValidBlockHeight\n };\n } catch (error) {\n if (!_instanceof(error, import_types.UnsupportedClientMethodError)) throw error;\n }\n }\n return {\n signature: await broadcast(await signer.signTransaction(wire)),\n lastValidBlockHeight\n };\n };\n var statusOf = async function statusOf2(signature) {\n var { value } = await rpc.getSignatureStatuses([\n signature\n ], {\n searchTransactionHistory: true\n }).send();\n var status = value[0];\n if (status === null || status === void 0 ? void 0 : status.err) {\n throw new SolanaConfirmationError(signature, \"failed\", `failed on chain: ${JSON.stringify(status.err, function(_, v) {\n return (typeof v === \"undefined\" ? \"undefined\" : _type_of(v)) === \"bigint\" ? `${v}` : v;\n })}`);\n }\n return status;\n };\n return {\n family: \"solana\",\n address: owner,\n chainId: chain,\n capabilities,\n rpc,\n signer,\n async signMessage(message) {\n var bytes = typeof message === \"string\" ? new TextEncoder().encode(message) : message;\n return (0, import_kit.getBase58Decoder)().decode(await signer.signMessage(bytes));\n },\n signTransaction,\n signAndSendTransaction,\n sendTransaction,\n async confirmTransaction(submission) {\n var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n var { signature, lastValidBlockHeight: submitted } = typeof submission === \"string\" ? {\n signature: submission\n } : submission;\n var { commitment = \"confirmed\", lastValidBlockHeight = submitted, timeoutMs = 9e4, pollMs = 500 } = options;\n var deadline = Date.now() + timeoutMs;\n for (; ; ) {\n if (reached(await statusOf(signature), commitment)) return;\n if (lastValidBlockHeight !== void 0) {\n var height = await rpc.getBlockHeight({\n commitment\n }).send();\n if (height > lastValidBlockHeight) {\n var status = await statusOf(signature);\n if (reached(status, commitment)) return;\n if (!status) {\n throw new SolanaConfirmationError(signature, \"expired\", `expired: block height ${height} passed ${lastValidBlockHeight}`);\n }\n }\n } else if (Date.now() > deadline) {\n throw new SolanaConfirmationError(signature, \"timeout\", `not ${commitment} after ${timeoutMs}ms`);\n }\n await sleep(pollMs);\n }\n },\n async getBalance(target) {\n var { value } = await rpc.getBalance(target ? (0, import_kit.address)(target) : owner).send();\n return value;\n },\n async transferSol(param) {\n var { to, lamports } = param;\n var { value: latestBlockhash } = await rpc.getLatestBlockhash().send();\n var message = (0, import_kit.pipe)((0, import_kit.createTransactionMessage)({\n version: 0\n }), function(m) {\n return (0, import_kit.setTransactionMessageFeePayer)(owner, m);\n }, function(m) {\n return (0, import_kit.setTransactionMessageLifetimeUsingBlockhash)(latestBlockhash, m);\n }, function(m) {\n return (0, import_kit.appendTransactionMessageInstruction)(transferSolInstruction(owner, (0, import_kit.address)(to), lamports), m);\n });\n var { signature } = await signAndSendTransaction((0, import_kit.compileTransaction)(message));\n return {\n signature,\n lastValidBlockHeight: latestBlockhash.lastValidBlockHeight\n };\n }\n };\n}\nfunction walletFeature(wallet, name) {\n var feature = wallet.features[name];\n if (!feature) {\n throw new import_types.UnsupportedClientMethodError(\"solana\", name, `${wallet.name} does not implement it`);\n }\n return feature;\n}\nfunction standardSolanaSigner(wallet, account) {\n var chain = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : \"solana:mainnet\";\n var signer = {\n address: account.address,\n async signMessage(message) {\n var feature = walletFeature(wallet, import_walletStandard.SolanaSignMessage);\n var [output] = await feature.signMessage({\n account,\n message\n });\n return output.signature;\n },\n async signTransaction(transaction) {\n var feature = walletFeature(wallet, import_walletStandard.SolanaSignTransaction);\n var [output] = await feature.signTransaction({\n account,\n transaction,\n chain\n });\n return output.signedTransaction;\n }\n };\n if (wallet.features[import_walletStandard.SolanaSignAndSendTransaction]) {\n signer.signAndSendTransaction = async function(transaction) {\n var feature = walletFeature(wallet, import_walletStandard.SolanaSignAndSendTransaction);\n var [output] = await feature.signAndSendTransaction({\n account,\n transaction,\n chain\n });\n return output.signature;\n };\n }\n return signer;\n}\nfunction findSolanaSigner(owner, chain) {\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = (0, import_walletStandard.getSolanaWallets)()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var wallet = _step.value;\n var account = wallet.accounts.find(function(a) {\n return a.address === owner;\n });\n if (account) return standardSolanaSigner(wallet, account, chain);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return null;\n}\nasync function connectSolanaWallet() {\n var options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n var _options_chain, _accounts_find;\n var wallets = (0, import_walletStandard.getSolanaWallets)();\n var wallet = options.wallet ? wallets.find(function(w) {\n var _options_wallet;\n return w.name.toLowerCase() === ((_options_wallet = options.wallet) === null || _options_wallet === void 0 ? void 0 : _options_wallet.toLowerCase());\n }) : wallets[0];\n if (!wallet) {\n throw new Error(options.wallet ? `No Solana wallet named ${options.wallet} is installed` : \"No Solana wallet found. Install Phantom, Solflare or Backpack.\");\n }\n var { accounts } = await walletFeature(wallet, import_walletStandard.StandardConnect).connect({\n silent: options.silent\n });\n var chain = (_options_chain = options.chain) !== null && _options_chain !== void 0 ? _options_chain : \"solana:mainnet\";\n var account = (_accounts_find = accounts.find(function(a) {\n return a.chains.includes(chain);\n })) !== null && _accounts_find !== void 0 ? _accounts_find : accounts[0];\n if (!account) throw new Error(`${wallet.name} returned no Solana account`);\n return standardSolanaSigner(wallet, account, chain);\n}\nvar utf8 = function utf82(bytes) {\n try {\n return new TextDecoder(\"utf-8\", {\n fatal: true\n }).decode(bytes);\n } catch (unused) {\n return null;\n }\n};\nfunction injectedSolanaSigner(adapter, chain) {\n var owner = adapter.address;\n if (!owner) throw new Error(\"injectedSolanaSigner: connect a Solana wallet first\");\n var standard = function standard2(method) {\n var signer = findSolanaSigner(owner, chain);\n if (!signer) {\n throw new import_types.UnsupportedClientMethodError(\"solana\", method, `no Wallet Standard wallet holds ${owner}; connect Phantom, Solflare or Backpack`);\n }\n return signer;\n };\n return {\n address: owner,\n async signMessage(message) {\n var text = utf8(message);\n if (text === null) return standard(\"signMessage\").signMessage(message);\n return Uint8Array.from((0, import_kit.getBase58Encoder)().encode(await adapter.signMessage(text)));\n },\n signTransaction: async function signTransaction(transaction) {\n return standard(\"signTransaction\").signTransaction(transaction);\n },\n async signAndSendTransaction(transaction) {\n var signer = standard(\"signAndSendTransaction\");\n if (!signer.signAndSendTransaction) {\n throw new import_types.UnsupportedClientMethodError(\"solana\", \"signAndSendTransaction\");\n }\n return signer.signAndSendTransaction(transaction);\n }\n };\n}\n//# sourceMappingURL=solana.js.map\n"],"mappings":"AAAA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AM,CAAC,MAAM4H,OAAO,CAACjE,WAAW,CAACqE,IAAI,CAAC,CAAC,CAAC;IACpG,CAAC;IACD9F,eAAe,EAAE,eAAeA,eAAeA,CAACpC,WAAW,EAAE;MAC3D,OAAO+H,QAAQ,CAAC,iBAAiB,CAAC,CAAC3F,eAAe,CAACpC,WAAW,CAAC;IACjE,CAAC;IACD,MAAM8C,sBAAsBA,CAAC9C,WAAW,EAAE;MACxC,IAAI+B,MAAM,GAAGgG,QAAQ,CAAC,wBAAwB,CAAC;MAC/C,IAAI,CAAChG,MAAM,CAACe,sBAAsB,EAAE;QAClC,MAAM,IAAI7I,YAAY,CAACiJ,4BAA4B,CAAC,QAAQ,EAAE,wBAAwB,CAAC;MACzF;MACA,OAAOnB,MAAM,CAACe,sBAAsB,CAAC9C,WAAW,CAAC;IACnD;EACF,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,38 @@
|
|
|
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 solanaMessage_exports = {};
|
|
24
|
+
__export(solanaMessage_exports, {
|
|
25
|
+
solanaMessageClient: () => solanaMessageClient
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(solanaMessage_exports);
|
|
28
|
+
const capabilities = ["signMessage"];
|
|
29
|
+
function solanaMessageClient(adapter, chain = "solana:mainnet") {
|
|
30
|
+
if (!adapter.address) throw new Error("solanaMessageClient: connect a Solana wallet first");
|
|
31
|
+
return {
|
|
32
|
+
family: "solana",
|
|
33
|
+
address: adapter.address,
|
|
34
|
+
chainId: chain,
|
|
35
|
+
capabilities,
|
|
36
|
+
signMessage: message => adapter.signMessage(message)
|
|
37
|
+
};
|
|
38
|
+
}
|