Bitcoin API, Blockchain API, Crypto APIs, Addresses APIs

NEM community subreddit

NEM (New Economy Movement) is a dual-layer blockchain with 100% original source code. Launched on March 31, 2015, the NEM mainnet supports multiple ledgers on its cryptocurrency layer, and the NEM Smart Assets layer supports mosaics to represent any asset. NEM’s proprietary coin is XEM, which is harvested (mined) using a Proof-of-Importance (PoI) algorithm. This community is for discussions regarding the blockchain platform.
[link]

Blockchain Explorer API for pubKey in JSON /r/Bitcoin

Blockchain Explorer API for pubKey in JSON /Bitcoin submitted by ABitcoinAllBot to BitcoinAll [link] [comments]

C#, bitcoin blockchain API json and newtonsoft json parser.

For the life of me I cannot get json.net to deserialize json from the blockchain API. Has anybody been able to do this?
submitted by ths1977 to csharp [link] [comments]

1 day left for this game-changing project

1 day left for this game-changing project

Integration broker for P2P apps on BCH Chain
Alright guys, I apologize for all the shilling on this sub for this project, but it was suggested by the admin.
This flipstarter has 1 day left before it expires, and needs one last push to get it through.
CashSQL: the integration broker helps you get data out of (and put data into) the BCH chain through a nice and easy SQL database of your choosing. It's designed to help build P2P apps rapidly. Enveloping data transactions inside layer-1 BCH is tough. If apps could rely on a simple SQL DB, with community developed data-transformers, life is easier for all apps using those layer-2 protocols. This means more devs, more apps and more activity on BCH.
If this project makes sense to you, consider a PLEDGE NOW!

CashSQL Vision

DELIVERABLE SUMMARY

  • Full Blockchain Database: the entire BCH blockchain available as SQL database. Useful for chainalysis, data analytics, etc. This database can be optionally deployed by users.
  • Light-weight Database: lean and mean database for tracking user-specific blockchain data. Most applications will only need to use this.
  • DBMS support: SQL Server, MySQL/MariaDB and SQLite (has plug-n-play design, others can be added later).
  • Mempool Integration: JSON/XML/Web-Socket API for real-time event data.
  • Simplified Schema Design: blockchain data is extracted and processed into higher-level data abstractions that developers can easily use. For example, account balances, debits and credits for BCH and SLP addresses, confirmations for transactions, etc.
  • Extensible Schema: users can extend scheme with custom columns and tables that suit their applications.
  • Transformable Data: users can plug-n-play custom data-transformations that extract meaningful high-level data from compressed blockchain data.
  • Real-Time Capability: databases are maintained in real-time with minimal locking.
  • Send Capability: includes “outbound” tables for users to push out transactions onto the network. Includes send receipts and history tables.
  • High-performance: expertly-tuned database design for large and small deployments.
  • Enterprise-ready: Written in latest C#/.NET, a popular enterprise-class platform.
  • Cross-Platform: Target platform is .NET 5 which runs on Windows, Linux, macOS and Unix.
  • Simple GUI: an explorer-like GUI is shipped with the backend based on HTML5.
  • Open Source: Fully open-sourced under MIT license.
A prototype is currently available at http://blockchainsql.io.

WHO WE ARE

Sphere 10 Software (ABN: 39600596316) is an Australian based LLC led by Director and Chief Software Architect, Herman Schoenfeld. Herman has been involved in cryptocurrency since 2011, and was the "retrospective co-founder" of the PascalCoin cryptocurrency. Herman has appeared in commercial programming aired on Bloomberg and Fox Business News as well as radio broadcasts in the NYC area. Herman has been a long-time supporter of Bitcoin Cash and has always promoted it as the true, original Bitcoin as laid out in the Satoshi whitepaper. However, due to certain personalities dominant in BCH, Herman was de-motivated from participating until now. Since the BSV split and with the prospect of BCHN taking node leadership in November, Herman is very bullish on BCH and motivated to support BCH into the bright future and imminent explosive growth it was destined for. Sphere 10 Software will allocate 2 developers to work on CashSQL (one of them Herman). All the funds from this fund-raiser will be used for paying the time and material of development.


https://preview.redd.it/gy7wn4olw8u51.png?width=245&format=png&auto=webp&s=9189d2319f2e1fdd5e2567865e8610c4cbbb729a
submitted by HermanSchoenfeld to btc [link] [comments]

Subreddit Stats: programming top posts from 2019-10-22 to 2020-10-21 06:41 PDT

Period: 364.67 days
Submissions Comments
Total 1000 180545
Rate (per day) 2.74 491.84
Unique Redditors 629 34951
Combined Score 1178903 2688497

Top Submitters' Top Submissions

  1. 47468 points, 49 submissions: iamkeyur
    1. One Guy Ruined Hacktoberfest 2020 (3039 points, 584 comments)
    2. AWS forked my project and launched it as its own service (2956 points, 810 comments)
    3. Privacy analysis of Tiktok’s app and website (2858 points, 234 comments)
    4. 98.css – design system for building faithful recreations of Windows 98 UIs (2781 points, 318 comments)
    5. Microsoft demos language model that writes code based on signature and comment (2621 points, 614 comments)
    6. Why does HTML think “chucknorris” is a color? (2565 points, 531 comments)
    7. Windows 95 UI Design (2309 points, 665 comments)
    8. The Linux codebase has over 3k TODO comments, many from over a decade ago (2119 points, 369 comments)
    9. eBay is port scanning visitors to their website (1829 points, 236 comments)
    10. Using const/let instead of var can make JavaScript code run 10× slower in Webkit (1814 points, 525 comments)
  2. 44853 points, 28 submissions: speckz
    1. From August, Chrome will start blocking ads that consume 4MB of network data, 15 seconds of CPU usage in any 30 second period, or 60 seconds of total CPU usage (8434 points, 590 comments)
    2. How To Spot Toxic Software Jobs From Their Descriptions (6246 points, 1281 comments)
    3. A Facebook crawler was making 7M requests per day to my stupid website (2662 points, 426 comments)
    4. Apple, Your Developer Documentation is Garbage (2128 points, 432 comments)
    5. The code I’m still ashamed of (2016) (2105 points, 429 comments)
    6. Slack Is Fumbling Developers And The Rise Of Developer Discords (2095 points, 811 comments)
    7. The Chromium project finds that around 70% of our serious security bugs are memory safety problems. Our next major project is to prevent such bugs at source. (1959 points, 418 comments)
    8. Advice to Myself When Starting Out as a Software Developer (1934 points, 257 comments)
    9. Software patents are another kind of disease (1893 points, 419 comments)
    10. My favourite Git commit (1772 points, 206 comments)
  3. 35237 points, 28 submissions: whackri
    1. It is perfectly OK to only code at work, you can have a life too (6765 points, 756 comments)
    2. Kernighan's Law - Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. (5171 points, 437 comments)
    3. The entire Apollo 11 computer code that helped get us to the Moon is available on github. (3841 points, 433 comments)
    4. Raytracing - in Excel! (2478 points, 168 comments)
    5. Writing userspace USB drivers for abandoned devices (1689 points, 84 comments)
    6. Drum Machine in Excel (1609 points, 60 comments)
    7. fork() can fail: this is important (1591 points, 264 comments)
    8. Learn how computers add numbers and build a 4 bit adder circuit (1548 points, 66 comments)
    9. Heroes Of Might And Magic III engine written from scratch (open source, playable) (1453 points, 84 comments)
    10. Apollo Guidance Computer: Restoring the computer that put man on the Moon (1277 points, 47 comments)
  4. 14588 points, 11 submissions: pimterry
    1. I'm a software engineer going blind, how should I prepare? (4237 points, 351 comments)
    2. The 2038 problem is already affecting some systems (1988 points, 518 comments)
    3. TLDR pages: Simplified, community-driven man pages (1897 points, 182 comments)
    4. JetBrains Mono: A Typeface for Developers (1728 points, 456 comments)
    5. BlurHash: extremely compact representations of image placeholders (930 points, 159 comments)
    6. Let's Destroy C (855 points, 290 comments)
    7. Shared Cache is Going Away (833 points, 192 comments)
    8. XML is almost always misused (766 points, 538 comments)
    9. Wireshark has a new packet diagram view (688 points, 24 comments)
    10. fork() can fail: this is important (460 points, 299 comments)
  5. 14578 points, 9 submissions: magenta_placenta
    1. Trello handed over user's personal account to user's previous company (2962 points, 489 comments)
    2. Feds: IBM did discriminate against older workers in making layoffs - “Analysis shows it was primarily older workers (85.85%) in the total potential pool of those considered for layoff,” the EEOC wrote (2809 points, 509 comments)
    3. Stripe Workers Who Relocate Get $20,000 Bonus and a Pay Cut - Stripe Inc. plans to make a one-time payment of $20,000 to employees who opt to move out of San Francisco, New York or Seattle, but also cut their base salary by as much as 10% (2765 points, 989 comments)
    4. US court fully legalized website scraping and technically prohibited it - On September 9, the U.S. 9th circuit court of Appeals ruled that web scraping public sites does not violate the CFAA (Computer Fraud and Abuse Act) (2014 points, 327 comments)
    5. I Suspect many Task Deadlines are Designed to Force Engineers to Work for Free (1999 points, 553 comments)
    6. Intent to Deprecate and Freeze: The User-Agent string (1012 points, 271 comments)
    7. Contractor admits planting logic bombs in his software to ensure he’d get new work (399 points, 182 comments)
    8. AlphaStar: Grandmaster level in StarCraft II using multi-agent reinforcement learning (396 points, 97 comments)
    9. Half of the websites using WebAssembly use it for malicious purposes - WebAssembly not that popular: Only 1,639 sites of the Top 1 Million use WebAssembly (222 points, 133 comments)
  6. 13750 points, 3 submissions: pedrovhb
    1. Bubble sort visualization (7218 points, 276 comments)
    2. Breadth-first search visualization (3874 points, 96 comments)
    3. Selection sort visualization (2658 points, 80 comments)
  7. 11833 points, 1 submission: flaming_bird
    1. 20GB leak of Intel data: whole Git repositories, dev tools, backdoor mentions in source code (11833 points, 956 comments)
  8. 11208 points, 10 submissions: PowerOfLove1985
    1. No cookie consent walls — and no, scrolling isn’t consent, says EU data protection body (5975 points, 890 comments)
    2. Redesigning uBlock Origin (1184 points, 162 comments)
    3. Playing Around With The Fuchsia Operating System (696 points, 164 comments)
    4. Microsoft's underwater data centre resurfaces after two years (623 points, 199 comments)
    5. Microsoft Paint/Paintbrush in Javascript (490 points, 58 comments)
    6. GitHub shuts off access to Aurelia repository, citing trade sanctions (478 points, 81 comments)
    7. How 3D Game Rendering Works: Texturing (475 points, 22 comments)
    8. Simdjson: Parsing Gigabytes of JSON per Second (441 points, 90 comments)
    9. How 1500 bytes became the MTU of the internet (435 points, 60 comments)
    10. It’s OK for your open source library to be a bit shitty (411 points, 130 comments)
  9. 10635 points, 8 submissions: michalg82
    1. Turning animations to 60fps using AI (3449 points, 234 comments)
    2. Bug #1463112 “Cat sitting on keyboard crashes lightdm” (3150 points, 143 comments)
    3. Heroes Of Might And Magic III engine written from scratch (open source, playable) (1431 points, 172 comments)
    4. Vulkan is coming to Raspberry Pi: first triangle - Raspberry Pi (1318 points, 66 comments)
    5. An EPYC trip to Rome: AMD is Cloudflare's 10th-generation Edge server CPU (431 points, 60 comments)
    6. Microsoft cancels GDC 2020 presence due to coronavirus concerns (Following Sony, Facebook, Kojima Productions, Epic Games, Unity, and more) (371 points, 52 comments)
    7. Moving from reCAPTCHA to hCaptcha - The Cloudflare Blog (278 points, 71 comments)
    8. How much of a genius-level move was using binary space partitioning in Doom? (207 points, 109 comments)
  10. 10106 points, 10 submissions: SerenityOS
    1. Someone suggested I should host my website on my own OS. For that we'll need a web server, so here's me building a basic web server in C++ for SerenityOS! (2269 points, 149 comments)
    2. I've been learning about OS security lately. Here's me making a local root exploit for SerenityOS, and then fixing the kernel bugs that made it possible! (1372 points, 87 comments)
    3. SerenityOS was hacked in a 36c3 CTF! (Exploit and write-up) (1236 points, 40 comments)
    4. One week ago, I started building a JavaScript engine for SerenityOS. Here’s me integrating it with the web browser and adding some simple API’s like alert()! (1169 points, 63 comments)
    5. Implementing macOS-style "purgeable memory" in my kernel. This technique is amazing and helps apps be better memory usage citizens! (1131 points, 113 comments)
    6. SerenityOS: The second year (900 points, 101 comments)
    7. Using my own C++ IDE to make a little program for decorating my webcam frame (571 points, 33 comments)
    8. This morning I ported git to SerenityOS. It took about an hour and some hacks, but it works! :D (547 points, 64 comments)
    9. Smarter C/C++ inlining with attribute((flatten)) (521 points, 118 comments)
    10. Introduction to SerenityOS GUI programming (390 points, 45 comments)

