Rising Tide Developers
SDKCore

Core

The root @rising-tide/sdk entry point - smart products, instances, types, and data fetching.

The root @rising-tide/sdk entry point carries the client class and all protocol types. Every server-side data fetch or mutation runs through it.

Exports

  • RisingTideSDK - Client class. Instantiate once and reuse.
  • RisingTideConfig - Constructor input shape (baseUrl, apiKey?, timeout?, headers?)
  • RisingTideError - Error class thrown on API failures, and its RateLimitError subclass for 429
  • HttpClient - Underlying transport, available via rtClient.getHttpClient() if you need raw access
  • All protocol types: SmartProduct, ProductInstance, Contribution, ContributionRole, ProductStatus, ProductDomain, FundingGroup, Invite, ProductType, plus domain-specific shapes (SmartProductPage, SmartProductEvent, SmartProductPrediction, SmartProductGame, PageDetails, EventDetails, BracketDetails, GameLobbyDetails) and the isPage, isEvent, isPrediction and isGame narrowers
  • Utility functions, listed under Utility exports

Client shape

RisingTideSDK
one class, many service namespaces
  • smartProducts
    substrate CRUD + lifecycle
  • productInstances / instances
    numbered copies
  • productTypes
    haiku, ticket, bracket...
  • styleSets
    visual templates
  • stickers
    sticker artists + registry
  • brackets
    PREDICTION helpers
  • games
    GAME lobbies, matches, records
  • users / invites / waitlist / delegate wallet / push / apps
    identity
  • payments / fundingGroups / currencyTypes / stats
    money
  • contracts / commands / chainhooks / transactions / pendingTransactions / privy
    blockchain
  • events / locations / eventTypes
    EVENT domain
  • arweave / upload / collections / tags / errorLogs / analytics
    storage + observability
import { RisingTideSDK } from "@rising-tide/sdk";

const rtClient = new RisingTideSDK({
  baseUrl: process.env.NEXT_PUBLIC_RT_API_URL!,
  apiKey: process.env.NEXT_PUBLIC_API_KEY,
});

// Substrate domain
rtClient.smartProducts.*       // Smart product CRUD and lifecycle
rtClient.productInstances.*    // Numbered, ownable copies (alias: rtClient.instances)
rtClient.productTypes.*        // Catalog (haiku, tanka, sonnet, basic-page, openletter, ticket, bracket, game-lobby)
rtClient.styleSets.*           // Visual templates and SVG rendering
rtClient.ticketStyles.*        // Ticket style sets and styles
rtClient.gameStyles.*          // Game trophy previews from a sample match
rtClient.stickers.*            // Sticker artists and sticker registry
rtClient.brackets.*            // Bracket-specific queries (PREDICTION domain)
rtClient.games.*               // Lobbies, matches, records, leaderboards (GAME domain)

// Identity
rtClient.users.*               // User profile, preferences, notifications, achievements
rtClient.invites.*             // Invite CRUD, assignment, preview, claim
rtClient.waitlist.*            // Waitlist signup, status, open spots
rtClient.delegateWallet.*              // The person's delegate wallet: open, fund, empty, resign
rtClient.push.*                // Web Push device subscriptions
rtClient.apps.*                // App registry, signup posture, access checks

// Monetization
rtClient.payments.*            // Per-user revenue + collector queries
rtClient.fundingGroups.*       // Approved causes
rtClient.currencyTypes.*       // The currencies a product may be priced in
rtClient.stats.*               // Per-product and per-collection counters

// Blockchain
rtClient.contracts.*           // Contract generation
rtClient.commands.*            // One command surface for every state change
rtClient.chainhooks.*          // Chainhook registration + status
rtClient.transactions.*        // Transaction status queries
rtClient.pendingTransactions.* // Broadcast tx confirmation + reconciliation
rtClient.privy.*               // Server-side Privy helpers (wallet create, signing)

// Events domain
rtClient.events.*              // EVENT product helpers
rtClient.locations.*           // Venue registry
rtClient.eventTypes.*          // Event type catalog

// Storage + observability
rtClient.arweave.*             // Permanent storage helpers
rtClient.upload.*              // Media upload (avatars, sticker assets)
rtClient.productImages.*       // Permanent pictures of products and editions
rtClient.collections.*         // Curated collections (campaigns)
rtClient.tags.*                // Tag listing and typeahead
rtClient.templates.*           // Contract composition reads and the capability registry
rtClient.errorLogs.*           // App-side error log writes
rtClient.analytics.*           // Protocol-wide analytics projection

The RisingTideAdmin class in @rising-tide/sdk/admin wraps this client and adds admin-only methods. See the Admin entry point for details.

In this section

Utility exports

The root entry also exports plain functions. None of them calls the API.

GroupExports
CurrencyformatSbtcDisplay(amount) renders a bitcoin amount as whole sats however large (480,000 sats, 1 sat); it takes sBTC as a decimal, so divide sats by 100_000_000 first. formatCurrency(value, currency) and formatFee(fee, currencyType) take base units and render the on-chain decimal (0.0048 sBTC) for ledgers and operator tables. formatUsdApprox(tokenAmount, tokenPriceUsd) returns a ~$ gloss, or null without a price. CURRENCY_DESCRIPTORS, PRIMARY_CURRENCY, currencyLabel, decimalsForCurrency, isCurrencyAccepted, currencyFromPreference and resolvePaymentCurrency back the payment currency policy
Chain textfoldToAscii(value) rewrites look-alike characters into the closest ASCII for compose surfaces, and returns anything it cannot fold unchanged. isClarityAscii, findNonAscii, nonAsciiMessage and assertClarityAscii check the result. Text that reaches a Clarity string must be ASCII
GasCALL_GAS_USTX, callCostUstx, deployGasUstx and the fee floors - see what a broadcast costs
StickersbuildStickerTransform, isWithinZone, clampToZone and defaultPlacement - see Stickers
sBTCgetSbtcContractId(network), getSbtcAssetIdentifier(network), getSbtcDeployer(network) and SBTC_DECIMALS. The sBTC deployer differs per network, so never hardcode it
FormattingformatAddress(address, format?) (short, medium, long), formatTxId(txId), formatDate(date, format?) and deriveStacksAddress
Transaction buildersbuild...Transaction functions (buildPublishEditionTransaction, buildTransferEditionTransaction, buildBurnEditionTransaction, buildSubmitBracketTransaction, buildGameActionTransaction, buildBracketActionTransaction and the rest) construct a contract call with its post-conditions for a connected wallet to sign. rtClient.commands.submit calls them for you, so reach for them only when building the wallet path yourself. signerSpend and contractPayoutPostConditions are the post-condition arithmetic on its own

Operator surface, deliberately not documented here

Two services on the client exist for the protocol's own admin tool and have no reference page, which is a decision rather than a gap:

  • rtClient.eventTypes - the event type catalog. Seeded reference data; an app reads event types through rtClient.events rather than administering them.
  • rtClient.locations - the venue registry, written from the operator console.

If you are building something that needs to write either, that is a conversation with the protocol team rather than a missing page.