Skip to content

About

Package which simply broadcasting messages to cosmos based blockchain node

Resources

Stars

0 stars

Watchers

2 watching

Forks

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

broadcaster

img img

Package which simplifies broadcasting messages to decentr blockchain node

Example

import (
    . "github.com/Decentr-net/decentr/testutil"
    communitytypes "github.com/Decentr-net/decentr/x/community/types"
    "github.com/Decentr-net/go-broadcaster"
)

func main() {
	b, err := broadcaster.New(Config{
		KeyringRootDir:     "~/.decentr",
		KeyringBackend:     "test",
		KeyringPromptInput: "",
		NodeURI:            "http://localhost:26657",
		BroadcastMode:      "sync",
		From:               "jack",
		ChainID:            "local",
	})
	if err != nil {
		panic(err)
	}

	if _, err := b.BroadcastMsg(&communitytypes.MsgFollow{
		Owner: b.From(),
		Whom:  NewAccAddress(),
	}, "follow me back"); err != nil {
		panic(err)
	}
}

About

Package which simply broadcasting messages to cosmos based blockchain node

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages