Skip to content
Snippets Groups Projects
  • Angelo Capossele's avatar
    ed435f7d
    Adds a HTTP API to query and create transactions (#95) · ed435f7d
    Angelo Capossele authored
    * :art: moves all webapi into one
    
    * :art: adds public key log
    
    * :art: changes txRequest to getTrytes
    
    * :art: rename packages
    
    * :pencil: adds comments
    
    * :art: changes status to error
    
    * :recycle: removes duration from API - getTrytes converts trits to trytes - set default spammer TPS to 1
    
    Fix: Allow starting a node with gossip disabled (#97)
    
    * fix: remove selection flag and use gossip plugin
    
    * Upgrade hive.go
    
    feat: improve logging
    
    feat: improve analysis status
    
    chore: remove unused packages (#99)
    
    Fix: Use docker specific config (#100)
    
    * Use docker specific config
    
    * Format JSON
    
    :heavy_minus_sign: removes status
    
    :art: adds omitempty
    
    :lipstick: updates style import
    
    :sparkles: adds getNeighbors API
    
    :sparkles: adds getTransaction
    
    :heavy_minus_sign: removes addEndpoint
    
    * :construction: WIP
    
    * :construction: WIP
    
    * :sparkles: adds txs per address
    
    * :sparkles: adds findTransactions API
    ed435f7d
    History
    Adds a HTTP API to query and create transactions (#95)
    Angelo Capossele authored
    * :art: moves all webapi into one
    
    * :art: adds public key log
    
    * :art: changes txRequest to getTrytes
    
    * :art: rename packages
    
    * :pencil: adds comments
    
    * :art: changes status to error
    
    * :recycle: removes duration from API - getTrytes converts trits to trytes - set default spammer TPS to 1
    
    Fix: Allow starting a node with gossip disabled (#97)
    
    * fix: remove selection flag and use gossip plugin
    
    * Upgrade hive.go
    
    feat: improve logging
    
    feat: improve analysis status
    
    chore: remove unused packages (#99)
    
    Fix: Use docker specific config (#100)
    
    * Use docker specific config
    
    * Format JSON
    
    :heavy_minus_sign: removes status
    
    :art: adds omitempty
    
    :lipstick: updates style import
    
    :sparkles: adds getNeighbors API
    
    :sparkles: adds getTransaction
    
    :heavy_minus_sign: removes addEndpoint
    
    * :construction: WIP
    
    * :construction: WIP
    
    * :sparkles: adds txs per address
    
    * :sparkles: adds findTransactions API
main.go 2.24 KiB
package main

import (
	"net/http"
	_ "net/http/pprof"

	"github.com/iotaledger/goshimmer/plugins/analysis"
	"github.com/iotaledger/goshimmer/plugins/autopeering"
	"github.com/iotaledger/goshimmer/plugins/bundleprocessor"
	"github.com/iotaledger/goshimmer/plugins/cli"
	"github.com/iotaledger/goshimmer/plugins/dashboard"
	"github.com/iotaledger/goshimmer/plugins/gossip"
	"github.com/iotaledger/goshimmer/plugins/gracefulshutdown"
	"github.com/iotaledger/goshimmer/plugins/graph"
	"github.com/iotaledger/goshimmer/plugins/metrics"
	"github.com/iotaledger/goshimmer/plugins/statusscreen"
	statusscreen_tps "github.com/iotaledger/goshimmer/plugins/statusscreen-tps"
	"github.com/iotaledger/goshimmer/plugins/tangle"
	"github.com/iotaledger/goshimmer/plugins/tipselection"
	"github.com/iotaledger/goshimmer/plugins/ui"
	"github.com/iotaledger/goshimmer/plugins/webapi"
	webapi_broadcastData "github.com/iotaledger/goshimmer/plugins/webapi/broadcastData"
	webapi_findTransactions "github.com/iotaledger/goshimmer/plugins/webapi/findTransactions"
	webapi_getNeighbors "github.com/iotaledger/goshimmer/plugins/webapi/getNeighbors"
	webapi_getTransactions "github.com/iotaledger/goshimmer/plugins/webapi/getTransactions"
	webapi_getTrytes "github.com/iotaledger/goshimmer/plugins/webapi/getTrytes"
	webapi_gtta "github.com/iotaledger/goshimmer/plugins/webapi/gtta"
	webapi_spammer "github.com/iotaledger/goshimmer/plugins/webapi/spammer"
	"github.com/iotaledger/goshimmer/plugins/webauth"
	"github.com/iotaledger/goshimmer/plugins/zeromq"
	"github.com/iotaledger/hive.go/node"
)

func main() {
	cli.LoadConfig()

	go http.ListenAndServe("localhost:6060", nil) // pprof Server for Debbuging Mutexes

	node.Run(
		node.Plugins(
			cli.PLUGIN,
			autopeering.PLUGIN,
			gossip.PLUGIN,
			tangle.PLUGIN,
			bundleprocessor.PLUGIN,
			analysis.PLUGIN,
			gracefulshutdown.PLUGIN,
			tipselection.PLUGIN,
			zeromq.PLUGIN,
			dashboard.PLUGIN,
			metrics.PLUGIN,

			statusscreen.PLUGIN,
			statusscreen_tps.PLUGIN,

			webapi.PLUGIN,
			webapi_gtta.PLUGIN,
			webapi_spammer.PLUGIN,
			webapi_broadcastData.PLUGIN,
			webapi_getTrytes.PLUGIN,
			webapi_getTransactions.PLUGIN,
			webapi_findTransactions.PLUGIN,
			webapi_getNeighbors.PLUGIN,

			ui.PLUGIN,
			webauth.PLUGIN,

			graph.PLUGIN,
		),
	)
}