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 itsRateLimitErrorsubclass for429HttpClient- Underlying transport, available viartClient.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 theisPage,isEvent,isPredictionandisGamenarrowers - Utility functions, listed under Utility exports
Client shape
RisingTideSDK
one class, many service namespaces
- smartProductssubstrate CRUD + lifecycle
- productInstances / instancesnumbered copies
- productTypeshaiku, ticket, bracket...
- styleSetsvisual templates
- stickerssticker artists + registry
- bracketsPREDICTION helpers
- gamesGAME lobbies, matches, records
- users / invites / waitlist / delegate wallet / push / appsidentity
- payments / fundingGroups / currencyTypes / statsmoney
- contracts / commands / chainhooks / transactions / pendingTransactions / privyblockchain
- events / locations / eventTypesEVENT domain
- arweave / upload / collections / tags / errorLogs / analyticsstorage + 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 projectionThe 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
- Smart Products
- Product Instances
- Product Types
- Pages
- Events
- Funding Groups
- Users
- Push
- Invites
- Contracts
- Chainhooks
- Pending Transactions
- Style Sets
- Stickers
- Collections
- Apps
- Commands
- Templates
- Tags
- Analytics
- Waitlist
- Delegate wallet
- Product Images
- Payments
- Transactions
- Privy signing
- Brackets
- Games
- Stats
- Storage - upload and archival
- Error logs
Utility exports
The root entry also exports plain functions. None of them calls the API.
| Group | Exports |
|---|---|
| Currency | formatSbtcDisplay(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 text | foldToAscii(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 |
| Gas | CALL_GAS_USTX, callCostUstx, deployGasUstx and the fee floors - see what a broadcast costs |
| Stickers | buildStickerTransform, isWithinZone, clampToZone and defaultPlacement - see Stickers |
| sBTC | getSbtcContractId(network), getSbtcAssetIdentifier(network), getSbtcDeployer(network) and SBTC_DECIMALS. The sBTC deployer differs per network, so never hardcode it |
| Formatting | formatAddress(address, format?) (short, medium, long), formatTxId(txId), formatDate(date, format?) and deriveStacksAddress |
| Transaction builders | build...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 throughrtClient.eventsrather 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.