Version: v0.8.2 Latest Latest

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

Go to latest
Published: Jun 11, 2019 License: AGPL-3.0 Imports: 2 Imported by: 0



Package constants declares system-wide constants.



View Source
const (
	// DebugMode is a flag to indicate whether the application is in debug mode.
	// If disabled some options won't be available
	DebugMode = true

	// NonceLength indicates number of bytes used for any nonces.
	NonceLength = 16 // 128 bits - should be more than enough


View Source
var (
	// SpentZetaPrefix represents prefix for each zeta in the database to indicate it has been spent.
	SpentZetaPrefix = []byte("SpentZeta")

	// AggregateVkKey represents the database entry for the aggregate verification key of the threshold number
	// of issuing authorities of the system. It is used for credential verification.
	AggregateVkKey = []byte("AggregateVerificationKey")

	// IaKeyPrefix represents the prefix for particular issuing authority to store their keys.
	IaKeyPrefix = []byte("IssuingAuthority")

	// EthereumWatcherKeyPrefix represents the prefix for storing public keys of trusted watchers.
	EthereumWatcherKeyPrefix = []byte("EthereumWatcher")

	// AccountsPrefix represents prefix for each account in the database to indicate amount of associated tokens.
	AccountsPrefix = []byte("account")

	// CoconutHsKey represents the database entry for the EC points of G1 as defined by
	// the public, system-wide coconut parameters.
	CoconutHsKey = []byte("coconutHs")

	// SeenNoncePrefix represents prefix for each seen nonce in the database.
	SeenNoncePrefix = []byte("NONCE")

	// CredentialRequestKeyPrefix represents prefix attached to key field of kvpair in the tags of response
	// to a successful request to transfer tokens to the pipe account.
	CredentialRequestKeyPrefix = []byte("GETCREDENTIAL")

	// EthereumWatcherNotificationPrefix represents prefix for database entry
	// to indicate given watcher has already notified about particular transfer.
	EthereumWatcherNotificationPrefix = []byte("HOLDTRANSFNOTIF")

	// PipeAccountTransferNotificationCountKeyPrefix represents prefix for the key for number of watchers
	// confirming given transfer
	PipeAccountTransferNotificationCountKeyPrefix = []byte("COUNT HODLTRANSFNOTIF")

	// WatcherThresholdKey represents key under which watcher threshold as initially set in genesis state is stored.
	WatcherThresholdKey = []byte("WatcherThreshold")

	// PipeContractKey represents key under which address of the pipe account
	// as initially set in genesis state is stored.
	PipeContractKey = []byte("PipeContractAddress")

	// HashFunction defines a hash function used during signing and verification of messages sent to tendermint chain
	HashFunction = ethcrypto.Keccak256

	// ErrNotInDebug indicates error thrown when trying to access functionalities only available in debug mode
	ErrNotInDebug = errors.New("could not proceed with request. App is not in debug mode")

nolint: gochecknoglobals


This section is empty.


This section is empty.

Jump to

Keyboard shortcuts

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