MetaID SDK Documentation

Use MetaID js SDK to easily integrate MetaID into your application. Create real data that truly belongs to the user and is portable across applications.

What is this SDK for?

The MetaID SDK provides a set of standard specifications and method tools for generating and processing underlying blockchain data that follows MetaID protocol (specifically referring to chains that comply with the UTXO standard, currently supporting the BTC chain).

Core Concepts

There are two core concepts in the MetaID SDK: Connector and Entity.

Connector

A Connector is used for the authentication and management of identity information, maintain and syncronize connection status with underlying wallets.

Entity

An Entity is a term used in the application layer.

It is used to manage resources of a specific data type. From a programming perspective, when you create a new entity instance, you can access its properties and use a series of executable methods provided for data storage and modification on the chain. You can understand each type of Entity as corresponding to the PATH part in the MetaID Specification.

An Entity is like a model from an ORM (Object-Relational Mapping), while an instance of an Entity is like an object of a model.

What about PINs?

MetaID v2 protocol introduces the brilliant concept of PINs. A PIN represents one piece of data with uniqueness. A PIN can be transferred, verified or sold.

However, the concept of PINs is still kinda low-level. It requires developers to have a basic understanding of the underlying blockchain technology. Meanwhile this MetaID SDK, as a data-modeling layer, is designed to help developers to easily interact with the blockchain and manage PINs.

So we choose to encapsulate the concept of PINs and hide it from DApp developers. Developers can easily utilize the data model (which we called Entity) we provide to manage their data without worrying about the underlying mess.

If you prefer to manage PINs manually, you can use our createPin() method to meet your needs.

Was this page helpful?