We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The example dapp should use standard libraries to support many wallets, so that devs can learn best practices.
Instead of connecting directly to Freighter, the dapp should use https://github.com/Creit-Tech/Stellar-Wallets-Kit
The text was updated successfully, but these errors were encountered:
Great! Will check this to include it in paltalabs/soroban-react#11
Sorry, something went wrong.
Currently, @soroban-react uses "connectors" Each connector should be created first as a package @soroban-react/my-connector and then used like this:
... import {futurenet, sandbox, standalone} from '@soroban-react/chains'; import {freighter} from '@soroban-react/freighter'; ... const connectors: Connector[] = [freighter()]; export default function ProviderExample({children}:{children: React.ReactNode}) { return ( <SorobanReactProvider chains={chains} appName={"Example Stellar App"} connectors={connectors}> <SorobanEventsProvider> {children} </SorobanEventsProvider> </SorobanReactProvider> ) }
A connector should just do:
export type Connector = { id: string; name: string; shortName?: string; iconUrl: string | (() => Promise<string>); iconBackground: string; installed?: boolean; downloadUrls?: { android?: string; ios?: string; browserExtension?: string; qrCode?: string; }; isConnected: () => boolean; getNetworkDetails: () => Promise<NetworkDetails>; getPublicKey: () => Promise<string>; signTransaction: (xdr: string, opts?: { network?: string; networkPassphrase?: string; accountToSign?: string }) => Promise<string>; };
I see that Stellar-Wallet-Kit has a similar architecture: https://github.com/Creit-Tech/Stellar-Wallets-Kit/tree/main/src/lib
No branches or pull requests
What problem does your feature solve?
The example dapp should use standard libraries to support many wallets, so that devs can learn best practices.
What would you like to see?
Instead of connecting directly to Freighter, the dapp should use https://github.com/Creit-Tech/Stellar-Wallets-Kit
What alternatives are there?
The text was updated successfully, but these errors were encountered: