Sollinked SDK
Sollinked is the Mail, Calendar, and Github Platform build on Solana. Users are able create @sollinked.com emails, schedule appointments through our Calendar feature, and manage Github issues all in one place!
With this SDK, you'll be able to integrate Sollinked into your app in a matter of minutes!
This app is constantly under development so be prepared to see exciting new features in the coming days!
Integrating Sollinked
You will have to wrap your Component in the SollinkedProvider like so.
import { Provider as SollinkedProvider } from '@sollinked/sdk';
...
return (
<SollinkedProvider
auth={{
address, // publicKey.toBase58()
message: "message you used to verify the address's ownership"
}}
>
<Component/>
</SollinkedProvider>
)
And that's it, really. Simple right?
If you wish to useSollinked anywhere in your web app, you'll have to wrap your App component.
Initializing Sollinked
Before you start using Sollinked, you need to initialize it like so.
const { init } = useSollinked();
useEffect(() => {
const initSollinked = async() => {
await init(signature);
}
initSollinked();
init(signature);
}, []);
How to useSollinked
In the components wrapped inside SollinkedProvider, you can call useSollinked() like any React hook. Example:
...
const { user } = useSollinked();
...
useSollinked Contents
{
user,
signature,
isVerified,
isVerifying,
init,
account: {
me,
create: createAccount,
update: updateAccount,
},
mail: {
setTiers: setMailTiers,
claim: claimMail,
claimAll: claimAllMail,
},
calendar: {
setPresetPrice: setCalendarPresetPrice,
setCustomPrice: setCalendarCustomPrice,
},
github: {
create: createGithubProfile,
update: updateGithubProfile,
toggle: toggleGitHubProfileStatus,
get: getGithubDetails,
newIssue: newGithubIssue,
delete: deleteGithubProfile,
},
integration: {
update: updateIntegration,
test: testIntegration,
}
}
Examples and More Docs
Soon tm.
Every component is typed, please refer to the typings while I make some examples.