Single-page showcase for the VSC crosschain SDK — an embeddable cross-chain swap widget for HIVE, HBD, and BTC on the Magi (VSC) DEX.
Intended host: magisdk.okinoko.io (not yet routed).
The @vsc.eco/crosschain-* packages this site depends on are not yet published to npm. Until they are, the showcase consumes them as tarballs under vendor/, packed directly from vsc-eco/crosschain-sdk main.
vendor/*.tgz is committed to this repo so fresh clones install with no extra steps.
pnpm install
pnpm dev # http://localhost:5173
pnpm build # static output in dist/
pnpm test # vitest + jsdomWhen crosschain-sdk's main branch advances:
pnpm refresh-sdk # alias of scripts/pack-sdk.shThis:
- Fetches
maininto your local crosschain-sdk checkout (default:../crosschain-sdk; override withMAGI_SDK_PATH=/path/to/crosschain-sdk). - Rebuilds
@vsc.eco/crosschain-core,@vsc.eco/crosschain-sdk,@vsc.eco/crosschain-widget. - Replaces
vendor/*.tgzwith fresh tarballs. - Patches the widget tarball with
dist/styles.cssanddist/themes/altera-dark.cssentry points that the widget's current tsup build doesn't emit directly. - Restores crosschain-sdk to the branch you were on.
Then git status → commit the three changed tarballs.
src/snippets/* are the canonical integration examples. SNIPPETS.md is generated from those files:
pnpm sync-snippets # regenerate SNIPPETS.md
pnpm sync-snippets --check # CI mode; fails if out of syncEdit the .tsx/.ts/.html snippet sources — never edit code blocks in SNIPPETS.md directly. The tests/sync.test.ts test fails if someone forgets.
src/sections/— Hero, Features, LiveWidget, Integrate, Footer.src/snippets/— canonical snippet sources; rendered on-page viavite-plugin-shiki.tsand intoSNIPPETS.mdviasync-snippets.src/aioha.ts— Aioha factory (Keychain, HiveSigner, HiveAuth).scripts/pack-sdk.sh— SDK tarball refresh.scripts/sync-snippets.ts—SNIPPETS.mdgeneration.
When @vsc.eco/crosschain-* ships to npm:
- Replace
file:vendor/vsc.eco-crosschain-*.tgzinpackage.jsonwith real version ranges. - Delete
vendor/andscripts/pack-sdk.sh. - Drop the
pack-sdk,refresh-sdk, andpnpm.overridesblock frompackage.json. - Update this README's "Status" section.
MIT.