Cyberfly IO’s Chat Feature: Secure, Decentralized, and Private Messaging

Cyberfly

--

Welcome to the Future of Decentralized Chat!

Tired of centralized messaging apps snooping on your conversations? Cyberfly IO is here to change the game! With its built-in chat feature, you can send messages securely, privately, and in real-time — all powered by the Cyberfly Node. Whether you’re chatting with friends, sending IoT commands, or just testing out decentralized tech, Cyberfly’s got you covered.

Why Use Cyberfly for Chat?

Unlike traditional chat apps that rely on centralized servers, Cyberfly IO is decentralized, meaning:

  • No central authority: No one owns your data. You do.
  • Super secure: Messages are cryptographically signed and verifiable.
  • Lightning-fast: Built on libp2p for instant delivery.
  • Optional End-to-End Encryption: Want extra privacy? Encrypt your messages before sending!
  • Chat-Based Kadena Token Payments & Multi-Sig Wallets in Cyberfly Mobile Wallet: Soon, you’ll be able to send Kadena tokens and manage multi-signature wallets directly in chat within the Cyberfly Mobile Wallet!

Setting Up Cyberfly Chat in JavaScript

Let’s dive into the code and see how easy it is to use Cyberfly’s chat functionality.

Install Cyberfly SDK

npm install @cyberfly-io/client

Initialize Cyberfly SDK

import { CyberflySDK, getStreamName } from "@cyberfly-io/client";

async function example() {
try {
const sdk = new CyberflySDK('https://node.cyberfly.io');
sdk.setSecretKey("0476b401cdf8f80279edd2b61ccd3708bfbc6196ba5e6ce321867c84f5d5a216");

const sender_pubkey = sdk.signing.publicKey;
const receiver_pubkey = "c63db4173d432d3cbbaef4397522c0cee5a883654e6915bf5701907f66e63322";
const msg = { fromAccount: `k:${sender_pubkey}`, message: "hello from client js" };

// Send a message
sdk.sendMessage(receiver_pubkey, msg);

// Subscribe to the message
sdk.subscribe(receiver_pubkey);

// Listen for incoming messages
sdk.onReceive((msg) => {
console.log("Received message: ", msg);
});

// Retrieve chat history
const streamName = getStreamName(receiver_pubkey, sender_pubkey);
const history = await sdk.getChatHistory(streamName);
console.log("Chat history: ", history);
} catch (error) {
console.error('Error:', error);
}
}

example();

Boom! You’ve just sent and received messages using Cyberfly’s chat system. That’s how easy it is!

Want Extra Privacy? Enable End-to-End Encryption

Cyberfly takes privacy seriously. If you want even more security, you can encrypt your messages before sending them. Here’s how:

import { encrypt, decrypt, generateX25519KeyPair } from "@cyberfly-io/client";

// Generate key pairs for sender and receiver
const sender_keyPair = generateX25519KeyPair();
const receiver_Keypair = generateX25519KeyPair();

const msg = "mytopsecret";

// Encrypt the message using the receiver's public key and sender's private key
const encryptedMsg = encrypt(msg, receiver_Keypair.publicKey, sender_keyPair.privateKey);
console.log(`Encrypted msg: ${encryptedMsg}`);

// Decrypt the message using the sender's public key and receiver's private key
const decryptedMsg = decrypt(encryptedMsg, sender_keyPair.publicKey, receiver_Keypair.privateKey);
console.log(`Decrypted msg: ${decryptedMsg}`);

Now, even if someone intercepts your messages, all they’ll see is gibberish. Your privacy stays intact.

Chat-Based Kadena Token Payments & Multi-Sig Wallets in Cyberfly Mobile Wallet (Coming Soon!)

Cyberfly isn’t just about messaging — it’s about transacting securely. Soon, within the Cyberfly Mobile Wallet, you’ll be able to:

  • Send Kadena Tokens via Chat: Transfer KDA tokens seamlessly within a conversation.
  • Manage Multi-Sig Wallets for Kadena: Approve and execute multi-signature transactions without leaving the chat.

This means frictionless, decentralized finance (DeFi) experiences — all inside a simple chat interface! Say goodbye to complicated wallets and hello to seamless chat-based payments. 🚀

Why Cyberfly is a Game-Changer

  • Powered by Cyberfly Node: Decentralized, reliable, and built for the future.
  • Secure by Design: Your messages are cryptographically verifiable.
  • Private: Optional end-to-end encryption for total privacy.
  • Fast: Uses libp2p’s pub/sub model for real-time chat.
  • No Middlemen: You don’t need to trust a central server. Just pure, peer-to-peer communication.
  • Kadena Token Payments & Multi-Sig Wallets in Cyberfly Mobile Wallet: The future of chat-based DeFi is here!

Final Thoughts

Cyberfly IO’s chat functionality brings the future of messaging to IoT, DeFi, and beyond. Whether you’re a developer, a privacy advocate, or just someone who wants to try out decentralized tech, Cyberfly is your go-to solution.

Try it out and experience next-gen messaging today! 🔥

--

--

No responses yet