@openfort/react 0.3.2 → 1.0.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/build/assets/browsers.js +13 -0
- package/build/assets/browsers.js.map +1 -0
- package/build/assets/chains.js +139 -0
- package/build/assets/chains.js.map +1 -0
- package/build/assets/icons.js +41 -0
- package/build/assets/icons.js.map +1 -0
- package/build/assets/logos.js +173 -0
- package/build/assets/logos.js.map +1 -0
- package/build/assets/wave.js +6 -0
- package/build/assets/wave.js.map +1 -0
- package/build/components/BalanceButton/index.js +89 -0
- package/build/components/BalanceButton/index.js.map +1 -0
- package/build/components/Common/Alert/index.js +10 -0
- package/build/components/Common/Alert/index.js.map +1 -0
- package/build/components/Common/Alert/styles.js +55 -0
- package/build/components/Common/Alert/styles.js.map +1 -0
- package/build/components/Common/Avatar/index.d.ts +11 -3
- package/build/components/Common/Avatar/index.js +100 -0
- package/build/components/Common/Avatar/index.js.map +1 -0
- package/build/components/Common/Avatar/styles.js +59 -0
- package/build/components/Common/Avatar/styles.js.map +1 -0
- package/build/components/Common/BrowserIcon/index.js +28 -0
- package/build/components/Common/BrowserIcon/index.js.map +1 -0
- package/build/components/Common/BrowserIcon/styles.js +20 -0
- package/build/components/Common/BrowserIcon/styles.js.map +1 -0
- package/build/components/Common/Button/index.js +36 -0
- package/build/components/Common/Button/index.js.map +1 -0
- package/build/components/Common/Button/styles.js +302 -0
- package/build/components/Common/Button/styles.js.map +1 -0
- package/build/components/Common/Button/types.d.ts +1 -0
- package/build/components/Common/Chain/index.d.ts +8 -0
- package/build/components/Common/Chain/index.js +38 -0
- package/build/components/Common/Chain/index.js.map +1 -0
- package/build/components/Common/Chain/styles.js +94 -0
- package/build/components/Common/Chain/styles.js.map +1 -0
- package/build/components/Common/ConnectorList/index.js +58 -0
- package/build/components/Common/ConnectorList/index.js.map +1 -0
- package/build/components/Common/ConnectorList/styles.js +324 -0
- package/build/components/Common/ConnectorList/styles.js.map +1 -0
- package/build/components/Common/CopyToClipboard/CopyButton.js +12 -0
- package/build/components/Common/CopyToClipboard/CopyButton.js.map +1 -0
- package/build/components/Common/CopyToClipboard/CopyIcon.js +76 -0
- package/build/components/Common/CopyToClipboard/CopyIcon.js.map +1 -0
- package/build/components/Common/CopyToClipboard/CopyIconButton.js +38 -0
- package/build/components/Common/CopyToClipboard/CopyIconButton.js.map +1 -0
- package/build/components/Common/CopyToClipboard/CopyText.js +26 -0
- package/build/components/Common/CopyToClipboard/CopyText.js.map +1 -0
- package/build/components/Common/CustomQRCode/QRCode.js +60 -0
- package/build/components/Common/CustomQRCode/QRCode.js.map +1 -0
- package/build/components/Common/CustomQRCode/index.js +22 -0
- package/build/components/Common/CustomQRCode/index.js.map +1 -0
- package/build/components/Common/CustomQRCode/styles.js +155 -0
- package/build/components/Common/CustomQRCode/styles.js.map +1 -0
- package/build/components/Common/FitText/index.js +28 -0
- package/build/components/Common/FitText/index.js.map +1 -0
- package/build/components/Common/Input/index.js +17 -0
- package/build/components/Common/Input/index.js.map +1 -0
- package/build/components/Common/Input/styles.js +53 -0
- package/build/components/Common/Input/styles.js.map +1 -0
- package/build/components/Common/LargeButton/index.js +10 -0
- package/build/components/Common/LargeButton/index.js.map +1 -0
- package/build/components/Common/LargeButton/styles.js +69 -0
- package/build/components/Common/LargeButton/styles.js.map +1 -0
- package/build/components/Common/Loading/index.js +96 -0
- package/build/components/Common/Loading/index.js.map +1 -0
- package/build/components/Common/Modal/index.js +272 -0
- package/build/components/Common/Modal/index.js.map +1 -0
- package/build/components/Common/Modal/styles.d.ts +0 -1
- package/build/components/Common/Modal/styles.js +657 -0
- package/build/components/Common/Modal/styles.js.map +1 -0
- package/build/components/Common/OTPInput/index.js +108 -0
- package/build/components/Common/OTPInput/index.js.map +1 -0
- package/build/components/Common/OTPInput/styles.js +153 -0
- package/build/components/Common/OTPInput/styles.js.map +1 -0
- package/build/components/Common/Portal/index.js +31 -0
- package/build/components/Common/Portal/index.js.map +1 -0
- package/build/components/Common/PoweredByFooter/index.js +103 -0
- package/build/components/Common/PoweredByFooter/index.js.map +1 -0
- package/build/components/Common/Providers/ProviderHeader.d.ts +2 -2
- package/build/components/Common/Providers/ProviderHeader.js +55 -0
- package/build/components/Common/Providers/ProviderHeader.js.map +1 -0
- package/build/components/Common/Providers/ProviderIcon.d.ts +2 -2
- package/build/components/Common/Providers/ProviderIcon.js +41 -0
- package/build/components/Common/Providers/ProviderIcon.js.map +1 -0
- package/build/components/Common/Providers/getProviderName.d.ts +1 -1
- package/build/components/Common/Providers/getProviderName.js +15 -0
- package/build/components/Common/Providers/getProviderName.js.map +1 -0
- package/build/components/Common/ScrollArea/index.js +58 -0
- package/build/components/Common/ScrollArea/index.js.map +1 -0
- package/build/components/Common/ScrollArea/styles.js +168 -0
- package/build/components/Common/ScrollArea/styles.js.map +1 -0
- package/build/components/Common/Spinner/index.js +24 -0
- package/build/components/Common/Spinner/index.js.map +1 -0
- package/build/components/Common/Spinner/styles.js +22 -0
- package/build/components/Common/Spinner/styles.js.map +1 -0
- package/build/components/Common/SquircleSpinner/index.js +15 -0
- package/build/components/Common/SquircleSpinner/index.js.map +1 -0
- package/build/components/Common/SquircleSpinner/styles.js +66 -0
- package/build/components/Common/SquircleSpinner/styles.js.map +1 -0
- package/build/components/Common/ThemedButton/index.js +25 -0
- package/build/components/Common/ThemedButton/index.js.map +1 -0
- package/build/components/Common/ThemedButton/styles.js +152 -0
- package/build/components/Common/ThemedButton/styles.js.map +1 -0
- package/build/components/Common/TickList/index.js +11 -0
- package/build/components/Common/TickList/index.js.map +1 -0
- package/build/components/Common/TickList/styles.js +28 -0
- package/build/components/Common/TickList/styles.js.map +1 -0
- package/build/components/Common/Tooltip/index.js +91 -0
- package/build/components/Common/Tooltip/index.js.map +1 -0
- package/build/components/Common/Tooltip/styles.js +81 -0
- package/build/components/Common/Tooltip/styles.js.map +1 -0
- package/build/components/Common/WalletRecoveryIcon/index.d.ts +4 -0
- package/build/components/Common/WalletRecoveryIcon/index.js +19 -0
- package/build/components/Common/WalletRecoveryIcon/index.js.map +1 -0
- package/build/components/ConnectButton/index.d.ts +12 -4
- package/build/components/ConnectButton/index.js +266 -0
- package/build/components/ConnectButton/index.js.map +1 -0
- package/build/components/ConnectButton/styles.js +50 -0
- package/build/components/ConnectButton/styles.js.map +1 -0
- package/build/components/ConnectKitThemeProvider/ConnectKitThemeProvider.js +20 -0
- package/build/components/ConnectKitThemeProvider/ConnectKitThemeProvider.js.map +1 -0
- package/build/components/ConnectModal/ConnectUsing.d.ts +1 -1
- package/build/components/ConnectModal/ConnectUsing.js +68 -0
- package/build/components/ConnectModal/ConnectUsing.js.map +1 -0
- package/build/components/ConnectModal/ConnectWithInjector/CircleSpinner/index.js +17 -0
- package/build/components/ConnectModal/ConnectWithInjector/CircleSpinner/index.js.map +1 -0
- package/build/components/ConnectModal/ConnectWithInjector/CircleSpinner/styles.js +118 -0
- package/build/components/ConnectModal/ConnectWithInjector/CircleSpinner/styles.js.map +1 -0
- package/build/components/ConnectModal/ConnectWithInjector/index.d.ts +0 -2
- package/build/components/ConnectModal/ConnectWithInjector/index.js +295 -0
- package/build/components/ConnectModal/ConnectWithInjector/index.js.map +1 -0
- package/build/components/ConnectModal/ConnectWithInjector/styles.js +133 -0
- package/build/components/ConnectModal/ConnectWithInjector/styles.js.map +1 -0
- package/build/components/ConnectModal/ConnectWithMobile.js +99 -0
- package/build/components/ConnectModal/ConnectWithMobile.js.map +1 -0
- package/build/components/ConnectModal/ConnectWithOAuth.js +128 -0
- package/build/components/ConnectModal/ConnectWithOAuth.js.map +1 -0
- package/build/components/ConnectModal/ConnectWithQRCode.js +78 -0
- package/build/components/ConnectModal/ConnectWithQRCode.js.map +1 -0
- package/build/components/ConnectModal/index.js +230 -0
- package/build/components/ConnectModal/index.js.map +1 -0
- package/build/components/FloatingGraphic/index.js +13 -0
- package/build/components/FloatingGraphic/index.js.map +1 -0
- package/build/components/FloatingGraphic/styles.js +175 -0
- package/build/components/FloatingGraphic/styles.js.map +1 -0
- package/build/components/Openfort/OpenfortProvider.d.ts +10 -25
- package/build/components/Openfort/OpenfortProvider.js +351 -0
- package/build/components/Openfort/OpenfortProvider.js.map +1 -0
- package/build/components/Openfort/context.d.ts +48 -5
- package/build/components/Openfort/context.js +7 -0
- package/build/components/Openfort/context.js.map +1 -0
- package/build/components/Openfort/routeHelpers.d.ts +5 -0
- package/build/components/Openfort/routeHelpers.js +20 -0
- package/build/components/Openfort/routeHelpers.js.map +1 -0
- package/build/components/Openfort/types.d.ts +57 -23
- package/build/components/Openfort/types.js +119 -0
- package/build/components/Openfort/types.js.map +1 -0
- package/build/components/Openfort/useOpenfort.d.ts +2 -0
- package/build/components/Openfort/useOpenfort.js +12 -0
- package/build/components/Openfort/useOpenfort.js.map +1 -0
- package/build/components/PageContent/index.js +55 -0
- package/build/components/PageContent/index.js.map +1 -0
- package/build/components/PageContent/styles.js +11 -0
- package/build/components/PageContent/styles.js.map +1 -0
- package/build/components/Pages/About/graphics.js +193 -0
- package/build/components/Pages/About/graphics.js.map +1 -0
- package/build/components/Pages/About/index.js +142 -0
- package/build/components/Pages/About/index.js.map +1 -0
- package/build/components/Pages/About/styles.js +142 -0
- package/build/components/Pages/About/styles.js.map +1 -0
- package/build/components/Pages/AssetInventory/index.js +66 -0
- package/build/components/Pages/AssetInventory/index.js.map +1 -0
- package/build/components/Pages/Buy/coinbaseApi.js +106 -0
- package/build/components/Pages/Buy/coinbaseApi.js.map +1 -0
- package/build/components/Pages/Buy/index.js +88 -0
- package/build/components/Pages/Buy/index.js.map +1 -0
- package/build/components/Pages/Buy/onrampApi.js +57 -0
- package/build/components/Pages/Buy/onrampApi.js.map +1 -0
- package/build/components/Pages/Buy/providers.js +39 -0
- package/build/components/Pages/Buy/providers.js.map +1 -0
- package/build/components/Pages/Buy/stripeApi.js +74 -0
- package/build/components/Pages/Buy/stripeApi.js.map +1 -0
- package/build/components/Pages/Buy/styles.js +230 -0
- package/build/components/Pages/Buy/styles.js.map +1 -0
- package/build/components/Pages/Buy/utils.js +71 -0
- package/build/components/Pages/Buy/utils.js.map +1 -0
- package/build/components/Pages/BuyComplete/index.js +47 -0
- package/build/components/Pages/BuyComplete/index.js.map +1 -0
- package/build/components/Pages/BuyProcessing/index.js +231 -0
- package/build/components/Pages/BuyProcessing/index.js.map +1 -0
- package/build/components/Pages/BuyProviderSelect/index.js +55 -0
- package/build/components/Pages/BuyProviderSelect/index.js.map +1 -0
- package/build/components/Pages/BuyProviderSelect/styles.js +103 -0
- package/build/components/Pages/BuyProviderSelect/styles.js.map +1 -0
- package/build/components/Pages/BuySelectProvider/index.js +245 -0
- package/build/components/Pages/BuySelectProvider/index.js.map +1 -0
- package/build/components/Pages/Connected/ConnectedPageLayout.d.ts +22 -0
- package/build/components/Pages/Connected/ConnectedPageLayout.js +11 -0
- package/build/components/Pages/Connected/ConnectedPageLayout.js.map +1 -0
- package/build/components/Pages/Connected/EthereumConnected.d.ts +3 -0
- package/build/components/Pages/Connected/EthereumConnected.js +133 -0
- package/build/components/Pages/Connected/EthereumConnected.js.map +1 -0
- package/build/components/Pages/Connected/SolanaConnected.d.ts +3 -0
- package/build/components/Pages/Connected/SolanaConnected.js +96 -0
- package/build/components/Pages/Connected/SolanaConnected.js.map +1 -0
- package/build/components/Pages/Connected/index.d.ts +2 -2
- package/build/components/Pages/Connected/index.js +18 -0
- package/build/components/Pages/Connected/index.js.map +1 -0
- package/build/components/Pages/Connected/styles.js +122 -0
- package/build/components/Pages/Connected/styles.js.map +1 -0
- package/build/components/Pages/ConnectedSuccess/index.js +19 -0
- package/build/components/Pages/ConnectedSuccess/index.js.map +1 -0
- package/build/components/Pages/Connectors/index.js +73 -0
- package/build/components/Pages/Connectors/index.js.map +1 -0
- package/build/components/Pages/CreateGuestUserPage/index.js +28 -0
- package/build/components/Pages/CreateGuestUserPage/index.js.map +1 -0
- package/build/components/Pages/CreateWallet/SolanaCreateWallet.d.ts +6 -0
- package/build/components/Pages/CreateWallet/SolanaCreateWallet.js +241 -0
- package/build/components/Pages/CreateWallet/SolanaCreateWallet.js.map +1 -0
- package/build/components/Pages/CreateWallet/index.js +303 -0
- package/build/components/Pages/CreateWallet/index.js.map +1 -0
- package/build/components/Pages/CreateWallet/styles.js +17 -0
- package/build/components/Pages/CreateWallet/styles.js.map +1 -0
- package/build/components/Pages/DownloadApp/index.js +32 -0
- package/build/components/Pages/DownloadApp/index.js.map +1 -0
- package/build/components/Pages/EmailLogin/index.js +118 -0
- package/build/components/Pages/EmailLogin/index.js.map +1 -0
- package/build/components/Pages/EmailLogin/styles.js +24 -0
- package/build/components/Pages/EmailLogin/styles.js.map +1 -0
- package/build/components/Pages/EmailOTP/index.js +116 -0
- package/build/components/Pages/EmailOTP/index.js.map +1 -0
- package/build/components/Pages/EmailOTP/styles.js +38 -0
- package/build/components/Pages/EmailOTP/styles.js.map +1 -0
- package/build/components/Pages/EmailVerification/index.js +86 -0
- package/build/components/Pages/EmailVerification/index.js.map +1 -0
- package/build/components/Pages/ExportKey/index.js +44 -0
- package/build/components/Pages/ExportKey/index.js.map +1 -0
- package/build/components/Pages/ForgotPassword/index.js +129 -0
- package/build/components/Pages/ForgotPassword/index.js.map +1 -0
- package/build/components/Pages/LinkEmail/index.js +63 -0
- package/build/components/Pages/LinkEmail/index.js.map +1 -0
- package/build/components/Pages/LinkedProvider/index.d.ts +3 -0
- package/build/components/Pages/LinkedProvider/index.js +90 -0
- package/build/components/Pages/LinkedProvider/index.js.map +1 -0
- package/build/components/Pages/LinkedProviders/index.js +45 -0
- package/build/components/Pages/LinkedProviders/index.js.map +1 -0
- package/build/components/Pages/LinkedProviders/styles.js +51 -0
- package/build/components/Pages/LinkedProviders/styles.js.map +1 -0
- package/build/components/Pages/LoadWallets/index.js +91 -0
- package/build/components/Pages/LoadWallets/index.js.map +1 -0
- package/build/components/Pages/Loading/index.js +61 -0
- package/build/components/Pages/Loading/index.js.map +1 -0
- package/build/components/Pages/MobileConnectors/index.js +71 -0
- package/build/components/Pages/MobileConnectors/index.js.map +1 -0
- package/build/components/Pages/MobileConnectors/styles.js +65 -0
- package/build/components/Pages/MobileConnectors/styles.js.map +1 -0
- package/build/components/Pages/NoAssetsAvailable/index.js +45 -0
- package/build/components/Pages/NoAssetsAvailable/index.js.map +1 -0
- package/build/components/Pages/NoAssetsAvailable/styles.js +10 -0
- package/build/components/Pages/NoAssetsAvailable/styles.js.map +1 -0
- package/build/components/Pages/Onboarding/index.js +20 -0
- package/build/components/Pages/Onboarding/index.js.map +1 -0
- package/build/components/Pages/PhoneOTP/index.js +128 -0
- package/build/components/Pages/PhoneOTP/index.js.map +1 -0
- package/build/components/Pages/PhoneOTP/styles.js +38 -0
- package/build/components/Pages/PhoneOTP/styles.js.map +1 -0
- package/build/components/Pages/Profile/index.js +35 -0
- package/build/components/Pages/Profile/index.js.map +1 -0
- package/build/components/Pages/Providers/index.js +157 -0
- package/build/components/Pages/Providers/index.js.map +1 -0
- package/build/components/Pages/Providers/styles.js +156 -0
- package/build/components/Pages/Providers/styles.js.map +1 -0
- package/build/components/Pages/Receive/index.js +61 -0
- package/build/components/Pages/Receive/index.js.map +1 -0
- package/build/components/Pages/Receive/styles.d.ts +1 -0
- package/build/components/Pages/Receive/styles.js +52 -0
- package/build/components/Pages/Receive/styles.js.map +1 -0
- package/build/components/Pages/Recover/index.js +252 -0
- package/build/components/Pages/Recover/index.js.map +1 -0
- package/build/components/Pages/Recover/recoveryRegistry.d.ts +32 -0
- package/build/components/Pages/Recover/recoveryRegistry.js +61 -0
- package/build/components/Pages/Recover/recoveryRegistry.js.map +1 -0
- package/build/components/Pages/RemoveLinkedProvider/index.js +104 -0
- package/build/components/Pages/RemoveLinkedProvider/index.js.map +1 -0
- package/build/components/Pages/SelectToken/index.js +102 -0
- package/build/components/Pages/SelectToken/index.js.map +1 -0
- package/build/components/Pages/SelectToken/styles.js +78 -0
- package/build/components/Pages/SelectToken/styles.js.map +1 -0
- package/build/components/Pages/SelectWalletToRecover/index.d.ts +1 -2
- package/build/components/Pages/SelectWalletToRecover/index.js +70 -0
- package/build/components/Pages/SelectWalletToRecover/index.js.map +1 -0
- package/build/components/Pages/Send/EthereumSend.d.ts +1 -0
- package/build/components/Pages/Send/EthereumSend.js +88 -0
- package/build/components/Pages/Send/EthereumSend.js.map +1 -0
- package/build/components/Pages/Send/SolanaSend.d.ts +1 -0
- package/build/components/Pages/Send/SolanaSend.js +93 -0
- package/build/components/Pages/Send/SolanaSend.js.map +1 -0
- package/build/components/Pages/Send/index.d.ts +7 -1
- package/build/components/Pages/Send/index.js +18 -0
- package/build/components/Pages/Send/index.js.map +1 -0
- package/build/components/Pages/Send/styles.js +112 -0
- package/build/components/Pages/Send/styles.js.map +1 -0
- package/build/components/Pages/Send/utils.d.ts +1 -1
- package/build/components/Pages/Send/utils.js +63 -0
- package/build/components/Pages/Send/utils.js.map +1 -0
- package/build/components/Pages/SendConfirmation/EstimatedFees.js +66 -0
- package/build/components/Pages/SendConfirmation/EstimatedFees.js.map +1 -0
- package/build/components/Pages/SendConfirmation/index.js +331 -0
- package/build/components/Pages/SendConfirmation/index.js.map +1 -0
- package/build/components/Pages/SendConfirmation/styles.js +129 -0
- package/build/components/Pages/SendConfirmation/styles.js.map +1 -0
- package/build/components/Pages/SocialProviders/index.js +15 -0
- package/build/components/Pages/SocialProviders/index.js.map +1 -0
- package/build/components/Pages/SolanaSendConfirmation/index.d.ts +1 -0
- package/build/components/Pages/SolanaSendConfirmation/index.js +152 -0
- package/build/components/Pages/SolanaSendConfirmation/index.js.map +1 -0
- package/build/components/Pages/SolanaWallets/index.d.ts +1 -0
- package/build/components/Pages/SolanaWallets/index.js +36 -0
- package/build/components/Pages/SolanaWallets/index.js.map +1 -0
- package/build/components/PasswordStrength/PasswordStrengthIndicator.js +62 -0
- package/build/components/PasswordStrength/PasswordStrengthIndicator.js.map +1 -0
- package/build/components/PasswordStrength/password-utility.js +128 -0
- package/build/components/PasswordStrength/password-utility.js.map +1 -0
- package/build/constants/chainConfigs.js +316 -0
- package/build/constants/chainConfigs.js.map +1 -0
- package/build/constants/defaultTheme.js +6 -0
- package/build/constants/defaultTheme.js.map +1 -0
- package/build/constants/openfort.d.ts +4 -0
- package/build/constants/openfort.js +8 -0
- package/build/constants/openfort.js.map +1 -0
- package/build/core/ConnectionStrategy.d.ts +31 -0
- package/build/core/ConnectionStrategy.js +9 -0
- package/build/core/ConnectionStrategy.js.map +1 -0
- package/build/core/ConnectionStrategyContext.d.ts +16 -0
- package/build/core/ConnectionStrategyContext.js +22 -0
- package/build/core/ConnectionStrategyContext.js.map +1 -0
- package/build/core/errors.d.ts +1 -0
- package/build/core/strategies/EthereumBridgeStrategy.d.ts +11 -0
- package/build/core/strategies/EthereumBridgeStrategy.js +83 -0
- package/build/core/strategies/EthereumBridgeStrategy.js.map +1 -0
- package/build/core/strategies/EthereumEmbeddedStrategy.d.ts +8 -0
- package/build/core/strategies/EthereumEmbeddedStrategy.js +85 -0
- package/build/core/strategies/EthereumEmbeddedStrategy.js.map +1 -0
- package/build/core/strategies/SolanaEmbeddedStrategy.d.ts +9 -0
- package/build/core/strategies/SolanaEmbeddedStrategy.js +53 -0
- package/build/core/strategies/SolanaEmbeddedStrategy.js.map +1 -0
- package/build/core/strategyUtils.d.ts +6 -0
- package/build/core/strategyUtils.js +31 -0
- package/build/core/strategyUtils.js.map +1 -0
- package/build/ethereum/OpenfortEthereumBridgeContext.d.ts +87 -0
- package/build/ethereum/OpenfortEthereumBridgeContext.js +18 -0
- package/build/ethereum/OpenfortEthereumBridgeContext.js.map +1 -0
- package/build/ethereum/hooks/getEmbeddedWalletClient.d.ts +14 -0
- package/build/ethereum/hooks/getEmbeddedWalletClient.js +24 -0
- package/build/ethereum/hooks/getEmbeddedWalletClient.js.map +1 -0
- package/build/ethereum/hooks/useEthereumEmbeddedWallet.d.ts +17 -0
- package/build/ethereum/hooks/useEthereumEmbeddedWallet.js +425 -0
- package/build/ethereum/hooks/useEthereumEmbeddedWallet.js.map +1 -0
- package/build/ethereum/hooks/useEthereumWalletAssets.d.ts +29 -0
- package/build/ethereum/hooks/useEthereumWalletAssets.js +204 -0
- package/build/ethereum/hooks/useEthereumWalletAssets.js.map +1 -0
- package/build/ethereum/index.d.ts +11 -0
- package/build/ethereum/index.js +3 -0
- package/build/ethereum/index.js.map +1 -0
- package/build/ethereum/types.d.ts +140 -0
- package/build/hooks/openfort/auth/requestEmailVerification.js +21 -0
- package/build/hooks/openfort/auth/requestEmailVerification.js.map +1 -0
- package/build/hooks/openfort/auth/status.js +11 -0
- package/build/hooks/openfort/auth/status.js.map +1 -0
- package/build/hooks/openfort/auth/useAuthCallback.d.ts +2 -1
- package/build/hooks/openfort/auth/useAuthCallback.js +197 -0
- package/build/hooks/openfort/auth/useAuthCallback.js.map +1 -0
- package/build/hooks/openfort/auth/useConnectToWalletPostAuth.d.ts +2 -2
- package/build/hooks/openfort/auth/useConnectToWalletPostAuth.js +161 -0
- package/build/hooks/openfort/auth/useConnectToWalletPostAuth.js.map +1 -0
- package/build/hooks/openfort/auth/useEmailAuth.d.ts +4 -3
- package/build/hooks/openfort/auth/useEmailAuth.js +496 -0
- package/build/hooks/openfort/auth/useEmailAuth.js.map +1 -0
- package/build/hooks/openfort/auth/useEmailOtpAuth.d.ts +4 -3
- package/build/hooks/openfort/auth/useEmailOtpAuth.js +151 -0
- package/build/hooks/openfort/auth/useEmailOtpAuth.js.map +1 -0
- package/build/hooks/openfort/auth/useGuestAuth.d.ts +4 -3
- package/build/hooks/openfort/auth/useGuestAuth.js +142 -0
- package/build/hooks/openfort/auth/useGuestAuth.js.map +1 -0
- package/build/hooks/openfort/auth/useOAuth.d.ts +4 -3
- package/build/hooks/openfort/auth/useOAuth.js +217 -0
- package/build/hooks/openfort/auth/useOAuth.js.map +1 -0
- package/build/hooks/openfort/auth/usePhoneOtpAuth.d.ts +4 -3
- package/build/hooks/openfort/auth/usePhoneOtpAuth.js +174 -0
- package/build/hooks/openfort/auth/usePhoneOtpAuth.js.map +1 -0
- package/build/hooks/openfort/auth/useSignOut.d.ts +2 -1
- package/build/hooks/openfort/auth/useSignOut.js +104 -0
- package/build/hooks/openfort/auth/useSignOut.js.map +1 -0
- package/build/hooks/openfort/hookConsistency.js +17 -0
- package/build/hooks/openfort/hookConsistency.js.map +1 -0
- package/build/hooks/openfort/use7702Authorization.js +73 -0
- package/build/hooks/openfort/use7702Authorization.js.map +1 -0
- package/build/hooks/openfort/useGrantPermissions.d.ts +7 -76
- package/build/hooks/openfort/useGrantPermissions.js +221 -0
- package/build/hooks/openfort/useGrantPermissions.js.map +1 -0
- package/build/hooks/openfort/useProviders.js +75 -0
- package/build/hooks/openfort/useProviders.js.map +1 -0
- package/build/hooks/openfort/useRevokePermissions.d.ts +2 -1
- package/build/hooks/openfort/useRevokePermissions.js +126 -0
- package/build/hooks/openfort/useRevokePermissions.js.map +1 -0
- package/build/hooks/openfort/useUI.d.ts +4 -45
- package/build/hooks/openfort/useUI.js +122 -0
- package/build/hooks/openfort/useUI.js.map +1 -0
- package/build/hooks/openfort/useUser.d.ts +12 -35
- package/build/hooks/openfort/useUser.js +61 -0
- package/build/hooks/openfort/useUser.js.map +1 -0
- package/build/hooks/openfort/walletTypes.d.ts +32 -0
- package/build/hooks/openfort/walletTypes.js +53 -0
- package/build/hooks/openfort/walletTypes.js.map +1 -0
- package/build/hooks/useBalance.d.ts +50 -0
- package/build/hooks/useBalance.js +80 -0
- package/build/hooks/useBalance.js.map +1 -0
- package/build/hooks/useConnectLifecycle.d.ts +7 -0
- package/build/hooks/useConnectLifecycle.js +43 -0
- package/build/hooks/useConnectLifecycle.js.map +1 -0
- package/build/hooks/useConnectors.d.ts +3 -5
- package/build/hooks/useConnectors.js +26 -0
- package/build/hooks/useConnectors.js.map +1 -0
- package/build/hooks/useCopyToClipboard.js +29 -0
- package/build/hooks/useCopyToClipboard.js.map +1 -0
- package/build/hooks/useFitText.js +125 -0
- package/build/hooks/useFitText.js.map +1 -0
- package/build/hooks/useFocusTrap.d.ts +4 -1
- package/build/hooks/useFocusTrap.js +60 -0
- package/build/hooks/useFocusTrap.js.map +1 -0
- package/build/hooks/useGoogleFont.js +43 -0
- package/build/hooks/useGoogleFont.js.map +1 -0
- package/build/hooks/useIsMobile.js +17 -0
- package/build/hooks/useIsMobile.js.map +1 -0
- package/build/hooks/useIsMounted.js +10 -0
- package/build/hooks/useIsMounted.js.map +1 -0
- package/build/hooks/useLastConnector.js +39 -0
- package/build/hooks/useLastConnector.js.map +1 -0
- package/build/hooks/useLocales.d.ts +1 -1
- package/build/hooks/useLocales.js +68 -0
- package/build/hooks/useLocales.js.map +1 -0
- package/build/hooks/useLockBodyScroll.js +53 -0
- package/build/hooks/useLockBodyScroll.js.map +1 -0
- package/build/hooks/usePrevious.js +14 -0
- package/build/hooks/usePrevious.js.map +1 -0
- package/build/hooks/useResolvedIdentity.d.ts +70 -0
- package/build/hooks/useResolvedIdentity.js +90 -0
- package/build/hooks/useResolvedIdentity.js.map +1 -0
- package/build/hooks/useRouteProps.d.ts +10 -5
- package/build/hooks/useRouteProps.js +27 -0
- package/build/hooks/useRouteProps.js.map +1 -0
- package/build/hooks/useWalletConnectModal.js +59 -0
- package/build/hooks/useWalletConnectModal.js.map +1 -0
- package/build/hooks/useWindowSize.js +23 -0
- package/build/hooks/useWindowSize.js.map +1 -0
- package/build/index.d.ts +61 -16
- package/build/index.js +31 -0
- package/build/index.js.map +1 -0
- package/build/localizations/index.js +57 -0
- package/build/localizations/index.js.map +1 -0
- package/build/localizations/locales/ar-AE.js +100 -0
- package/build/localizations/locales/ar-AE.js.map +1 -0
- package/build/localizations/locales/ca-AD.js +98 -0
- package/build/localizations/locales/ca-AD.js.map +1 -0
- package/build/localizations/locales/ee-EE.js +98 -0
- package/build/localizations/locales/ee-EE.js.map +1 -0
- package/build/localizations/locales/en-US.js +115 -0
- package/build/localizations/locales/en-US.js.map +1 -0
- package/build/localizations/locales/es-ES.js +98 -0
- package/build/localizations/locales/es-ES.js.map +1 -0
- package/build/localizations/locales/fa-IR.js +98 -0
- package/build/localizations/locales/fa-IR.js.map +1 -0
- package/build/localizations/locales/fr-FR.js +98 -0
- package/build/localizations/locales/fr-FR.js.map +1 -0
- package/build/localizations/locales/ja-JP.js +98 -0
- package/build/localizations/locales/ja-JP.js.map +1 -0
- package/build/localizations/locales/pt-BR.js +98 -0
- package/build/localizations/locales/pt-BR.js.map +1 -0
- package/build/localizations/locales/ru-RU.js +98 -0
- package/build/localizations/locales/ru-RU.js.map +1 -0
- package/build/localizations/locales/tr-TR.js +98 -0
- package/build/localizations/locales/tr-TR.js.map +1 -0
- package/build/localizations/locales/vi-VN.js +98 -0
- package/build/localizations/locales/vi-VN.js.map +1 -0
- package/build/localizations/locales/zh-CN.js +98 -0
- package/build/localizations/locales/zh-CN.js.map +1 -0
- package/build/openfort/CoreOpenfortProvider.d.ts +9 -22
- package/build/openfort/CoreOpenfortProvider.js +389 -0
- package/build/openfort/CoreOpenfortProvider.js.map +1 -0
- package/build/{hooks/useConnectCallback.d.ts → openfort/connectCallbackTypes.d.ts} +2 -2
- package/build/openfort/context.d.ts +3 -2
- package/build/openfort/context.js +6 -0
- package/build/openfort/context.js.map +1 -0
- package/build/openfort/core/client.d.ts +2 -1
- package/build/openfort/core/client.js +23 -0
- package/build/openfort/core/client.js.map +1 -0
- package/build/openfort/hooks/useActiveAddressSync.d.ts +20 -0
- package/build/openfort/hooks/useActiveAddressSync.js +76 -0
- package/build/openfort/hooks/useActiveAddressSync.js.map +1 -0
- package/build/openfort/hooks/useAutoRecovery.d.ts +26 -0
- package/build/openfort/hooks/useAutoRecovery.js +102 -0
- package/build/openfort/hooks/useAutoRecovery.js.map +1 -0
- package/build/openfort/hooks/useEmbeddedStateMachine.d.ts +31 -0
- package/build/openfort/hooks/useEmbeddedStateMachine.js +77 -0
- package/build/openfort/hooks/useEmbeddedStateMachine.js.map +1 -0
- package/build/openfort/selectors.d.ts +9 -0
- package/build/openfort/selectors.js +15 -0
- package/build/openfort/selectors.js.map +1 -0
- package/build/openfort/store.d.ts +46 -0
- package/build/openfort/store.js +116 -0
- package/build/openfort/store.js.map +1 -0
- package/build/openfort/useOpenfort.d.ts +9 -3
- package/build/openfort/useOpenfort.js +15 -0
- package/build/openfort/useOpenfort.js.map +1 -0
- package/build/openfort/useOpenfortStore.d.ts +2 -0
- package/build/openfort/useOpenfortStore.js +13 -0
- package/build/openfort/useOpenfortStore.js.map +1 -0
- package/build/query/index.d.ts +2 -0
- package/build/query/queryKeys.d.ts +12 -0
- package/build/query/queryKeys.js +15 -0
- package/build/query/queryKeys.js.map +1 -0
- package/build/query/queryOptions.d.ts +23 -0
- package/build/query/queryOptions.js +31 -0
- package/build/query/queryOptions.js.map +1 -0
- package/build/shared/hooks/useAsyncData.d.ts +19 -0
- package/build/shared/hooks/useAsyncData.js +69 -0
- package/build/shared/hooks/useAsyncData.js.map +1 -0
- package/build/shared/hooks/useRecoveryOTP.d.ts +11 -0
- package/build/shared/hooks/useRecoveryOTP.js +64 -0
- package/build/shared/hooks/useRecoveryOTP.js.map +1 -0
- package/build/shared/types.d.ts +65 -0
- package/build/shared/utils/embeddedWalletStatusMapper.d.ts +15 -0
- package/build/shared/utils/embeddedWalletStatusMapper.js +22 -0
- package/build/shared/utils/embeddedWalletStatusMapper.js.map +1 -0
- package/build/shared/utils/explorer.d.ts +24 -0
- package/build/shared/utils/explorer.js +71 -0
- package/build/shared/utils/explorer.js.map +1 -0
- package/build/shared/utils/otpError.d.ts +8 -0
- package/build/shared/utils/otpError.js +17 -0
- package/build/shared/utils/otpError.js.map +1 -0
- package/build/shared/utils/recovery.d.ts +15 -0
- package/build/shared/utils/recovery.js +96 -0
- package/build/shared/utils/recovery.js.map +1 -0
- package/build/shared/utils/validation.d.ts +15 -0
- package/build/shared/utils/validation.js +27 -0
- package/build/shared/utils/validation.js.map +1 -0
- package/build/shared/utils/walletStatusProps.d.ts +18 -0
- package/build/shared/utils/walletStatusProps.js +45 -0
- package/build/shared/utils/walletStatusProps.js.map +1 -0
- package/build/siwe/create-siwe-message.d.ts +15 -1
- package/build/siwe/create-siwe-message.js +32 -0
- package/build/siwe/create-siwe-message.js.map +1 -0
- package/build/solana/SolanaContext.d.ts +43 -0
- package/build/solana/SolanaContext.js +87 -0
- package/build/solana/SolanaContext.js.map +1 -0
- package/build/solana/constants.d.ts +21 -0
- package/build/solana/constants.js +24 -0
- package/build/solana/constants.js.map +1 -0
- package/build/solana/hooks/recoveryResolver.d.ts +16 -0
- package/build/solana/hooks/recoveryResolver.js +39 -0
- package/build/solana/hooks/recoveryResolver.js.map +1 -0
- package/build/solana/hooks/useSolanaEmbeddedWallet.d.ts +17 -0
- package/build/solana/hooks/useSolanaEmbeddedWallet.js +389 -0
- package/build/solana/hooks/useSolanaEmbeddedWallet.js.map +1 -0
- package/build/solana/hooks/utils.d.ts +2 -0
- package/build/solana/hooks/utils.js +18 -0
- package/build/solana/hooks/utils.js.map +1 -0
- package/build/solana/index.d.ts +12 -0
- package/build/solana/index.js +2 -0
- package/build/solana/index.js.map +1 -0
- package/build/solana/operations.d.ts +22 -0
- package/build/solana/operations.js +40 -0
- package/build/solana/operations.js.map +1 -0
- package/build/solana/provider.d.ts +131 -0
- package/build/solana/provider.js +126 -0
- package/build/solana/provider.js.map +1 -0
- package/build/solana/types.d.ts +253 -0
- package/build/solana/utils/transfer.d.ts +9 -0
- package/build/solana/utils/transfer.js +20 -0
- package/build/solana/utils/transfer.js.map +1 -0
- package/build/styles/index.js +334 -0
- package/build/styles/index.js.map +1 -0
- package/build/styles/styled/index.js +14 -0
- package/build/styles/styled/index.js.map +1 -0
- package/build/styles/themes/base.js +147 -0
- package/build/styles/themes/base.js.map +1 -0
- package/build/styles/themes/index.js +13 -0
- package/build/styles/themes/index.js.map +1 -0
- package/build/styles/themes/midnight.js +78 -0
- package/build/styles/themes/midnight.js.map +1 -0
- package/build/styles/themes/minimal.js +100 -0
- package/build/styles/themes/minimal.js.map +1 -0
- package/build/styles/themes/nouns.js +83 -0
- package/build/styles/themes/nouns.js.map +1 -0
- package/build/styles/themes/retro.js +110 -0
- package/build/styles/themes/retro.js.map +1 -0
- package/build/styles/themes/rounded.js +110 -0
- package/build/styles/themes/rounded.js.map +1 -0
- package/build/styles/themes/soft.js +73 -0
- package/build/styles/themes/soft.js.map +1 -0
- package/build/styles/themes/web95.js +136 -0
- package/build/styles/themes/web95.js.map +1 -0
- package/build/types.d.ts +5 -6
- package/build/types.js +33 -0
- package/build/types.js.map +1 -0
- package/build/utils/banner.d.ts +1 -0
- package/build/utils/banner.js +14 -0
- package/build/utils/banner.js.map +1 -0
- package/build/utils/errorHandling.js +331 -0
- package/build/utils/errorHandling.js.map +1 -0
- package/build/utils/format.d.ts +18 -0
- package/build/utils/format.js +59 -0
- package/build/utils/format.js.map +1 -0
- package/build/utils/index.d.ts +2 -3
- package/build/utils/index.js +67 -0
- package/build/utils/index.js.map +1 -0
- package/build/utils/logger.js +13 -0
- package/build/utils/logger.js.map +1 -0
- package/build/utils/oauthErrorHandler.d.ts +1 -1
- package/build/utils/oauthErrorHandler.js +42 -0
- package/build/utils/oauthErrorHandler.js.map +1 -0
- package/build/utils/p3.js +14 -0
- package/build/utils/p3.js.map +1 -0
- package/build/utils/rpc.d.ts +34 -0
- package/build/utils/rpc.js +93 -0
- package/build/utils/rpc.js.map +1 -0
- package/build/utils/useOnUserReturn.js +25 -0
- package/build/utils/useOnUserReturn.js.map +1 -0
- package/build/utils/validation.js +7 -0
- package/build/utils/validation.js.map +1 -0
- package/build/utils/wallets.d.ts +6 -0
- package/build/utils/wallets.js +14 -0
- package/build/utils/wallets.js.map +1 -0
- package/build/version.d.ts +1 -1
- package/build/version.js +4 -0
- package/build/version.js.map +1 -0
- package/build/wagmi/OpenfortWagmiBridge.d.ts +3 -0
- package/build/wagmi/OpenfortWagmiBridge.js +166 -0
- package/build/wagmi/OpenfortWagmiBridge.js.map +1 -0
- package/build/wagmi/components/ChainSelect/index.js +140 -0
- package/build/wagmi/components/ChainSelect/index.js.map +1 -0
- package/build/wagmi/components/ChainSelectDropdown/index.js +144 -0
- package/build/wagmi/components/ChainSelectDropdown/index.js.map +1 -0
- package/build/wagmi/components/ChainSelectDropdown/styles.js +47 -0
- package/build/wagmi/components/ChainSelectDropdown/styles.js.map +1 -0
- package/build/wagmi/components/ChainSelectList/index.js +109 -0
- package/build/wagmi/components/ChainSelectList/index.js.map +1 -0
- package/build/wagmi/components/ChainSelectList/styles.js +225 -0
- package/build/wagmi/components/ChainSelectList/styles.js.map +1 -0
- package/build/wagmi/components/SwitchNetworks/index.js +22 -0
- package/build/wagmi/components/SwitchNetworks/index.js.map +1 -0
- package/build/wagmi/connectorFilter.d.ts +6 -0
- package/build/wagmi/connectorFilter.js +16 -0
- package/build/wagmi/connectorFilter.js.map +1 -0
- package/build/{defaultConfig.d.ts → wagmi/defaultConfig.d.ts} +1 -2
- package/build/wagmi/defaultConfig.js +27 -0
- package/build/wagmi/defaultConfig.js.map +1 -0
- package/build/wagmi/defaultConnectors.js +36 -0
- package/build/wagmi/defaultConnectors.js.map +1 -0
- package/build/wagmi/embeddedConnector.d.ts +4 -0
- package/build/wagmi/embeddedConnector.js +80 -0
- package/build/wagmi/embeddedConnector.js.map +1 -0
- package/build/wagmi/index.d.ts +10 -0
- package/build/wagmi/index.js +10 -0
- package/build/wagmi/index.js.map +1 -0
- package/build/wagmi/useChainIsSupported.d.ts +20 -0
- package/build/wagmi/useChainIsSupported.js +30 -0
- package/build/wagmi/useChainIsSupported.js.map +1 -0
- package/build/wagmi/useChains.d.ts +29 -0
- package/build/wagmi/useChains.js +38 -0
- package/build/wagmi/useChains.js.map +1 -0
- package/build/wagmi/useConnectWithSiwe.d.ts +22 -0
- package/build/wagmi/useConnectWithSiwe.js +115 -0
- package/build/wagmi/useConnectWithSiwe.js.map +1 -0
- package/build/wagmi/useEmbeddedWalletWagmiSync.d.ts +2 -0
- package/build/wagmi/useEmbeddedWalletWagmiSync.js +55 -0
- package/build/wagmi/useEmbeddedWalletWagmiSync.js.map +1 -0
- package/build/wagmi/useWalletAuth.d.ts +24 -0
- package/build/wagmi/useWalletAuth.js +180 -0
- package/build/wagmi/useWalletAuth.js.map +1 -0
- package/build/wallets/useExternalConnectors.d.ts +17 -0
- package/build/wallets/useExternalConnectors.js +98 -0
- package/build/wallets/useExternalConnectors.js.map +1 -0
- package/build/wallets/walletConfigs.js +344 -0
- package/build/wallets/walletConfigs.js.map +1 -0
- package/package.json +62 -11
- package/build/components/PageLayout/index.d.ts +0 -6
- package/build/components/contexts/web3/index.d.ts +0 -13
- package/build/constants/erc20.d.ts +0 -42
- package/build/hooks/openfort/auth/useWalletAuth.d.ts +0 -20
- package/build/hooks/openfort/useConnectWithSiwe.d.ts +0 -8
- package/build/hooks/openfort/useWalletAssets.d.ts +0 -16
- package/build/hooks/openfort/useWallets.d.ts +0 -134
- package/build/hooks/useChainIsSupported.d.ts +0 -24
- package/build/hooks/useChains.d.ts +0 -41
- package/build/hooks/useConnect.d.ts +0 -24
- package/build/hooks/useEnsFallbackConfig.d.ts +0 -1
- package/build/index.es.js +0 -19627
- package/build/index.es.js.map +0 -1
- package/build/openfortCustomTypes.d.ts +0 -10
- package/build/wallets/index.d.ts +0 -7
- package/build/wallets/useWagmiWallets.d.ts +0 -9
- /package/build/components/Pages/{SoicalProviders → SocialProviders}/index.d.ts +0 -0
- /package/build/{components/Common → wagmi/components}/ChainSelect/index.d.ts +0 -0
- /package/build/{components/Common → wagmi/components}/ChainSelectDropdown/index.d.ts +0 -0
- /package/build/{components/Common → wagmi/components}/ChainSelectDropdown/styles.d.ts +0 -0
- /package/build/{components/Common → wagmi/components}/ChainSelectList/index.d.ts +0 -0
- /package/build/{components/Common → wagmi/components}/ChainSelectList/styles.d.ts +0 -0
- /package/build/{components/Pages → wagmi/components}/SwitchNetworks/index.d.ts +0 -0
- /package/build/{defaultConnectors.d.ts → wagmi/defaultConnectors.d.ts} +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Solana Wallet Operations
|
|
3
|
+
*
|
|
4
|
+
* Pure functions for signing operations.
|
|
5
|
+
* Extracted from hooks for testability and reusability.
|
|
6
|
+
*
|
|
7
|
+
* CRITICAL: Solana uses Ed25519, NOT keccak256.
|
|
8
|
+
* Always set hashMessage: false when signing.
|
|
9
|
+
*/
|
|
10
|
+
import type { SolanaTransaction } from './types';
|
|
11
|
+
/**
|
|
12
|
+
* Extract message bytes from various Solana transaction formats
|
|
13
|
+
*
|
|
14
|
+
* Supports:
|
|
15
|
+
* - Raw Uint8Array
|
|
16
|
+
* - Object with messageBytes property
|
|
17
|
+
* - Object with serializeMessage() method (legacy Transaction)
|
|
18
|
+
*
|
|
19
|
+
* @param transaction - Transaction in various formats
|
|
20
|
+
* @returns Transaction bytes as Uint8Array
|
|
21
|
+
*/
|
|
22
|
+
export declare function getTransactionBytes(transaction: SolanaTransaction): Uint8Array;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { OpenfortError, OpenfortReactErrorType } from '../types.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Solana Wallet Operations
|
|
5
|
+
*
|
|
6
|
+
* Pure functions for signing operations.
|
|
7
|
+
* Extracted from hooks for testability and reusability.
|
|
8
|
+
*
|
|
9
|
+
* CRITICAL: Solana uses Ed25519, NOT keccak256.
|
|
10
|
+
* Always set hashMessage: false when signing.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Extract message bytes from various Solana transaction formats
|
|
14
|
+
*
|
|
15
|
+
* Supports:
|
|
16
|
+
* - Raw Uint8Array
|
|
17
|
+
* - Object with messageBytes property
|
|
18
|
+
* - Object with serializeMessage() method (legacy Transaction)
|
|
19
|
+
*
|
|
20
|
+
* @param transaction - Transaction in various formats
|
|
21
|
+
* @returns Transaction bytes as Uint8Array
|
|
22
|
+
*/
|
|
23
|
+
function getTransactionBytes(transaction) {
|
|
24
|
+
// Raw bytes
|
|
25
|
+
if (transaction instanceof Uint8Array) {
|
|
26
|
+
return transaction;
|
|
27
|
+
}
|
|
28
|
+
// Object with messageBytes (VersionedTransaction style)
|
|
29
|
+
if ('messageBytes' in transaction) {
|
|
30
|
+
return transaction.messageBytes;
|
|
31
|
+
}
|
|
32
|
+
// Object with serializeMessage (legacy Transaction style)
|
|
33
|
+
if ('serializeMessage' in transaction && typeof transaction.serializeMessage === 'function') {
|
|
34
|
+
return transaction.serializeMessage();
|
|
35
|
+
}
|
|
36
|
+
throw new OpenfortError('Unsupported Solana transaction format', OpenfortReactErrorType.CONFIGURATION_ERROR);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { getTransactionBytes };
|
|
40
|
+
//# sourceMappingURL=operations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Solana Wallet Provider Implementation
|
|
3
|
+
*
|
|
4
|
+
* Provides signing capabilities for Solana transactions and messages.
|
|
5
|
+
* This provider implements a request-based API pattern similar to EIP-1193
|
|
6
|
+
* but adapted for Solana operations.
|
|
7
|
+
*
|
|
8
|
+
* CRITICAL: Ed25519 signing is used for Solana (no keccak256 hashing).
|
|
9
|
+
* When calling the Openfort SDK, always use hashMessage: false.
|
|
10
|
+
*/
|
|
11
|
+
import type { EmbeddedAccount } from '@openfort/openfort-js';
|
|
12
|
+
import type { OpenfortEmbeddedSolanaWalletProvider, SignedSolanaTransaction, SolanaSignAllTransactionsRequest, SolanaSignMessageRequest, SolanaSignTransactionRequest, SolanaTransaction } from './types';
|
|
13
|
+
/**
|
|
14
|
+
* Configuration for creating an OpenfortSolanaProvider
|
|
15
|
+
*/
|
|
16
|
+
interface OpenfortSolanaProviderConfig {
|
|
17
|
+
/** The embedded account to use for this provider */
|
|
18
|
+
account: EmbeddedAccount;
|
|
19
|
+
/**
|
|
20
|
+
* Function to sign a single transaction.
|
|
21
|
+
* Should use hashMessage: false for Ed25519 signing.
|
|
22
|
+
*/
|
|
23
|
+
signTransaction: (transaction: SolanaTransaction) => Promise<SignedSolanaTransaction>;
|
|
24
|
+
/**
|
|
25
|
+
* Function to sign multiple transactions.
|
|
26
|
+
* Should use hashMessage: false for Ed25519 signing.
|
|
27
|
+
*/
|
|
28
|
+
signAllTransactions: (transactions: SolanaTransaction[]) => Promise<SignedSolanaTransaction[]>;
|
|
29
|
+
/**
|
|
30
|
+
* Function to sign a message.
|
|
31
|
+
* CRITICAL: Must use hashMessage: false for Ed25519 (no keccak256).
|
|
32
|
+
*/
|
|
33
|
+
signMessage: (message: string) => Promise<string>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Embedded Solana wallet provider implementation for Openfort.
|
|
37
|
+
*
|
|
38
|
+
* This provider can be used directly for signing operations or wrapped
|
|
39
|
+
* with Kit signers for use with @solana/kit.
|
|
40
|
+
*
|
|
41
|
+
* @example Direct usage
|
|
42
|
+
* ```ts
|
|
43
|
+
* const signature = await provider.signMessage('Hello Solana!');
|
|
44
|
+
* const signed = await provider.signTransaction(transaction);
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* @example Request-based API
|
|
48
|
+
* ```ts
|
|
49
|
+
* const { signature } = await provider.request({
|
|
50
|
+
* method: 'signMessage',
|
|
51
|
+
* params: { message: 'Hello Solana!' }
|
|
52
|
+
* });
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
declare class OpenfortSolanaProvider implements OpenfortEmbeddedSolanaWalletProvider {
|
|
56
|
+
private readonly _account;
|
|
57
|
+
private readonly _signTransaction;
|
|
58
|
+
private readonly _signAllTransactions;
|
|
59
|
+
private readonly _signMessage;
|
|
60
|
+
/**
|
|
61
|
+
* Creates a new OpenfortSolanaProvider instance
|
|
62
|
+
*
|
|
63
|
+
* @param config - Provider configuration including account and signing functions
|
|
64
|
+
*/
|
|
65
|
+
constructor(config: OpenfortSolanaProviderConfig);
|
|
66
|
+
/**
|
|
67
|
+
* The public key of the wallet (Solana address in Base58 format)
|
|
68
|
+
*/
|
|
69
|
+
get publicKey(): string;
|
|
70
|
+
/**
|
|
71
|
+
* Sign a message
|
|
72
|
+
*
|
|
73
|
+
* @param message - Message to sign (UTF-8 string)
|
|
74
|
+
* @returns Base58 encoded signature
|
|
75
|
+
*/
|
|
76
|
+
signMessage(message: string): Promise<string>;
|
|
77
|
+
/**
|
|
78
|
+
* Sign a single transaction
|
|
79
|
+
*
|
|
80
|
+
* @param transaction - Transaction to sign (various formats supported)
|
|
81
|
+
* @returns Signed transaction with signature and public key
|
|
82
|
+
*/
|
|
83
|
+
signTransaction(transaction: SolanaTransaction): Promise<SignedSolanaTransaction>;
|
|
84
|
+
/**
|
|
85
|
+
* Sign multiple transactions atomically
|
|
86
|
+
*
|
|
87
|
+
* @param transactions - Array of transactions to sign
|
|
88
|
+
* @returns Array of signed transactions in the same order
|
|
89
|
+
*/
|
|
90
|
+
signAllTransactions(transactions: SolanaTransaction[]): Promise<SignedSolanaTransaction[]>;
|
|
91
|
+
/**
|
|
92
|
+
* Request-based API for wallet operations
|
|
93
|
+
*
|
|
94
|
+
* Provides a unified interface similar to EIP-1193 but for Solana operations.
|
|
95
|
+
*/
|
|
96
|
+
request(args: SolanaSignMessageRequest): Promise<{
|
|
97
|
+
signature: string;
|
|
98
|
+
}>;
|
|
99
|
+
request(args: SolanaSignTransactionRequest): Promise<{
|
|
100
|
+
signedTransaction: SignedSolanaTransaction;
|
|
101
|
+
}>;
|
|
102
|
+
request(args: SolanaSignAllTransactionsRequest): Promise<{
|
|
103
|
+
signedTransactions: SignedSolanaTransaction[];
|
|
104
|
+
}>;
|
|
105
|
+
/**
|
|
106
|
+
* Pretty log output for when an instance of this class is console.log'd
|
|
107
|
+
*/
|
|
108
|
+
toJSON(): string;
|
|
109
|
+
/**
|
|
110
|
+
* String representation
|
|
111
|
+
*/
|
|
112
|
+
toString(): string;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Creates a new OpenfortSolanaProvider instance
|
|
116
|
+
*
|
|
117
|
+
* @param config - Provider configuration
|
|
118
|
+
* @returns A new OpenfortSolanaProvider instance
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```ts
|
|
122
|
+
* const provider = createSolanaProvider({
|
|
123
|
+
* account: embeddedAccount,
|
|
124
|
+
* signTransaction: async (tx) => { ... },
|
|
125
|
+
* signAllTransactions: async (txs) => { ... },
|
|
126
|
+
* signMessage: async (msg) => { ... },
|
|
127
|
+
* });
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
130
|
+
export declare function createSolanaProvider(config: OpenfortSolanaProviderConfig): OpenfortSolanaProvider;
|
|
131
|
+
export {};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Solana Wallet Provider Implementation
|
|
3
|
+
*
|
|
4
|
+
* Provides signing capabilities for Solana transactions and messages.
|
|
5
|
+
* This provider implements a request-based API pattern similar to EIP-1193
|
|
6
|
+
* but adapted for Solana operations.
|
|
7
|
+
*
|
|
8
|
+
* CRITICAL: Ed25519 signing is used for Solana (no keccak256 hashing).
|
|
9
|
+
* When calling the Openfort SDK, always use hashMessage: false.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Embedded Solana wallet provider implementation for Openfort.
|
|
13
|
+
*
|
|
14
|
+
* This provider can be used directly for signing operations or wrapped
|
|
15
|
+
* with Kit signers for use with @solana/kit.
|
|
16
|
+
*
|
|
17
|
+
* @example Direct usage
|
|
18
|
+
* ```ts
|
|
19
|
+
* const signature = await provider.signMessage('Hello Solana!');
|
|
20
|
+
* const signed = await provider.signTransaction(transaction);
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* @example Request-based API
|
|
24
|
+
* ```ts
|
|
25
|
+
* const { signature } = await provider.request({
|
|
26
|
+
* method: 'signMessage',
|
|
27
|
+
* params: { message: 'Hello Solana!' }
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
class OpenfortSolanaProvider {
|
|
32
|
+
/**
|
|
33
|
+
* Creates a new OpenfortSolanaProvider instance
|
|
34
|
+
*
|
|
35
|
+
* @param config - Provider configuration including account and signing functions
|
|
36
|
+
*/
|
|
37
|
+
constructor(config) {
|
|
38
|
+
this._account = config.account;
|
|
39
|
+
this._signTransaction = config.signTransaction;
|
|
40
|
+
this._signAllTransactions = config.signAllTransactions;
|
|
41
|
+
this._signMessage = config.signMessage;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The public key of the wallet (Solana address in Base58 format)
|
|
45
|
+
*/
|
|
46
|
+
get publicKey() {
|
|
47
|
+
return this._account.address;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Sign a message
|
|
51
|
+
*
|
|
52
|
+
* @param message - Message to sign (UTF-8 string)
|
|
53
|
+
* @returns Base58 encoded signature
|
|
54
|
+
*/
|
|
55
|
+
async signMessage(message) {
|
|
56
|
+
return await this._signMessage(message);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Sign a single transaction
|
|
60
|
+
*
|
|
61
|
+
* @param transaction - Transaction to sign (various formats supported)
|
|
62
|
+
* @returns Signed transaction with signature and public key
|
|
63
|
+
*/
|
|
64
|
+
async signTransaction(transaction) {
|
|
65
|
+
return await this._signTransaction(transaction);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Sign multiple transactions atomically
|
|
69
|
+
*
|
|
70
|
+
* @param transactions - Array of transactions to sign
|
|
71
|
+
* @returns Array of signed transactions in the same order
|
|
72
|
+
*/
|
|
73
|
+
async signAllTransactions(transactions) {
|
|
74
|
+
return await this._signAllTransactions(transactions);
|
|
75
|
+
}
|
|
76
|
+
async request(args) {
|
|
77
|
+
switch (args.method) {
|
|
78
|
+
case 'signMessage': {
|
|
79
|
+
const signature = await this._signMessage(args.params.message);
|
|
80
|
+
return { signature };
|
|
81
|
+
}
|
|
82
|
+
case 'signTransaction': {
|
|
83
|
+
const signedTransaction = await this._signTransaction(args.params.transaction);
|
|
84
|
+
return { signedTransaction };
|
|
85
|
+
}
|
|
86
|
+
case 'signAllTransactions': {
|
|
87
|
+
const signedTransactions = await this._signAllTransactions(args.params.transactions);
|
|
88
|
+
return { signedTransactions };
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Pretty log output for when an instance of this class is console.log'd
|
|
94
|
+
*/
|
|
95
|
+
toJSON() {
|
|
96
|
+
return `OpenfortSolanaProvider(${this.publicKey})`;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* String representation
|
|
100
|
+
*/
|
|
101
|
+
toString() {
|
|
102
|
+
return this.toJSON();
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Creates a new OpenfortSolanaProvider instance
|
|
107
|
+
*
|
|
108
|
+
* @param config - Provider configuration
|
|
109
|
+
* @returns A new OpenfortSolanaProvider instance
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```ts
|
|
113
|
+
* const provider = createSolanaProvider({
|
|
114
|
+
* account: embeddedAccount,
|
|
115
|
+
* signTransaction: async (tx) => { ... },
|
|
116
|
+
* signAllTransactions: async (txs) => { ... },
|
|
117
|
+
* signMessage: async (msg) => { ... },
|
|
118
|
+
* });
|
|
119
|
+
* ```
|
|
120
|
+
*/
|
|
121
|
+
function createSolanaProvider(config) {
|
|
122
|
+
return new OpenfortSolanaProvider(config);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export { createSolanaProvider };
|
|
126
|
+
//# sourceMappingURL=provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Solana-specific types for @openfort/react/solana
|
|
3
|
+
*
|
|
4
|
+
* These types define the Solana wallet state machine and related interfaces.
|
|
5
|
+
*/
|
|
6
|
+
import type { ChainTypeEnum, EmbeddedAccount, RecoveryMethod, RecoveryParams } from '@openfort/openfort-js';
|
|
7
|
+
import type React from 'react';
|
|
8
|
+
import type { ConnectedWalletState, CreateEmbeddedWalletOptions, SetActiveEmbeddedWalletOptionsBase, SetRecoveryOptions as SetRecoveryOptionsBase, WalletDerived } from '../shared/types';
|
|
9
|
+
/**
|
|
10
|
+
* Solana cluster identifier
|
|
11
|
+
*/
|
|
12
|
+
export type SolanaCluster = 'mainnet-beta' | 'devnet' | 'testnet';
|
|
13
|
+
/**
|
|
14
|
+
* Solana commitment level for transactions
|
|
15
|
+
*/
|
|
16
|
+
export type SolanaCommitment = 'processed' | 'confirmed' | 'finalized';
|
|
17
|
+
/**
|
|
18
|
+
* UI options for Solana-connected views (e.g. SolanaConnected page)
|
|
19
|
+
*/
|
|
20
|
+
export type SolanaUIOptions = {
|
|
21
|
+
/** Custom avatar component; receives address for display */
|
|
22
|
+
customAvatar?: React.ComponentType<{
|
|
23
|
+
address: string;
|
|
24
|
+
}>;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Configuration for Solana support in OpenfortProvider
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```tsx
|
|
31
|
+
* <OpenfortProvider
|
|
32
|
+
* publishableKey="pk_..."
|
|
33
|
+
* walletConfig={{
|
|
34
|
+
* shieldPublishableKey: 'shield_pk_...',
|
|
35
|
+
* solana: {
|
|
36
|
+
* cluster: 'mainnet-beta',
|
|
37
|
+
* commitment: 'confirmed'
|
|
38
|
+
* }
|
|
39
|
+
* }}
|
|
40
|
+
* >
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export type SolanaConfig = {
|
|
44
|
+
/** Solana cluster to connect to */
|
|
45
|
+
cluster: SolanaCluster;
|
|
46
|
+
/** RPC URLs per cluster (mirrors ethereum.rpcUrls) */
|
|
47
|
+
rpcUrls?: Partial<Record<'mainnet-beta' | 'devnet' | 'testnet', string>>;
|
|
48
|
+
/** Commitment level for transactions (default: 'confirmed') */
|
|
49
|
+
commitment?: SolanaCommitment;
|
|
50
|
+
/** UI options for Solana-connected screens */
|
|
51
|
+
ui?: SolanaUIOptions;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Solana transaction formats supported by the provider
|
|
55
|
+
*
|
|
56
|
+
* Supports both @solana/kit format and raw bytes.
|
|
57
|
+
*/
|
|
58
|
+
export type SolanaTransaction = {
|
|
59
|
+
messageBytes: Uint8Array;
|
|
60
|
+
} | {
|
|
61
|
+
serializeMessage(): Uint8Array;
|
|
62
|
+
} | Uint8Array;
|
|
63
|
+
/**
|
|
64
|
+
* Signed Solana transaction result
|
|
65
|
+
*/
|
|
66
|
+
export type SignedSolanaTransaction = {
|
|
67
|
+
/** Base58 encoded signature */
|
|
68
|
+
signature: string;
|
|
69
|
+
/** Base58 encoded public key of signer */
|
|
70
|
+
publicKey: string;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Request to sign a message
|
|
74
|
+
*/
|
|
75
|
+
export type SolanaSignMessageRequest = {
|
|
76
|
+
method: 'signMessage';
|
|
77
|
+
params: {
|
|
78
|
+
message: string;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Request to sign a transaction
|
|
83
|
+
*/
|
|
84
|
+
export type SolanaSignTransactionRequest = {
|
|
85
|
+
method: 'signTransaction';
|
|
86
|
+
params: {
|
|
87
|
+
transaction: SolanaTransaction;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Request to sign multiple transactions
|
|
92
|
+
*/
|
|
93
|
+
export type SolanaSignAllTransactionsRequest = {
|
|
94
|
+
method: 'signAllTransactions';
|
|
95
|
+
params: {
|
|
96
|
+
transactions: SolanaTransaction[];
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Solana embedded wallet provider
|
|
101
|
+
*
|
|
102
|
+
* Provides signing capabilities for Solana transactions and messages.
|
|
103
|
+
* Can be used directly or wrapped with Kit signers.
|
|
104
|
+
*
|
|
105
|
+
* @example Direct usage
|
|
106
|
+
* ```tsx
|
|
107
|
+
* if (solana.status === 'connected') {
|
|
108
|
+
* const signature = await solana.provider.signMessage('Hello Solana!');
|
|
109
|
+
* }
|
|
110
|
+
* ```
|
|
111
|
+
*
|
|
112
|
+
* @example With Kit Signer (from @openfort/react/solana)
|
|
113
|
+
* ```tsx
|
|
114
|
+
* const signer = createTransactionSigner(provider);
|
|
115
|
+
* // Use with @solana/kit
|
|
116
|
+
* ```
|
|
117
|
+
*/
|
|
118
|
+
export interface OpenfortEmbeddedSolanaWalletProvider {
|
|
119
|
+
/** Public key of the wallet (Base58 encoded) */
|
|
120
|
+
readonly publicKey: string;
|
|
121
|
+
/**
|
|
122
|
+
* Sign a message
|
|
123
|
+
* @param message - Message to sign (UTF-8 string)
|
|
124
|
+
* @returns Base58 encoded signature
|
|
125
|
+
*/
|
|
126
|
+
signMessage(message: string): Promise<string>;
|
|
127
|
+
/**
|
|
128
|
+
* Sign a single transaction
|
|
129
|
+
* @param transaction - Transaction to sign
|
|
130
|
+
* @returns Signed transaction with signature and public key
|
|
131
|
+
*/
|
|
132
|
+
signTransaction(transaction: SolanaTransaction): Promise<SignedSolanaTransaction>;
|
|
133
|
+
/**
|
|
134
|
+
* Sign multiple transactions atomically
|
|
135
|
+
* @param transactions - Array of transactions to sign
|
|
136
|
+
* @returns Array of signed transactions
|
|
137
|
+
*/
|
|
138
|
+
signAllTransactions(transactions: SolanaTransaction[]): Promise<SignedSolanaTransaction[]>;
|
|
139
|
+
/**
|
|
140
|
+
* Request-based API (EIP-1193 style)
|
|
141
|
+
*/
|
|
142
|
+
request(args: SolanaSignMessageRequest): Promise<{
|
|
143
|
+
signature: string;
|
|
144
|
+
}>;
|
|
145
|
+
request(args: SolanaSignTransactionRequest): Promise<{
|
|
146
|
+
signedTransaction: SignedSolanaTransaction;
|
|
147
|
+
}>;
|
|
148
|
+
request(args: SolanaSignAllTransactionsRequest): Promise<{
|
|
149
|
+
signedTransactions: SignedSolanaTransaction[];
|
|
150
|
+
}>;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Connected Solana embedded wallet
|
|
154
|
+
*/
|
|
155
|
+
export type ConnectedEmbeddedSolanaWallet = {
|
|
156
|
+
/** Embedded account id (from Openfort) */
|
|
157
|
+
id: string;
|
|
158
|
+
/** Solana address in Base58 format */
|
|
159
|
+
address: string;
|
|
160
|
+
/** Chain type discriminator */
|
|
161
|
+
chainType: typeof ChainTypeEnum.SVM;
|
|
162
|
+
/** Wallet index (for multiple wallets) */
|
|
163
|
+
walletIndex: number;
|
|
164
|
+
/** Recovery method for this wallet */
|
|
165
|
+
recoveryMethod?: RecoveryMethod;
|
|
166
|
+
/** Get the Solana wallet provider */
|
|
167
|
+
getProvider(): Promise<OpenfortEmbeddedSolanaWalletProvider>;
|
|
168
|
+
};
|
|
169
|
+
/** Options for setting active Solana wallet (chain-specific address + shared recovery). */
|
|
170
|
+
export type SetActiveSolanaWalletOptions = SetActiveEmbeddedWalletOptionsBase & {
|
|
171
|
+
/** Wallet address to set as active (Base58) */
|
|
172
|
+
address: string;
|
|
173
|
+
};
|
|
174
|
+
/**
|
|
175
|
+
* Actions available on Solana embedded wallets
|
|
176
|
+
*/
|
|
177
|
+
export interface SolanaWalletActions {
|
|
178
|
+
/** Create a new Solana embedded wallet */
|
|
179
|
+
create(options?: CreateEmbeddedWalletOptions): Promise<EmbeddedAccount>;
|
|
180
|
+
/** List of available Solana wallets */
|
|
181
|
+
wallets: ConnectedEmbeddedSolanaWallet[];
|
|
182
|
+
/** Set the active wallet */
|
|
183
|
+
setActive(options: SetActiveSolanaWalletOptions): Promise<void>;
|
|
184
|
+
/** Update recovery method */
|
|
185
|
+
setRecovery(options: SetRecoveryOptionsBase): Promise<void>;
|
|
186
|
+
/** Export the private key (requires user confirmation) */
|
|
187
|
+
exportPrivateKey(): Promise<string>;
|
|
188
|
+
}
|
|
189
|
+
export type SolanaWalletStateBase = (SolanaWalletActions & {
|
|
190
|
+
status: 'disconnected';
|
|
191
|
+
activeWallet: null;
|
|
192
|
+
address?: never;
|
|
193
|
+
cluster?: never;
|
|
194
|
+
displayAddress?: never;
|
|
195
|
+
}) | (SolanaWalletActions & {
|
|
196
|
+
status: 'fetching-wallets';
|
|
197
|
+
activeWallet: null;
|
|
198
|
+
address?: never;
|
|
199
|
+
cluster?: never;
|
|
200
|
+
displayAddress?: never;
|
|
201
|
+
}) | (SolanaWalletActions & {
|
|
202
|
+
status: 'connecting';
|
|
203
|
+
activeWallet: ConnectedEmbeddedSolanaWallet;
|
|
204
|
+
address: string;
|
|
205
|
+
cluster: SolanaCluster;
|
|
206
|
+
displayAddress: string;
|
|
207
|
+
}) | (SolanaWalletActions & {
|
|
208
|
+
status: 'reconnecting';
|
|
209
|
+
activeWallet: ConnectedEmbeddedSolanaWallet;
|
|
210
|
+
address: string;
|
|
211
|
+
cluster: SolanaCluster;
|
|
212
|
+
displayAddress: string;
|
|
213
|
+
}) | (SolanaWalletActions & {
|
|
214
|
+
status: 'creating';
|
|
215
|
+
activeWallet: null;
|
|
216
|
+
address?: never;
|
|
217
|
+
cluster?: never;
|
|
218
|
+
displayAddress?: never;
|
|
219
|
+
}) | (SolanaWalletActions & {
|
|
220
|
+
status: 'needs-recovery';
|
|
221
|
+
activeWallet: ConnectedEmbeddedSolanaWallet;
|
|
222
|
+
address?: string;
|
|
223
|
+
cluster?: SolanaCluster;
|
|
224
|
+
displayAddress?: string;
|
|
225
|
+
}) | (SolanaWalletActions & {
|
|
226
|
+
status: 'connected';
|
|
227
|
+
activeWallet: ConnectedEmbeddedSolanaWallet;
|
|
228
|
+
provider: OpenfortEmbeddedSolanaWalletProvider;
|
|
229
|
+
address: string;
|
|
230
|
+
cluster: SolanaCluster;
|
|
231
|
+
displayAddress: string;
|
|
232
|
+
}) | (SolanaWalletActions & {
|
|
233
|
+
status: 'error';
|
|
234
|
+
activeWallet: ConnectedEmbeddedSolanaWallet | null;
|
|
235
|
+
error: string;
|
|
236
|
+
address?: string;
|
|
237
|
+
cluster?: SolanaCluster;
|
|
238
|
+
displayAddress?: string;
|
|
239
|
+
});
|
|
240
|
+
/** Derived booleans + optional RPC URL (Solana-specific). */
|
|
241
|
+
export type SolanaWalletDerived = WalletDerived & {
|
|
242
|
+
rpcUrl?: string;
|
|
243
|
+
};
|
|
244
|
+
export type SolanaWalletState = SolanaWalletStateBase & SolanaWalletDerived & ConnectedWalletState;
|
|
245
|
+
/**
|
|
246
|
+
* Options for useSolanaEmbeddedWallet hook
|
|
247
|
+
*/
|
|
248
|
+
export type UseEmbeddedSolanaWalletOptions = {
|
|
249
|
+
/** Solana cluster (mainnet-beta, devnet, testnet). Overrides context when set. */
|
|
250
|
+
cluster?: SolanaCluster;
|
|
251
|
+
/** Recovery params for wallet access */
|
|
252
|
+
recoveryParams?: RecoveryParams;
|
|
253
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AccountRole, address } from '@solana/kit';
|
|
2
|
+
export declare function createTransferSolInstruction(from: string, to: string, lamports: bigint): {
|
|
3
|
+
programAddress: ReturnType<typeof address>;
|
|
4
|
+
data: Uint8Array;
|
|
5
|
+
accounts: Array<{
|
|
6
|
+
address: ReturnType<typeof address>;
|
|
7
|
+
role: AccountRole;
|
|
8
|
+
}>;
|
|
9
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { address, AccountRole } from '@solana/kit';
|
|
2
|
+
import { TRANSFER_INSTRUCTION_INDEX, SYSTEM_PROGRAM_ADDRESS } from '../constants.js';
|
|
3
|
+
|
|
4
|
+
function createTransferSolInstruction(from, to, lamports) {
|
|
5
|
+
const data = new Uint8Array(12);
|
|
6
|
+
const view = new DataView(data.buffer);
|
|
7
|
+
view.setUint32(0, TRANSFER_INSTRUCTION_INDEX, true);
|
|
8
|
+
view.setBigUint64(4, lamports, true);
|
|
9
|
+
return {
|
|
10
|
+
programAddress: address(SYSTEM_PROGRAM_ADDRESS),
|
|
11
|
+
data,
|
|
12
|
+
accounts: [
|
|
13
|
+
{ address: address(from), role: AccountRole.WRITABLE_SIGNER },
|
|
14
|
+
{ address: address(to), role: AccountRole.WRITABLE },
|
|
15
|
+
],
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { createTransferSolInstruction };
|
|
20
|
+
//# sourceMappingURL=transfer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transfer.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;"}
|