Relysia
Relysia WalletAPI DocumentationGithub RepositoryDemo
  • Relysia SDK
  • Getting Started
    • Setup
    • API
    • Infrastructure
  • Wallets
    • Wallets
    • Mnemonic
    • Addresses
    • Metrics
    • Balance
    • History
  • Payments
    • Lookup
    • Sweep
    • URI
    • Transactions
    • Raw Transactions
    • Invoices
      • Create Invoice
      • Get Invoice
      • Pay Invoice
    • Payments
    • Asm
  • token
    • Basics
    • Token Issuance
    • NFT Issuance
    • Atomic Swaps
    • Details
    • Leaderboard
  • Utility
    • Post
    • Upload
    • Conversion
    • Paymail
    • Transpile-Compile
  • Enterprise Wallet
    • Overview
    • Authentication
    • Management
    • Wallet
    • Smart Contracts
    • Transaction
    • Fee Manager
    • Events
  • Realtime Transaction Notification
    • Use Case
    • Setup and Configuration
    • Events and Messages
  • More
    • Metashard
    • Satolearn
Powered by GitBook
On this page
  • Getting Started
  • Initialize the Library
  1. Getting Started

Setup

Your first Blockchain Application is just minutes away

PreviousRelysia SDKNextAPI

Last updated 1 year ago

Getting Started

Make use of our npm repository to add it to your node project of choice or Clone the Relysia SDK repository from https://github.com/kohze/relysiaSDK to add it locally to your project. Alternatively we also offer a CDN to integrate the Relysia SDK into traditional html pages.

npm i @relysia/sdk

Alternatively, install the newest development version via GitHub

git clone https://github.com/kohze/relysiaSDK

Initialize the Library

Each Relysia SDK interaction starts with getting the Authentication Token. To get a Authentication token, load the Relysia SDK either via NPM or CDN and start with the following lines.

const RelysiaSDK = require('relysia');

const relysia = new RelysiaSDK();
await relysia.authentication.v1.auth({email: "abc@gmail.com", password: "pass"});
import RelysiaSDK from 'relysia';

const relysia = new RelysiaSDK();
await relysia.auth({email: "abc@gmail.com", password: "pass"});
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <script src="https://cdn.jsdelivr.net/npm/relysia@1.0.6/dist/relysia-sdk.js"></script>
</head>
<body>
  <script>
    const relysia = new RelysiaSDK();
  </script>
</body>
</html>

Make sure the authentication codes are not shared publicly.

In case you already have the authentication token or serviceId from your firebase frontend application use:

const relysia = new RelysiaSDK({authToken: "your authToken", serviceId:"<your serviceId>"})

Account details

User details are typically an essential part of your user management and platform experience. To access user account details, such as email, name or profile picture, call the getUserDetails() function as indicated below.

const response = await relysia.user.v1.getUserDetails();