Top Commenters

  1. XANi_ (10753 points, 821 comments)
  2. dnew (7513 points, 641 comments)
  3. drysart (7479 points, 202 comments)
  4. MuonManLaserJab (6666 points, 233 comments)
  5. SanityInAnarchy (6331 points, 350 comments)
  6. AngularBeginner (6215 points, 59 comments)
  7. SerenityOS (5627 points, 128 comments)
  8. chucker23n (5465 points, 370 comments)
  9. IshKebab (4898 points, 393 comments)
  10. L3tum (4857 points, 199 comments)

Top Submissions

  1. 20GB leak of Intel data: whole Git repositories, dev tools, backdoor mentions in source code by flaming_bird (11833 points, 956 comments)
  2. hentAI: Detecting and removing censors with Deep Learning and Image Segmentation by 7cmStrangler (9621 points, 395 comments)
  3. US Politicians Want to Ban End-to-End Encryption by CarrotRobber (9427 points, 523 comments)
  4. From August, Chrome will start blocking ads that consume 4MB of network data, 15 seconds of CPU usage in any 30 second period, or 60 seconds of total CPU usage by speckz (8434 points, 590 comments)
  5. Mozilla: The Greatest Tech Company Left Behind by matthewpmacdonald (7566 points, 1087 comments)
  6. Bubble sort visualization by pedrovhb (7218 points, 276 comments)
  7. During lockdown my wife has been suffering mentally from pressure to stay at her desk 100% of the time otherwise after a few minutes her laptop locks and she is recorded as inactive. I wrote this small app to help her escape her desk by periodically moving the cursor. Hopefully it can help others. by silitbang6000 (7193 points, 855 comments)
  8. It is perfectly OK to only code at work, you can have a life too by whackri (6765 points, 756 comments)
  9. Blockchain, the amazing solution for almost nothing by imogenchampagne (6725 points, 1561 comments)
  10. Blockchain, the amazing solution for almost nothing by jessefrederik (6524 points, 1572 comments)

Top Comments

  1. 2975 points: deleted's comment in hentAI: Detecting and removing censors with Deep Learning and Image Segmentation
  2. 2772 points: I_DONT_LIE_MUCH's comment in 20GB leak of Intel data: whole Git repositories, dev tools, backdoor mentions in source code
  3. 2485 points: api's comment in Stripe Workers Who Relocate Get $20,000 Bonus and a Pay Cut - Stripe Inc. plans to make a one-time payment of $20,000 to employees who opt to move out of San Francisco, New York or Seattle, but also cut their base salary by as much as 10%
  4. 2484 points: a_false_vacuum's comment in Stack Overflow lays off 15%
  5. 2464 points: iloveparagon's comment in Google engineer breaks down the problems he uses when doing technical interviews. Lots of advice on algorithms and programming.
  6. 2384 points: why_not_both_bot's comment in During lockdown my wife has been suffering mentally from pressure to stay at her desk 100% of the time otherwise after a few minutes her laptop locks and she is recorded as inactive. I wrote this small app to help her escape her desk by periodically moving the cursor. Hopefully it can help others.
  7. 2293 points: ThatInternetGuy's comment in Iranian Maintainer refuses to merge code from Israeli Developer. Cites Iranian regulations.
  8. 2268 points: xequae's comment in I'm a software engineer going blind, how should I prepare?
  9. 2228 points: turniphat's comment in AWS forked my project and launched it as its own service
  10. 2149 points: Rami-Slicer's comment in 20GB leak of Intel data: whole Git repositories, dev tools, backdoor mentions in source code
Generated with BBoe's Subreddit Stats
submitted by flpezet to subreddit_stats [link] [comments]

API key for connection to BTC full node

GetBlock is a service that provides a fast and easy connection to a continuously growing list of over 20 cryptocurrencies’ nodes, including Bitcoin (BTC), Ethereum (ETH), Litecoin (LTC), among others. We support such tools like JSON-RPC, REST, and WebSockets, which facilitates direct synchronization with the blockchain.
In order to build a blockchain-based application, an individual or a company usually has to deploy and run several blockchain nodes. Now you can immediately connect your app to a blockchain, as GetBlock relieves you from running a node yourself.
In order to get started with GetBlock fill in the form on the website and get your free API key.
submitted by getblockio to btc [link] [comments]

Fast and Easy Connection to Blockchain Nodes

GetBlock is a service that provides a fast and easy connection to a continuously growing list of over 30 cryptocurrencies’ nodes, including Bitcoin (BTC), Ethereum (ETH), Litecoin (LTC), among others. We support such tools like JSON-RPC, REST, and WebSockets, which facilitates direct synchronization with the blockchain.
In order to build a blockchain-based application, an individual or a company usually has to deploy and run several blockchain nodes. Now you can immediately connect your app to a blockchain, as GetBlock relieves you from running a node yourself.
In order to get started with GetBlock fill in the form on the website and get your free API key.
submitted by getblockio to decentralization [link] [comments]

Free API key to Access the Blockchain Nodes

GetBlock is a service that provides a fast and easy connection to a continuously growing list of over 20 cryptocurrencies’ nodes, including Bitcoin (BTC), Ethereum (ETH), Litecoin (LTC), among others. We support such tools like JSON-RPC, REST, and WebSockets, which facilitates direct synchronization with the blockchain.
In order to build a blockchain-based application, an individual or a company usually has to deploy and run several blockchain nodes. Now you can immediately connect your app to a blockchain, as GetBlock relieves you from running a node yourself.
In order to get started with GetBlock fill in the form on the website and get your free API key.
submitted by getblockio to api [link] [comments]

[ANN][ANDROID MINING][AIRDROP] NewEnglandcoin: Scrypt RandomSpike

New England
New England 6 States Songs: https://www.reddit.com/newengland/comments/er8wxd/new_england_6_states_songs/
NewEnglandcoin
Symbol: NENG
NewEnglandcoin is a clone of Bitcoin using scrypt as a proof-of-work algorithm with enhanced features to protect against 51% attack and decentralize on mining to allow diversified mining rigs across CPUs, GPUs, ASICs and Android phones.
Mining Algorithm: Scrypt with RandomSpike. RandomSpike is 3rd generation of Dynamic Difficulty (DynDiff) algorithm on top of scrypt.
1 minute block targets base difficulty reset: every 1440 blocks subsidy halves in 2.1m blocks (~ 2 to 4 years) 84,000,000,000 total maximum NENG 20000 NENG per block Pre-mine: 1% - reserved for dev fund ICO: None RPCPort: 6376 Port: 6377
NewEnglandcoin has dogecoin like supply at 84 billion maximum NENG. This huge supply insures that NENG is suitable for retail transactions and daily use. The inflation schedule of NengEnglandcoin is actually identical to that of Litecoin. Bitcoin and Litecoin are already proven to be great long term store of value. The Litecoin-like NENG inflation schedule will make NewEnglandcoin ideal for long term investment appreciation as the supply is limited and capped at a fixed number
Bitcoin Fork - Suitable for Home Hobbyists
NewEnglandcoin core wallet continues to maintain version tag of "Satoshi v0.8.7.5" because NewEnglandcoin is very much an exact clone of bitcoin plus some mining feature changes with DynDiff algorithm. NewEnglandcoin is very suitable as lite version of bitcoin for educational purpose on desktop mining, full node running and bitcoin programming using bitcoin-json APIs.
The NewEnglandcoin (NENG) mining algorithm original upgrade ideas were mainly designed for decentralization of mining rigs on scrypt, which is same algo as litecoin/dogecoin. The way it is going now is that NENG is very suitable for bitcoin/litecoin/dogecoin hobbyists who can not , will not spend huge money to run noisy ASIC/GPU mining equipments, but still want to mine NENG at home with quiet simple CPU/GPU or with a cheap ASIC like FutureBit Moonlander 2 USB or Apollo pod on solo mining setup to obtain very decent profitable results. NENG allows bitcoin litecoin hobbyists to experience full node running, solo mining, CPU/GPU/ASIC for a fun experience at home at cheap cost without breaking bank on equipment or electricity.
MIT Free Course - 23 lectures about Bitcoin, Blockchain and Finance (Fall,2018)
https://www.youtube.com/playlist?list=PLUl4u3cNGP63UUkfL0onkxF6MYgVa04Fn
CPU Minable Coin Because of dynamic difficulty algorithm on top of scrypt, NewEnglandcoin is CPU Minable. Users can easily set up full node for mining at Home PC or Mac using our dedicated cheetah software.
Research on the first forked 50 blocks on v1.2.0 core confirmed that ASIC/GPU miners mined 66% of 50 blocks, CPU miners mined the remaining 34%.
NENG v1.4.0 release enabled CPU mining inside android phones.
Youtube Video Tutorial
How to CPU Mine NewEnglandcoin (NENG) in Windows 10 Part 1 https://www.youtube.com/watch?v=sdOoPvAjzlE How to CPU Mine NewEnglandcoin (NENG) in Windows 10 Part 2 https://www.youtube.com/watch?v=nHnRJvJRzZg
How to CPU Mine NewEnglandcoin (NENG) in macOS https://www.youtube.com/watch?v=Zj7NLMeNSOQ
Decentralization and Community Driven NewEnglandcoin is a decentralized coin just like bitcoin. There is no boss on NewEnglandcoin. Nobody nor the dev owns NENG.
We know a coin is worth nothing if there is no backing from community. Therefore, we as dev do not intend to make decision on this coin solely by ourselves. It is our expectation that NewEnglandcoin community will make majority of decisions on direction of this coin from now on. We as dev merely view our-self as coin creater and technical support of this coin while providing NENG a permanent home at ShorelineCrypto Exchange.
Twitter Airdrop
Follow NENG twitter and receive 100,000 NENG on Twitter Airdrop to up to 1000 winners
Graphic Redesign Bounty
Top one award: 90.9 million NENG Top 10 Winners: 500,000 NENG / person Event Timing: March 25, 2019 - Present Event Address: NewEnglandcoin DISCORD at: https://discord.gg/UPeBwgs
Please complete above Twitter Bounty requirement first. Then follow Below Steps to qualify for the Bounty: (1) Required: submit your own designed NENG logo picture in gif, png jpg or any other common graphic file format into DISCORD "bounty-submission" board (2) Optional: submit a second graphic for logo or any other marketing purposes into "bounty-submission" board. (3) Complete below form.
Please limit your submission to no more than two total. Delete any wrongly submitted or undesired graphics in the board. Contact DISCORD u/honglu69#5911 or u/krypton#6139 if you have any issues.
Twitter Airdrop/Graphic Redesign bounty sign up: https://goo.gl/forms/L0vcwmVi8c76cR7m1
Milestones
Roadmap
NENG v1.4.0 Android Mining, randomSpike Evaluation https://github.com/ShorelineCrypto/NewEnglandCoin/releases/download/NENG_2020_Q3_report/NENG_2020_Q3_report.pdf
RandomSpike - NENG core v1.3.0 Hardfork Upgrade Proposal https://github.com/ShorelineCrypto/NewEnglandCoin/releases/download/2020Q1_Report/Scrypt_RandomSpike_NENGv1.3.0_Hardfork_Proposal.pdf
NENG Security, Decentralization & Valuation
https://github.com/ShorelineCrypto/NewEnglandCoin/releases/download/2019Q2_report/NENG_Security_Decentralization_Value.pdf
Whitepaper v1.0 https://github.com/ShorelineCrypto/NewEnglandCoin/releases/download/whitepaper_v1.0/NENG_WhitePaper.pdf
DISCORD https://discord.gg/UPeBwgs
Explorer
http://www.findblocks.com/exploreNENG http://86.100.49.209/exploreNENG http://nengexplorer.mooo.com:3001/
Step by step guide on how to setup an explorer: https://github.com/ShorelineCrypto/nengexplorer
Github https://github.com/ShorelineCrypto/NewEnglandCoin
Wallet
Android with UserLand App (arm64/armhf), Chromebook (x64/arm64/armhf): https://github.com/ShorelineCrypto/NewEnglandCoin/releases/tag/v1.4.0.5
Linux Wallet (Ubuntu/Linux Mint, Debian/MX Linux, Arch/Manjaro, Fedora, openSUSE): https://github.com/ShorelineCrypto/NewEnglandCoin/releases/tag/v1.4.0.3
MacOS Wallet (10.11 El Capitan or higher): https://github.com/ShorelineCrypto/NewEnglandCoin/releases/tag/v1.4.0.2
Android with GNUroot on 32 bits old Phones (alpha release) wallet: https://github.com/ShorelineCrypto/NewEnglandCoin/releases/tag/v1.4.0
Windows wallet: https://github.com/ShorelineCrypto/NewEnglandCoin/releases/tag/v1.3.0.1
addnode ip address for the wallet to sync faster, frequently updated conf file: https://github.com/ShorelineCrypto/cheetah_cpumineblob/mastenewenglandcoin.conf-example
How to Sync Full Node Desktop Wallet https://www.reddit.com/NewEnglandCoin/comments/er6f0q/how_to_sync_full_node_desktop_wallet/
TWITTER https://twitter.com/newenglandcoin
REDDIT https://www.reddit.com/NewEnglandCoin/
Cheetah CPU Miner Software https://github.com/ShorelineCrypto/cheetah_cpuminer
Solo Mining with GPU or ASIC https://bitcointalk.org/index.php?topic=5027091.msg52187727#msg52187727
How to Run Two Full Node in Same Desktop PC https://bitcointalk.org/index.php?topic=5027091.msg53581449#msg53581449
ASIC/GPU Mining Pools Warning to Big ASIC Miners Due to DynDiff Algo on top of Scrypt, solo mining is recommended for ASIC/GPU miners. Further more, even for mining pools, small mining pool will generate better performance than big NENG mining pool because of new algo v1.2.x post hard fork.
The set up configuration of NENG for scrypt pool mining is same as a typical normal scrypt coin. In other word, DynDiff on Scrypt algo is backward compatible with Scrypt algo. Because ASIC/GPU miners rely on CPU miners for smooth blockchain movement, checkout bottom of "Latest News" section for A WARNING to All ASIC miners before you decide to dump big ASIC hash rate into NENG mining.
(1) Original DynDiff Warning: https://bitcointalk.org/index.php?topic=5027091.msg48324708#msg48324708 (2) New Warning on RandomSpike Spike difficulty (244k) introduced in RandomSpike served as roadblocks to instant mining and provide security against 51% attack risk. However, this spike difficulty like a roadblock that makes big ASIC mining less profitable. In case of spike block to be mined, the spike difficulty immediately serve as base difficulty, which will block GPU/ASIC miners effectively and leave CPU cheetah solo miners dominating mining almost 100% until next base difficulty reset.
FindBlocks http://findblocks.com/
CRpool http://crpool.xyz/
Cminors' Pool http://newenglandcoin.cminors-pool.com/
SPOOL https://spools.online/
Exchange
📷
https://shorelinecrypto.com/
Features: anonymous sign up and trading. No restriction or limit on deposit or withdraw.
The trading pairs available: NewEnglandcoin (NENG) / Dogecoin (DOGE)
Trading commission: A round trip trading will incur 0.10% trading fees in average. Fees are paid only on buyer side. buy fee: 0.2% / sell fee: 0% Deposit fees: free for all coins Withdraw fees: ZERO per withdraw. Mining fees are appointed by each coin blockchain. To cover the blockchain mining fees, there is minimum balance per coin per account: * Dogecoin 2 DOGE * NewEnglandcoin 1 NENG
Latest News Aug 30, 2020 - NENG v1.4.0.5 Released for Android/Chromebook Upgrade with armhf, better hardware support https://bitcointalk.org/index.php?topic=5027091.msg55098029#msg55098029
Aug 11, 2020 - NENG v1.4.0.4 Released for Android arm64 Upgrade / Chromebook Support https://bitcointalk.org/index.php?topic=5027091.msg54977437#msg54977437
Jul 30, 2020 - NENG v1.4.0.3 Released for Linux Wallet Upgrade with 8 Distros https://bitcointalk.org/index.php?topic=5027091.msg54898540#msg54898540
Jul 21, 2020 - NENG v1.4.0.2 Released for MacOS Upgrade with Catalina https://bitcointalk.org/index.php?topic=5027091.msg54839522#msg54839522
Jul 19, 2020 - NENG v1.4.0.1 Released for MacOS Wallet Upgrade https://bitcointalk.org/index.php?topic=5027091.msg54830333#msg54830333
Jul 15, 2020 - NENG v1.4.0 Released for Android Mining, Ubuntu 20.04 support https://bitcointalk.org/index.php?topic=5027091.msg54803639#msg54803639
Jul 11, 2020 - NENG v1.4.0 Android Mining, randomSpike Evaluation https://bitcointalk.org/index.php?topic=5027091.msg54777222#msg54777222
Jun 27, 2020 - Pre-Announce: NENG v1.4.0 Proposal for Mobile Miner Upgrade, Android Mining Start in July 2020 https://bitcointalk.org/index.php?topic=5027091.msg54694233#msg54694233
Jun 19, 2020 - Best Practice for Futurebit Moonlander2 USB ASIC on solo mining mode https://bitcointalk.org/index.php?topic=5027091.msg54645726#msg54645726
Mar 15, 2020 - Scrypt RandomSpike - NENG v1.3.0.1 Released for better wallet syncing https://bitcointalk.org/index.php?topic=5027091.msg54030923#msg54030923
Feb 23, 2020 - Scrypt RandomSpike - NENG Core v1.3.0 Relased, Hardfork on Mar 1 https://bitcointalk.org/index.php?topic=5027091.msg53900926#msg53900926
Feb 1, 2020 - Scrypt RandomSpike Proposal Published- NENG 1.3.0 Hardfork https://bitcointalk.org/index.php?topic=5027091.msg53735458#msg53735458
Jan 15, 2020 - NewEnglandcoin Dev Team Expanded with New Kickoff https://bitcointalk.org/index.php?topic=5027091.msg53617358#msg53617358
Jan 12, 2020 - Explanation of Base Diff Reset and Effect of Supply https://www.reddit.com/NewEnglandCoin/comments/envmo1/explanation_of_base_diff_reset_and_effect_of/
Dec 19, 2019 - Shoreline_tradingbot version 1.0 is released https://bitcointalk.org/index.php?topic=5121953.msg53391184#msg53391184
Sept 1, 2019 - NewEnglandcoin (NENG) is Selected as Shoreline Tradingbot First Supported Coin https://bitcointalk.org/index.php?topic=5027091.msg52331201#msg52331201
Aug 15, 2019 - Mining Update on Effect of Base Difficulty Reset, GPU vs ASIC https://bitcointalk.org/index.php?topic=5027091.msg52169572#msg52169572
Jul 7, 2019 - CPU Mining on macOS Mojave is supported under latest Cheetah_Cpuminer Release https://bitcointalk.org/index.php?topic=5027091.msg51745839#msg51745839
Jun 1, 2019 - NENG Fiat project is stopped by Square, Inc https://bitcointalk.org/index.php?topic=5027091.msg51312291#msg51312291
Apr 21, 2019 - NENG Fiat Project is Launched by ShorelineCrypto https://bitcointalk.org/index.php?topic=5027091.msg50714764#msg50714764
Apr 7, 2019 - Announcement of Fiat Project for all U.S. Residents & Mobile Miner Project Initiation https://bitcointalk.org/index.php?topic=5027091.msg50506585#msg50506585
Apr 1, 2019 - Disclosure on Large Buying on NENG at ShorelineCrypto Exchange https://bitcointalk.org/index.php?topic=5027091.msg50417196#msg50417196
Mar 27, 2019 - Disclosure on Large Buying on NENG at ShorelineCrypto Exchange https://bitcointalk.org/index.php?topic=5027091.msg50332097#msg50332097
Mar 17, 2019 - Disclosure on Large Buying on NENG at ShorelineCrypto Exchange https://bitcointalk.org/index.php?topic=5027091.msg50208194#msg50208194
Feb 26, 2019 - Community Project - NewEnglandcoin Graphic Redesign Bounty Initiated https://bitcointalk.org/index.php?topic=5027091.msg49931305#msg49931305
Feb 22, 2019 - Dev Policy on Checkpoints on NewEnglandcoin https://bitcointalk.org/index.php?topic=5027091.msg49875242#msg49875242
Feb 20, 2019 - NewEnglandCoin v1.2.1 Released to Secure the Hard Kork https://bitcointalk.org/index.php?topic=5027091.msg49831059#msg49831059
Feb 11, 2019 - NewEnglandCoin v1.2.0 Released, Anti-51% Attack, Anti-instant Mining after Hard Fork https://bitcointalk.org/index.php?topic=5027091.msg49685389#msg49685389
Jan 13, 2019 - Cheetah_CpuMiner added support for CPU Mining on Mac https://bitcointalk.org/index.php?topic=5027091.msg49218760#msg49218760
Jan 12, 2019 - NENG Core v1.1.2 Released to support MacOS OSX Wallet https://bitcointalk.org/index.php?topic=5027091.msg49202088#msg49202088
Jan 2, 2019 - Cheetah_Cpuminer v1.1.0 is released for both Linux and Windows https://bitcointalk.org/index.php?topic=5027091.msg49004345#msg49004345
Dec 31, 2018 - Technical Whitepaper is Released https://bitcointalk.org/index.php?topic=5027091.msg48990334#msg48990334
Dec 28, 2018 - Cheetah_Cpuminer v1.0.0 is released for Linux https://bitcointalk.org/index.php?topic=5027091.msg48935135#msg48935135
Update on Dec 14, 2018 - NENG Blockchain Stuck Issue https://bitcointalk.org/index.php?topic=5027091.msg48668375#msg48668375
Nov 27, 2018 - Exclusive for PC CPU Miners - How to Steal a Block from ASIC Miners https://bitcointalk.org/index.php?topic=5027091.msg48258465#msg48258465
Nov 28, 2018 - How to CPU Mine a NENG block with window/linux PC https://bitcointalk.org/index.php?topic=5027091.msg48298311#msg48298311
Nov 29, 2018 - A Warning to ASIC Miners https://bitcointalk.org/index.php?topic=5027091.msg48324708#msg48324708
Disclosure: Dev Team Came from ShorelineCrypto, a US based Informatics Service Business offering Fee for service for Coin Creation, Coin Exchange Listing, Blockchain Consulting, etc.
submitted by honglu69 to NewEnglandCoin [link] [comments]

Full node for $ETH buidlers

GetBlock is a service that provides a fast and easy connection to a continuously growing list of over 20 cryptocurrencies’ nodes, including Bitcoin (BTC), Ethereum (ETH), Litecoin (LTC), among others. We support such tools like JSON-RPC, REST, and WebSockets, which facilitates direct synchronization with the blockchain.
In order to build a blockchain-based application, an individual or a company usually has to deploy and run several blockchain nodes. Now you can immediately connect your app to a blockchain, as GetBlock relieves you from running a node yourself.
In order to get started with GetBlock fill in the form on the website and get your free API key.
submitted by getblockio to eth [link] [comments]

Free full node for ETH buidlers

GetBlock is a service that provides a fast and easy connection to a continuously growing list of over 20 cryptocurrencies’ nodes, including Bitcoin (BTC), Ethereum (ETH), Litecoin (LTC), among others. We support such tools like JSON-RPC, REST, and WebSockets, which facilitates direct synchronization with the blockchain.
In order to build a blockchain-based application, an individual or a company usually has to deploy and run several blockchain nodes. Now you can immediately connect your app to a blockchain, as GetBlock relieves you from running a node yourself.
In order to get started with GetBlock fill in the form on the website and get your free API key.
submitted by getblockio to ethdev [link] [comments]

Access to blockchain nodes of the most popular cryptocurrencies

GetBlock is a service that provides a fast and easy connection to a continuously growing list of over 30 cryptocurrencies’ nodes, including Bitcoin (BTC), Ethereum (ETH), Litecoin (LTC), among others. We support such tools like JSON-RPC, REST, and WebSockets, which facilitates direct synchronization with the blockchain.
In order to build a blockchain-based application, an individual or a company usually has to deploy and run several blockchain nodes. Now you can immediately connect your app to a blockchain, as GetBlock relieves you from running a node yourself.
In order to get started with GetBlock fill in the form on the website and get your free API key.
submitted by getblockio to CryptoCurrencies [link] [comments]

