network

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(cfg *types.NetworkConfig, encodingConfig params.EncodingConfig) (*Client, error)

func (*Client) GetBalance

func (n *Client) GetBalance(user string) (sdk.Coins, error)

GetBalance returns the balance of the given user

func (*Client) GetDiscordRole

func (n *Client) GetDiscordRole(username string) (disgord.Snowflake, error)

GetDiscordRole returns the role that should be assigned to the Discord user having the given username, based on the fact that they have connected their Discord account to a validator or user Desmos Profile

func (*Client) ParseAddress

func (n *Client) ParseAddress(address string) (sdk.AccAddress, error)

ParseAddress parses the given address as a sdk.AccAddress instance

func (*Client) RefreshRoles added in v0.3.0

func (n *Client) RefreshRoles(s disgord.Session) error

RefreshRoles refreshes the roles of all the members based on their verification system

func (*Client) SendTokens

func (n *Client) SendTokens(user string, amount int64) (*sdk.TxResponse, error)

SendTokens sends the specified amount of tokens to the provided user

func (*Client) UploadDataToThemis

func (n *Client) UploadDataToThemis(username string, data *sign.SignatureData) error

UploadDataToThemis uploads the given data to Themis

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL