genesysgo

package
v0.0.0-...-e4fabe8 Latest Latest
Warning

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

Go to latest
Published: May 11, 2022 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TokenURL = "https://auth.genesysgo.net/auth/realms/RPCs/protocol/openid-connect/token"

	MainNetBeta = rpc.Cluster{
		Name: rpc.MainNetBeta.Name,
		RPC:  "https://only1.genesysgo.net",
		WS:   "ws://only1.genesysgo.net",
	}

	DevNet = rpc.Cluster{
		Name: rpc.DevNet.Name,
		RPC:  "https://psytrbhymqlkfrhudd.dev.genesysgo.net:8899",
		WS:   "ws://psytrbhymqlkfrhudd.dev.genesysgo.net:8899",
	}

	ErrInvalidToken = errors.New("invalid token")
)

Functions

func GetToken

func GetToken(ctx context.Context, authToken string) (*oauth2.Token, error)

RFC2617 authToken - clientID:clientSecret encoded in base64 Please use the following instruction in order to generate a new token: https://genesysgo.medium.com/a-primer-to-genesysgo-network-auth-a3c678a9dc2a

func NewRPCClient

func NewRPCClient(endpoint string, authToken string) *rpc.Client

RFC2617 authToken - clientID:clientSecret encoded in base64 Please use the following instruction in order to generate a new token: https://genesysgo.medium.com/a-primer-to-genesysgo-network-auth-a3c678a9dc2a

Types

This section is empty.

Jump to

Keyboard shortcuts

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