What naming convention should I use for a JSON RPC client API designed for multiple languages?

This is the documentation with the original RPC client API specification. The naming convention in the specification is camel case.
Naming conventions might differ in subtle ways for different languages (camel case vs. pascal case), but for some conventions like snake case (Python) or Swift's Fluent Usage API changing the names in the original specification might increase the cognitive load when using the API for those already familiar with the specification.
When searching for different JSON RPC APIs on GitHub, some implementations seem to take advantage of reflection to intercept method calls and pass them to RPC request "as is" so method names for that language are the same as in the original spec. If reflection is not available the names are hardcoded and are mostly the same as the spec, changing only the capitalization of letters for some languages.
Some examples:
Not using Fluent Design in Swift
https://github.com/fanquake/CoreRPC/blob/masteSources/CoreRPC/Blockchain.swift https://github.com/brunophilipe/SwiftRPC/blob/masteSwiftRPC/SwiftRPC+Requests.swift
Not using snake case in Ruby
https://github.com/sinisterchipmunk/bitcoin-client/blob/mastelib/bitcoin-client/client.rb
Changing method names to pascal case in C#
https://github.com/cryptean/bitcoinlib/blob/mastesrc/BitcoinLib/Services/RpcServices/RpcService/RpcService.cs
submitted by rraallvv to learnprogramming [link] [comments]

Full node for $ETH buidlers

GetBlock is a service that provides a fast and easy connection to a continuously growing list of over 20 cryptocurrencies’ nodes, including Bitcoin (BTC), Ethereum (ETH), Litecoin (LTC), among others. We support such tools like JSON-RPC, REST, and WebSockets, which facilitates direct synchronization with the blockchain.
In order to build a blockchain-based application, an individual or a company usually has to deploy and run several blockchain nodes. Now you can immediately connect your app to a blockchain, as GetBlock relieves you from running a node yourself.
In order to get started with GetBlock fill in the form on the website and get your free API key.
submitted by getblockio to Ether [link] [comments]

Full node for $ETH buidlers

GetBlock is a service that provides a fast and easy connection to a continuously growing list of over 20 cryptocurrencies’ nodes, including Bitcoin (BTC), Ethereum (ETH), Litecoin (LTC), among others. We support such tools like JSON-RPC, REST, and WebSockets, which facilitates direct synchronization with the blockchain.
In order to build a blockchain-based application, an individual or a company usually has to deploy and run several blockchain nodes. Now you can immediately connect your app to a blockchain, as GetBlock relieves you from running a node yourself.
In order to get started with GetBlock fill in the form on the website and get your free API key.
submitted by getblockio to ethtrader [link] [comments]

RiB Newsletter #14 – Are We Smart (Contract) Yet?

We’re seeing a bunch of interesting Rust blockchain and crypto projects, so this month the “Interesting Things” section is loaded up with news, papers, and project links.
This month, Elrond, appeared on our radar with the launch of their mainnet. Although not written in Rust, it runs Rust smart contracts on its Arwen WASM VM, which itself is based on the Rust Wasmer VM. Along with NEAR, Nervos, and Enigma (and probably others), this continues an encouraging trend of blockchains enabling smart contracts in Rust. See the “Interesting Things” section for examples of Elrond’s Rust contracts.
Rust continues to be popular for research into zero-knowledge proofs, with Microsoft releasing Spartan, a zk-SNARK system without trusted setup.
In RiB news, we published a late one-year anniversary blog post. It has some reflection on the changes to, and growth of, RiB over the last year.
The Awesome Blockchain Rust project, which is maintained by Sun under the rust-in-blockchain GitHub org, has received a stream of updates recently, and is now published as the Awesome-RiB page on rustinblockchain.org.
It’s a pretty good resource for finding blockchain-related Rust projects, with links to many of the more prominent and mature projects noted in the RiB newsletter. It could use more eyes on it though.

Project Spotlight

Each month we like to shine a light on a notable Rust blockchain project. This month that project is…
ethers.rs
ethers.rs is an Ethereum & Celo library and wallet implementation, implemented as a port of the ethers.js library to Rust.
Ethereum client programming is usually done in JavaScript with either web3.js or ethers.js, with ethers.js being the newer of the two. These clients communicate to an Ethereum node, typically via JSON-RPC (or, when in the browser, via an “injected” client provider that follows EIP-1193, like MetaMask).
ethers.rs then provides a strongly-typed alternative for writing software that interacts with the Ethereum network.
As of now it is only suited for non-browser use cases, but if you prefer hacking in Rust to JavaScript, as some of us surely do, it is worth looking into for your next Ethereum project.
The author of ethers.rs, Georgios Konstantopoulos, accepts donations to sponsor their work.
Note that there is also a Rust alternative to web3.js, rust-web3.

Interesting Things

News

Blog Posts

Papers

Projects

Podcasts and Videos


Read more: https://rustinblockchain.org/newsletters/2020-08-05-are-we-smart-contract-yet/
submitted by Aimeedeer to rust [link] [comments]

Alternatives to rest.bitcoin.com?

TL;DR: What are some serious alternatives to rest.bitcoin.com (free or paid) offering JSON REST API?

Having no time and resources to maintain my own full node/indexer servers, I have used multiple remote APIs to interact with the BCH blockchain. Sadly, most of them are unstable and tend to quickly die.
I have used Bitprim.org, which went out of business during last year's hard fork upgrade without prior warning and returning incorrect data to its clients. I have used bitcore.io from BitPay, which returns incorrect data for unconfirmed transactions and also has very little documentation - most of the endpoints are not documented. I have used Blockchain.com in the past but they do not support BCH. I tried using BTC.com but they do not support the CashAddress format (so I assumed it is not maintained).
Finally, the best service I used so far is rest.bitcoin.com, it has little downtime and is very well documented. The only issue I faced when I started using it is that it does not serve requests over TOR, which is not a big deal.
The problem is that its quality is decreasing over time. There is more and more downtime, they recently dropped support for testnet (trest.bitcoin.com) WITHOUT WARNING and nothing is said about this in the documentation, the site still says it is fully operational and the error message returned says nothing about the endpoint being obsolete/deprecated. Moreover, they do not seem to maintain their repo, tons of issues are open without answer, I submitted a pull request to it and have received no answecomment so far.
I am now looking for serious (reliable, documented...) alternatives. I am willing to pay for an API key. Thank you!
submitted by merc1er to btc [link] [comments]

GetBlock.io is Going Live! Fee-free Access to Full Blockchain Nodes

Hello!
At GetBlock we provide connection for the most popular cryptocurrencies nodes with JSON-RPC, REST and WebSockets. There is no need to deploy a node yourself, our service allows you to connect to the blockchain via a full node without having to pay a fee.
We are constantly developing and adding new nodes, on the contrary, the connection always stays put — fast and secure 24/7. At the moment, GetBlock offers nodes of more than 20 cryptos, including Bitcoin (BTC), Ethereum (ETH), Monero (XMR), and Litecoin (LTC).
The platform is quite suitable for young entrepreneurs and beginners, as well as for crypto developers and blockchain users, for all those who have neither time nor resources to run their own full node.
To start using the node, please get your personal and free API key. Tell us about your project or why you need access to blockchain data, and we will grant you a free API key.
If you do have any further questions or partnership offers, feel free to contact us via email: [[email protected]](mailto:[email protected])
submitted by getblockio to getblockio [link] [comments]

New Ethereum Developer Course

Hey All! We've been working heads down on a new developer curriculum for the last year. We're excited to announce it's finally here.
This curriculum is composed primarily of in-browser coding tutorials and challenges (no need to install any dependencies!). It also includes videos and guides which will help you apply what you learned in your local development environment when you're done with the course.
The full course includes:
Learning JavaScript: A collection of JavaScript coding tutorials and challenges which thoroughly teach JS from scratch with the latest ECMAScript features. Networking: Writing Asynchronous Code and communicating with servers through APIs Data Structures: Building and understanding data structures that are important to blockchain programming (especially trees and linked lists) Blockchain: Understanding Bitcoin, Proof-Of-Work, Digital Signatures and building core blockchain data structures. As well as learning about Ethereum, the EVM, ethers.js, and the Ethereum Node JSON-RPC API. Smart Contracts: Our largest section! This includes 21 coding tutorials and challenges thoroughly teaching the latest Solidity version 0.6.x from the very basics. Decentralized Applications: Deploy Smart Contracts and interact with them through ethers.js. You'll have three new working decentralized applications at the end of this section which you'll be able to extend upon to build bigger projects!
You can find the full listing here: https://www.chainshot.com/curriculum
The course is available through a monthly subscription. We'll also be starting live coding classes next month for all subscribers!
We hope you'll choose to learn with us. Let us know if you have any questions/concerns. All feedback is welcome. :)
submitted by dan-nolan to ethdev [link] [comments]

GetBlock.io is Going Live! Fee-free Access to Full Blockchain Nodes

Hello!
At GetBlock we provide connection for the most popular cryptocurrencies nodes via an open API (JSON-RPC). There is no need to deploy a node yourself, our service allows you to connect to the blockchain via a full node without having to pay a fee.
We are constantly developing and adding new nodes, on the contrary, the connection always stays put — fast and secure 24/7. At the moment, GetBlock offers nodes of more than 20 cryptos, including Bitcoin (BTC), Ethereum (ETH), Monero (XMR), and Litecoin (LTC).
The platform is quite suitable for young entrepreneurs and beginners, as well as for crypto developers and blockchain users, for all those who have neither time nor resources to run their own full node.
To start using the node, please get your personal and free API key. Tell us about your project or why you need access to blockchain data, and we will grant you a free API key.
If you do have any further questions or partnership offers, feel free to contact us via email: [[email protected]](mailto:[email protected])
submitted by getblockio to u/getblockio [link] [comments]

ETHEREUM FRONTEND JAVASCRIPT APIS: WHAT YOU NEED TO KNOW

ETHEREUM FRONTEND JAVASCRIPT APIS: WHAT YOU NEED TO KNOW

https://preview.redd.it/9djdo90nx9051.jpg?width=2400&format=pjpg&auto=webp&s=54ca700da20bac0692ed294a31e75cfefb96f671
Blockchain has emerged as a popular technology, and if you are planning to make a career in this field, then there are various certification programs. When we talk about Blockchain, then it becomes important to mention about Ethereum. It is a cryptocurrency and an open-source platform as well. There has been some great development in this field, and those who are planning to learn about Ethereum must go for a certified Ethereum course.
Blockchain developers who are developing apps on Ethereum must know about the different frontend javascript which can simplify their task. In this blog, we will be highlight three such popular javascript APIs.
Ethereum Overview:
Ethereum emerged after Bitcoin and has now become a popular Blockchain platform. It is a cryptocurrency as well. It is an open-source software platform. Ethereum offers a flexible platform to the developer so that they can develop decentralized apps with ease.
Although scalability is a bit of an issue with Ethereum, in the current scenario, it is one of the best platforms for decentralized application development.
Looking at the broader spectrum and use of Blockchain, it has become a great career opportunity for many. Hence, option for certified Blockchain Developer is the right way to give your career the right boost.
What is API?
API is a set of the protocol which is used of building and integrating the applications across different platforms. APIs eventually simplifies app development and enables seamless interaction of your products and services with the user.
Popular frontend Javascript APIs:
Web3.js- This is a collection of libraries which empowers you to connect with remote Ethereum node. It is achieved by using HTTP or IPC connection. This is used for the following :

  1. Send ether from one account to another
  2. Interact with smart contracts
  3. Retrieve user account
It interacts with Ethereum Blockchain with JSON RPC protocol. A copy of all the data and code is present on the Blockchain. The API requests an individual Ethereum node with JSON RPC to read and write data to the network.
Ethers.js
Another frontend javascript is Ethere.js, which is used by most of the decentralized application developers owing to its features and functionalities. It has the following main features:

  1. It is open source
  2. It is completely safe as it keeps private keys restricted to the clients
  3. You can import and export using JSON wallets which again adds to the security feature
  4. Import and export BIP 39 mnemonic phrases
  5. You can connect to Ethereum nodes via JSON-RPC, MetaMask, INFURA, or Etherscan.
  6. It is completely TypeScript ready
  7. It offers complete functionality for all Ethereym needs
  8. Extensive documentation
  9. It has a huge collection of test cases
  10. It has an MIT Licence.
