Get Started
The MetaID-TS-SDK source code has been released on GitHub. For the latest API and example code, please refer to the most recent GitHub page.
Introduction
MetaID SDK provides a set of standard specifications and tools for generating and processing underlying blockchain data that conforms to the MetaID protocol (specifically for UTXO-standard chains, currently supporting the BTC chain).
The design goal of MetaID SDK is to offer a relatively unified and efficient method, greatly simplifying the integration of web3 services. It eliminates the need for developers to handle multiple protocols and construct complex UTXO transactions for on-chain data, saving time and reducing the risk of compatibility issues.
With the simplicity, compatibility, extensibility, and efficiency of MetaID SDK, traditional application developers can quickly develop and deploy a Dapp application running on a UTXO chain.
Core Concepts
MetaID SDK has two core concepts: Connector and Entity.
Connector: Used for authentication and management of identity information, serving as the foundation for users to publish data on the blockchain.
Entity: A term used in the application layer for managing resources of a specific data type. From a programming perspective, when you create a new entity instance, you can access its properties and utilize a series of methods it provides for executing on-chain data storage and modifications. Each type of Entity corresponds to the PATH part of the MetaID Specification.
Installation
Method 1: Use Yarn or NPM
Method 2: Include as src in Your Native JS Project
This method converts the npm package into a browser-compatible package without requiring a bundling tool like webpack.
Initialize a local project:
Install the SDK:
Create a
main.js
file with just two lines of code:
Globally install browserify:
After installation, run the command:
Once the command is executed, a
bundle.js
file will be generated. Now you can include this file along with your HTML code using the<script>
tag:
Last updated