aklib

package module
v0.0.0-...-3927449 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2019 License: MIT Imports: 1 Imported by: 7

README

Build Status GitHub license GoDoc Coverage Status Go Report Card

aklib

Overview

This library is for managing AidosKuneen features including

Requirements

  • git
  • go 1.9+

are required to compile this.

Installation

 $ go get github.com/AidosKuneen/aklib

Contribution

Improvements to the codebase and pull requests are encouraged.

Dependencies and Licenses

This software includes the work that is distributed in the Apache License 2.0.

github.com/AidosKuneen/bliss/bit                          MIT License
github.com/AidosKuneen/consensus                          MIT License
github.com/AidosKuneen/cuckoo                             MIT License
github.com/AidosKuneen/numcpu                             MIT License
github.com/AndreasBriese/bbloom                           MIT License, Public Domain
github.com/blang/semver                                   MIT License
github.com/cloudflare/sidh                                BSD 3-clause "New" or "Revised" License / MIT License
github.com/dgraph-io/badger                               Apache License 2.0
github.com/dgryski/go-farm                                MIT License
github.com/golang/protobuf/proto                          BSD 3-clause "New" or "Revised" License
github.com/google/go-github/github                        BSD 3-clause "New" or "Revised" License 
github.com/google/go-querystring/query                    BSD 3-clause "New" or "Revised" License
github.com/henrydcase/nobs/hash/sha3                      BSD 3-clause "New" or "Revised" License
github.com/inconshreveable/go-update                      Apache License, Version 2
github.com/inconshreveable/go-update/internal/binarydist  MIT License
github.com/inconshreveable/go-update/internal/osext       BSD 3-clause "New" or "Revised" License
github.com/pkg/errors                                     BSD 2-clause "Simplified" License
github.com/rhysd/go-github-selfupdate/selfupdate          MIT License
github.com/tcnksm/go-gitconfig                            MIT License
github.com/ulikunitz/xz                                   BSD 3-clause "New" or "Revised" License
github.com/vmihailenco/msgpack/codes                      BSD 2-clause "Simplified" License
golang.org/x/crypto                                       BSD 3-clause "New" or "Revised" License 
golang.org/x/net                                          BSD 3-clause "New" or "Revised" License 
golang.org/x/oauth2/internal                              BSD 3-clause "New" or "Revised" License
golang.org/x/sys                                          BSD 3-clause "New" or "Revised" License 
Golang Standard Library                                   BSD 3-clause License

Documentation

Index

Constants

View Source
const (
	//ADK is for converting 1 ADK to unit in transactions.
	ADK = 100000000
	//ADKSupply is total supply of ADK.
	ADKSupply uint64 = 25 * 1000000 * ADK
)

Variables

View Source
var (
	//MainConfig is a Config for MainNet
	MainConfig = &Config{
		Name:                "mainnet",
		Easiness:            0x7fffffff,
		TicketEasiness:      0x0007ffff,
		PrefixPriv:          []byte{0x1d, 0x49},
		PrefixAdrs:          []byte{0xab, 0x55},
		PrefixMsig:          []byte{0x67, 0xbc},
		PrefixNkey:          []byte{0x20, 0x62},
		PrefixNode:          []byte{0x5a, 0x37},
		PrefixOTA:           []byte{0x10, 0xce},
		DefaultPort:         14270,
		DefaultRPCPort:      14271,
		DefaultExplorerPort: 8081,
		DNS: []SRV{
			{
				Service: "seeds",
				Name:    "aidoskuneen.com",
			},
		},
		MessageMagic: 0xD3AB9E77,
		Genesis: map[string]uint64{
			"AKADRSM1cCn6Kd1YoKXa4zmZqBKFqFVLnj8w27Rqonzo3fACYoA2cxzct": ADKSupply,
		},
		WalletServers: []string{
			"http://78.46.193.200:14271",
			"http://78.47.29.65:14271",
		},
	}
	//TestConfig is a Config for TestNet
	TestConfig = &Config{
		Name:                "testnet",
		Easiness:            0x7fffffff,
		TicketEasiness:      0x00ffffff,
		PrefixPriv:          []byte{0x1d, 0x64},
		PrefixAdrs:          []byte{0xac, 0x08},
		PrefixMsig:          []byte{0x68, 0x6f},
		PrefixNkey:          []byte{0x20, 0x7d},
		PrefixNode:          []byte{0x5a, 0xea},
		PrefixOTA:           []byte{0x10, 0xe4},
		DefaultPort:         14370,
		DefaultRPCPort:      14371,
		DefaultExplorerPort: 8082,
		DNS: []SRV{
			{
				Service: "testnetseeds",
				Name:    "aidoskuneen.com",
			},
		},
		MessageMagic: 0xD9CBA322,
		Genesis: map[string]uint64{
			"AKADRST1zateckCRSGvzABqsJrzApWX4NRJSYP193AD8Z2sBbdCmSk2tz": ADKSupply,
		},
		WalletServers: []string{
			"http://78.46.250.88:14371",
		},
	}
	//DebugConfig is a Config for debug
	DebugConfig = &Config{
		Name:                "debug",
		Easiness:            0xffffffff,
		TicketEasiness:      0xffffffff,
		PrefixPriv:          []byte{0x1d, 0x24},
		PrefixAdrs:          []byte{0xaa, 0x67},
		PrefixMsig:          []byte{0x66, 0xcd},
		PrefixNkey:          []byte{0x20, 0x3e},
		PrefixNode:          []byte{0x59, 0x48},
		PrefixOTA:           []byte{0x10, 0xb1},
		DefaultPort:         14470,
		DefaultRPCPort:      14471,
		DefaultExplorerPort: 8083,
		DNS: []SRV{
			{
				Service: "testnetseeds",
				Name:    "aidoskuneen.com",
			},
		},
		MessageMagic: 0xD4E9BF30,
		Genesis: map[string]uint64{
			"AKADRSD4HSext48uT6cibWYoQQj6pvtVgLkQo61wbiToSKfeSi2inrMUU": ADKSupply,
		},
		WalletServers: []string{
			"http://78.46.250.88:14471",
		},
	}
)

Configs is a list of nets.

Functions

This section is empty.

Types

type Config

type Config struct {
	Name           string
	Easiness       uint32
	TicketEasiness uint32
	PrefixPriv     []byte
	PrefixAdrs     []byte
	PrefixMsig     []byte
	PrefixNkey     []byte
	PrefixNode     []byte
	PrefixOTA      []byte

	DefaultPort         uint16
	DefaultRPCPort      uint16
	DefaultExplorerPort uint16

	DNS          []SRV
	MessageMagic uint32
	Genesis      map[string]uint64

	WalletServers []string
}

Config is settings for various parameters.

type DBConfig

type DBConfig struct {
	DB     *bolt.DB `json:"-"`
	Config *Config  `json:"-"`
}

DBConfig is a set of config for db.

type SRV

type SRV struct {
	Service string
	Name    string
}

SRV is a param for SRVLookup

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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