common

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintlnJSON

func PrintlnJSON(data interface{}) error

Types

type Company

type Company struct {
	// Unique company identifier on a Katena network
	BcId string

	// Dummy users with their keys to sign transactions
	Ed25519Keys map[string]*Key
}

type Key

type Key struct {
	Id            string
	PrivateKeyStr string
}

type KeyPair

type KeyPair struct {
	PrivateKeyStr string
	PublicKeyStr  string
}

type OffChain

type OffChain struct {
	// Dummy users with their keys to sign off-chain data
	Ed25519Keys map[string]*KeyPair

	// Dummy users with their keys to seal/open nacl boxes to share secret information
	X25519Keys map[string]*KeyPair
}

type Settings

type Settings struct {
	// API url to dialogue with a Katena network
	ApiUrl string

	// Katena network id
	ChainId string

	// Number of transactions the API should return
	TxPerPage int

	// Dummy company committed on chain
	Company *Company

	// Sample transaction ids used in examples
	// If one id is already used on the Katena test network, feel free to change these values in DefaultSettings below
	CertificateId string
	SecretId      string
	KeyId         string

	// Off chain samples data to do off chain operations
	OffChain *OffChain
}

func DefaultSettings

func DefaultSettings() *Settings

Jump to

Keyboard shortcuts

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