If you are looking for another API to develop javascript with Ethereum, then you must consider Ether.js. It is loaded with features that any Blockchain developer would require. The library is designed in such a way that it matches the need of the client. With the use of ether.js, it becomes easier to write javascript-based wallets.
Light.js
The third entrant in our list is light.js. It provides high-level tools which are used for developing efficient Dapps on the light client. This is also a great alternative to web3.js. It works with remote nodes and makes it easy for a developer to build decentralized applications with ease.
Here it becomes important to mention that light.js chooses the best pattern which works with light clients, it listens to headers and makes API calls on a new header an ensures that network calls are not extreme.
The end objective is to put up a high-level library such that the decentralized app developers can make use of this and create apps.
Besides, these there are other APIs like Web3-wrapper can also be used by blockchain developer. These APIs aim to simplify the task of the developer so that they can create apps which work seamlessly.
Final Thoughts
If you are working on a decentralized application developed, then you would come across either of these apps or will be using one of them. In case you are new to this field and are looking for gaining comprehensive knowledge in this field, then you must go for a Certified Ethereum Expert online training program by Blockchain Council. This exhaustive program will help you learn about Ethereum, APIs and allied concepts and at the same time, learn how to use them. In case you want to learn how to use smart contracts on Ethereum based applications, then you must opt for Certified Solidity Developer coursesby Blockchain Council. Connect with us today to explore more about Ethereum.
submitted by Blockchain_org to BlockchainStartups [link] [comments]

FlowCards: A Declarative Framework for Development of Ergo dApps

FlowCards: A Declarative Framework for Development of Ergo dApps
Introduction
ErgoScript is the smart contract language used by the Ergo blockchain. While it has concise syntax adopted from Scala/Kotlin, it still may seem confusing at first because conceptually ErgoScript is quite different compared to conventional languages which we all know and love. This is because Ergo is a UTXO based blockchain, whereas smart contracts are traditionally associated with account based systems like Ethereum. However, Ergo's transaction model has many advantages over the account based model and with the right approach it can even be significantly easier to develop Ergo contracts than to write and debug Solidity code.
Below we will cover the key aspects of the Ergo contract model which makes it different:
Paradigm
The account model of Ethereum is imperative. This means that the typical task of sending coins from Alice to Bob requires changing the balances in storage as a series of operations. Ergo's UTXO based programming model on the other hand is declarative. ErgoScript contracts specify conditions for a transaction to be accepted by the blockchain (not changes to be made in the storage state as result of the contract execution).
Scalability
In the account model of Ethereum both storage changes and validity checks are performed on-chain during code execution. In contrast, Ergo transactions are created off-chain and only validation checks are performed on-chain thus reducing the amount of operations performed by every node on the network. In addition, due to immutability of the transaction graph, various optimization strategies are possible to improve throughput of transactions per second in the network. Light verifying nodes are also possible thus further facilitating scalability and accessibility of the network.
Shared state
The account-based model is reliant on shared mutable state which is known to lead to complex semantics (and subtle million dollar bugs) in the context of concurrent/ distributed computation. Ergo's model is based on an immutable graph of transactions. This approach, inherited from Bitcoin, plays well with the concurrent and distributed nature of blockchains and facilitates light trustless clients.
Expressive Power
Ethereum advocated execution of a turing-complete language on the blockchain. It theoretically promised unlimited potential, however in practice severe limitations came to light from excessive blockchain bloat, subtle multi-million dollar bugs, gas costs which limit contract complexity, and other such problems. Ergo on the flip side extends UTXO to enable turing-completeness while limiting the complexity of the ErgoScript language itself. The same expressive power is achieved in a different and more semantically sound way.
With the all of the above points, it should be clear that there are a lot of benefits to the model Ergo is using. In the rest of this article I will introduce you to the concept of FlowCards - a dApp developer component which allows for designing complex Ergo contracts in a declarative and visual way.

From Imperative to Declarative

In the imperative programming model of Ethereum a transaction is a sequence of operations executed by the Ethereum VM. The following Solidity function implements a transfer of tokens from sender to receiver . The transaction starts when sender calls this function on an instance of a contract and ends when the function returns.
// Sends an amount of existing coins from any caller to an address function send(address receiver, uint amount) public { require(amount <= balances[msg.sender], "Insufficient balance."); balances[msg.sender] -= amount; balances[receiver] += amount; emit Sent(msg.sender, receiver, amount); } 
The function first checks the pre-conditions, then updates the storage (i.e. balances) and finally publishes the post-condition as the Sent event. The gas which is consumed by the transaction is sent to the miner as a reward for executing this transaction.
Unlike Ethereum, a transaction in Ergo is a data structure holding a list of input coins which it spends and a list of output coins which it creates preserving the total balances of ERGs and tokens (in which Ergo is similar to Bitcoin).
Turning back to the example above, since Ergo natively supports tokens, therefore for this specific example of sending tokens we don't need to write any code in ErgoScript. Instead we need to create the ‘send’ transaction shown in the following figure, which describes the same token transfer but declaratively.
https://preview.redd.it/sxs3kesvrsv41.png?width=1348&format=png&auto=webp&s=582382bc26912ff79114d831d937d94b6988e69f
The picture visually describes the following steps, which the network user needs to perform:
  1. Select unspent sender's boxes, containing in total tB >= amount of tokens and B >= txFee + minErg ERGs.
  2. Create an output target box which is protected by the receiver public key with minErg ERGs and amount of T tokens.
  3. Create one fee output protected by the minerFee contract with txFee ERGs.
  4. Create one change output protected by the sender public key, containing B - minErg - txFee ERGs and tB - amount of T tokens.
  5. Create a new transaction, sign it using the sender's secret key and send to the Ergo network.
What is important to understand here is that all of these steps are preformed off-chain (for example using Appkit Transaction API) by the user's application. Ergo network nodes don't need to repeat this transaction creation process, they only need to validate the already formed transaction. ErgoScript contracts are stored in the inputs of the transaction and check spending conditions. The node executes the contracts on-chain when the transaction is validated. The transaction is valid if all of the conditions are satisfied.
Thus, in Ethereum when we “send amount from sender to recipient” we are literally editing balances and updating the storage with a concrete set of commands. This happens on-chain and thus a new transaction is also created on-chain as the result of this process.
In Ergo (as in Bitcoin) transactions are created off-chain and the network nodes only verify them. The effects of the transaction on the blockchain state is that input coins (or Boxes in Ergo's parlance) are removed and output boxes are added to the UTXO set.
In the example above we don't use an ErgoScript contract but instead assume a signature check is used as the spending pre-condition. However in more complex application scenarios we of course need to use ErgoScript which is what we are going to discuss next.

From Changing State to Checking Context

In the send function example we first checked the pre-condition (require(amount <= balances[msg.sender],...) ) and then changed the state (i.e. update balances balances[msg.sender] -= amount ). This is typical in Ethereum transactions. Before we change anything we need to check if it is valid to do so.
In Ergo, as we discussed previously, the state (i.e. UTXO set of boxes) is changed implicitly when a valid transaction is included in a block. Thus we only need to check the pre-conditions before the transaction can be added to the block. This is what ErgoScript contracts do.
It is not possible to “change the state” in ErgoScript because it is a language to check pre-conditions for spending coins. ErgoScript is a purely functional language without side effects that operates on immutable data values. This means all the inputs, outputs and other transaction parameters available in a script are immutable. This, among other things, makes ErgoScript a very simple language that is easy to learn and safe to use. Similar to Bitcoin, each input box contains a script, which should return the true value in order to 1) allow spending of the box (i.e. removing from the UTXO set) and 2) adding the transaction to the block.
If we are being pedantic, it is therefore incorrect (strictly speaking) to think of ErgoScript as the language of Ergo contracts, because it is the language of propositions (logical predicates, formulas, etc.) which protect boxes from “illegal” spending. Unlike Bitcoin, in Ergo the whole transaction and a part of the current blockchain context is available to every script. Therefore each script may check which outputs are created by the transaction, their ERG and token amounts (we will use this capability in our example DEX contracts), current block number etc.
In ErgoScript you define the conditions of whether changes (i.e. coin spending) are allowed to happen in a given context. This is in contrast to programming the changes imperatively in the code of a contract.
While Ergo's transaction model unlocks a whole range of applications like (DEX, DeFi Apps, LETS, etc), designing contracts as pre-conditions for coin spending (or guarding scripts) directly is not intuitive. In the next sections we will consider a useful graphical notation to design contracts declaratively using FlowCard Diagrams, which is a visual representation of executable components (FlowCards).
FlowCards aim to radically simplify dApp development on the Ergo platform by providing a high-level declarative language, execution runtime, storage format and a graphical notation.
We will start with a high level of diagrams and go down to FlowCard specification.

FlowCard Diagrams

