NuLink Docs
  • Get Started
    • NuLink Introduction
    • Roadmap
  • Cryptographic Primitives
    • Proxy Re-encryption
    • Identity-Based Encryption & Attribute-Based Encryption
    • Zero-Knowledge Proof
    • Fully Homomorphic Encryption
  • Products
    • Introduction
      • Target Audience and Use Cases
    • NuLink for Stakers
      • Staking Dashboard
        • Dashboard
        • Staking
        • Auction
        • Staking Grid
      • NuLink Worker Installer
        • Create Worker Account
        • NuLink Worker Installation
        • NuLink Worker Initialization and Running
        • NuLink Worker Update
    • NuLink for DApp Builders
      • NuLink Agent SDK
        • API Reference
      • NuLink SDK
        • API Reference
        • Usage Example
    • NuLink for DApp Users
      • NuLink Agent
      • DApp Example
      • NuLink Snaps
    • Horus3.0 Testnet
      • Testnet Milestones
  • Resources
    • Glossary
    • Release Notes
      • NuLink Agent Release Notes
      • NuLink Agent SDK Release Notes
      • NuLink SDK Release Notes
      • NuLink Worker Release Notes
      • NuLink Dashboard Release Notes
    • Frequently Asked Questions
Powered by GitBook
On this page
  • Build & Install
  • Build Source
  • Install via npm
  • API docs
  • The Classes
  • The Functions
  • Usage Example

Was this helpful?

  1. Products
  2. NuLink for DApp Builders

NuLink SDK

PreviousAPI ReferenceNextAPI Reference

Last updated 8 months ago

Was this helpful?

NuLink SDK is a software development kit designed to support privacy computing in the NuLink network.

Build & Install

Build Source

Set up your environment

  1. select a configuration file of your usage environment

  • Development Environment (.env.dev)

  • Production Environment (.env.prod)

  • Custom Environment (.env.example)

  1. Rename configuration file to .env

  • for Development Environment: rename .env.dev to .env

  • for Production Environment: rename .env.prod to .env

  • for Custom Environment: rename .env.example to .env,

Set configuration for a custom environment

//Modify config:
//the sdk backend testnet server address. in the nulink testnet,
//you can use the address: https://agent.testnet.nulink.org/bk
REACT_APP_CENTRALIZED_SERVER_URL=xxxxx

//Configure the parameters of the network that you connect to. Parameters for networks that are not connected do not need to be configured.

//the nulink bsc testnet porter address. in the nulink testnet,
//you can use the address: https://agent.testnet.nulink.org/porter
REACT_APP_BSC_TESTNET_PORTER_URI= xxxxx
//the network's (e.g. bsc testnet) web3 rpc url. example:
REACT_APP_BSC_TESTNET_WEB3_RPC_URL=xxxxx

build project

1. yarn install
2. yarn build:main

Install via npm

npm i @nulink_network/nulink-sdk

or

yarn add @nulink_network/nulink-sdk

API docs

The Classes

  • NulinkHDWallet: The module mainly includes interfaces for nulink wallet related operations.

  • AccountManager: The module mainly responsible for managing multiple Account objects. AccountManager is a property of the NulinkHDWallet wallet object.

  • Account: The module mainly includes interfaces for nulink wallet account related operations. Account is a property of the AccountManager object.

  • Strategy: The module is mainly used to encrypt user files for file uploading using private keys.

The Functions

  • Functions: The module mainly includes interfaces for file encryption and uploading, as well as operations related to interacting with the blockchain.

Usage Example

See to get how to use NuLink SDK.

API Details
NuLink SDK Examples
then you need to modify the configuration file manually