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
  • Agent Authorization Login
  • File Upload -> Single File Upload
  • File Upload -> Multiple File Batch Upload
  • File Application
  • File Approval
  • File Download
  • Storage Capacity

Was this helpful?

  1. Products
  2. NuLink for DApp Users

DApp Example

PreviousNuLink AgentNextNuLink Snaps

Last updated 1 year ago

Was this helpful?

Welcome to the NuLink Agent SDK's third-party demonstration case, showcasing a private file-sharing platform known as . This platform ensures privacy and security by encrypting all files uploaded and shared among users.

The workflow of File Transfer is simple and efficient:

  • Users can freely upload and encrypt their files on the platform.

  • Other users can apply for files they are interested in.

  • Once the author approves the application, the applicant can download and view the encrypted files.

To maintain the utmost privacy and security of files, all operations within this platform are executed through on-chain contracts.

In the following sections, we will dive deeper into the detailed usage of this application and its seamless integration with the NuLink Agent.

This application requires authorization to log into the Agent account for normal access and operation.

Click Agent in the top right corner to call up the Agent authorization page.

Agent Authorization Login

Before official authorization, enter your account password and click confirm to start the authorization.

As shown in the authorization page below, it displays the request source's address and my Agent account address.

Click Confirm and the page will automatically return to the third-party application page.

The image below shows the third-party application 'File Transfer' page in the logged-in state, with the account being the currently logged-in Agent account.

If you have not uploaded any files, please click Upload File first.

File Upload -> Single File Upload

After selecting the local file to upload, you will be redirected to the Agent page to encrypt the file first, as shown below.

Notice: the file size can not exceed 5M bytes.

Click NEXT to start encryption.

After encryption, you will enter the file upload page, as shown below.

Click CONFIRM to start the file upload.

After successful file upload, the following interface will be displayed:

File Upload -> Multiple File Batch Upload

After selecting the local files to upload, you will be redirected to the Agent page to encrypt the files first, as shown below.

Click the Left Arrow or Right Arrow buttons on the progress bar to switch and view each file's details. And click NEXT to start encryption.

After encryption, you will enter the file upload page, as shown below.

Click CONFIRM to start the file upload.

After successful file upload, the following interface will be displayed:

File Application

The figure below shows the file details page, and clicking "Request the file" can apply for the file. Enter the number of days you want to apply for and click "Submit."

The image below is the file detail page. Click Request the file to apply for the file.

Enter the desired number of days and click Submit.

Next, Agent will be called up for file application authorization, and the request details are shown below.

Click CONFIRM to apply.

After completing the authorization application, you will return to the third-party application page, and the file status will change to pending.

File Approval

The image below is the author's list page of received applications.

  • Single File Approval

Click Review request button next to the file list to view the application details, and click Submit if everything is fine.

  • Multiple File Batch Approval Select multiple files you wish to apply for, then click Review request button. View the application details of the files, click the Previous and Next buttons to view different file application details, and click Submit if everything is fine.

Then the Agent authorization page will be called up, and the details of the approval request are shown below. Click APPROVE to proceed with the approval.

After completing the approval, you will return to the third-party application page, and the file status will change to Approved.

File Download

When the applicant re-enters the file details page, they will see that their request has been approved and they can now download the file.

Click Download now. Since it is an encrypted file, the encrypted file will be downloaded first, click NEXT, as shown in the image below,

further decrypt the file by clicking Confirm.

A message indicating successful decryption will appear, and after 1 second, you will automatically return to the third-party application page.

The image below shows the returned third-party page, and as shown in the lower left corner, the file has been downloaded to the local machine through the browser.

Click on the file to view its content, as shown below.

Storage Capacity

To meet users' needs for encrypted file storage capacity, Agent offers a storage capacity recharge plan for users, as shown in the image below.

File Transfer
File Transfer Demo
Enter Password
Connect NuLink Agent
File Transfer
File Upload
File Upload Confirm
File Upload Success
Multiple Files Upload
Multiple Files Upload Confirm
Multiple Files Upload Success
Request File
Request Submit
Request Confirm
Rquest Pending
Request Review
Request Review Submit
Request Review Submit
Request Approve
Request Approved
Approved File Info
Authorization Request
File Decryption Confirm
File Decrypted
The Main
File Image
Storage Upgrade
Storage Plan Chose