The Tronic JavaScript SDK empowers developers to provide frictionless web3 onboarding to their end-users while preserving their security and privacy using non-custodial wallets.
License · Changelog · Contributing Guide
Integrating your app with Tronic will require our client-side NPM package:
# Via NPM:
npm install --save tronic-sdk # If you're targeting web browsers
# Via Yarn:
yarn add tronic-sdk # If you're targeting web browsers
Alternatively, you can load via CDN by adding a script tag to your app’s <head>
:
<script src="https://cdn.jsdelivr.net/npm/tronic-sdk/dist/tronic.js"></script>
Sign up or log in to the developer dashboard to receive API keys that will allow your application to interact with Tronic's APIs.
import { Tronic } from "@tronic/tronic-sdk"
const tronic = new Tronic('YOUR_API_KEY', { endpoint: 'https://your-endpoint.tronic.app' });
await tronic.wallet.showUI();
These are packages you can install to enable Tronic JS SDK functionality for your client-side application.
Package Name | Changelog | Description |
---|---|---|
tronic-sdk |
CHANGELOG | Web/browser entry-point for Tronic SDK. |
Extend Tronic JS SDK functionality for your use-case through @tronic-ext/*
packages.
These are packages Tronic JS SDK uses internally to work seamlessly across platforms.
Package Name | Changelog | Description |
---|---|---|
@tronic-sdk/types |
CHANGELOG | Core typings shared between JavaScript entry-points of Tronic SDK. |
@tronic-sdk/provider |
CHANGELOG | Core business logic shared between JavaScript entry-points of Tronic SDK. |
@tronic-sdk/commons |
CHANGELOG | Exposes a listing of common public APIs from @tronic-sdk/provider and @tronic-sdk/types to the platform-specific entry points. |
@tronic-sdk/types |
CHANGELOG | Core typings for Tronic SDK packages. |
Run tests for all packages
yarn test
Test an individual package
PKG=tronic-sdk yarn test
Test specific files
yarn test /test/**/constructor.spec.ts