@oneid-xyz/base
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

Base SDK

OneID SDK supports our partners to integrate OneID Service easily, which will solve all the complicated cross-chain issues, and help the blockchain products easier to use. Currently, OneID Service supports 70+ chains with only 1 step setup and the OneID NFT is using TRC-721 (TomoChain)

Getting Started

To get started, your must accept with the terms of use for using @oneid-xyz/core.

import { ServiceCore } from '@oneid-xyz/base';

const core = new ServiceCore()

Functions

Init Configuration

initConfig() allows to init base configuration from OneID SDK

Interface

await oneid.systemConfig.initConfig()

Note: Inspect & Core SDK are using same system config, developer shall only need to init once.

Set Provider

Init provider to interact with blockchain (tomoChain).

interface

setProvider(provider: provider): void;

Setup API Engpoint

using custom restfull API to call function in SDK.

interface

setupAPIEndpoint(endpoint: string): void;

Setup GraphQL

using custom GraphQL endpoint to call function in SDK.

interface

setupGraphQL(endpoint: string): void;

Setup Extensions

using custom server to extends core service.

interface

withExtension<T extends ServiceCore>(extension: ServiceExtension<T>): ServiceCore;

Get Node

Convert ID Name to hash string on contract. this function included validate ID name.

interface

getNode(id: string): string;

Readme

Keywords

none

Package Sidebar

Install

npm i @oneid-xyz/base

Weekly Downloads

307

Version

1.0.5

License

ISC

Unpacked Size

146 kB

Total Files

6

Last publish

Collaborators

  • coin98_labs