para_phantom_connector 1.0.0
para_phantom_connector: ^1.0.0 copied to clipboard
A Flutter package to connect and interact with Phantom Wallet to Para, enabling seamless integration with Solana blockchain applications.
Phantom Wallet Connector #
The Phantom Wallet Connector package allows developers to easily integrate the Phantom Wallet into their Dart and Flutter applications. This package provides a seamless way to connect, authenticate, and interact with the Phantom Wallet, enabling users to manage their Solana-based assets directly within your app.
Features #
- Connect to Phantom Wallet
- Retrieve wallet information
- Send and receive SOL tokens
- Sign transactions
- Sign Messages
Getting started #
To start using the Phantom Wallet Connector package, ensure you have the following prerequisites:
- Dart SDK: >=2.12.0 <3.0.0
- Flutter SDK: >=2.0.0
Add the following dependency to your pubspec.yaml file:
dependencies:
para_phantom_connector: ^1.0.0
Then, run flutter pub get to install the package.
Usage #
Here is a simple example of how to use the Phantom Wallet Connector package:
import 'package:para_phantom_connector/para_wallet_connector.dart';
void main() async {
final paraClient = Para(
environment: Environment.beta,
apiKey: apiKey,
);
final phantomConnector = ParaPhantomConnector(
para: paraClient,
appUrl: "https://example.com/",
deepLink: "exampleapp"
);
// Connect to Phantom Wallet
final address = await phantomConnector.connect();
print('Connected to wallet: $address');
// Sign a Message
final signedMessage = await phantomConnector.signMessage("Hello, World!");
}
Thank you for using the Para Phantom Connector package!