Startrail SDK Playground
@startbahn/startrail-sdk-js loading SDK…
Not signed in

Try every SDK call against a live wallet

Loading @startbahn/startrail-sdk-js…

This page is a working integration of @startbahn/startrail-sdk-js. Each card below is one method: fill the form, press Run, and read the exact outcome — the result, a false for a cancelled popup, or the typed error — right under it, with the code you would write.

  1. Constructnew Startrail(config) — cheap, no network.Setup →
  2. Sign inlogin() opens the wallet; resolves with the user's EOAs.Sign in →
  3. ActcreateSRR(), transfers, collections… signed through your LUW.Records →

Getting started

Sign-ins open real wallet windows on the selected environment (QA by default). Nothing here writes to the chain until you run a write action.

1Setup

The object passed to new Startrail(config). The environment is chosen in the top bar (it follows you as you scroll) and fills in the API path and Torus config key below. Any change rebuilds the instance; the generated snippet on the right is what you would paste into your app.

Generated config


          

2Brand the login modal new

The provider picker is brand-neutral until you say otherwise. Logo, name, colours, light/dark mode, font, corner radius and wording all come from customUi, and mode / accent are forwarded to the wallet UI. Pick a preset or tune it, then Preview opens the real modal — close it to get false back.

3Sign in

Choose the wallet and which login methods to offer — this is your loginProvider. One method signs in directly; several (or none) show the picker. The sentence under the chips tells you exactly what login() will do.

Session methods

4Shared parameters

Values every write action needs. Edit them once here; each card lists the ones it uses. They persist across reloads.

5Startrail Records

Mint, update, transfer and annotate SRRs. Write actions sign a meta-transaction and submit it through the LUW; they sign the user in first if needed. Success responses carry a txReceiptId — the chain write itself is asynchronous.

6Collections

Deploy a collection contract and hand it over.

7Read & batch

Read-only helpers that never open a popup, and bulk() for several operations in one transaction.

8Scenarios

Multi-step flows that exercise the SDK's session handling end to end. Each verdict is kept per SDK version: pick another release in the top bar, run the scenario again, and compare the rows.

Switch user after a page reload

Regression test for the persisted-session bug: login A → discard instance → new instance → logout → login must let a different user sign in, not silently return A. Run the steps in order — each login opens the real wallet window. The wallet's own session lives in the cross-origin wallet iframe; only logout() can end it.

This origin's localStorage + sessionStorage (⚑ = web3auth-related)
(empty)

MetaMask: sign in again after signing out new

Regression test for the silent reconnect: with MetaMask, login → logout → login must make MetaMask ask for the account again, and so must login({ forceLogin: true }) while signed in. MetaMask's prompt is a window this page cannot see, so each step reads what MetaMask reports instead: whether the site is still connected, and which requests the SDK sent it (listed under each call in Activity). Keep MetaMask unlocked and approve the connection whenever it asks.

To compare, pick another release in the version picker (top bar) and run it again. Releases up to 2.3.0 reproduce the bug.