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

tensorflow-sui

v1.0.5

Published

Upload datasets and manage Sui blockchain assets with Walrus integration.

Readme

OpenGraphClient SDK

Easily upload datasets and manage Sui blockchain assets via Walrus Publisher and Aggregator.

📦 Installation

npm install tensorflow-sui

or

yarn add tensorflow-sui

🚀 Quick Start

import { OpenGraphClient } from "tensorflow-sui";

// Initialize the client
const client = new OpenGraphClient({
  networkUrl: "https://fullnode.testnet.sui.io",
  packageId: "0x...",
  gasBudget: 100000000,
});

// Upload dataset
const result = await client.uploadDataset(
  files,           // File[]
  walletAddress,   // string
  {
    name: "Example Dataset",
    description: "Sample description",
    dataType: "image",
    dataSize: 12345,
    creator: "John Doe",
    license: "MIT",
    tags: ["sample", "example"],
  },
  ["cat", "dog"],   // Annotations
  3                // Optional epochs
);

// Check storage info and transaction
console.log(result.storageInfos);
console.log(result.transaction);

📚 API Overview

Constructor

new OpenGraphClient(config: OpenGraphClientConfig);

Constructor Parameters

| Parameter | Type | Description | |-----------------------|----------|--------------------------------------| | networkUrl | string | Sui RPC endpoint URL | | packageId | string | Smart contract package ID | | gasBudget | number | Default gas budget | | walrusNetwork? | string | Walrus network (default: testnet) | | walrusPublisherUrl? | string | Walrus publisher API URL | | walrusAggregatorUrl? | string | Walrus aggregator API URL |

Main Methods

uploadDataset

uploadDataset(
  files: File[],
  address: string,
  metadata: DatasetMetadata,
  annotations: string[],
  epochs?: number
): Promise<{
  storageInfos: WalrusStorageInfo[],
  transaction: Transaction
}>
  • files: List of files to upload (File[])
  • address: Owner's wallet address (string)
  • metadata: Metadata about the dataset (DatasetMetadata)
  • annotations: Annotations for each file (string[])
  • epochs?: Optional certification duration (number)

getDatasets

getDatasets(ownerAddress: string): Promise<DatasetMetadata[]>
  • ownerAddress: The Sui address of the dataset owner (string)

getDatasetById

getDatasetById(datasetId: string): Promise<DatasetMetadata>
  • datasetId: The object ID of the dataset (string)

uploadTrainingData

uploadTrainingData(file: File, address: string): Promise<WalrusStorageInfo>
  • file: The training data file to upload (File)
  • address: Wallet address for ownership (string)

getTrainingData

getTrainingData(blobIds: string[]): Promise<Blob[]>
  • blobIds: Array of blob IDs to download (string[])

getMedia

getMedia(blobId: string): Promise<Blob>
  • blobId: The ID of a single blob (string)

Getter/Setter Methods

  • getNetworkUrl(), setNetworkUrl(url)
  • getPackageId(), setPackageId(id)
  • getGasBudget(), setGasBudget(budget)
  • getWalrusNetwork(), setWalrusNetwork(network)
  • getWalrusPublisherUrl(), setWalrusPublisherUrl(url)
  • getWalrusAggregatorUrl(), setWalrusAggregatorUrl(url)
  • getConfig()

🛠️ Types

interface OpenGraphClientConfig {
  networkUrl: string;
  packageId: string;
  gasBudget: number;
  walrusNetwork?: string;
  walrusPublisherUrl?: string;
  walrusAggregatorUrl?: string;
}

interface DatasetMetadata {
  name: string;
  description?: string;
  dataType: string;
  dataSize: number;
  creator?: string;
  license?: string;
  tags?: string[];
}

interface WalrusStorageInfo {
  status: WalrusStorageStatus;
  blobId: string;
  endEpoch: number;
  suiRefType: string;
  suiRef: string;
  mediaUrl: string;
  suiScanUrl: string;
  suiRefId: string;
}

enum WalrusStorageStatus {
  NEWLY_CREATED = "NEWLY_CREATED",
  ALREADY_CERTIFIED = "ALREADY_CERTIFIED",
}

🌐 Walrus URLs

| Network | Publisher URL | Aggregator URL | |---------|----------------------------------------------|------------------------------------------------| | Testnet | https://publisher.testnet.walrus.atalma.io | https://aggregator.testnet.walrus.atalma.io |

License

This project is open-sourced under the ISC License.

You are free to use, copy, modify, and distribute this software with or without fee, provided that the original copyright notice and this permission notice appear.

See the LICENSE file for full license information.