Spling social protocol for building a solana on-chain social media platform.
Install these dependencies over:
npm:
npm install @spling/social-protocol
yarn:
yarn add @spling/social-protocol
import React, { useEffect } from "react";
import * as anchor from "@project-serum/anchor";
import { SplingProtocol } from "@spling/social-protocol";
import {
AnchorWallet,
useAnchorWallet,
useConnection,
} from "@solana/wallet-adapter-react";
export default function SplingProtocol() {
const { connection } = useConnection();
const wallet = useAnchorWallet();
useEffect(() => {
(async () => {
if (wallet?.publicKey) {
const splingProtocol = await new SplingProtocol(
connection,
wallet
).init();
}
})();
}, [wallet?.publicKey]);
return <div></div>;
}
import { SplingProtocol } from "@spling/social-protocol";
const splingProtocol = await new SplingProtocol(connection, wallet).init();
package | description |
---|---|
node | Using @spling/protocol in a nodejs environment components |
react | Using @spling/protocol in a react/browser environment |
- Clone the project:
git clone https://github.com/spling-protocol/social.git
- Install dependencies:
cd social
npm install