@tronic/tronic-sdk
v1.0.0
Published
@tronic/tronic-sdk
Downloads
13
Keywords
Readme
Tronic JavaScript SDK
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.
⚡️ Quick Start
Installation
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>
Usage
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();
📦 Package Ecosystem
Entry points
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. |
Extensions
Extend Tronic JS SDK functionality for your use-case through @tronic-ext/*
packages.
Internals
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. |
🚦 Testing
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