dogecoin

package
v0.0.0-...-410a110 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package dogecoin -

Package dogecoin -

Index

Constants

View Source
const (
	// MainNet represents the main dogecoin network.
	MainNet wire.BitcoinNet = 0xc0c0c0c0

	// TestNet3 represents the test network (version 3).
	TestNet3 wire.BitcoinNet = 0xdcb7c1fc
)

Constants used to indicate the message dogecoin network.

View Source
const (
	// Blockchain is Dogecoin.
	Blockchain string = "Dogecoin"

	// MainnetNetwork is the value of the network
	// in MainnetNetworkIdentifier.
	MainnetNetwork string = "Mainnet"

	// TestnetNetwork is the value of the network
	// in TestnetNetworkIdentifier.
	TestnetNetwork string = "Testnet3"

	// Decimals is the decimals value
	// used in Currency.
	Decimals = 8

	// SatoshisInBitcoin is the number of
	// Satoshis in 1 DOGE (10^8).
	SatoshisInBitcoin = 100000000

	// TransactionHashLength is the length
	// of any transaction hash in Dogecoin.
	TransactionHashLength = 64
)

Variables

View Source
var (
	// MainnetGenesisBlockIdentifier is the genesis block for mainnet.
	MainnetGenesisBlockIdentifier = &types.BlockIdentifier{
		Hash: "1a91e3dace36e2be3bf030a65679fe821aa1d6ef92e7c9902eb318182c355691",
	}

	// MainnetParams are the params for mainnet.
	MainnetParams = &MainNetParams

	// MainnetCurrency is the *types.Currency for mainnet.
	MainnetCurrency = &types.Currency{
		Symbol:   "DOGE",
		Decimals: Decimals,
	}

	// TestnetGenesisBlockIdentifier is the genesis block for testnet.
	TestnetGenesisBlockIdentifier = &types.BlockIdentifier{
		Hash: "bb0a78264637406b6360aad926284d544d7049f45189db5664f3c4d07350559e",
	}

	// TestnetParams are the params for testnet.
	TestnetParams = &TestNet3Params

	// TestnetCurrency is the *types.Currency for testnet.
	TestnetCurrency = &types.Currency{
		Symbol:   "DOGETEST",
		Decimals: Decimals,
	}
)
View Source
var MainNetParams = chaincfg.Params{
	Name:        "mainnet",
	Net:         MainNet,
	DefaultPort: "22556",
	DNSSeeds: []chaincfg.DNSSeed{
		{Host: "seed.multidoge.org", HasFiltering: true},
		{Host: "seed2.multidoge.org", HasFiltering: false},
	},

	GenesisBlock:             &genesisBlock,
	GenesisHash:              &genesisHash,
	PowLimit:                 mainPowLimit,
	PowLimitBits:             0x3bffffff,
	BIP0034Height:            1034383,
	BIP0065Height:            3464751,
	BIP0066Height:            1034383,
	CoinbaseMaturity:         240,
	SubsidyReductionInterval: 100000,
	TargetTimespan:           time.Minute,
	TargetTimePerBlock:       time.Minute,
	RetargetAdjustmentFactor: 4,
	ReduceMinDifficulty:      false,
	MinDiffReductionTime:     0,
	GenerateSupported:        false,

	Checkpoints: []chaincfg.Checkpoint{
		{Height: 0, Hash: newHashFromStr("bb0a78264637406b6360aad926284d544d7049f45189db5664f3c4d07350559e")},
		{Height: 483173, Hash: newHashFromStr("a804201ca0aceb7e937ef7a3c613a9b7589245b10cc095148c4ce4965b0b73b5")},
		{Height: 591117, Hash: newHashFromStr("5f6b93b2c28cedf32467d900369b8be6700f0649388a7dbfd3ebd4a01b1ffad8")},
		{Height: 658924, Hash: newHashFromStr("ed6c8324d9a77195ee080f225a0fca6346495e08ded99bcda47a8eea5a8a620b")},
		{Height: 703635, Hash: newHashFromStr("839fa54617adcd582d53030a37455c14a87a806f6615aa8213f13e196230ff7f")},
		{Height: 1000000, Hash: newHashFromStr("1fe4d44ea4d1edb031f52f0d7c635db8190dc871a190654c41d2450086b8ef0e")},
		{Height: 1202214, Hash: newHashFromStr("a2179767a87ee4e95944703976fee63578ec04fa3ac2fc1c9c2c83587d096977")},
		{Height: 1250000, Hash: newHashFromStr("b46affb421872ca8efa30366b09694e2f9bf077f7258213be14adb05a9f41883")},
		{Height: 1500000, Hash: newHashFromStr("0caa041b47b4d18a4f44bdc05cef1a96d5196ce7b2e32ad3e4eb9ba505144917")},
		{Height: 1750000, Hash: newHashFromStr("8042462366d854ad39b8b95ed2ca12e89a526ceee5a90042d55ebb24d5aab7e9")},
		{Height: 2000000, Hash: newHashFromStr("d6acde73e1b42fc17f29dcc76f63946d378ae1bd4eafab44d801a25be784103c")},
		{Height: 2250000, Hash: newHashFromStr("c4342ae6d9a522a02e5607411df1b00e9329563ef844a758d762d601d42c86dc")},
		{Height: 2500000, Hash: newHashFromStr("3a66ec4933fbb348c9b1889aaf2f732fe429fd9a8f74fee6895eae061ac897e2")},
		{Height: 2750000, Hash: newHashFromStr("473ea9f625d59f534ffcc9738ffc58f7b7b1e0e993078614f5484a9505885563")},
		{Height: 3062910, Hash: newHashFromStr("113c41c00934f940a41f99d18b2ad9aefd183a4b7fe80527e1e6c12779bd0246")},
	},

	RuleChangeActivationThreshold: 1900,
	MinerConfirmationWindow:       2000,
	Deployments: [chaincfg.DefinedDeployments]chaincfg.ConsensusDeployment{
		chaincfg.DeploymentTestDummy: {
			BitNumber:  28,
			StartTime:  1199145601,
			ExpireTime: 1230767999,
		},
		chaincfg.DeploymentCSV: {
			BitNumber:  0,
			StartTime:  1462060800,
			ExpireTime: 1493596800,
		},
		chaincfg.DeploymentSegwit: {
			BitNumber:  1,
			StartTime:  1479168000,
			ExpireTime: 0,
		},
	},

	RelayNonStdTxs: false,

	Bech32HRPSegwit: "doge",

	PubKeyHashAddrID:        0x1e,
	ScriptHashAddrID:        0x16,
	PrivateKeyID:            0x9e,
	WitnessPubKeyHashAddrID: 0x00,
	WitnessScriptHashAddrID: 0x00,

	HDPublicKeyID:  [4]byte{0x02, 0xfa, 0xca, 0xfd},
	HDPrivateKeyID: [4]byte{0x02, 0xfa, 0xc3, 0x98},

	HDCoinType: 3,
}

