@oneid-xyz/base
v1.1.1
Published
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 N
Downloads
3,023
Readme
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;