Skip to content
Snippets Groups Projects
Select Git revision
  • 58bdc6fb3871626af29070383fcc70bbf43a421a
  • without_tipselection default
  • develop protected
  • fix/grafana-local-dashboard
  • wasp
  • fix/dashboard-explorer-freeze
  • master
  • feat/timerqueue
  • test/sync_debug_and_650
  • feat/sync_revamp_inv
  • wip/sync
  • tool/db-recovery
  • portcheck/fix
  • fix/synchronization
  • feat/new-dashboard-analysis
  • feat/refactored-analysis-dashboard
  • feat/new-analysis-dashboard
  • test/demo-prometheus-fpc
  • prometheus_metrics
  • wip/analysis-server
  • merge/fpc-test-value-transfer
  • v0.2.2
  • v0.2.1
  • v0.2.0
  • v0.1.3
  • v0.1.2
  • v0.1.1
  • v0.1.0
28 results

data.go

Blame
  • data.go 454 B
    package client
    
    import (
    	"net/http"
    
    	webapi_data "github.com/iotaledger/goshimmer/plugins/webapi/data"
    )
    
    const (
    	routeData = "data"
    )
    
    // Data sends the given data (payload) by creating a message in the backend.
    func (api *GoShimmerAPI) Data(data []byte) (string, error) {
    
    	res := &webapi_data.Response{}
    	if err := api.do(http.MethodPost, routeData,
    		&webapi_data.Request{Data: data}, res); err != nil {
    		return "", err
    	}
    
    	return res.ID, nil
    }