npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@galliun/sofi-sdk

v0.1.3

Published

SDK for interacting with the Galliun SocialFi protocol

Downloads

12

Readme

Galliun SoFi SDK

A TypeScript SDK for interacting with the Galliun SoFi protocol on the Sui blockchain.

Installation

npm install @galliun/sofi-sdk

Requirements

  • Node.js >= 16
  • Sui version >= 1.21.2

Usage

First, initialize the SDK with your package ID and network:

import { SoFiClient } from '@galliun/sofi-sdk';

const sdk = new SoFiClient({
	packageId: 'YOUR_PACKAGE_ID',
	network: 'mainnet', // or 'testnet', 'devnet'
});

Profile Management

// Create a profile
const createProfileTx = await sdk.profileManager.createProfile(
	signer,
	'username',
	'Display Name',
	'Bio',
	'profile_picture_url',
	'background_picture_url',
);

// Update profile
const updateProfileTx = await sdk.profileManager.updateProfile(
	signer,
	profileId,
	'New Display Name',
	'New Bio',
	'new_profile_picture_url',
	'new_background_picture_url',
);

// Follow/Unfollow
const followTx = await sdk.profileManager.followProfile(myProfileId, targetProfileId);
const unfollowTx = await sdk.profileManager.unfollowProfile(myProfileId, targetProfileId);

Goal Management

// Create a goal
const createGoalTx = await sdk.goalManager.createGoal(
	profileId,
	'SUI',
	BigInt(1000000), // amount in smallest unit
	'Goal description',
	false, // overFund
	BigInt(Date.now() + 86400000), // expires in 24h
);

// Pay a goal
const payGoalTx = await sdk.goalManager.payGoal(goalId, coinObjectId, BigInt(100000));

// Claim a goal
const claimGoalTx = await sdk.goalManager.claimGoal(goalId);

// Cancel a goal
const cancelGoalTx = await sdk.goalManager.cancelGoal(goalId);

Tip Management

// Create a tip
const createTipTx = await sdk.tipManager.createTip(
	profileId,
	coin,
	recipientAddress,
	'SUI',
	BigInt(1000000),
	'Tip description',
);

// Claim a tip
const claimTipTx = await sdk.tipManager.claimTip(tipId);

// Cancel a tip
const cancelTipTx = await sdk.tipManager.cancelTip(tipId);

Query Methods

// Get single object details
const profile = await sdk.profileMnager.getProfileById(profileId);
const goal = await sdk.profileMnager.getGoal(goalId);
const tip = await sdk.profileMnager.getTip(tipId);

Transaction Execution

All methods that modify state return a Transaction that needs to be signed and executed:

import { Transaction } from '@mysten/sui/transactions';

// Create the transaction
const tx = await sdk.createProfile(/* ... */);

// Sign and execute the transaction using your preferred wallet or signer
const result = await wallet.signAndExecuteTransactionBlock({
	transactionBlock: tx,
});

Error Handling

All methods may throw errors if:

  • The network is unavailable
  • The contract call fails
  • Invalid parameters are provided
  • The user lacks necessary permissions

Always wrap calls in try-catch blocks and handle errors appropriately.

Data Types

The SDK uses the following main types:

interface Profile {
	id: string;
	owner: string;
	username: string;
	displayName: string;
	bio: string;
	profilePicture: string;
	backgroundPicture: string;
	points: string;
	links: ProfileLink[];
	followers: string[];
	following: string[];
	acceptTips: boolean;
}

interface Goal {
	id: string;
	profile: string;
	creator: string;
	coinType: string;
	amount: bigint;
	status: GoalStatus;
	totalPaymentsMade: bigint;
	totalAmountPaid: bigint;
	totalAmountClaimed: bigint;
	totalFeeAmount: bigint;
	totalAmountRefunded: bigint;
	description: string;
	expiresAt?: bigint;
	overFund: boolean;
}

interface Tip {
	id: string;
	creator: string;
	recipient: string;
	profile: string;
	coinType: string;
	amount: bigint;
	status: TipStatus;
	totalAmountPaid: bigint;
	totalAmountClaimed: bigint;
	totalFeeAmount: bigint;
	totalAmountRefunded: bigint;
	description: string;
}

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.