config

package
v0.0.0-...-5d8db7d Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Port                           int             `valid:"required"`
	UsingProxy                     bool            `valid:"optional" toml:"using_proxy"`
	Bitcoin                        *bitcoinConfig  `valid:"optional" toml:"bitcoin"`
	Ethereum                       *ethereumConfig `valid:"optional" toml:"ethereum"`
	AccessControlAllowOriginHeader string          `valid:"optional" toml:"access_control_allow_origin_header"`

	Stellar struct {
		Horizon           string `valid:"required" toml:"horizon"`
		NetworkPassphrase string `valid:"required" toml:"network_passphrase"`
		// TokenAssetCode is asset code of token that will be purchased using BTC or ETH.
		TokenAssetCode string `valid:"required" toml:"token_asset_code"`
		// NeedsAuthorize should be set to true if issuers's authorization required flag is set.
		NeedsAuthorize bool `valid:"optional" toml:"needs_authorize"`
		// IssuerPublicKey is public key of the assets issuer.
		IssuerPublicKey string `valid:"required,stellar_accountid" toml:"issuer_public_key"`
		// DistributionPublicKey is public key of the distribution account.
		// Distribution account can be the same account as issuer account however it's recommended
		// to use a separate account.
		// Distribution account is also used to fund new accounts.
		DistributionPublicKey string `valid:"required,stellar_accountid" toml:"distribution_public_key"`
		// SignerSecretKey is:
		// * Distribution's secret key if only one instance of Bifrost is deployed.
		// * Channel's secret key of Distribution account if more than one instance of Bifrost is deployed.
		// https://www.stellar.org/developers/guides/channels.html
		// Signer's sequence number will be consumed in transaction's sequence number.
		SignerSecretKey string `valid:"required,stellar_seed" toml:"signer_secret_key"`
		// StartingBalance is the starting amount of XLM for newly created accounts.
		// Default value is 41. Increase it if you need Data records / other custom entities on new account.
		StartingBalance string `valid:"optional,stellar_amount" toml:"starting_balance"`
		// LockUnixTimestamp defines unix timestamp when user account will be unlocked.
		LockUnixTimestamp uint64 `valid:"optional" toml:"lock_unix_timestamp"`
	} `valid:"required" toml:"stellar"`
	Database struct {
		Type string `valid:"matches(^postgres$)"`
		DSN  string `valid:"required"`
	} `valid:"required"`
}

func (Config) SignerPublicKey

func (c Config) SignerPublicKey() string

Jump to

Keyboard shortcuts

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