MainNetParams defines the network parameters for the main Bitcoin network.

View Source
var TestNet3Params = chaincfg.Params{
	Name:        "testnet3",
	Net:         TestNet3,
	DefaultPort: "44556",
	DNSSeeds: []chaincfg.DNSSeed{
		{Host: "testseed.jrn.me.uk", HasFiltering: false},
	},

	GenesisBlock:             &testNet3GenesisBlock,
	GenesisHash:              &testNet3GenesisHash,
	PowLimit:                 testNet3PowLimit,
	PowLimitBits:             0x3bffffff,
	BIP0034Height:            708658,
	BIP0065Height:            1854705,
	BIP0066Height:            708658,
	CoinbaseMaturity:         240,
	SubsidyReductionInterval: 100000,
	TargetTimespan:           time.Minute,
	TargetTimePerBlock:       time.Minute,
	RetargetAdjustmentFactor: 4,
	ReduceMinDifficulty:      true,
	MinDiffReductionTime:     time.Minute * 2,
	GenerateSupported:        false,

	Checkpoints: []chaincfg.Checkpoint{
		{Height: 0, Hash: newHashFromStr("bb0a78264637406b6360aad926284d544d7049f45189db5664f3c4d07350559e")},
		{Height: 483173, Hash: newHashFromStr("a804201ca0aceb7e937ef7a3c613a9b7589245b10cc095148c4ce4965b0b73b5")},
		{Height: 591117, Hash: newHashFromStr("5f6b93b2c28cedf32467d900369b8be6700f0649388a7dbfd3ebd4a01b1ffad8")},
		{Height: 658924, Hash: newHashFromStr("ed6c8324d9a77195ee080f225a0fca6346495e08ded99bcda47a8eea5a8a620b")},
		{Height: 703635, Hash: newHashFromStr("839fa54617adcd582d53030a37455c14a87a806f6615aa8213f13e196230ff7f")},
		{Height: 1000000, Hash: newHashFromStr("1fe4d44ea4d1edb031f52f0d7c635db8190dc871a190654c41d2450086b8ef0e")},
		{Height: 1202214, Hash: newHashFromStr("a2179767a87ee4e95944703976fee63578ec04fa3ac2fc1c9c2c83587d096977")},
		{Height: 1250000, Hash: newHashFromStr("b46affb421872ca8efa30366b09694e2f9bf077f7258213be14adb05a9f41883")},
		{Height: 1500000, Hash: newHashFromStr("0caa041b47b4d18a4f44bdc05cef1a96d5196ce7b2e32ad3e4eb9ba505144917")},
		{Height: 1750000, Hash: newHashFromStr("8042462366d854ad39b8b95ed2ca12e89a526ceee5a90042d55ebb24d5aab7e9")},
		{Height: 2000000, Hash: newHashFromStr("d6acde73e1b42fc17f29dcc76f63946d378ae1bd4eafab44d801a25be784103c")},
		{Height: 2250000, Hash: newHashFromStr("c4342ae6d9a522a02e5607411df1b00e9329563ef844a758d762d601d42c86dc")},
		{Height: 2500000, Hash: newHashFromStr("3a66ec4933fbb348c9b1889aaf2f732fe429fd9a8f74fee6895eae061ac897e2")},
		{Height: 2750000, Hash: newHashFromStr("473ea9f625d59f534ffcc9738ffc58f7b7b1e0e993078614f5484a9505885563")},
		{Height: 3062910, Hash: newHashFromStr("113c41c00934f940a41f99d18b2ad9aefd183a4b7fe80527e1e6c12779bd0246")},
	},

	RuleChangeActivationThreshold: 1900,
	MinerConfirmationWindow:       2000,
	Deployments: [chaincfg.DefinedDeployments]chaincfg.ConsensusDeployment{
		chaincfg.DeploymentTestDummy: {
			BitNumber:  28,
			StartTime:  1199145601,
			ExpireTime: 1230767999,
		},
		chaincfg.DeploymentCSV: {
			BitNumber:  0,
			StartTime:  1456790400,
			ExpireTime: 1493596800,
		},
		chaincfg.DeploymentSegwit: {
			BitNumber:  1,
			StartTime:  1462060800,
			ExpireTime: 0,
		},
	},

	RelayNonStdTxs: true,

	Bech32HRPSegwit: "tdge",

	PubKeyHashAddrID:        0x71,
	ScriptHashAddrID:        0xc4,
	PrivateKeyID:            0xf1,
	WitnessPubKeyHashAddrID: 0x00,
	WitnessScriptHashAddrID: 0x00,

	HDPublicKeyID:  [4]byte{0x04, 0x35, 0x87, 0xcf},
	HDPrivateKeyID: [4]byte{0x04, 0x35, 0x83, 0x94},

	HDCoinType: 1,
}

TestNet3Params defines the network parameters for the test Bitcoin network (version 3). Not to be confused with the regression test network, this network is sometimes simply called "testnet".

Functions

func LoadConfiguration

func LoadConfiguration(baseDirectory string) (*configuration.Configuration, error)

LoadConfiguration attempts to create a new Configuration using the ENVs in the environment.

func StartDogecoind

func StartDogecoind(ctx context.Context, configPath string, g *errgroup.Group) error

StartDogecoind starts a dogecoin daemon in another goroutine and logs the results to the console.

Types

This section is empty.

Jump to

Keyboard shortcuts

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