DCore Blockchain Use cases

The DCore protocol is gradually growing to be the blockchain technology for data and file transactions accessible and useful for real-world application/use case. DCore uses a DPoS (Delegated Proof of Stake) consensus algorithm and IPFS (InterPlanetary File System) to help with fast data transactions with a very high level of security. A little video on how to run a wallet CLI — https://www.loom.com/share/beedbb2f81394749a579ad965b510c25

DApps(Decentralized Applications) can be created on the DCore protocol using the DCore’s API or SDK. Developer to build their dream use case.

Use Cases of DCore Blockchain

These are some of the real-world applications that can be built of the protocol are;

Distributed Content Distribution: This is a decentralized application that can be used to store and distribute media materials or document via the blockchain. The file types are Music, Movie, Book, AudioBook, Software, Game, Picture, and Document.

Digital Event Ticket: You can create digital tickets for events which can be issued to users once they make payment. This can be done using the custom token creation, also known as User Issued Asset, a method through the Dcore wallet API.

Crowdfunding and micro-investment: Popularly known as ICO(Initial Coin Offering) or STO(Security Token Offering) can be created in the Dcore platform and used to raise capital for startups or used as a funding vehicle for organizations seeking funds from the public.

Decentralized Messaging App: A messaging app can also be created on the platform where messages are encrypted and decrypted via the blockchain. Users can send messages to other users by just knowing their account username.

There are lots of DApps or use cases for the DCore protocol using either Wallet API or SDK. We are going to concentrate a little on how to use the Wallet API through the Wallet CLI method to connect and create some use cases like transferring documents, creating custom tokens, looking up seeders, sending a message and retrieving the message content. I will also give notes about some of the issues I faced during installation and testing the Wallet API.

Running the Wallet API via WebSocket

First and foremost, you would need to download the Dcore desktop application from the decent website. I created a video tutorial on how to download and install here. Follow this link to watch (https://www.loom.com/share/a3421805149b4fcca1d0ee700a9bbdbe) or simply go straight to the website — https://decent.ch/dcore/ to download and follow the installation prompts to install. Also, you’d need to wait for the application to sync and download all transaction blocks and be up to date.

After the desktop application is installed, go to the installation folder (if you are using windows, simply check your Programs folder) and launch 3 Terminals or Command Prompts from inside the Decent installation folder. Note that you can also go to the DCore website for information on how to go about the installation https://docs.decent.ch/getting_started/getting_dcore_intro/index.html

i. Start the DCore daemon by executing decentd on the first terminal/command prompt

ii. Run Cli_Wallet -r on the second terminal/command prompt. This will make the wallet listen to WebSocket connection on the default port. You will need to unlock your wallet or create a new password if it is the first time you are launching the wallet CLI. I found out that for Windows system, you would need to enclose your password with quotation mark for it to work, e.g “mypassword”. You can visit this mini-tutorial on the DCore website https://docs.decent.ch/snippets/cli_wallet/index.html

iii. Finally, wscat –c ws://127.0.0.1:8091 on the third terminal/command prompt, you need to connect the WebSocket console to the CLI Wallet.

Examples on how to use the Wallet API

You can get the Wallet API instruction here https://docs.decent.ch/API/index.html#calling_wallet_api_via_websocket. First unlock your wallet. Follow the steps above to unlock your wallet. Upon successful unlocking of your wallet, you’d get ‘ unlocked >>> ’ status.

To create a custom token or User Issuer Asset(UIA), use the method “create_user_issued_asset” and the parameters.

signed_transaction
create_user_issued_asset(string issuer,
string symbol,
uint8_t precision,
string description,
uint64_t max_supply,
price core_exchange_rate,
bool is_exchangeable,
bool is_fixed_max_supply,
bool broadcast = false);

Example

create_user_issued_asset dw-justcharlz MCCC 0 "Mick credits" 10000 {"base":{"amount":200000000,"asset_id":1.3.0},"quote":{"amount":1,"asset_id":1.3.1}} true false true

The Result:

To upload content to the DCore blockchain, you first need to see the seeders available. You can search for Seeders by Price, upload, region, and rating. To search for seeders by price, simply use the “list_seeders_by_price” method with a parameter of 5. The 5 is the number of seeders to return. The red marked in the image below is the id of the seeder which will be used when uploading content to the seeder blockchain.

vector<seeder_object> list_seeders_by_price(uint32_t count);

Example -

list_seeders_by_price 5

The Result:

Use the “submit_content_async” method to publish or upload your media content.

void submit_content_async (string author,
vector<pair<string, uint32_t>> co_authors,
string content_dir,
string samples_dir,
string protocol,
vector<regional_price_info> price_amounts,
vector<account_id_type> seeders,
fc::time_point_sec expiration,
string synopsis);

Example -

submit_content_async dw-justcharlz [] “/C:\Users\Mr Charles\Documents\BlockchainMeetup.docx” “yep” “ipfs” [{“region”:”AE”,”amount”:”1",”asset_symbol”:”DCT”}] [“1.2.10849”] “2019–11–17T23:59:59” “{\”content_type_id\”:\”0\”,\”title\”:\”greatTestFile\”,\ \”description\”:\”some description.. \”}”

The Result:

To create a messaging app or enable message sending and receiving in a DApp, use the “Send_message” method

send_message sender_acc [recv_acc1, recv_acc2] "Test message text." true

Example and the Result:

To create a messaging app or enable message sending and receiving in a DApp, use the “get_message” method

get_messages recv_acc1 1

There are lots of methods to use to connect to the Wallet API and create a killer decentralized application on the DCore Blockchain. It depends on what you are creating and how well you are good with the language you are building on. You can always refer to the DCore documentation website whenever you are in a fix on what to do. https://docs.decent.ch/

Charles is a blockchain solution architect, fullstack developer with over a decade experience in the IT world creating applications, running and advising several startups. Passionate about great ideas that have “Proof of concept” and scalability. #Fitfam gym dude and enjoys swimming when he is not in front of his laptop, bar, cooking, playing ping-pong or snooker.
twitter:
justcharz
linkedin:
linkedin.com/in/justcharles

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store