Minimal zenon.network JS SDK

Overview

znn.js

znn.js is a community-backed javascript SDJ for the zenon.network project. The implementation is based on the official Dart SDK.

Minimal requirements

  • allow devs to create addresses from a mnemonic
  • allow devs to create the hash of a block
  • allow devs to sign a block

In theory, this will allow any JS-client to be able to interact with the ZNN network in a rudimentary way. All read operations can be done as depicted in the who-to-delegate tool @ source code here.

Snippet of code depicting a embedded.pillar.getAll RPC call

$.ajax({
    type: 'POST',
    url: 'http://ip-of-node:35997',
    crossDomain: true,
    data: '{"jsonrpc": "2.0","id": 30,"method": "embedded.pillar.getAll","params": [0, 150]}',
    beforeSend: function (xhr) {
        xhr.setRequestHeader("Content-Type", "application/json");
        xhr.setRequestHeader("Accept", "application/json, text/plain, */*");
    }, success: function (response) {
    }
})
Comments
  • Improve wallet module

    Improve wallet module

    • add a keyStore to take care of entropy/mnemonic
    • ~~rename keyFile in encryptedKeyStore~~
    • add ability to derive keyPair instead of using just the default 1
    • add manager for node
      • interact with shared ZNN Wallet folder
    enhancement 
    opened by av-vonsbak 3
  • Add browser-wallet-manager

    Add browser-wallet-manager

    When using the SDK in a browser environment, the developer might expect to find/store keyFiles in cookies / browser session.

    This requires a lot of moving pieces which I’m not aware on how to deal with at the moment.

    The cookies/session storage is just an idea. I’ve never actually done anything remotely similar to this before If anyone has any thoughts on how this works/what to expect, please hit me up E.G: a project/medium article that simulates a directory structure/file system in the browser-session/cookies will be of amazing help 🙏🏻

    enhancement wontfix 
    opened by av-vonsbak 2
  • Hey - added some node endpoint requests

    Hey - added some node endpoint requests

    Hey Alien Valley,

    I saw your JS SDK and thought it was a good entry point into learning about the Zenon Network and how this is all structured. Currently I have finished the znnplayground found here: https://znnplayground.com/. (It only works on http now for a WS/HTTP request, otherwise you get a SSL error)

    I added more function to the src folder, do you want that file (I just copied all the requests basically, not written custom ones). But I managed to make the websocket and http request use the same structure you provided. Now I will continue to learn about the network and see if I can build some more onto it.

    opened by DrunkenMoose 2
  • Empty array in 'api.ledger.getUnreceivedBlocksByAddress'

    Empty array in 'api.ledger.getUnreceivedBlocksByAddress'

    Test prerequisit:

    • Transaction sent from account A to account B, but not received yet

    Test

    • Use 'api.ledger.getUnreceivedBlockByAddress' with address of account B
    • Result is { list: [], count: 1, more: false }, list is empty
    • When unning the same api function with the dart SDK the list array has one transaction in it
    opened by znnpd 1
  • Add Flags in cli

    Add Flags in cli

    The Dart znn-cli tool has a lot of cool flags which can be used here as well. As a design decision, the JS version should be as close as possible to the Dart one, where if makes sense, to not reinvent the wheel.

    The following flags should be added:

    FLAGS:
    -u, --url           Provide a websocket znnd connection URL with a port
                        (defaults to "ws://127.0.0.1:35998")
    -p, --passphrase    use this passphrase for the keyStore or enter it manually in a secure way
    -k, --keyStore      Select the local keyStore
                        (defaults to "available keyStore if only one is present")
    -i, --index         Address index
                        (defaults to "0")
    -v, --verbose       Prints detailed information about the action that it performs
    -h, --help          Displays help information
    
    enhancement 
    opened by av-vonsbak 1
  • Add Subscribe API

    Add Subscribe API

    • should be enabled only for WS connections
      • an error should be thrown by the znnd if called via HTTP
    • add momentum.listen in cli to test functionality out
    enhancement 
    opened by av-vonsbak 1
  • Migrate PoW into znn.js

    Migrate PoW into znn.js

    Migrate the znn-pow-links.js into the SDK natively.

    • test the blocking behaviour of generating PoW
    • only test in node.js scenario since running wasm in browser can be hard
      • or at least in extensions due to policy
    enhancement 
    opened by av-vonsbak 0
Owner
Alien Valley
Alien Valley
🍂 Minimal Dark and Monochrome Apk Extractor App available for Android 4.1+

⭐ ⭐ ⭐ ⭐ ⭐ Kanade - Apk Extractor Dark and Minimal Pixel Art based Apk Extractor for Android 4.1+ Art ?? Kanade Chan by closedworldopenwound ?? ハムの上で寝て

