Coder Social home page Coder Social logo

woc-plugins-example's Introduction

woc-plugins-example

This project contains different WhatsOnChain plugin examples. To learn more about plugins click here

Prerequisites

Node.js 18.14.2 or above

Installation

  1. Clone this repo using git clone https://github.com/TAAL-GmbH/woc-plugins-example.git
  2. Move to the directory: cd woc-plugins-example
  3. Run cp .env.template .env
  4. Run npm i in order to install dependencies
  5. Run npm start.

You will now be able to run the examples below.

Examples

Transaction type plugins

Block type plugin

Address type plugin

Script type plugin

Search type plugin

Data decoder plugin

How to test the plugin on whatsonchain.com

  1. Go to https://whatsonchain.com/ and then select 'Manage Plugins' link from the tools menu.
  2. For this example select 'Block' from the decoder type drop down.
  3. For this example lets name the plugin 'Block Anim'.
  4. For the webhook url field use the following placeholder url http://localhost:3000/block-decode/{network}/anim/{blockhash} (Make sure you have the application running locally. In reality this will be the using the deployed url rather then running from localhost).
  5. For the preview hash use an actual blockhash from mainnet. For this example you can use: 000000000000000002c7b29b04ec4431c380751463c6b3cb23f6fad414de8fe7.
  6. The remaining fields you can fill in however you wish.
  7. Make sure you have the example application running and then select the save button. You should be able to see a preview.

If you go to the any block page like https://whatsonchain.com/block-height/782095 you should now see a tab called 'Block Anim' which will allow you to view the decoder. As information is stored in local storage only you can view this on the browser you added the plugin to.

Publishing the plugin

To make this plugin accessible to all user's on WhatsOnchain the decoder application will need to be published (Assuming at this point that your application is already deployed). You can then follow the instructions on how to publish by going to 'manage plugins' link on WhatsOnchain then clicking on the burger menu icon to the right of the plugin menu item named 'Block Anim' and selecting publish.

All the instructions will be presented to you on how to then publish the plugin.

woc-plugins-example's People

Contributors

waqas64 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.