fomo-deal-sdk-v1 v0.2.2
FomoDeal SDK
Overview
The FomoDeal SDK provides developers with a powerful toolset for interacting with Ethereum and Solana blockchains. It simplifies blockchain operations, such as fetching data, managing VC-backed projects, tracking investments, and executing token-related operations like distribution and vesting.
Installation
Install the package via npm:
npm install fomo-deal-sdk
Features
- GraphQL Integration: Utilize The Graph for efficient querying of blockchain data.
- Multi-Chain Support: Seamlessly interact with Ethereum and Solana.
- VC & Project Management: Easily retrieve and manage VC and project data.
- Investment Tracking: Analyze and track investments across supported chains.
- Token Operations: Execute token distribution and vesting schedules effortlessly.
Usage
Initialization
Start by initializing the SDK.
import { FomoDeal, Network } from "fomo-deal-sdk";
const fomoDeal = new FomoDeal();
Functions
1. Fetch All Projects
Retrieve all projects on a specific blockchain network.
const projects = await fomoDeal.getAllProjects(Network.ETHEREUM);
2. Fetch Project by ID
Get detailed information about a specific project using its ID.
const project = await fomoDeal.getProjectById(Network.SOLANA, "projectId123");
3. Retrieve VC Information
Fetch details of a VC from Ethereum or Solana.
const vcInfo = await fomoDeal.getVCInfo({
ethereum: {
provider, // Ethereum provider
contractAddress, // VC registry contract address
abi, // Contract ABI
vcAddress: "vcAddress123", // VC wallet address
},
solana: {
connection, // Solana connection object
programId, // Solana program ID
vcAddress: "vcAddress123", // VC wallet address
},
});
4. Contribute to a Project
Make a contribution to a project on Ethereum or Solana.
await fomoDeal.contribute(
Network.ETHEREUM,
{
ethereum: {
provider, // Ethereum provider
contractAddress, // Project registry contract address
abi, // Contract ABI
},
},
{
vcAddress: "vcAddress123", // VC managing the project
projectCount: 1, // Project identifier
paymentTokenAddress: "tokenAddress", // Token used for payment
amount: "1000000000000000000", // Contribution amount (1 ETH in wei)
proof: [], // Optional Merkle proof
},
);
5. Distribute Tokens
Distribute tokens in batches for a project.
await fomoDeal.distributeTokens(
Network.SOLANA,
{
solana: {
connection, // Solana connection object
programId, // Solana program ID
payer, // Payer object for signing transactions
signTransaction, // Function to sign transactions
},
},
{
batchId: "batchId123", // Batch identifier
projectCount: 1, // Project identifier
recipients: ["recipient1", "recipient2"], // List of recipient addresses
},
);
6. Fetch Supported Tokens
Retrieve a list of supported payment tokens for a specific blockchain.
const supportedTokens = await fomoDeal.getSupportedTokens(Network.ETHEREUM);
7. Retrieve Investor Profile
Fetch investment details of a specific investor.
const investorProfile = await fomoDeal.getInvestorProfile(Network.SOLANA, "investorAddress", {
solana: {
connection, // Solana connection object
programId, // Solana program ID
},
});
Dependencies
The SDK leverages the following dependencies:
- Ethers.js: For seamless Ethereum blockchain interaction.
- Solana/web3.js: For managing Solana blockchain operations.
- GraphQL: To query data using The Graph.
Contributing
We welcome community contributions to improve the SDK! Follow these steps to contribute:
- Fork the repository.
- Create a new feature branch.
- Submit a pull request for review.
License
This project is licensed under the MIT License.
Support
For issues, suggestions, or questions, please visit our GitHub Issues page.
Next Steps
- Verify Functionalities: Thoroughly test the SDK for accurate real-time interactions across Ethereum and Solana.
- Deployment on NPM: Publish and verify the package for public use.
- Documentation Updates: Continuously improve the documentation based on user feedback.
This updated README.md ensures clarity, completeness, and ease of use for developers integrating the FomoDeal SDK. Let me know if further refinements are needed!
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
6 months ago
6 months ago
6 months ago
6 months ago
7 months ago
7 months ago
7 months ago
7 months ago
8 months ago
8 months ago
8 months ago
7 months ago
8 months ago
8 months ago
8 months ago