The idea behind FlowCard diagrams is based on the following observations: 1) An Ergo box is immutable and can only be spent in the transaction which uses it as an input. 2) We therefore can draw a flow of boxes through transactions, so that boxes flowing in to the transaction are spent and those flowing out are created and added to the UTXO. 3) A transaction from this perspective is simply a transformer of old boxes to the new ones preserving the balances of ERGs and tokens involved.
The following figure shows the main elements of the Ergo transaction we've already seen previously (now under the name of FlowCard Diagram).
https://preview.redd.it/06aqkcd1ssv41.png?width=1304&format=png&auto=webp&s=106eda730e0526919aabd5af9596b97e45b69777
There is a strictly defined meaning (semantics) behind every element of the diagram, so that the diagram is a visual representation (or a view) of the underlying executable component (called FlowCard).
The FlowCard can be used as a reusable component of an Ergo dApp to create and initiate the transaction on the Ergo blockchain. We will discuss this in the coming sections.
Now let's look at the individual pieces of the FlowCard diagram one by one.
1. Name and Parameters
Each flow card is given a name and a list of typed parameters. This is similar to a template with parameters. In the above figure we can see the Send flow card which has five parameters. The parameters are used in the specification.
2. Contract Wallet
This is a key element of the flow card. Every box has a guarding script. Often it is the script that checks a signature against a public key. This script is trivial in ErgoScript and is defined like the def pk(pubkey: Address) = { pubkey } template where pubkey is a parameter of the type Address . In the figure, the script template is applied to the parameter pk(sender) and thus a concrete wallet contract is obtained. Therefore pk(sender) and pk(receiver) yield different scripts and represent different wallets on the diagram, even though they use the same template.
Contract Wallet contains a set of all UTXO boxes which have a given script derived from the given script template using flow card parameters. For example, in the figure, the template is pk and parameter pubkey is substituted with the `sender’ flow card parameter.
3. Contract
Even though a contract is a property of a box, on the diagram we group the boxes by their contracts, therefore it looks like the boxes belong to the contracts, rather than the contracts belong to the boxes. In the example, we have three instantiated contracts pk(sender) , pk(receiver) and minerFee . Note, that pk(sender) is the instantiation of the pk template with the concrete parameter sender and minerFee is the instantiation of the pre-defined contract which protects the miner reward boxes.
4. Box name
In the diagram we can give each box a name. Besides readability of the diagram, we also use the name as a synonym of a more complex indexed access to the box in the contract. For example, change is the name of the box, which can also be used in the ErgoScript conditions instead of OUTPUTS(2) . We also use box names to associate spending conditions with the boxes.
5. Boxes in the wallet
In the diagram, we show boxes (darker rectangles) as belonging to the contract wallets (lighter rectangles). Each such box rectangle is connected with a grey transaction rectangle by either orange or green arrows or both. An output box (with an incoming green arrow) may include many lines of text where each line specifies a condition which should be checked as part of the transaction. The first line specifies the condition on the amount of ERG which should be placed in the box. Other lines may take one of the following forms:
  1. amount: TOKEN - the box should contain the given amount of the given TOKEN
  2. R == value - the box should contain the given value of the given register R
  3. boxName ? condition - the box named boxName should check condition in its script.
We discuss these conditions in the sections below.
6. Amount of ERGs in the box
Each box should store a minimum amount of ERGs. This is checked when the creating transaction is validated. In the diagram the amount of ERGs is always shown as the first line (e.g. B: ERG or B - minErg - txFee ). The value type ascription B: ERG is optional and may be used for readability. When the value is given as a formula, then this formula should be respected by the transaction which creates the box.
It is important to understand that variables like amount and txFee are not named properties of the boxes. They are parameters of the whole diagram and representing some amounts. Or put it another way, they are shared parameters between transactions (e.g. Sell Order and Swap transactions from DEX example below share the tAmt parameter). So the same name is tied to the same value throughout the diagram (this is where the tooling would help a lot). However, when it comes to on-chain validation of those values, only explicit conditions which are marked with ? are transformed to ErgoScript. At the same time, all other conditions are ensured off-chain during transaction building (for example in an application using Appkit API) and transaction validation when it is added to the blockchain.
7. Amount of T token
A box can store values of many tokens. The tokens on the diagram are named and a value variable may be associated with the token T using value: T expression. The value may be given by formula. If the formula is prefixed with a box name like boxName ? formula , then it is should also be checked in the guarding script of the boxName box. This additional specification is very convenient because 1) it allows to validate the visual design automatically, and 2) the conditions specified in the boxes of a diagram are enough to synthesize the necessary guarding scripts. (more about this below at “From Diagrams To ErgoScript Contracts”)
8. Tx Inputs
Inputs are connected to the corresponding transaction by orange arrows. An input arrow may have a label of the following forms:
  1. [email protected] - optional name with an index i.e. [email protected] or u/2 . This is a property of the target endpoint of the arrow. The name is used in conditions of related boxes and the index is the position of the corresponding box in the INPUTS collection of the transaction.
  2. !action - is a property of the source of the arrow and gives a name for an alternative spending path of the box (we will see this in DEX example)
Because of alternative spending paths, a box may have many outgoing orange arrows, in which case they should be labeled with different actions.
9. Transaction
A transaction spends input boxes and creates output boxes. The input boxes are given by the orange arrows and the labels are expected to put inputs at the right indexes in INPUTS collection. The output boxes are given by the green arrows. Each transaction should preserve a strict balance of ERG values (sum of inputs == sum of outputs) and for each token the sum of inputs >= the sum of outputs. The design diagram requires an explicit specification of the ERG and token values for all of the output boxes to avoid implicit errors and ensure better readability.
10. Tx Outputs
Outputs are connected to the corresponding transaction by green arrows. An output arrow may have a label of the following [email protected] , where an optional name is accompanied with an index i.e. [email protected] or u/2 . This is a property of the source endpoint of the arrow. The name is used in conditions of the related boxes and the index is the position of the corresponding box in the OUTPUTS collection of the transaction.

Example: Decentralized Exchange (DEX)

Now let's use the above described notation to design a FlowCard for a DEX dApp. It is simple enough yet also illustrates all of the key features of FlowCard diagrams which we've introduced in the previous section.
The dApp scenario is shown in the figure below: There are three participants (buyer, seller and DEX) of the DEX dApp and five different transaction types, which are created by participants. The buyer wants to swap ergAmt of ERGs for tAmt of TID tokens (or vice versa, the seller wants to sell TID tokens for ERGs, who sends the order first doesn't matter). Both the buyer and the seller can cancel their orders any time. The DEX off-chain matching service can find matching orders and create the Swap transaction to complete the exchange.
The following diagram fully (and formally) specifies all of the five transactions that must be created off-chain by the DEX dApp. It also specifies all of the spending conditions that should be verified on-chain.

https://preview.redd.it/piogz0v9ssv41.png?width=1614&format=png&auto=webp&s=e1b503a635ad3d138ef91e2f0c3b726e78958646
Let's discuss the FlowCard diagram and the logic of each transaction in details:
Buy Order Transaction
A buyer creates a Buy Order transaction. The transaction spends E amount of ERGs (which we will write E: ERG ) from one or more boxes in the pk(buyer) wallet. The transaction creates a bid box with ergAmt: ERG protected by the buyOrder script. The buyOrder script is synthesized from the specification (see below at “From Diagrams To ErgoScript Contracts”) either manually or automatically by a tool. Even though we don't need to define the buyOrder script explicitly during designing, at run time the bid box should contain the buyOrder script as the guarding proposition (which checks the box spending conditions), otherwise the conditions specified in the diagram will not be checked.
The change box is created to make the input and output sums of the transaction balanced. The transaction fee box is omitted because it can be added automatically by the tools. In practice, however, the designer can add the fee box explicitly to the a diagram. It covers the cases of more complex transactions (like Swap) where there are many ways to pay the transaction fee.
Cancel Buy, Cancel Sell Transactions
At any time, the buyer can cancel the order by sending CancelBuy transaction. The transaction should satisfy the guarding buyOrder contract which protects the bid box. As you can see on the diagram, both the Cancel and the Swap transactions can spend the bid box. When a box has spending alternatives (or spending paths) then each alternative is identified by a unique name prefixed with ! (!cancel and !swap for the bid box). Each alternative path has specific spending conditions. In our example, when the Cancel Buy transaction spends the bid box the ?buyer condition should be satisfied, which we read as “the signature for the buyer address should be presented in the transaction”. Therefore, only buyer can cancel the buy order. This “signature” condition is only required for the !cancel alternative spending path and not required for !swap .
Sell Order Transaction
The Sell Order transaction is similar to the BuyOrder in that it deals with tokens in addition to ERGs. The transaction spends E: ERG and T: TID tokens from seller's wallet (specified as pk(seller) contract). The two outputs are ask and change . The change is a standard box to balance transaction. The ask box keeps tAmt: TID tokens for the exchange and minErg: ERG - the minimum amount of ERGs required in every box.
Swap Transaction
This is a key transaction in the DEX dApp scenario. The transaction has several spending conditions on the input boxes and those conditions are included in the buyOrder and sellOrder scripts (which are verified when the transaction is added to the blockchain). However, on the diagram those conditions are not specified in the bid and ask boxes, they are instead defined in the output boxes of the transaction.
This is a convention for improved usability because most of the conditions relate to the properties of the output boxes. We could specify those properties in the bid box, but then we would have to use more complex expressions.
Let's consider the output created by the arrow labeled with [email protected] . This label tells us that the output is at the index 0 in the OUTPUTS collection of the transaction and that in the diagram we can refer to this box by the buyerOut name. Thus we can label both the box itself and the arrow to give the box a name.
The conditions shown in the buyerOut box have the form bid ? condition , which means they should be verified on-chain in order to spend the bid box. The conditions have the following meaning:
  • tAmt: TID requires the box to have tAmt amount of TID token
  • R4 == bid.id requires R4 register in the box to be equal to id of the bid box.
  • script == buyer requires the buyerOut box to have the script of the wallet where it is located on the diagram, i.e. pk(buyer)
Similar properties are added to the sellerOut box, which is specified to be at index 1 and the name is given to it using the label on the box itself, rather than on the arrow.
The Swap transaction spends two boxes bid and ask using the !swap spending path on both, however unlike !cancel the conditions on the path are not specified. This is where the bid ? and ask ? prefixes come into play. They are used so that the conditions listed in the buyerOut and sellerOut boxes are moved to the !swap spending path of the bid and ask boxes correspondingly.
If you look at the conditions of the output boxes, you will see that they exactly specify the swap of values between seller's and buyer's wallets. The buyer gets the necessary amount of TID token and seller gets the corresponding amount of ERGs. The Swap transaction is created when there are two matching boxes with buyOrder and sellOrder contracts.

From Diagrams To ErgoScript Contracts

What is interesting about FlowCard specifications is that we can use them to automatically generate the necessary ErgoTree scripts. With the appropriate tooling support this can be done automatically, but with the lack of thereof, it can be done manually. Thus, the FlowCard allows us to capture and visually represent all of the design choices and semantic details of an Ergo dApp.
What we are going to do next is to mechanically create the buyOrder contract from the information given in the DEX flow card.
Recall that each script is a proposition (boolean valued expression) which should evaluate to true to allow spending of the box. When we have many conditions to be met at the same time we can combine them in a logical formula using the AND binary operation, and if we have alternatives (not necessarily exclusive) we can put them into the OR operation.
The buyOrder box has the alternative spending paths !cancel and !swap . Thus the ErgoScript code should have OR operation with two arguments - one for each spending path.
/** buyOrder contract */ { val cancelCondition = {} val swapCondition = {} cancelCondition || swapCondition } 
The formula for the cancelCondition expression is given in the !cancel spending path of the buyOrder box. We can directly include it in the script.
/** buyOrder contract */ { val cancelCondition = { buyer } val swapCondition = {} cancelCondition || swapCondition } 
For the !swap spending path of the buyOrder box the conditions are specified in the buyerOut output box of the Swap transaction. If we simply include them in the swapCondition then we get a syntactically incorrect script.
/** buyOrder contract */ { val cancelCondition = { buyer } val swapCondition = { tAmt: TID && R4 == bid.id && @contract } cancelCondition || swapCondition } 
We can however translate the conditions from the diagram syntax to ErgoScript expressions using the following simple rules
  1. [email protected] ==> val buyerOut = OUTPUTS(0)
  2. tAmt: TID ==> tid._2 == tAmt where tid = buyerOut.tokens(TID)
  3. R4 == bid.id ==> R4 == SELF.id where R4 = buyerOut.R4[Coll[Byte]].get
  4. script == buyer ==> buyerOut.propositionBytes == buyer.propBytes
Note, in the diagram TID represents a token id, but ErgoScript doesn't have access to the tokens by the ids so we cannot write tokens.getByKey(TID) . For this reason, when the diagram is translated into ErgoScript, TID becomes a named constant of the index in tokens collection of the box. The concrete value of the constant is assigned when the BuyOrder transaction with the buyOrder box is created. The correspondence and consistency between the actual tokenId, the TID constant and the actual tokens of the buyerOut box is ensured by the off-chain application code, which is completely possible since all of the transactions are created by the application using FlowCard as a guiding specification. This may sound too complicated, but this is part of the translation from diagram specification to actual executable application code, most of which can be automated.
After the transformation we can obtain a correct script which checks all the required preconditions for spending the buyOrder box.
/** buyOrder contract */ def DEX(buyer: Addrss, seller: Address, TID: Int, ergAmt: Long, tAmt: Long) { val cancelCondition: SigmaProp = { buyer } // verify buyer's sig (ProveDlog) val swapCondition = OUTPUTS.size > 0 && { // securing OUTPUTS access val buyerOut = OUTPUTS(0) // from [email protected] buyerOut.tokens.size > TID && { // securing tokens access val tid = buyerOut.tokens(TID) val regR4 = buyerOut.R4[Coll[Byte]] regR4.isDefined && { // securing R4 access val R4 = regR4.get tid._2 == tAmt && // from tAmt: TID R4 == SELF.id && // from R4 == bid.id buyerOut.propositionBytes == buyer.propBytes // from script == buyer } } } cancelCondition || swapCondition } 
A similar script for the sellOrder box can be obtained using the same translation rules. With the help of the tooling the code of contracts can be mechanically generated from the diagram specification.

Conclusions

Declarative programming models have already won the battle against imperative programming in many application domains like Big Data, Stream Processing, Deep Learning, Databases, etc. Ergo is pioneering the declarative model of dApp development as a better and safer alternative to the now popular imperative model of smart contracts.
The concept of FlowCard shifts the focus from writing ErgoScript contracts to the overall flow of values (hence the name), in such a way, that ErgoScript can always be generated from them. You will never need to look at the ErgoScript code once the tooling is in place.
Here are the possible next steps for future work:
  1. Storage format for FlowCard Spec and the corresponding EIP standardized file format (Json/XML/Protobuf). This will allow various tools (Diagram Editor, Runtime, dApps etc) to create and use *.flowcard files.
  2. FlowCard Viewer, which can generate the diagrams from *.flowcard files.
  3. FlowCard Runtime, which can run *.flowcard files, create and send transactions to Ergo network.
  4. FlowCard Designer Tool, which can simplify development of complex diagrams . This will make designing and validation of Ergo contracts a pleasant experience, more like drawing rather than coding. In addition, the correctness of the whole dApp scenario can be verified and controlled by the tooling.
submitted by eleanorcwhite to btc [link] [comments]

FlowCards: A Declarative Framework for Development of Ergo dApps

FlowCards: A Declarative Framework for Development of Ergo dApps
Introduction
ErgoScript is the smart contract language used by the Ergo blockchain. While it has concise syntax adopted from Scala/Kotlin, it still may seem confusing at first because conceptually ErgoScript is quite different compared to conventional languages which we all know and love. This is because Ergo is a UTXO based blockchain, whereas smart contracts are traditionally associated with account based systems like Ethereum. However, Ergo's transaction model has many advantages over the account based model and with the right approach it can even be significantly easier to develop Ergo contracts than to write and debug Solidity code.
Below we will cover the key aspects of the Ergo contract model which makes it different:
Paradigm
The account model of Ethereum is imperative. This means that the typical task of sending coins from Alice to Bob requires changing the balances in storage as a series of operations. Ergo's UTXO based programming model on the other hand is declarative. ErgoScript contracts specify conditions for a transaction to be accepted by the blockchain (not changes to be made in the storage state as result of the contract execution).
Scalability
In the account model of Ethereum both storage changes and validity checks are performed on-chain during code execution. In contrast, Ergo transactions are created off-chain and only validation checks are performed on-chain thus reducing the amount of operations performed by every node on the network. In addition, due to immutability of the transaction graph, various optimization strategies are possible to improve throughput of transactions per second in the network. Light verifying nodes are also possible thus further facilitating scalability and accessibility of the network.
Shared state
The account-based model is reliant on shared mutable state which is known to lead to complex semantics (and subtle million dollar bugs) in the context of concurrent/ distributed computation. Ergo's model is based on an immutable graph of transactions. This approach, inherited from Bitcoin, plays well with the concurrent and distributed nature of blockchains and facilitates light trustless clients.
Expressive Power
Ethereum advocated execution of a turing-complete language on the blockchain. It theoretically promised unlimited potential, however in practice severe limitations came to light from excessive blockchain bloat, subtle multi-million dollar bugs, gas costs which limit contract complexity, and other such problems. Ergo on the flip side extends UTXO to enable turing-completeness while limiting the complexity of the ErgoScript language itself. The same expressive power is achieved in a different and more semantically sound way.
With the all of the above points, it should be clear that there are a lot of benefits to the model Ergo is using. In the rest of this article I will introduce you to the concept of FlowCards - a dApp developer component which allows for designing complex Ergo contracts in a declarative and visual way.
From Imperative to Declarative
In the imperative programming model of Ethereum a transaction is a sequence of operations executed by the Ethereum VM. The following Solidity function implements a transfer of tokens from sender to receiver . The transaction starts when sender calls this function on an instance of a contract and ends when the function returns.
// Sends an amount of existing coins from any caller to an address function send(address receiver, uint amount) public { require(amount <= balances[msg.sender], "Insufficient balance."); balances[msg.sender] -= amount; balances[receiver] += amount; emit Sent(msg.sender, receiver, amount); } 
The function first checks the pre-conditions, then updates the storage (i.e. balances) and finally publishes the post-condition as the Sent event. The gas which is consumed by the transaction is sent to the miner as a reward for executing this transaction.
Unlike Ethereum, a transaction in Ergo is a data structure holding a list of input coins which it spends and a list of output coins which it creates preserving the total balances of ERGs and tokens (in which Ergo is similar to Bitcoin).
Turning back to the example above, since Ergo natively supports tokens, therefore for this specific example of sending tokens we don't need to write any code in ErgoScript. Instead we need to create the ‘send’ transaction shown in the following figure, which describes the same token transfer but declaratively.
https://preview.redd.it/id5kjdgn9tv41.png?width=1348&format=png&auto=webp&s=31b937d7ad0af4afe94f4d023e8c90c97c8aed2e
The picture visually describes the following steps, which the network user needs to perform:
  1. Select unspent sender's boxes, containing in total tB >= amount of tokens and B >= txFee + minErg ERGs.
  2. Create an output target box which is protected by the receiver public key with minErg ERGs and amount of T tokens.
  3. Create one fee output protected by the minerFee contract with txFee ERGs.
  4. Create one change output protected by the sender public key, containing B - minErg - txFee ERGs and tB - amount of T tokens.
  5. Create a new transaction, sign it using the sender's secret key and send to the Ergo network.
What is important to understand here is that all of these steps are preformed off-chain (for example using Appkit Transaction API) by the user's application. Ergo network nodes don't need to repeat this transaction creation process, they only need to validate the already formed transaction. ErgoScript contracts are stored in the inputs of the transaction and check spending conditions. The node executes the contracts on-chain when the transaction is validated. The transaction is valid if all of the conditions are satisfied.
Thus, in Ethereum when we “send amount from sender to recipient” we are literally editing balances and updating the storage with a concrete set of commands. This happens on-chain and thus a new transaction is also created on-chain as the result of this process.
In Ergo (as in Bitcoin) transactions are created off-chain and the network nodes only verify them. The effects of the transaction on the blockchain state is that input coins (or Boxes in Ergo's parlance) are removed and output boxes are added to the UTXO set.
In the example above we don't use an ErgoScript contract but instead assume a signature check is used as the spending pre-condition. However in more complex application scenarios we of course need to use ErgoScript which is what we are going to discuss next.
From Changing State to Checking Context
In the send function example we first checked the pre-condition (require(amount <= balances[msg.sender],...) ) and then changed the state (i.e. update balances balances[msg.sender] -= amount ). This is typical in Ethereum transactions. Before we change anything we need to check if it is valid to do so.
In Ergo, as we discussed previously, the state (i.e. UTXO set of boxes) is changed implicitly when a valid transaction is included in a block. Thus we only need to check the pre-conditions before the transaction can be added to the block. This is what ErgoScript contracts do.
It is not possible to “change the state” in ErgoScript because it is a language to check pre-conditions for spending coins. ErgoScript is a purely functional language without side effects that operates on immutable data values. This means all the inputs, outputs and other transaction parameters available in a script are immutable. This, among other things, makes ErgoScript a very simple language that is easy to learn and safe to use. Similar to Bitcoin, each input box contains a script, which should return the true value in order to 1) allow spending of the box (i.e. removing from the UTXO set) and 2) adding the transaction to the block.
If we are being pedantic, it is therefore incorrect (strictly speaking) to think of ErgoScript as the language of Ergo contracts, because it is the language of propositions (logical predicates, formulas, etc.) which protect boxes from “illegal” spending. Unlike Bitcoin, in Ergo the whole transaction and a part of the current blockchain context is available to every script. Therefore each script may check which outputs are created by the transaction, their ERG and token amounts (we will use this capability in our example DEX contracts), current block number etc.
In ErgoScript you define the conditions of whether changes (i.e. coin spending) are allowed to happen in a given context. This is in contrast to programming the changes imperatively in the code of a contract.
While Ergo's transaction model unlocks a whole range of applications like (DEX, DeFi Apps, LETS, etc), designing contracts as pre-conditions for coin spending (or guarding scripts) directly is not intuitive. In the next sections we will consider a useful graphical notation to design contracts declaratively using FlowCard Diagrams, which is a visual representation of executable components (FlowCards).
FlowCards aim to radically simplify dApp development on the Ergo platform by providing a high-level declarative language, execution runtime, storage format and a graphical notation.
We will start with a high level of diagrams and go down to FlowCard specification.
FlowCard Diagrams
The idea behind FlowCard diagrams is based on the following observations: 1) An Ergo box is immutable and can only be spent in the transaction which uses it as an input. 2) We therefore can draw a flow of boxes through transactions, so that boxes flowing in to the transaction are spent and those flowing out are created and added to the UTXO. 3) A transaction from this perspective is simply a transformer of old boxes to the new ones preserving the balances of ERGs and tokens involved.
The following figure shows the main elements of the Ergo transaction we've already seen previously (now under the name of FlowCard Diagram).
https://preview.redd.it/9kcxl11o9tv41.png?width=1304&format=png&auto=webp&s=378a7f50769292ca94de35ff597dc1a44af56d14
There is a strictly defined meaning (semantics) behind every element of the diagram, so that the diagram is a visual representation (or a view) of the underlying executable component (called FlowCard).
The FlowCard can be used as a reusable component of an Ergo dApp to create and initiate the transaction on the Ergo blockchain. We will discuss this in the coming sections.
Now let's look at the individual pieces of the FlowCard diagram one by one.
  1. Name and Parameters
Each flow card is given a name and a list of typed parameters. This is similar to a template with parameters. In the above figure we can see the Send flow card which has five parameters. The parameters are used in the specification.
  1. Contract Wallet
This is a key element of the flow card. Every box has a guarding script. Often it is the script that checks a signature against a public key. This script is trivial in ErgoScript and is defined like the def pk(pubkey: Address) = { pubkey } template where pubkey is a parameter of the type Address . In the figure, the script template is applied to the parameter pk(sender) and thus a concrete wallet contract is obtained. Therefore pk(sender) and pk(receiver) yield different scripts and represent different wallets on the diagram, even though they use the same template.
Contract Wallet contains a set of all UTXO boxes which have a given script derived from the given script template using flow card parameters. For example, in the figure, the template is pk and parameter pubkey is substituted with the `sender’ flow card parameter.
  1. Contract
