@eniblock/sdk
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

Eniblock SDK

version license

Eniblock SDK is a JavaScript/TypeScript library that facilitates the development of blockchain-based applications. It simplifies wallet and account management, transaction creation, token transfers, and much more. It provides an accessible gateway to blockchain technology.

Please note that you need to be a beta tester or have subscribed to one of our offers to use the SDK. More information can be found at Eniblock.

Getting Started

Prerequisites

Before you begin, ensure you have met the following requirements:

  • You have installed Node.js version 18.0.0 or later.
  • You are a beta tester or have subscribed to one of our offers.

Installation

Install the Eniblock SDK package using npm:

npm install @eniblock/sdk

Basic Usage

Here is a quick example of how to instantiate a wallet and an account using the Eniblock SDK:

const { Eniblock } = require("@eniblock/sdk");

// Function to get the access token
const getAccessToken = async () => {
    // TODO: Implement logic to get access token
};

// Instantiate Eniblock SDK
const sdk = new Eniblock({
    appId: "your-appId",
    accessTokenProvider: getAccessToken,
});

// Instantiate a wallet and an account
const account = await sdk.account.instantiate("My first account");

// Display the account details.
console.log(`Account Details:
  - Address: ${await account.getAddress()}
  - Alias: ${account.alias}
  - Balance: ${(await account.getNativeBalance()).balance}
  - Public Key: ${account.getPublicKey()}
  - Creation Date: ${account.creationDate}`);

Features

Eniblock SDK provides many features, including:

  • Wallet and Account Management: Easily create and manage wallets and accounts.
  • Transaction Building: Construct blockchain transactions with ease.
  • Token Transfers: Facilitates transfers of various types of tokens.
  • and many more!

For more details about each feature, please refer to our official documentation.

License

The Eniblock SDK is licensed under the Apache-2.0.

/@eniblock/sdk/

    Package Sidebar

    Install

    npm i @eniblock/sdk

    Weekly Downloads

    3

    Version

    1.2.0

    License

    Apache-2.0

    Unpacked Size

    501 kB

    Total Files

    225

    Last publish

    Collaborators

    • eniblockbot