config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const UnsupportedChain = "Unsupport chain"
View Source
const UnsupportedOperation = UnsupportedChain

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Server   Server   `yaml:"server"`
	Fullnode Fullnode `yaml:"fullnode"`
	NetWork  string   `yaml:"network"`
	Chains   []string `yaml:"chains"`
}

Config instance define

func New

func New(path string) (*Config, error)

Setup init config

type Fullnode

type Fullnode struct {
	Btc Node       `yaml:"btc"`
	Eth Node       `yaml:"eth"`
	Trx Node       `yaml:"trx"`
	Sol SolanaNode `yaml:"solana"`
}

Fullnode define

type NetWorkType

type NetWorkType int
const (
	MainNet NetWorkType = iota
	TestNet
	RegTest
)

type Node

type Node struct {
	RPCs          []*RPC `yaml:"rpcs"`
	TpApiUrl      string `yaml:"tp_api_url"`
	TpApiKey      string `yaml:"tp-api-key"`
	Confirmations uint64 `yaml:"confirmations"`
}

type RPC

type RPC struct {
	RPCURL  string `yaml:"rpc_url"`
	RPCUser string `yaml:"rpc_user"`
	RPCPass string `yaml:"rpc_pass"`
}

RPC connection info define

type Server

type Server struct {
	Port string `yaml:"port"`
}

Server prot

type SolanaNode

type SolanaNode struct {
	PublicUrl        string `yaml:"public_url"`
	NetWork          string `yaml:"network"`
	NonceAccountAddr string `yaml:"NonceAccountAddr"`
	FeeAccountPriKey string `yaml:"FeeAccountPriKey"`
}

Jump to

Keyboard shortcuts

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