Even though a contract is a property of a box, on the diagram we group the boxes by their contracts, therefore it looks like the boxes belong to the contracts, rather than the contracts belong to the boxes. In the example, we have three instantiated contracts pk(sender) , pk(receiver) and minerFee . Note, that pk(sender) is the instantiation of the pk template with the concrete parameter sender and minerFee is the instantiation of the pre-defined contract which protects the miner reward boxes.
  1. Box name
In the diagram we can give each box a name. Besides readability of the diagram, we also use the name as a synonym of a more complex indexed access to the box in the contract. For example, change is the name of the box, which can also be used in the ErgoScript conditions instead of OUTPUTS(2) . We also use box names to associate spending conditions with the boxes.
  1. Boxes in the wallet
In the diagram, we show boxes (darker rectangles) as belonging to the contract wallets (lighter rectangles). Each such box rectangle is connected with a grey transaction rectangle by either orange or green arrows or both. An output box (with an incoming green arrow) may include many lines of text where each line specifies a condition which should be checked as part of the transaction. The first line specifies the condition on the amount of ERG which should be placed in the box. Other lines may take one of the following forms:
  1. amount: TOKEN - the box should contain the given amount of the given TOKEN
  2. R == value - the box should contain the given value of the given register R
  3. boxName ? condition - the box named boxName should check condition in its script.
We discuss these conditions in the sections below.
  1. Amount of ERGs in the box
Each box should store a minimum amount of ERGs. This is checked when the creating transaction is validated. In the diagram the amount of ERGs is always shown as the first line (e.g. B: ERG or B - minErg - txFee ). The value type ascription B: ERG is optional and may be used for readability. When the value is given as a formula, then this formula should be respected by the transaction which creates the box.
It is important to understand that variables like amount and txFee are not named properties of the boxes. They are parameters of the whole diagram and representing some amounts. Or put it another way, they are shared parameters between transactions (e.g. Sell Order and Swap transactions from DEX example below share the tAmt parameter). So the same name is tied to the same value throughout the diagram (this is where the tooling would help a lot). However, when it comes to on-chain validation of those values, only explicit conditions which are marked with ? are transformed to ErgoScript. At the same time, all other conditions are ensured off-chain during transaction building (for example in an application using Appkit API) and transaction validation when it is added to the blockchain.
  1. Amount of T token
A box can store values of many tokens. The tokens on the diagram are named and a value variable may be associated with the token T using value: T expression. The value may be given by formula. If the formula is prefixed with a box name like boxName ? formula , then it is should also be checked in the guarding script of the boxName box. This additional specification is very convenient because 1) it allows to validate the visual design automatically, and 2) the conditions specified in the boxes of a diagram are enough to synthesize the necessary guarding scripts. (more about this below at “From Diagrams To ErgoScript Contracts”)
  1. Tx Inputs
Inputs are connected to the corresponding transaction by orange arrows. An input arrow may have a label of the following forms:
  1. [email protected] - optional name with an index i.e. [email protected] or u/2 . This is a property of the target endpoint of the arrow. The name is used in conditions of related boxes and the index is the position of the corresponding box in the INPUTS collection of the transaction.
  2. !action - is a property of the source of the arrow and gives a name for an alternative spending path of the box (we will see this in DEX example)
Because of alternative spending paths, a box may have many outgoing orange arrows, in which case they should be labeled with different actions.
  1. Transaction
A transaction spends input boxes and creates output boxes. The input boxes are given by the orange arrows and the labels are expected to put inputs at the right indexes in INPUTS collection. The output boxes are given by the green arrows. Each transaction should preserve a strict balance of ERG values (sum of inputs == sum of outputs) and for each token the sum of inputs >= the sum of outputs. The design diagram requires an explicit specification of the ERG and token values for all of the output boxes to avoid implicit errors and ensure better readability.
  1. Tx Outputs
