MaataData Resources
  • About MaataData
  • How MaataData's Blockchain Database Is More Secure
  • How MaataData's Blockchain Achieves High TPS Speed
  • MaataData's Approach To Smart Contracts
  • How Is MaataData Blockchain Better Than Others?
  • Get Started. Develop on MaataData's blockchain.
  • Why Current dApps Are Not Truly Web3
  • Current applications
  • White paper
  • Roadmap
  • Contact Us
  • Terms & Privacy Policy
Powered by GitBook
On this page
  • Security, Privacy & Storage
  • Write Data & Files
  • Retrieve Data & Files
  • Sending & Receiving Data

Get Started. Develop on MaataData's blockchain.

PreviousHow Is MaataData Blockchain Better Than Others?NextWhy Current dApps Are Not Truly Web3

Last updated 3 years ago

MaataData’s blockchain can be used for the development of applications that require robust computing and storage functionalities like database, file storage, messages, payments, legal contracts and more, where each transaction needs to be signed and secured, and related files need to be encrypted and easily stored in the same blockchain layer.

Here is an example of a simple HTML/Javascript API that can be used to integrate with the MaataData blockchain.

Security, Privacy & Storage

The basesapi.js file is the base security API to interface with the blockchain. This interface contains all the encryption, signing, storage and integrated database functions you need to interact with the blockchain.

The script basesapi.js is loaded in line 3.

The loadfirst function is executed on loading the api.html from a browser with the URL

The IP address is set in line 7.

Basic initialization is done through fs.initapi(IP address) function in line 9.

The private-public key for an account is generated from a user’s password through the fs.dbkey(‘password’) function in line 11.

Write Data & Files

To write information, i.e. any data to the blockchain, you would use the fs.recordput function like in line 12.

With the user account’s private-public key, data is signed and encrypted in the browser or on their device before sending it to the blockchain.

The function has multiple parameters to attached files like sending data to another public address.

Retrieve Data & Files

To retrieve data from the blockchain the fs.recordget function is use like in line 15.

The account’s private-public key is used to decrypt the retrieved data.

The data field can be an object with multiple fields. In the this example, the key ‘john’ call up the record of data.

A file and the file’s content can be added to the data. File types include pdf, docx, txt, mp3, mp4, png, and jpg.

In line 9, the file content is retrieved.

Sending & Receiving Data

For sending messages, contracts or payments, information can be sent to the receiving user’s public address.

The receiving user’s public address is used to encrypt the data which the receiving user with its private key can decrypt.

http://13.52.116.17:8960/api.html