Laks Castro 80 Dec 30, 2022
This app is a minimal TodoList app that functions like a whiteboard. You can add new tasks, keep track of your tasks to make your day more productive, and then delete it after it is done.

My First Mobile App _ Minimal TodoList Flutter A new Flutter project. Getting Started This project is a starting point for a Flutter application. A fe

null 0 Nov 23, 2021
Amazing task management application with fluid, minimal and modern UI using Flutter! One of The Winner Apps for Google DevFest 2021!

Orb "Let your task orbit!" ?? Description Orb is an easy-to-use task manager app that help you manage your daily struggles to get your things done eff

Tom Huynh 9 Oct 28, 2022
Flutter Satellite.im Minimal Secure Chat Client

Uplink Flutter Satellite.im Minimal Secure Chat Client Getting Started ?? To run this project either use the launch configuration in VSCode or use the

Satellite 27 Dec 21, 2022
Communication Network between Patient & Doctor

DrComm X-Legion-Coders - DrComm - Health Project is made under Scaler HackX hackathon Problem Statement Improve medical and emergency communication So

Ayush Kejariwal 3 Dec 30, 2021
Flutter network manager package.

Features With Network Manager, you can now easily manage your internet requests, send and receive data. Usage Set Base URL Settings Base URL -> Networ

Sercan KAYA 14 Dec 4, 2022
Meow App with animations, beautiful UI and network call

Meow app Meow App with animations, beautiful UI and network call. Each time you tap a new gif loads. Used API : (https://cataas.com/cat/gif) Screensho

null 1 Nov 2, 2021
Plugin to checker data connection network.

ci_connectivity OBS: For now we don't have IOS support Getting Started Flutter plugin for checking network connection. It is not just checking if you

Lucas Firmino 0 Nov 23, 2021
Instagram is a free, online photo-sharing application and social network platform

Instagram is a free, online photo-sharing application and social network platform that was acquired by Facebook in 2012. Instagram allows users to edit and upload photos and short videos through a mobile app.

Behruz Hurramov 4 Dec 6, 2022
Showwcase is a professional network built for developers to connect, build community, and find new opportunities.

Showwcase Generated by the Very Good CLI ?? Showwcase is a professional network built for developers to connect, build community, and find new opportu

Luis Ciber 4 Jan 13, 2022
A cryptocurrency, crypto-currency, or crypto is a digital currency designed to work as a medium of exchange through a computer network that is not reliant on any central authority

A cryptocurrency, crypto-currency, or crypto is a digital currency designed to work as a medium of exchange through a computer network that is not reliant on any central authority, such as a government or bank, to uphold or maintain it.

Prashant Kumar Singh 10 Dec 3, 2022
Meme Network is the creative powerhouse that supercharges your Meme projects with the World's First Layer 1 solution in the Cosmos Ecosystem.

MEME Chain How to Join MEME Mainnet Recommended system setup 4 core CPU Memory: 4GB Disk: 100GB Ubuntu 20.04 Meme Validator Node Snapshot & State-Sync

MEME Chain 10 Oct 26, 2022
⚡⚡ flutter mobile dapp to register/mint domain names (.voltz) on the polygon blockchain network (mumbai)

open-name-service connecting to wallet registering a domain on the network fetching address by domain name & viewing domain on opensea testnet .voltz

Chinyeaka Chinonso 10 Dec 11, 2022
A Flutter plugin for the Google Mobile Ads SDK

A Flutter plugin for the Google Mobile Ads SDK

Google Ads 251 Jan 2, 2023
P2P payment solution using Stream's Flutter SDK and Rapyd's Wallet API

Peer-to-peer payment integration to a messaging app using Flutter ?? This project shows how to integrate a peer-to-peer payment solution to your Strea

Souvik Biswas 15 Dec 8, 2022
Official plugin for using Thepeer SDK with flutter https://thepeer.co

Flutter Thepeer This package makes it easy to use the Thepeer in a flutter project. ?? Screen Shots ?? How to Use plugin ThePeer Send Launch ThepeerSe

The Peer 23 Dec 27, 2022
Hybrid App build on flutter SDK able to run on Android, IOS, web, desktop

Codeforces Visualizer APP Ready to use Flutter Application. Uses codeforces API. Useful for codeforces programmers. ScreenShots Single User Page Compa

vikas yadav 13 Dec 31, 2022
A simple chat app UI using flutter SDK project.

Chatty App A simple chat app UI using flutter SDK project. Screenshot Getting Started This project is a starting point for a Flutter application. A fe

Tengku Belmiro 5 Jul 15, 2022
A Flutter plugin that supports Pangle SDK on Android and iOS.

Thanks for non-commercial open source development authorization by JetBrains. 穿山甲 Flutter SDK `pangle_flutter`是一款集成了字节跳动穿山甲 Android 和 iOS SDK的 Flutter

null 121 Dec 2, 2022