Outputs are connected to the corresponding transaction by green arrows. An output arrow may have a label of the following [email protected] , where an optional name is accompanied with an index i.e. [email protected] or u/2 . This is a property of the source endpoint of the arrow. The name is used in conditions of the related boxes and the index is the position of the corresponding box in the OUTPUTS collection of the transaction.
Example: Decentralized Exchange (DEX)
Now let's use the above described notation to design a FlowCard for a DEX dApp. It is simple enough yet also illustrates all of the key features of FlowCard diagrams which we've introduced in the previous section.
The dApp scenario is shown in the figure below: There are three participants (buyer, seller and DEX) of the DEX dApp and five different transaction types, which are created by participants. The buyer wants to swap ergAmt of ERGs for tAmt of TID tokens (or vice versa, the seller wants to sell TID tokens for ERGs, who sends the order first doesn't matter). Both the buyer and the seller can cancel their orders any time. The DEX off-chain matching service can find matching orders and create the Swap transaction to complete the exchange.
The following diagram fully (and formally) specifies all of the five transactions that must be created off-chain by the DEX dApp. It also specifies all of the spending conditions that should be verified on-chain.

https://preview.redd.it/fnt5f4qp9tv41.png?width=1614&format=png&auto=webp&s=34f145f9a6d622454906857e645def2faba057bd
Let's discuss the FlowCard diagram and the logic of each transaction in details:
Buy Order Transaction
A buyer creates a Buy Order transaction. The transaction spends E amount of ERGs (which we will write E: ERG ) from one or more boxes in the pk(buyer) wallet. The transaction creates a bid box with ergAmt: ERG protected by the buyOrder script. The buyOrder script is synthesized from the specification (see below at “From Diagrams To ErgoScript Contracts”) either manually or automatically by a tool. Even though we don't need to define the buyOrder script explicitly during designing, at run time the bid box should contain the buyOrder script as the guarding proposition (which checks the box spending conditions), otherwise the conditions specified in the diagram will not be checked.
The change box is created to make the input and output sums of the transaction balanced. The transaction fee box is omitted because it can be added automatically by the tools. In practice, however, the designer can add the fee box explicitly to the a diagram. It covers the cases of more complex transactions (like Swap) where there are many ways to pay the transaction fee.
Cancel Buy, Cancel Sell Transactions
At any time, the buyer can cancel the order by sending CancelBuy transaction. The transaction should satisfy the guarding buyOrder contract which protects the bid box. As you can see on the diagram, both the Cancel and the Swap transactions can spend the bid box. When a box has spending alternatives (or spending paths) then each alternative is identified by a unique name prefixed with ! (!cancel and !swap for the bid box). Each alternative path has specific spending conditions. In our example, when the Cancel Buy transaction spends the bid box the ?buyer condition should be satisfied, which we read as “the signature for the buyer address should be presented in the transaction”. Therefore, only buyer can cancel the buy order. This “signature” condition is only required for the !cancel alternative spending path and not required for !swap .
Sell Order Transaction
The Sell Order transaction is similar to the BuyOrder in that it deals with tokens in addition to ERGs. The transaction spends E: ERG and T: TID tokens from seller's wallet (specified as pk(seller) contract). The two outputs are ask and change . The change is a standard box to balance transaction. The ask box keeps tAmt: TID tokens for the exchange and minErg: ERG - the minimum amount of ERGs required in every box.
Swap Transaction
This is a key transaction in the DEX dApp scenario. The transaction has several spending conditions on the input boxes and those conditions are included in the buyOrder and sellOrder scripts (which are verified when the transaction is added to the blockchain). However, on the diagram those conditions are not specified in the bid and ask boxes, they are instead defined in the output boxes of the transaction.
This is a convention for improved usability because most of the conditions relate to the properties of the output boxes. We could specify those properties in the bid box, but then we would have to use more complex expressions.
Let's consider the output created by the arrow labeled with [email protected] . This label tells us that the output is at the index 0 in the OUTPUTS collection of the transaction and that in the diagram we can refer to this box by the buyerOut name. Thus we can label both the box itself and the arrow to give the box a name.
The conditions shown in the buyerOut box have the form bid ? condition , which means they should be verified on-chain in order to spend the bid box. The conditions have the following meaning:
  • tAmt: TID requires the box to have tAmt amount of TID token
  • R4 == bid.id requires R4 register in the box to be equal to id of the bid box.
  • script == buyer requires the buyerOut box to have the script of the wallet where it is located on the diagram, i.e. pk(buyer)
Similar properties are added to the sellerOut box, which is specified to be at index 1 and the name is given to it using the label on the box itself, rather than on the arrow.
The Swap transaction spends two boxes bid and ask using the !swap spending path on both, however unlike !cancel the conditions on the path are not specified. This is where the bid ? and ask ? prefixes come into play. They are used so that the conditions listed in the buyerOut and sellerOut boxes are moved to the !swap spending path of the bid and ask boxes correspondingly.
If you look at the conditions of the output boxes, you will see that they exactly specify the swap of values between seller's and buyer's wallets. The buyer gets the necessary amount of TID token and seller gets the corresponding amount of ERGs. The Swap transaction is created when there are two matching boxes with buyOrder and sellOrder contracts.
From Diagrams To ErgoScript Contracts
What is interesting about FlowCard specifications is that we can use them to automatically generate the necessary ErgoTree scripts. With the appropriate tooling support this can be done automatically, but with the lack of thereof, it can be done manually. Thus, the FlowCard allows us to capture and visually represent all of the design choices and semantic details of an Ergo dApp.
What we are going to do next is to mechanically create the buyOrder contract from the information given in the DEX flow card.
Recall that each script is a proposition (boolean valued expression) which should evaluate to true to allow spending of the box. When we have many conditions to be met at the same time we can combine them in a logical formula using the AND binary operation, and if we have alternatives (not necessarily exclusive) we can put them into the OR operation.
The buyOrder box has the alternative spending paths !cancel and !swap . Thus the ErgoScript code should have OR operation with two arguments - one for each spending path.
/** buyOrder contract */ { val cancelCondition = {} val swapCondition = {} cancelCondition || swapCondition } 
The formula for the cancelCondition expression is given in the !cancel spending path of the buyOrder box. We can directly include it in the script.
/** buyOrder contract */ { val cancelCondition = { buyer } val swapCondition = {} cancelCondition || swapCondition } 
For the !swap spending path of the buyOrder box the conditions are specified in the buyerOut output box of the Swap transaction. If we simply include them in the swapCondition then we get a syntactically incorrect script.
/** buyOrder contract */ { val cancelCondition = { buyer } val swapCondition = { tAmt: TID && R4 == bid.id && @contract } cancelCondition || swapCondition } 
We can however translate the conditions from the diagram syntax to ErgoScript expressions using the following simple rules
  1. [email protected] ==> val buyerOut = OUTPUTS(0)
  2. tAmt: TID ==> tid._2 == tAmt where tid = buyerOut.tokens(TID)
  3. R4 == bid.id ==> R4 == SELF.id where R4 = buyerOut.R4[Coll[Byte]].get
  4. script == buyer ==> buyerOut.propositionBytes == buyer.propBytes
Note, in the diagram TID represents a token id, but ErgoScript doesn't have access to the tokens by the ids so we cannot write tokens.getByKey(TID) . For this reason, when the diagram is translated into ErgoScript, TID becomes a named constant of the index in tokens collection of the box. The concrete value of the constant is assigned when the BuyOrder transaction with the buyOrder box is created. The correspondence and consistency between the actual tokenId, the TID constant and the actual tokens of the buyerOut box is ensured by the off-chain application code, which is completely possible since all of the transactions are created by the application using FlowCard as a guiding specification. This may sound too complicated, but this is part of the translation from diagram specification to actual executable application code, most of which can be automated.
After the transformation we can obtain a correct script which checks all the required preconditions for spending the buyOrder box.
/** buyOrder contract */ def DEX(buyer: Addrss, seller: Address, TID: Int, ergAmt: Long, tAmt: Long) { val cancelCondition: SigmaProp = { buyer } // verify buyer's sig (ProveDlog) val swapCondition = OUTPUTS.size > 0 && { // securing OUTPUTS access val buyerOut = OUTPUTS(0) // from [email protected] buyerOut.tokens.size > TID && { // securing tokens access val tid = buyerOut.tokens(TID) val regR4 = buyerOut.R4[Coll[Byte]] regR4.isDefined && { // securing R4 access val R4 = regR4.get tid._2 == tAmt && // from tAmt: TID R4 == SELF.id && // from R4 == bid.id buyerOut.propositionBytes == buyer.propBytes // from script == buyer } } } cancelCondition || swapCondition } 
A similar script for the sellOrder box can be obtained using the same translation rules. With the help of the tooling the code of contracts can be mechanically generated from the diagram specification.
Conclusions
Declarative programming models have already won the battle against imperative programming in many application domains like Big Data, Stream Processing, Deep Learning, Databases, etc. Ergo is pioneering the declarative model of dApp development as a better and safer alternative to the now popular imperative model of smart contracts.
The concept of FlowCard shifts the focus from writing ErgoScript contracts to the overall flow of values (hence the name), in such a way, that ErgoScript can always be generated from them. You will never need to look at the ErgoScript code once the tooling is in place.
Here are the possible next steps for future work:
  1. Storage format for FlowCard Spec and the corresponding EIP standardized file format (Json/XML/Protobuf). This will allow various tools (Diagram Editor, Runtime, dApps etc) to create and use *.flowcard files.
  2. FlowCard Viewer, which can generate the diagrams from *.flowcard files.
  3. FlowCard Runtime, which can run *.flowcard files, create and send transactions to Ergo network.
  4. FlowCard Designer Tool, which can simplify development of complex diagrams . This will make designing and validation of Ergo contracts a pleasant experience, more like drawing rather than coding. In addition, the correctness of the whole dApp scenario can be verified and controlled by the tooling.
submitted by Guilty_Pea to CryptoCurrencies [link] [comments]

Bitcoin JSON-RPC Tutorial 3 - bitcoin.conf - YouTube Blockain Bitcoin Payments - using PHP and blockchain API v2 Bitcoin API - Bitcoin, Crypto currency live and historical ... Bitcoin JSON-RPC Tutorial 1 Using the Blockchain API in Google Sheets

Blockchain APIs – Blockchain as a service (BaaS) To develop an application that relies on one or more Blockchain protocols, you need to hire Blockchain developers with experience in each of these Blockchain protocols, setup and secure the servers, sync the nodes, find a good and reliable library and integrate each Blockchain protocol separately. The API is structured in this way because after Blockchain.info took down their original Receive Payments API v1, many users were left without a merchant payment solution. We are now here to provide that solution to merchants like you. Feel free to use your existing code or applications to utilize our API; simply change your system's configured root API URL from "blockchain.info" to ... Bitcoin can take several days to sync to the current blockchain, so it is a good idea to setup the node in advance in order to test out the API. Additionally you will need to install Node.js which ... January 24, 2020. To understand the overall meaning of Blockchain API and how it can be applied, one must do a quick recap on the essence of API itself, even though if you are interested in this field, chances are pretty high that you have encountered this concept before. Blockchain.com Exchange-APIs Erstellen Sie kostenlos Bitcoin-Apps auf der Blockchain.com Exchange-API. Fordern Sie einen Exchange-API-Schlüssel an Anmeldung. Blockchain.com Exchange-APIs. Websockets Nutzen Sie die Websocket-API, um Marktdaten zu erhalten und in Echtzeit mit dem Handelssystem zu interagieren. Jede Nachricht kommt im JSON-Format und Handelsnachrichten verwenden den FIX-Standard ...

[index] [16412] [7038] [17080] [31952] [24317] [459] [48065] [49518] [5646] [23531]

Bitcoin JSON-RPC Tutorial 3 - bitcoin.conf - YouTube

This video demonstrates how to work with Blockchain.info's JSON data. In this example we display total amount received by an address and it's most recent transactions. BTC address ... Automatically download Blockchain data into Google Sheets. Quick and easy tutorial on how to use the Blockchain API in the Spreadstreet Google Sheets add-in. What it does: Used to get the bitcoin ... Building Bitcoin Websites - Working With Blockchain.info JSON Data - Duration: 19 ... Building Bitcoin Websites - Blockchain API 1 of 2 - Duration: 13:00. m1xolyd1an 36,957 views. 13:00 . How To ... Building Bitcoin Websites - Blockchain API 1 of 2 - Duration: 13:00. m1xolyd1an 36,798 views. 13:00 . How the blockchain is changing money and business Don Tapscott - Duration: 18:50. TED ... In this video I will show you how to import live data and Historical data for Bitcoin, Ethereum, Ripple and other 1384 coins from web to excel. Data is refre...

#