Prerequisities & Installation
Prerequisites
Installation
git clone https://github.com/OpenMSCP/mscp-sdk
cd mscp-sdk/sdk
yarn install
yarn buildBasic Usage
import { OpenMSCPClient } from 'openmscp-sdk';
import { Connection, Keypair } from '@solana/web3.js';
// Initialize the client
const connection = new Connection('https://api.devnet.solana.com');
const wallet = Keypair.generate(); // Or use a wallet adapter
const client = new OpenMSCPClient(connection, wallet);
// Create a profile
const profile = await client.profile.create({
username: 'alice',
bio: 'Blockchain enthusiast',
profilePicture: 'ipfs://QmHash...'
});
// Create a post
const post = await client.post.create('Hello, OpenMSCP!');
// Send a message
const message = await client.message.send(
recipientPublicKey,
'This is an encrypted message'
);Last updated