config

package
v0.0.0-...-73b05ea Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TomoAmountPrecision = 7
)

Variables

View Source
var EmptyAddress = common.HexToAddress("0x0")

Functions

This section is empty.

Types

type BitcoinConfig

type BitcoinConfig struct {
	MasterPublicKey string `mapstructure:"master_public_key"`
	// Minimum value of transaction accepted by Bifrost in BTC.
	// Everything below will be ignored.
	MinimumValueBtc string `mapstructure:"minimum_value_btc"`
	// TokenPrice is a price of one token in BTC
	TokenPrice string `mapstructure:"token_price"`
	// Host only
	RpcServer string `mapstructure:"rpc_server"`
	RpcUser   string `mapstructure:"rpc_user"`
	RpcPass   string `mapstructure:"rpc_pass"`

	// Block number to confirm
	ConfirmedBlockNumber uint64 `mapstructure:"confirmed_block_number"`

	// Is testnet or mainnet
	Testnet bool `mapstructure:"testnet"`
}

type Config

type Config struct {
	Ethereum  *EthereumConfig  `mapstructure:"ethereum"`
	Bitcoin   *BitcoinConfig   `mapstructure:"bitcoin"`
	Tomochain *TomochainConfig `mapstructure:"tomochain"`
}

type EthereumConfig

type EthereumConfig struct {
	NetworkID       string `mapstructure:"network_id"`
	MasterPublicKey string `mapstructure:"master_public_key"`
	// Minimum value of transaction accepted by Bifrost in ETH.
	// Everything below will be ignored.
	MinimumValueEth string `mapstructure:"minimum_value_eth"`
	// TokenPrice is a price of one token in ETH
	TokenPrice string `mapstructure:"token_price"`
	// Host only
	RpcServer string `mapstructure:"rpc_server"`

	// Block number to confirm
	ConfirmedBlockNumber uint64 `mapstructure:"confirmed_block_number"`
}

type TomochainConfig

type TomochainConfig struct {
	// TokenAssetCode is asset code of token that will be purchased using ETH.
	TokenAssetCode string `mapstructure:"token_asset_code"`
	// IssuerPublicKey is public key of the assets issuer.
	IssuerPublicKey string `mapstructure:"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, this is via smart contract.
	DistributionPublicKey string `mapstructure:"distribution_public_key"`
	// SignerPrivateKey is:
	// * Distribution's secret key if only one instance of Bifrost is deployed.
	// Signer's sequence number will be consumed in transaction's sequence number.
	SignerPrivateKey string `mapstructure:"signer_private_key"`
	// StartingBalance is the starting amount of TOKEN for newly created accounts.
	// Default value is 41. Increase it if you need Data records / other custom entities on new account.
	StartingBalance string `mapstructure:"starting_balance"`
	// LockUnixTimestamp defines unix timestamp when user account will be unlocked.
	LockUnixTimestamp uint64 `mapstructure:"lock_unix_timestamp"`
	// contains filtered or unexported fields
}

func (*TomochainConfig) GetPrivateKey

func (c *TomochainConfig) GetPrivateKey() *ecdsa.PrivateKey

func (*TomochainConfig) GetPublicKey

func (c *TomochainConfig) GetPublicKey() common.Address

Jump to

Keyboard shortcuts

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